How to send IMFSample to EVR Media Sink

后端 未结 2 505
野趣味
野趣味 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

提交回复
热议问题