Hi ALL,
This are the error snippets found . *error snippets are:* * GStreamer-CRITICAL **: gst_poll_get_read_gpollfd: assertion 'set != NULL' failed GStreamer-CRITICAL **: gst_bus_create_watch: assertion 'bus->priv->poll != NULL' failed GStreamer-CRITICAL **: Creating bus watch failed * this is the sample code what i am using ,when playing with uri=file:NULL please correct me if anything wrong. #include <gstreamer-1.0/gst/gst.h> #include <stdio.h> #include <string.h> #include <pthread.h> #include <glib-object.h> typedef struct _CustomData { GstElement *pipeline; GMainLoop *main_loop; /* GLib's Main Loop */ } CustomData; CustomData data_prim; static gboolean bus_message (GstBus * bus, GstMessage * message, CustomData * app) { GstState state; GstState pending; switch (GST_MESSAGE_TYPE (message)) { case GST_MESSAGE_ERROR: printf("VA:GPRIM primary session got error\n"); g_main_loop_quit (app->main_loop); break; case GST_MESSAGE_EOS: printf( "VA:GPRIM primary session got eos\n"); g_main_loop_quit (app->main_loop); break; case GST_MESSAGE_STATE_CHANGED: /* We are only interested in state-changed messages from the pipeline */ if (GST_MESSAGE_SRC (message) == GST_OBJECT (app->pipeline)) { GstState old_state, new_state, pending_state; gst_message_parse_state_changed (message, &old_state, &new_state, &pending_state); g_print ("Pipeline state changed from %s to %s:\n", gst_element_state_get_name (old_state), gst_element_state_get_name (new_state)); printf("Pipeline state changed from %s to %s:", gst_element_state_get_name (old_state), gst_element_state_get_name (new_state)); printf( "VA:GPRIM GST_MESSAGE_STATE_CHANGED enter %s,%s", gst_element_state_get_name (old_state),gst_element_state_get_name(new_state)); /*if(new_state == GST_STATE_PLAYING) { syslog(fac|LOG_DEBUG, "VA:GPRIM play started"); }*/ } break; default: break; } return TRUE; } void main() { CustomData *data_prim_ptr =&data_prim; gst_init (NULL, NULL); while(1) { char file[500]; GstStateChangeReturn ret; GstBus *bus_prim; memset (data_prim_ptr, 0, sizeof (CustomData)); strcpy(file, "playbin "); strcat(file,"uri =file : NULL"); data_prim_ptr->pipeline = gst_parse_launch (file, NULL); if(data_prim_ptr->pipeline == NULL) { g_printerr("primarysession pipeline_prim is not created \n"); exit(0); } bus_prim = gst_element_get_bus (data_prim_ptr->pipeline); /* add watch for messages */ gst_bus_add_watch (bus_prim, (GstBusFunc) bus_message, data_prim_ptr); gst_object_unref (bus_prim); ret = gst_element_set_state (data_prim_ptr->pipeline, GST_STATE_PLAYING); data_prim_ptr->main_loop= g_main_loop_new(NULL,FALSE); g_main_loop_run (data_prim_ptr->main_loop); g_main_loop_unref(data_prim_ptr->main_loop); gst_element_set_state (data_prim_ptr->pipeline, GST_STATE_NULL); gst_object_unref (data_prim_ptr->pipeline); } gst_deinit(); } Thanks Sujith -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |