Hello
I couldn't find a suitable renderer class in BaseClasses that has 2 input pins - one for video and one for audio. Can anybody recommend/provide some code?
Regards Dominik
Hello
I couldn't find a suitable renderer class in BaseClasses that has 2 input pins - one for video and one for audio. Can anybody recommend/provide some code?
Regards Dominik
Hi Dominik,
The CBaseRenderer class is a base class for implementing renderer filters. It only supports one input pin though.
I've never encountered a renderer class that handles both audio and video, they're always rendered via separate renderer filters.
The VMR9 renderer (CLSID_VideoMixingRenderer9) is great for rendering video, while the DirectSound Renderer (CLSID_DSoundRender) is used for rendering audio.
Are you maybe trying to get both streams written to disk in a media file? Then you'll need a mux filter that understands both media types. Since I don't know what media types you're using, I could recommend you might have a look at the AVI Mux filter, which does such a job.
I hope that this points you in the right direction ;)
Alternatively you can add sample grabber filters to your media pipeline after your video and audio encoders and packetize the media and deliver the RTP packets in the sample grabber callbacks. The sample grabbers can be connected to the NULL renderer. That way you can avoid writing a filter and focus on the network transport.
Also, you should consider if you even want to mux the streams: usually in RTP video and audio are delivered in separate RTP sessions. If you still want to write a filter with multiple input pins, you can have a look at some baseclasses I wrote for a video mixer available at http://sourceforge.net/projects/videoprocessing/ as a starting point.