简体   繁体   English

DirectShow VC ++ Express 2010 vs图形编辑

[英]Directshow VC++ express 2010 vs Graph Edit

I have a program that creates a directshow graph for capture of video from a hardware device and direct encoding into mpeg-4 format. 我有一个程序,该程序可以创建DirectShow图形以捕获来自硬件设备的视频并直接编码为mpeg-4格式。

I had originally ran this code on another machine, where it worked. 我最初是在另一台可以运行此代码的机器上运行此代码的。 Now that I have switched machines, the code has the behaviour below: 现在,我已经切换了机器,代码具有以下行为:

What works: The graph is set up correctly ALL FILES ARE CREATED There are no errors in creating the graph I use IMediaControl::Start and ::Stop The issue occurs for XVID, ffdshow, divx encoders and haali matroska, matroska, and gdcl muxers 有效的方法:正确设置了图的所有文件都创建了。使用IMediaControl :: Start和:: Stop创建图时没有错误。XVID,ffdshow,divx编码器和haali matroska,matroska和gdcl多路复用器会出现问题

The issue: When I run the program in VC++ 2010 express, the file remains static and gains no content. 问题:当我在VC ++ 2010 express中运行该程序时,该文件保持静态,没有任何内容。 However, when I run the graph using Graph Edit, the file increases in size. 但是,当我使用“图形编辑”运行图形时,文件大小增加。

Any ideas (settings, maybe?) on what might be different between the machines? 关于机器之间可能有什么不同的任何想法(可能是设置?)? Or why the graph runs properly in GraphEdit but not in VC++ 2010 Express? 还是为什么该图在GraphEdit中正确运行,但在VC ++ 2010 Express中却不能正常运行?

You do something wrong. 你做错了。 You should show some code. 您应该显示一些代码。 A typical reason would be your NOT dispatching window messages on filter graph management/wait thread. 一个典型的原因是您不在过滤器图形管理/等待线程上调度窗口消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM