C# directshow 问题

wolf_Knight 2010-04-07 10:13:41

Type comtype = null;
object comobj = null;
comtype = Type.GetTypeFromCLSID( Clsid.FilterGraph );
if( comtype == null )
throw new NotSupportedException( "DirectX (8.1 or higher) not installed?" );
comobj = Activator.CreateInstance( comtype );
graphBuilder = (IGraphBuilder) comobj; comobj = null;
int hr = graphBuilder.RenderFile( clipFile, null );
if( hr < 0 )
Marshal.ThrowExceptionForHR( hr );
.......后面代码就不写了........


如上代码,wince 5.0 ,我执行循环播放,比如播放完成后,我把上面的代码重新执行一次,更换clipFile的值;
在int hr = graphBuilder.RenderFile( clipFile, null );这里经常(不是每次都有错误)会出现hr=-2147220970错误,查找错误提示后得知:An object or name was not found. 0x80040216 但是我确认这个文件是有的。
...全文
90 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
msdn2100 2010-04-11
  • 打赏
  • 举报
回复
是不是路径问题
wolf_Knight 2010-04-07
  • 打赏
  • 举报
回复
没人知道吗?

2,543

社区成员

发帖
与我相关
我的任务
社区描述
专题开发/技术/项目 多媒体/流媒体开发
社区管理员
  • 多媒体/流媒体开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧