2

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
(source: narod.ru)

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

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Rella
  • 65,003
  • 109
  • 363
  • 636

1 Answers1

3

Try implementing you own custom renderer instead of SampleGrabber.

AndreiM
  • 113
  • 2
  • 6
  • could you share some resources on HOW TO DO SUCH THING? – Rella Jan 28 '10 at 11:55
  • 1
    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, &hr); CComPtr pBaseTarget = pRenderer; m_pGB->AddFilter(pBaseTarget, L"MYRENDERER")); – AndreiM Feb 01 '10 at 10:51