[gst-devel] simple question about gst api

sledge hammer sledgehammer_999 at hotmail.com
Fri Oct 16 12:16:06 CEST 2009

You need to connect to the "pad-added" signal of the demuxer(qtdemux). The source pads of qtmux aren't available from the begining. Take a look at this section of the Gstreamer tutorial -->http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-dynamic.html

Date: Wed, 14 Oct 2009 18:09:49 +0900
From: mspark at keti.re.kr
To: gstreamer-devel at lists.sourceforge.net.
Subject: [gst-devel] simple question about gst api


I have some problem about constructing pipeline.


When I run gst-launch, I use it like this,(simple video/audio playback)


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 }



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.


  bin = GST_BIN (gst_element_factory_make ("pipeline", NULL));

  filesrc = gst_element_factory_make ("filesrc", "myapp_source");
  qtdemux = gst_element_factory_make ("qtdemux", "myapp_demux");


  queue_v = gst_element_factory_make ("queue", "myapp_queue_video"); 
  mp4_dec = gst_element_factory_make ("omx_mpeg4dec", "myapp_dec"); 
  ccv    = gst_element_factory_make ("ffmpegcolorspace", "myapp_colorspace"); 
  video_sink= gst_element_factory_make ("directdrawsink", "myapp_directdrawsink"); 


  queue_a = gst_element_factory_make ("queue", "myapp_queue_audio"); 
  aac_dec = gst_element_factory_make ("faad", "myapp_faad"); 
  video_sink= gst_element_factory_make ("directsoundsink", "myapp_audiosink"); 
  g_object_set (G_OBJECT (filesrc), "location", "iron.mp4", NULL);//filesrc location="test.mp4"
  g_object_set (G_OBJECT (filesrc), "name", "demux", NULL);//qtdemux name=demux, right??


  gst_bin_add_many (GST_BIN (bin), filesrc, qtdemux, 
                          queue_v, mp4_dec, ccv, video_sink, //video
                          queue_a, aac_dec, audio_sink, //audio

  gst_element_link(filesrc, qtdemux);

  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??

Min-Seok Park


Korea Electronics Technology Institute

Multi-Media IP



Windows Live: Κρατήστε τους φίλους σας ενήμερους για τις δραστηριότητές σας στο Internet.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20091016/65a248a0/attachment.htm>

More information about the gstreamer-devel mailing list