Problems capturing with Media Foundation & Windows 8 in C++

五迷三道 提交于 2019-12-04 19:22:37

Finally, I have figured out the reason of this problem.

With Windows 8.1 release Microsoft has introduced New AVStream Interfaces for Windows 8.1 There is a small but very important change in KS_FRAME_INFO structure - the new FrameCompletionNumber member.

An identifying sequence number for the frame in the completed queue. This number is used to verify proper frame order. When this value is 0, the frame was cancelled. This member is available starting with Windows 8.1.

DirectShow doesn't care about this number. And MediaFoundation cares.

So, you cannot just fix that on your user-mode side. The manufacture developers must release an update. Btw, I have two webcams - Logitech C270 and Creative Live Socialize HD. Logitech supports Metro while Creative does not.

I have successfully updated my driver with only a few lines of code (to set up FrameCompletionNumber properly).

UPD. similar thread http://www.osronline.com/showthread.cfm?link=255004

It must be a problem of the frame grabber Datapath VisionRGB-E1S. I've tried with the brand-new USB webcam LifeCam Studio, and everything worked fine.

I will left for other future thread why this unpaired behaviour between Windows 8 and Windows 7, but it could be something related to the User-mode access...

Emmanuel Buu

I had the same kind of issue:

  • IMFSourceReader was obtained successfully

  • reader->SetCurrentMediaType() reported no error.

  • reader->ReadSample() was successful.

then OnReadSample() was called only once and the hrStatus argument 0x80070491

For me, the issue was that I modified the video subtype IMFMediaType, then applied to the reader as current media type.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!