pipeline failure when going from cmdline to app.

Ashwini Sharma ak.ashwini at gmail.com
Thu Mar 10 22:15:26 PST 2011

Hi All,

I am trying to play a mp4 file. When I play from command line using the
"gst-launch filesrc location=/home/ashwini/streams/output.ts ! mpegtsparse !
mpegtsdemux ! decodebin ! ffmpegcolorspace ! ximagesink"

The video is displayed well.
 But when i try to achieve the same pipe thru the application, It fails.

The code snippet of pipelie creation is as follows:

pipeline = gst_pipeline_new ("gst-player");
    src = gst_element_factory_make ("filesrc", NULL);
    g_assert (src);
g_print("URI = %s\n",uri);
    g_object_set (G_OBJECT (src), "location", uri, NULL);
    parse = gst_element_factory_make ("mpegtsparse", NULL);
    g_assert (parse);
    demux = gst_element_factory_make ("mpegtsdemux", NULL);
    g_assert (demux);
    dec = gst_element_factory_make ("decodebin", NULL);
    g_assert (dec);
    csp = gst_element_factory_make ("ffmpegcolorspace", NULL);
    g_assert (csp);
    videosink = gst_element_factory_make ("ximagesink", NULL);
    g_assert (videosink);

    /* Adding elements to the pipeline */
    gst_bin_add_many (GST_BIN (pipeline), src, parse, demux, dec, csp,
videosink, NULL);
    //  gst_bin_add_many (GST_BIN (pipeline), src, videosink, NULL);
   // g_assert (gst_element_link_many (src, parse, demux, dec, csp,
videosink, NULL));
    g_assert (gst_element_link (src, parse));
    g_assert (gst_element_link (parse, demux));
    gst_element_link (demux, dec);
    (gst_element_link (dec, csp));
    (gst_element_link (csp, videosink));
    if (GST_IS_X_OVERLAY (videosink))
        gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (videosink),
GPOINTER_TO_INT (window));

    gst_element_set_state (pipeline, GST_STATE_PLAYING);

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)

Any help is appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110311/27eb43f4/attachment.htm>

More information about the gstreamer-devel mailing list