AW: splitmuxsink
Thornton, Keith
keith.thornton at zeiss.com
Fri Mar 31 10:55:27 UTC 2017
One problem seems to me to be that you add splitmuxsink to channel i and then you call g_object_set for channel 0. We don't know what I is equal to. Then at the end you set channel 0 and 1 to playing.
-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] Im Auftrag von jtag
Gesendet: Donnerstag, 30. März 2017 06:33
An: gstreamer-devel at lists.freedesktop.org
Betreff: splitmuxsink
Hi guys. Sorry for my bad english. I want to record multi files with splitmuxsink, but i can't find example on C. After running my program, program informs:
(hello:2629): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(hello:2629): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(hello:2629): GStreamer-CRITICAL **: gst_bin_add_many: assertion 'GST_IS_ELEMENT (element_1)' failed
(hello:2629): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(hello:2629): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(hello:2629): GStreamer-CRITICAL **: gst_element_link_many: assertion 'GST_IS_ELEMENT (element_1)' failed
(hello:2629): GStreamer-CRITICAL **: gst_bin_add_many: assertion 'GST_IS_ELEMENT (element_1)' failed
(hello:2629): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(hello:2629): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(hello:2629): GStreamer-CRITICAL **: gst_element_link_many: assertion 'GST_IS_ELEMENT (element_1)' failed 11Running...
My code:
struct _channel
{
GstElement *pipeline;
GstElement *source;
GstElement *queue;
GstElement *depayer;
GstElement *muxer;
GstElement * splitmux;
} ;
struct _channel channel[32];
channel[i].splitmux = gst_element_factory_make ("splitmuxsink",
"file-output");
g_object_set (channel[0].splitmux, "location", "/home/jtag/Documents/cam/movie%05d.mp4", NULL);
g_signal_connect (channel[i].splitmux, "format-location", G_CALLBACK(on_format_location), NULL);
gchar* on_format_location(GstElement *splitmux, guint fragment_id, gpointer
user_data)
{
//i don't know to write here for me
}
gst_bin_add_many (GST_BIN (channel[i].pipeline), channel[i].source, channel[i].queue, channel[i].depayer, channel[i].splitmux, NULL);
gst_element_link_many (channel[i].queue, channel[i].depayer, channel[i].splitmux);
while(1){
usleep(100000);
gst_element_set_state (channel[0].pipeline, GST_STATE_PLAYING);
gst_element_set_state (channel[1].pipeline, GST_STATE_
g_main_context_iteration(NULL,FALSE);
}
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/splitmuxsink-tp4682454.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list