Hi All, <br> <br>I am trying to play a mp4 file. When I play from command line using the pipe: <br>"gst-launch filesrc location=/home/ashwini/streams/output.ts ! 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, 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, 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), 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 have used the gst-player code and modified the pipe to current state) <br>
<br>Any help is appreciated. <br><br>-Ashwini