Without this the configured latency on the pipeline will be wrong.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3609>
static gboolean
bus_watch_cb (GstBus * bus, GstMessage * message, gpointer user_data)
{
+ GstPipeline *pipeline = user_data;
+
switch (GST_MESSAGE_TYPE (message)) {
case GST_MESSAGE_ERROR:
{
g_free (debug);
break;
}
+ case GST_MESSAGE_LATENCY:
+ gst_bin_recalculate_latency (GST_BIN (pipeline));
+ break;
default:
break;
}
}
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
- gst_bus_add_watch (bus, bus_watch_cb, NULL);
+ gst_bus_add_watch (bus, bus_watch_cb, pipeline);
gst_object_unref (bus);
gst_print ("Starting pipeline, not transmitting yet\n");
static gboolean
bus_watch_cb (GstBus * bus, GstMessage * message, gpointer user_data)
{
+ GstPipeline *pipeline = user_data;
+
switch (GST_MESSAGE_TYPE (message)) {
case GST_MESSAGE_ERROR:
{
g_free (debug);
break;
}
+ case GST_MESSAGE_LATENCY:
+ gst_bin_recalculate_latency (GST_BIN (pipeline));
+ break;
default:
break;
}
G_CALLBACK (on_ice_candidate_cb), (gpointer) receiver_entry);
bus = gst_pipeline_get_bus (GST_PIPELINE (receiver_entry->pipeline));
- gst_bus_add_watch (bus, bus_watch_cb, NULL);
+ gst_bus_add_watch (bus, bus_watch_cb, receiver_entry->pipeline);
gst_object_unref (bus);
if (gst_element_set_state (receiver_entry->pipeline, GST_STATE_PLAYING) ==
static gboolean
bus_watch_cb (GstBus * bus, GstMessage * message, gpointer user_data)
{
+ GstPipeline *pipeline = user_data;
+
switch (GST_MESSAGE_TYPE (message)) {
case GST_MESSAGE_ERROR:
{
g_free (debug);
break;
}
+ case GST_MESSAGE_LATENCY:
+ gst_bin_recalculate_latency (GST_BIN (pipeline));
+ break;
default:
break;
}
G_CALLBACK (on_ice_candidate_cb), (gpointer) receiver_entry);
bus = gst_pipeline_get_bus (GST_PIPELINE (receiver_entry->pipeline));
- gst_bus_add_watch (bus, bus_watch_cb, NULL);
+ gst_bus_add_watch (bus, bus_watch_cb, receiver_entry->pipeline);
gst_object_unref (bus);
if (gst_element_set_state (receiver_entry->pipeline, GST_STATE_PLAYING) ==