2

I am trying to capture camera stream with Media Foundation. My code works with the same device on Windows 10 but fails on windows 7. For some reason IMFSourceReader.ReadSample blocks and never returns.

The reading is done is synchronous mode.

The first call to read sample returns with pdwStreamFlags set to MF_SOURCE_READERF_STREAMTICK and no errors.

Subsequent calls blocks and never returns. I am using MF_SOURCE_READER_FIRST_VIDEO_STREAM stream index to capture the images from camera.

Any thoughts?

NullReference
  • 862
  • 1
  • 11
  • 27
  • With a freeze in sync mode you should be able to show a really small code snippet that demonstrates the issue. – Roman R. Jan 15 '18 at 12:03
  • Hi, what file do you try play? Microsoft updated file formats supporting from Windows 7 to Windows 10 - for example in Windows 7 MediaFoundation can read video file mp4 only with media information at the end of file, and only since Window 8 it can read fragmented mp4 - with media information at the begin of file. Read MSDN - https://msdn.microsoft.com/en-us/library/windows/desktop/dd757766(v=vs.85).aspx : `Movie fragments ('moof') is supported in Windows 8 MPEG-4 source and sink, but 'mfra' is not.` – Evgeny Pereguda Jan 16 '18 at 01:38

0 Answers0