splitmuxsink: (queued_bytes >= splitmux->mux_start_bytes)

Yaroslav yaroslavrakhnenko at gmail.com
Wed Jun 1 12:03:52 UTC 2016


Hello, 
This is my part of main.c:
/...
#define VID_TIME 60000000000 // ~1 min.

GstElement *pipeline, *rtspsrc, *rtph264depay, *h264parse,*splitmuxsink;
		
pipeline = gst_pipeline_new("video-recorder");
rtspsrc = gst_element_factory_make("rtspsrc", NULL);
rtph264depay = gst_element_factory_make("rtph264depay", NULL);
h264parse = gst_element_factory_make("h264parse", NULL);
splitmuxsink = gst_element_factory_make("splitmuxsink", NULL);

if (!pipeline || !rtspsrc || !rtph264depay || !h264parse || !splitmuxsink) {
         g_error("gst element could not be created.");
}

g_object_set(G_OBJECT(rtspsrc), "location", <my_rtsp>, NULL);
g_object_set(G_OBJECT(splitmuxsink), "location", <my_location>, "muxer",
NULL,
				"sink", NULL, "max-size-time", VID_TIME, NULL);

gst_bin_add_many(GST_BIN(pipeline), rtspsrc, rtph264depay,
h264parse,splitmuxsink, NULL);

g_signal_connect(rtspsrc, "pad-added", G_CALLBACK (on_pad_added),
rtph264depay);

if (!gst_element_link_many(rtph264depay, h264parse, splitmuxsink, NULL)) {
         g_error("gst element(s) could not be linked.");
}
		
GstBus *bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline));
gst_bus_add_watch(bus, process_message, <my_data>);
g_object_unref(bus);

gst_element_set_state(pipeline, GST_STATE_PLAYING)
...

gboolean process_message(GstBus *bus, GstMessage *msg, gpointer data) {

	GError *error;
	gchar *debug;

	g_print(" In process message msg->type : %d\n", GST_MESSAGE_TYPE(msg));

	switch (GST_MESSAGE_TYPE(msg)) {
	case GST_MESSAGE_UNKNOWN:
		g_print("GST_MESSAGE_UNKNOWN \n");
		break;
	case GST_MESSAGE_EOS:
		g_print("GST_MESSAGE_EOS \n");
		break;
	case GST_MESSAGE_ERROR:
		g_print("GST_MESSAGE_ERROR \n");
		gst_message_parse_error(msg, &error, &debug);
		g_free(debug);
		g_print("GST_MESSAGE_ERROR message : %s \n", error->message);
		break;
	case GST_MESSAGE_WARNING:
		g_print("GST_MESSAGE_WARNING  \n");
		break;
	case GST_MESSAGE_INFO:
		g_print("GST_MESSAGE_INFO \n");
		break;
	case GST_MESSAGE_STATE_CHANGED:
		g_print("GST_MESSAGE_STATE_CHANGED \n");
		break;
	default:
		g_print("default \n");
		break;
	}
	return TRUE;
}

static void on_pad_added(GstElement *element, GstPad *pad, gpointer data) {

	GstPad *sinkpad;
	GstElement *rtph264depay = (GstElement *) data;

	g_print("Dynamic pad created, linking rtspsrc and rtph264depay.\n");

	sinkpad = gst_element_get_static_pad(rtph264depay, "sink");
	gst_pad_link(pad, sinkpad);
	gst_object_unref(sinkpad);
}/


After every 60 video parts my app crash and i see that:
***
ERROR:gstsplitmuxsink.c:805:handle_gathered_gop: assertion failed:
(queued_bytes >= splitmux->mux_start_bytes)
Aborted*

So, where is the mistake?



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/splitmuxsink-queued-bytes-splitmux-mux-start-bytes-tp4677842.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list