Using IMFSourceReader to open a video file
问题 I want to open a video file using IMFSourceReader to access its Frames as IMFSample. In a WinRT C++ Class I send the RandomAccessStream of a video file and use the following code to create an IMFSourceReader object. HRESULT hr = S_OK; ComPtr<IMFSourceReader> pSourceReader; ComPtr<IMFByteStream> spByteStream; if (SUCCEEDED(hr)) { // Initialize the Media Foundation platform. hr = MFStartup(MF_VERSION); hr = MFCreateMFByteStreamOnStreamEx((IUnknown*)InputVideoStream, &spByteStream); ComPtr