0

I was not able to run the code from basic -tutorial program but there are no errors. the code is successfully built but it is not giving the out put by showing the following messages.someone help. I am attaching the code and the errors I am getting.

#include <gst/gst.h>

int
main (int argc, char *argv[])
{
    GstElement *pipeline;
    GstBus *bus;
    GstMessage *msg;

    /* Initialize GStreamer */
    gst_init (&argc, &argv);
         
    /* Build the pipeline */
    pipeline =
        gst_parse_launch ("playbin uri=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm", NULL);

    /* Start playing */
    gst_element_set_state (pipeline, GST_STATE_PLAYING);

    /* Wait until error or EOS */
    bus = gst_element_get_bus (pipeline);
    msg =
        gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
            GST_MESSAGE_ERROR | GST_MESSAGE_EOS);

    /* Free resources */
    if (msg != NULL)
        gst_message_unref (msg);
    gst_object_unref (bus);
    gst_element_set_state (pipeline, GST_STATE_NULL);
    gst_object_unref (pipeline);
    return 0;
}

errors:

E:\gstreamer\1.0\x86_64\stream\gst-docs-master\examples\tutorials\vs2010\x64\Debug>basic-tutorial-1.exe

(basic-tutorial-1.exe:4924): GStreamer-CRITICAL **: 22:11:57.268: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed

(basic-tutorial-1.exe:4924): GStreamer-CRITICAL **: 22:11:57.270: gst_element_get_bus: assertion 'GST_IS_ELEMENT (element)' failed

(basic-tutorial-1.exe:4924): GStreamer-CRITICAL **: 22:11:57.270: gst_bus_timed_pop_filtered: assertion 'GST_IS_BUS (bus)' failed

(basic-tutorial-1.exe:4924): GStreamer-CRITICAL **: 22:11:57.270: gst_object_unref: assertion 'object != NULL' failed

(basic-tutorial-1.exe:4924): GStreamer-CRITICAL **: 22:11:57.271: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed

(basic-tutorial-1.exe:4924): GStreamer-CRITICAL **: 22:11:57.272: gst_object_unref: assertion 'object != NULL' failed

Community
  • 1
  • 1
  • It's hard to follow exactly what you're doing without some code. On possibility is for example that you do not have the necessary GStreamer plug-ins installed, which means it can't load the plug-ins to play the given URI. Have you looked at the `GST_DEBUG` environment variable to get more useful logs also? – nielsdg Jun 07 '20 at 20:03
  • i have added the code. could u please check – katikireddy srivardhan Jun 08 '20 at 05:14
  • Right, we'll still need the output of the program when you run it with GST_DEBUG=3 – nielsdg Jun 08 '20 at 06:52
  • i am using visual studio 2013 to build the program .how to run with GST_DEBUG=3? – katikireddy srivardhan Jun 08 '20 at 09:05
  • I don't have personal experience with Visual Studio, but this question seems to explain how you can do this: https://stackoverflow.com/questions/100543/how-do-i-set-specific-environment-variables-when-debugging-in-visual-studio – nielsdg Jun 08 '20 at 09:24

0 Answers0