<div>Thanks a ton <font color="#888888">Nathanael.</font></div>
<div><font color="#888888">It worked for me.</font></div>
<div><br><br> </div>
<div class="gmail_quote">On Fri, Mar 11, 2011 at 12:25 PM, Nathanael D. Noblet <span dir="ltr"><<a href="mailto:nathanael@gnat.ca">nathanael@gnat.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div></div>
<div class="h5">On 03/10/2011 11:15 PM, Ashwini Sharma wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi All,<br><br>I am trying to play a mp4 file. When I play from command line using the<br>pipe:<br>"gst-launch filesrc location=/home/ashwini/streams/output.ts !<br>
mpegtsparse ! mpegtsdemux ! decodebin ! ffmpegcolorspace ! ximagesink"<br><br>The video is displayed well.<br> But when i try to achieve the same pipe thru the application, It fails.<br><br>The code snippet of pipelie creation is as follows:<br>
<br>pipeline = gst_pipeline_new ("gst-player");<br>//gst_debug_set_default_threshold(GST_LEVEL_DEBUG);<br>gst_debug_set_threshold_for_name("mpegtsparse",GST_LEVEL_DEBUG);<br> src = gst_element_factory_make ("filesrc", NULL);<br>
g_assert (src);<br>g_print("URI = %s\n",uri);<br> g_object_set (G_OBJECT (src), "location", uri, NULL);<br> parse = gst_element_factory_make ("mpegtsparse", NULL);<br> g_assert (parse);<br>
demux = gst_element_factory_make ("mpegtsdemux", NULL);<br> g_assert (demux);<br> dec = gst_element_factory_make ("decodebin", NULL);<br> g_assert (dec);<br> csp = gst_element_factory_make ("ffmpegcolorspace", NULL);<br>
g_assert (csp);<br> videosink = gst_element_factory_make ("ximagesink", NULL);<br> g_assert (videosink);<br><br> /* Adding elements to the pipeline */<br> gst_bin_add_many (GST_BIN (pipeline), src, parse, demux, dec, csp,<br>
videosink, NULL);<br> // gst_bin_add_many (GST_BIN (pipeline), src, videosink, NULL);<br> // g_assert (gst_element_link_many (src, parse, demux, dec, csp,<br>videosink, NULL));<br> g_assert (gst_element_link (src, parse));<br>
g_assert (gst_element_link (parse, demux));<br> gst_element_link (demux, dec);<br> (gst_element_link (dec, csp));<br> (gst_element_link (csp, videosink));<br> if (GST_IS_X_OVERLAY (videosink))<br> {<br>
gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (videosink),<br>GPOINTER_TO_INT (window));<br> }<br><br> gst_element_set_state (pipeline, GST_STATE_PLAYING);<br><br>What could be causing it to fail. (In the above snippet described, I<br>
have used the gst-player code and modified the pipe to current state)<br><br>Any help is appreciated.<br></blockquote><br></div></div>You need to listen for 'pad-added' signal from the decoder and check the gst_element_link() calls for success.<br>
<br><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-helloworld.html" target="_blank">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-helloworld.html</a><br>
<font color="#888888"><br>-- <br>Nathanael d. Noblet<br>t 403.875.4613<br>_______________________________________________<br>gstreamer-devel mailing list<br><a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br></font></blockquote></div><br>