[gst-devel] Playing avi - a newbie question

Štěpán stepan1117 at atlas.cz
Sun Oct 12 19:48:56 CEST 2008


Last problem solved, my compliments to you! Just for future reference,
the correct order is

gst_element_link (vdqueue, decvd);
gst_element_link (decvd, vcolorspace);
gst_element_link (vcolorspace, vdsink);

gst_element_link (adqueue, decad);
gst_element_link (decad, adconvert);
gst_element_link (adconvert, adsink);

I am going to focus on plugin writing, my aim now is to write a
cairo-based plugin which overlays a graphics on a video stream. I know,
it will be a long run, but I can try it at least.
  Stepan

Felipe Contreras napsal(a):
> On Sun, Oct 12, 2008 at 8:19 PM, Štěpán <stepan1117 at atlas.cz> wrote:
>   
>> Ah, thank you. I am now able to run the program without errors,
>> "ffmpegcolorspace" was missing. So, my code is following:
>>
>> ...
>> pipeline = gst_pipeline_new ("media-player");
>> source = gst_element_factory_make ("filesrc", "file-source");
>> demuxer = gst_element_factory_make ("avidemux", "avi-demuxer");
>> decvd = gst_element_factory_make ("ffdec_mpeg4", "video-decoder");
>> vcolorspace = gst_element_factory_make ("ffmpegcolorspace", "color-space");
>>
>> decad = gst_element_factory_make ("mad", "mp3-decoder");
>> vdsink = gst_element_factory_make ("autovideosink", "video-sink");
>> vdqueue = gst_element_factory_make ("queue", "video-queue");
>>
>> adqueue = gst_element_factory_make ("queue", "audio-queue");
>> adconvert = gst_element_factory_make ("audioconvert", "audioconvert");
>> adsink = gst_element_factory_make ("alsasink", "audio-sink");
>> ...
>> gst_element_link (source, demuxer);
>>
>> gst_element_link (decvd, vcolorspace);
>> gst_element_link (vcolorspace, vdqueue);
>> gst_element_link (vdqueue, vdsink);
>>
>> gst_element_link (decad, adconvert);
>> gst_element_link (adconvert, adqueue);
>> gst_element_link (adqueue, adsink);
>>
>> g_signal_connect (demuxer, "pad-added", G_CALLBACK (on_pad_added), NULL);
>>
>> The (hopefully last) problem I have now is that I cannot see and hear
>> anything. More precisely, If I remove the part for video, then I can
>> hear the audio. If I remove the part for audio, I can see the video -
>> but I cannot hear and see both. Is there something I forgot about?
>>     
>
> Take a closer look, your queues are in the wrong places.
>
>   




More information about the gstreamer-devel mailing list