Quantcast
Channel: Media Foundation Development for Windows Desktop forum
Viewing all articles
Browse latest Browse all 1079

IMFSourceReader.ReadSample never hitting callback after reading on stream index 1. Calls to Stream index 0 work fine.

$
0
0

So background im working on reworking an application that was using direct show to use Windows Media Foundation. in Directshow i have UVC camera still pins working fine. however when i switched to using a SourceReader in WMF i have stream 0 (the live video stream) however when i use the same interface to try and request samples on Stream1 i dont receive anything. This is with the following call.
                    hr = StreamReader.ReadSample(1,
                            MediaFoundation.ReadWrite.MF_SOURCE_READER_CONTROL_FLAG.None,
                            IntPtr.Zero,
                            IntPtr.Zero,
                            IntPtr.Zero,
                            IntPtr.Zero
                            );

if i switch it to 

                    hr = StreamReader.ReadSample(1,
                            MediaFoundation.ReadWrite.MF_SOURCE_READER_CONTROL_FLAG.Drain,
                            IntPtr.Zero,
                            IntPtr.Zero,
                            IntPtr.Zero,
                            IntPtr.Zero
                            );

i receive only null IMFSamples. ive checked the state of hr and it is always S_OK. During this time i am also running the same call but on stream 0 and it is working fine. The only error or flag i get is StreamTick on the first frame on stream 0.

Im not entirely sure where to go from here if anyone has suggestions im open


Viewing all articles
Browse latest Browse all 1079

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>