How to send IMFSample to EVR Media Sink

后端 未结 2 504
野趣味
野趣味 2021-01-21 10:12

I want to use EVR standalone, but i failed sending IMFSample to it. codes list below,

//create the video render 
IMFActivate* pActive = NULL;
hr = MFCreateVideo         


        
相关标签:
2条回答
  • 2021-01-21 10:23

    Maybe a little late to answer to your question, but anyway ... I was in a similar situation and I solved it by using a Stream Reader configured with MF_SOURCE_READER_D3D_MANAGER. I took the IDirect3DDeviceManager9 from the Stream Sink the same way you took the allocator: hr = MFGetService(m_pVideoStreamSink,MR_VIDEO_ACCELERATION_SERVICE,IID_PPV_ARGS(&pD3DManager);

    and set it as IUnknown to MF_SOURCE_READER_D3D_MANAGER attribute above.

    If you cannot use IMFSourceReader then maybe this link will be helpful: https://code.google.com/p/webrtc4all/source/browse/trunk/gotham/MFT_WebRTC4All/test/test_evr.cc?r=15

    0 讨论(0)
  • 2021-01-21 10:27

    When the pVideoSample is allocated, it already has a buffer for your use; you don't need to add any other buffers. In your case, my guess is that the originally allocated buffer was used to render the output - which is this case is empty, and hence there's no image.

    0 讨论(0)
提交回复
热议问题