Starting from videoprocessing project (
http://videoprocessing.sourceforge.net/#rtsp), I'm trying to build a directshow filter that connects to a RTSP server becoming a source filter for the Windows MPEG1 decoder (I can not use other formats or decoders having WinCE as OS target).
My filter declares MediaType
MEDIATYPE_Video type
FORMAT_MPEGVideo subtype
MEDIASUBTYPE_MPEG1Payload formatType
Currently, when I connect my rtspSource filter with the CLSID_CMpegVideoCodec decoder, I am rendering a black video.
However, if I replace the windows decoder with CLSID_LAV_VideoDecoderFilter provided by the LAVFilters project, the video is correctly rendered.
Currently I'm sending to decoder packets starting with Video Stream Start Code
000001 00 (Picture)
or starting with
000001 B8 (GOP)
or starting with
000001 B3 (Sequence Header)
I have shared a .csv dump of media_sample I send to the decoder (
https://drive.google.com/file/d/0BztsGp_KXn34U0tEOGVMQmRmaVE/edit?usp=sharing)
I am not clear exactly what is expected by the CLSID_CMpegVideoCodec filter, after agreeing the format type MEDIASUBTYPE_MPEG1Payload.
However, setting Discontinuity of each sample starting with "000001 B3 (Sequence Header)", the video is rendered with images updated approximately every 4 seconds and losing the intermediate images.
I performed the tests setting the IMediaSample with
SetTime(NULL, NULL)
and
SetMediaTime(NULL, NULL)
Any suggestions would be greatly appreciated.
Thanks in advance.