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

How do I use MFCreateVideoRenderer() independently?

$
0
0

I'm starting from scratch on this and am totally and completely lost.   Any help is greatly appreciated.

I have an existing program I've written that calls many media foundation things directly.  It works. Now I want to render video to a window, which wasn't an original part of my program.  I believe MFCreateVideoRenderer() is the correct choice. 

So far, I've coded only ONE LINE of source, and it fails when I run it!  It looks similar to this:

HRESULT hr = MFCreateVideoRenderer(MFVideoFormat_NV12, (void**)&pInterface);

I keep getting a E_NOINTERFACE result.  I've tried various definitions for pInterface, but none work.  My original believe was that I could use "IMFSinkWriter *pInterface".  Didn't work.  I tried IUnknown and IMFVideoPresenter. I'm not even sure this is related to why I'm getting the error.

I can find no examples whatsoever online of how to independently use the EVR.  My intent is to clone my current sinking to a file, and massage that code to sink to a video display window instead.   I'm trying to create the video renderer in parallel with my working call to MFCreateSinkWriterFromURL(...&m_pWriter) for IMFSinkWrtier *pWriter.  Elsewhere in my code, I call m_pWriter->AddStream, m_pWriter->SetInputMediaType, and m_pWriter->BeginWriting.  I thought I could call the same with IMFSinkWrite coming from the EVR.  But I can't connect the dots...

[EDIT] I believe I'm seeking how to connect the EVR to an IMFSinkWrtier.  If I get that working, I should have my own examples of how to do everything else.





Viewing all articles
Browse latest Browse all 1079

Trending Articles



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