Wednesday, November 05, 2008

RenderStream Failure

RenderStream Failure :
========================
hr = CaptureGraphBuilder2->RenderStream(
NULL,NULL,mp4Source,mpeg4videoDecoder,Mpeg4Encoder);

returns the "No combination of intermediate filters found"

Observation:
if we connected the Mpeg1 Encoder that is connecting pins in the
RenderStream as follows:

hr = CaptureGraphBuilder2->RenderStream(
NULL,NULL,SourceFilter,mpeg1VideoDecoder,Mpeg4Encoder);


( Source FIlter might be AddSourceFilter() with URL).

RenderStream is running successfully.


Solution:
============


hr = CaptureGraphBuilder2->RenderStream(
NULL,&MEDIATYPE_Video,mp4Source,mpeg4videoDecoder,Mpeg4Encoder);

if we modified it as follows: it is working fine...

The Reason is RenderStream() media type is NULL means it will
directly connects the Source Filter's First Pin the Video Decoder
Filter.

In case of MPEG1 Source Filter, the First output pin is video so it
is running successfully without any problem.

In case of MP4 Source Filter failure case, First output pin is audio
Pin. So the RenderStream() tries to connect with MP4 Source Audio
output pin with Video decoder. So that causes the error.

if we specified the MediaType as video, RenderStream() will takes the
Source Filter's Video output pin and tries to connect it with video
decoder. So it is working fine...

1 Comments:

Anonymous ElKri0BelZak said...

I would like to know if you use any method to transform your captured image in perspective to an image captured by a webcam that is in a plane perpendicular . I think is called homographhy. I how you can help me is for a autonomus vehicle project.

Thanks

6:47 AM  

Post a Comment

<< Home