views:

274

answers:

1

I made a simple graph to write MKV file. But I do not want to use file writer. I want to use SampleGabber and get stream using simple program. Problem is that I get data from anything but Matroska muxer!( What shall i do?

VirtualCamera - x264 - Matroska Muxer - SampleGraber - Null Renderer

So my question is How to use SampleGrabber with Matroska Muxer in DirectShow?

+1  A: 

Try implementing you own custom renderer instead of SampleGrabber.

AndreiM
could you share some resources on HOW TO DO SUCH THING?
Blender
Basically you create your own class derived from CBaseVideoRenderer. Then you have to implement your own: DoRenderSample method which will be called on every new sample filter receives.To add your renderer to the graph:CMyVideoRenderer *pRenderer = new CMyVideoRenderer(NULL, CComPtr<IBaseFilter> pBaseTarget = pRenderer;m_pGB->AddFilter(pBaseTarget, L"MYRENDERER"));
AndreiM