[gst-devel] simple question about gst api

Tim-Philipp Müller t.i.m at zen.co.uk
Fri Oct 16 12:07:54 CEST 2009


On Wed, 2009-10-14 at 18:09 +0900, 박민석 wrote:

> gst-launch-0.10.exe filesrc location="test.mp4" ! qtdemux name=demux  
> 
>   demux.video_00 ! { queue ! omx_mpeg4dec ! ffmpegcolorspace !
> directdrawsink } 
> 
>   demux.audio_00 ! { queue ! faad ! directsoundsink }

The { } are GStreamer 0.8 syntax, you should not use them with GStreamer
0.10. They are not needed any longer.
  
> 
> I want to construct upper command with GST API!!
> but how??? Below is my test code. but it doesn't work!
> 
> I'll appreciate it if you give any comment.

Please go easy on the ??!?!?!.

The easiest way would be to just use

 pipeline = gst_parse_launch ("filesrc ....", ...);


>   gst_element_link(qtdemux, queue_v);  
> 
>   gst_element_link_many(queue_v, mp4_dec, ccv, video_sink,
> NULL);//right??
>   
> 
>   gst_element_link(qtdemux, queue_a);  
> 
>   gst_element_link_many(queue_a, aac_dec, audio_sink, NULL);//right??

Many of these functions have return values to indicate success or
failure. You should check the return values.

In this case, it is probably the qtdemux -> queues links that fail.
qtdemux has so-called 'dynamic pads' as source pads, which will only be
created once data flow starts. You will have to g_signal_connect() to
the 'pad-added' signal of qtdemux and then link these things in the
callback.

Cheers
 -Tim






More information about the gstreamer-devel mailing list