queue2: Update buffering if its enabled and low/high watermarks are changed
authorCarlos Rafael Giani <dv@pseudoterminal.org>
Sun, 11 Sep 2016 13:26:26 +0000 (15:26 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 17 Sep 2016 08:54:29 +0000 (09:54 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=771210

plugins/elements/gstqueue2.c

index b2f7147..8d78856 100644 (file)
@@ -3746,16 +3746,24 @@ gst_queue2_set_property (GObject * object,
       break;
     case PROP_LOW_PERCENT:
       queue->low_watermark = g_value_get_int (value) * BUF_LEVEL_PERCENT_FACTOR;
+      if (queue->is_buffering)
+        update_buffering (queue);
       break;
     case PROP_HIGH_PERCENT:
       queue->high_watermark =
           g_value_get_int (value) * BUF_LEVEL_PERCENT_FACTOR;
+      if (queue->is_buffering)
+        update_buffering (queue);
       break;
     case PROP_LOW_WATERMARK:
       queue->low_watermark = g_value_get_double (value) * MAX_BUFFERING_LEVEL;
+      if (queue->is_buffering)
+        update_buffering (queue);
       break;
     case PROP_HIGH_WATERMARK:
       queue->high_watermark = g_value_get_double (value) * MAX_BUFFERING_LEVEL;
+      if (queue->is_buffering)
+        update_buffering (queue);
       break;
     case PROP_TEMP_TEMPLATE:
       gst_queue2_set_temp_template (queue, g_value_get_string (value));