static int Open( vlc_object_t *p_this )
{
sout_access_out_t *p_access = (sout_access_out_t*)p_this; if( !( p_access->p_sys = malloc( sizeof( sout_access_out_sys_t ) ) ) )
{
msg_Err( p_access, "out of memory" );
return( VLC_EGENERIC );
} if( !p_access->psz_name )
{
msg_Err( p_access, "no file name specified" );
return VLC_EGENERIC;
}
if( !strcmp( p_access->psz_name, "-" ) )
{
p_access->p_sys->i_handle = STDOUT_FILENO; //编译不过去, 没定义的标识符, VC下如何改
msg_Dbg( p_access, "using stdout" ); }
else if( ( p_access->p_sys->i_handle =
open( p_access->psz_name, O_WRONLY|O_CREAT|O_TRUNC,
S_IWRITE | S_IREAD | S_IRGRP | S_IROTH ) ) == -1 )
{
msg_Err( p_access, "cannot open `%s'", p_access->psz_name );
free( p_access->p_sys );
return( VLC_EGENERIC );
} p_access->pf_write = Write;
p_access->pf_seek = Seek; msg_Info( p_access, "Open: name:`%s'", p_access->psz_name );
return VLC_SUCCESS;
}
{
sout_access_out_t *p_access = (sout_access_out_t*)p_this; if( !( p_access->p_sys = malloc( sizeof( sout_access_out_sys_t ) ) ) )
{
msg_Err( p_access, "out of memory" );
return( VLC_EGENERIC );
} if( !p_access->psz_name )
{
msg_Err( p_access, "no file name specified" );
return VLC_EGENERIC;
}
if( !strcmp( p_access->psz_name, "-" ) )
{
p_access->p_sys->i_handle = STDOUT_FILENO; //编译不过去, 没定义的标识符, VC下如何改
msg_Dbg( p_access, "using stdout" ); }
else if( ( p_access->p_sys->i_handle =
open( p_access->psz_name, O_WRONLY|O_CREAT|O_TRUNC,
S_IWRITE | S_IREAD | S_IRGRP | S_IROTH ) ) == -1 )
{
msg_Err( p_access, "cannot open `%s'", p_access->psz_name );
free( p_access->p_sys );
return( VLC_EGENERIC );
} p_access->pf_write = Write;
p_access->pf_seek = Seek; msg_Info( p_access, "Open: name:`%s'", p_access->psz_name );
return VLC_SUCCESS;
}
解决方案 »
- 求救,有关richedit插入图片的问题
- 用API改变拥有者窗口,可以做到么?
- 关于在2个不同进程里对话框效果显示的问题
- 关于如何取得系统进程所属用户
- 关于gridCtrl的痛苦至死的问题(本人已受尽折磨)(有关画图板)
- 高分求教:怎样得到工具栏的框架父窗口的消息?
- 新的错误
- 计算机启动 ---> 我用自己的程序写COM 端口时会出错 ---->用别人用VB写好的COM调试程序试写端口时不会出错 -----> 再用我的程序写端口不
- 在2002年年底之前终于完成了 计算机原理组成的课程设计 高兴散分 (这可是第一次散发哦)
- 怎样在文件里查找特定的字符串?(定位查找)
- 为什么我要枚举字体时,不进入函数来啊
- CTreeCtrl的Bug???谢谢关注!!!
stdin
stdout
VC7 下好像找不到