mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
mssdemux: add max-queue-size-buffers property
Indicates how much buffering should be done internally in mssdemux
This commit is contained in:
parent
23ad760e3a
commit
46efc08809
1 changed files with 16 additions and 0 deletions
|
@ -43,12 +43,14 @@
|
||||||
GST_DEBUG_CATEGORY (mssdemux_debug);
|
GST_DEBUG_CATEGORY (mssdemux_debug);
|
||||||
|
|
||||||
#define DEFAULT_CONNECTION_SPEED 0
|
#define DEFAULT_CONNECTION_SPEED 0
|
||||||
|
#define DEFAULT_MAX_QUEUE_SIZE_BUFFERS 0
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PROP_0,
|
PROP_0,
|
||||||
|
|
||||||
PROP_CONNECTION_SPEED,
|
PROP_CONNECTION_SPEED,
|
||||||
|
PROP_MAX_QUEUE_SIZE_BUFFERS,
|
||||||
PROP_LAST
|
PROP_LAST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -130,6 +132,12 @@ gst_mss_demux_class_init (GstMssDemuxClass * klass)
|
||||||
0, G_MAXUINT / 1000, DEFAULT_CONNECTION_SPEED,
|
0, G_MAXUINT / 1000, DEFAULT_CONNECTION_SPEED,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
|
g_object_class_install_property (gobject_class, PROP_MAX_QUEUE_SIZE_BUFFERS,
|
||||||
|
g_param_spec_uint ("max-queue-size-buffers", "Max queue size in buffers",
|
||||||
|
"Maximum buffers that can be stored in each internal stream queue "
|
||||||
|
"(0 = infinite)", 0, G_MAXUINT, DEFAULT_MAX_QUEUE_SIZE_BUFFERS,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
gstelement_class->change_state =
|
gstelement_class->change_state =
|
||||||
GST_DEBUG_FUNCPTR (gst_mss_demux_change_state);
|
GST_DEBUG_FUNCPTR (gst_mss_demux_change_state);
|
||||||
}
|
}
|
||||||
|
@ -149,6 +157,8 @@ gst_mss_demux_init (GstMssDemux * mssdemux, GstMssDemuxClass * klass)
|
||||||
mssdemux->stream_task =
|
mssdemux->stream_task =
|
||||||
gst_task_create ((GstTaskFunction) gst_mss_demux_stream_loop, mssdemux);
|
gst_task_create ((GstTaskFunction) gst_mss_demux_stream_loop, mssdemux);
|
||||||
gst_task_set_lock (mssdemux->stream_task, &mssdemux->stream_lock);
|
gst_task_set_lock (mssdemux->stream_task, &mssdemux->stream_lock);
|
||||||
|
|
||||||
|
mssdemux->data_queue_max_size = DEFAULT_MAX_QUEUE_SIZE_BUFFERS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -292,6 +302,9 @@ gst_mss_demux_set_property (GObject * object, guint prop_id,
|
||||||
mssdemux->connection_speed);
|
mssdemux->connection_speed);
|
||||||
GST_OBJECT_UNLOCK (mssdemux);
|
GST_OBJECT_UNLOCK (mssdemux);
|
||||||
break;
|
break;
|
||||||
|
case PROP_MAX_QUEUE_SIZE_BUFFERS:
|
||||||
|
mssdemux->data_queue_max_size = g_value_get_uint (value);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -308,6 +321,9 @@ gst_mss_demux_get_property (GObject * object, guint prop_id, GValue * value,
|
||||||
case PROP_CONNECTION_SPEED:
|
case PROP_CONNECTION_SPEED:
|
||||||
g_value_set_uint (value, mssdemux->connection_speed / 1000);
|
g_value_set_uint (value, mssdemux->connection_speed / 1000);
|
||||||
break;
|
break;
|
||||||
|
case PROP_MAX_QUEUE_SIZE_BUFFERS:
|
||||||
|
g_value_set_uint (value, mssdemux->data_queue_max_size);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue