<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
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 --&gt;http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-dynamic.html<br><br><hr id="stopSpelling">Date: Wed, 14 Oct 2009 18:09:49 +0900<br>From: mspark@keti.re.kr<br>To: gstreamer-devel@lists.sourceforge.net.<br>Subject: [gst-devel] simple question about gst api<br><br><style>
.ExternalClass P
{margin-bottom:0px;}
</style>
<img src="http://gfx1.hotmail.com/mail/w4/pr01/ltr/i_safe.gif"><BR>
hi.<BR>
I have some problem about constructing pipeline.<BR>
&nbsp;<BR>
When I&nbsp;run gst-launch, I use it like this,(simple video/audio playback)<BR>
&nbsp;<BR>
<strong>gst-launch-0.10.exe filesrc location="test.mp4" ! qtdemux name=demux&nbsp; </strong><BR>
<strong>&nbsp; demux.video_00 ! { queue ! omx_mpeg4dec ! ffmpegcolorspace ! directdrawsink } </strong><BR>
<strong>&nbsp; demux.audio_00 ! { queue ! faad ! directsoundsink }</strong><BR>
&nbsp;<BR>
&nbsp;<BR>
I want to construct upper command with&nbsp;GST API!!<BR>
but how??? Below is my test code. but it doesn't work!<BR>
I'll appreciate it if you give any comment.<BR>
==========================================================================<BR>
&nbsp; bin = GST_BIN (gst_element_factory_make ("pipeline", NULL));<BR>
&nbsp; filesrc = gst_element_factory_make ("filesrc", "myapp_source");<br>&nbsp; qtdemux = gst_element_factory_make ("qtdemux", "myapp_demux");<BR>
&nbsp;<BR>
&nbsp; queue_v = gst_element_factory_make ("queue", "myapp_queue_video"); <br>&nbsp; mp4_dec = gst_element_factory_make ("omx_mpeg4dec", "myapp_dec"); <br>&nbsp; ccv &nbsp;&nbsp; = gst_element_factory_make ("ffmpegcolorspace", "myapp_colorspace"); <br>&nbsp; video_sink= gst_element_factory_make ("directdrawsink", "myapp_directdrawsink"); <BR>
&nbsp;<BR>
&nbsp; queue_a = gst_element_factory_make ("queue", "myapp_queue_audio"); <br>&nbsp; aac_dec = gst_element_factory_make ("faad", "myapp_faad"); <br>&nbsp; video_sink= gst_element_factory_make ("directsoundsink", "myapp_audiosink");&nbsp;<br>&nbsp;&nbsp;<br>&nbsp; g_object_set (G_OBJECT (filesrc), "location", "iron.mp4", NULL);//filesrc location="test.mp4"<br>&nbsp; g_object_set (G_OBJECT (filesrc), "name", "demux", NULL);//qtdemux name=demux, right??<BR>
&nbsp;<BR>
&nbsp; gst_bin_add_many (GST_BIN (bin), filesrc, qtdemux, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; queue_v, mp4_dec, ccv, video_sink, //video<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue_a, aac_dec, audio_sink, //audio<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NULL);//right??<BR>
&nbsp; gst_element_link(filesrc, qtdemux);<BR>
<br>&nbsp; gst_element_link(qtdemux, queue_v);&nbsp; <BR>
&nbsp; gst_element_link_many(queue_v, mp4_dec, ccv, video_sink, NULL);//right??<br>&nbsp; <BR>
&nbsp; gst_element_link(qtdemux, queue_a);&nbsp; <BR>
&nbsp; gst_element_link_many(queue_a, aac_dec, audio_sink, NULL);//right??<br><BR><br><br><pre>Min-Seok Park<BR><br>===============================<BR><br>Korea Electronics Technology Institute<BR><br>Multi-Media IP<BR><br>Tel.031-789-7385<BR><br>Fax.031-789-7379<BR><br>===============================&nbsp;<BR></pre>                                               <br /><hr />Σύρετε φωτογραφίες στο παράθυρο του Messenger. Δείτε πώς. <a href='http://download.live.com/messenger ' target='_new'>Κάντε κλικ εδώ!</a></body>
</html>