summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/hls/gsthlsdemux.c24
-rw-r--r--ext/hls/gsthlsdemux.h1
-rw-r--r--ext/smoothstreaming/gstmssdemux.c30
-rw-r--r--ext/smoothstreaming/gstmssdemux.h3
4 files changed, 5 insertions, 53 deletions
diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c
index 934bebabb..cbf10a8ca 100644
--- a/ext/hls/gsthlsdemux.c
+++ b/ext/hls/gsthlsdemux.c
@@ -63,14 +63,12 @@ enum
PROP_FRAGMENTS_CACHE,
PROP_BITRATE_LIMIT,
- PROP_CONNECTION_SPEED,
PROP_LAST
};
#define DEFAULT_FRAGMENTS_CACHE 1
#define DEFAULT_FAILED_COUNT 3
#define DEFAULT_BITRATE_LIMIT 0.8
-#define DEFAULT_CONNECTION_SPEED 0
/* GObject */
static void gst_hls_demux_set_property (GObject * object, guint prop_id,
@@ -177,12 +175,6 @@ gst_hls_demux_class_init (GstHLSDemuxClass * klass)
0, 1, DEFAULT_BITRATE_LIMIT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
- g_object_class_install_property (gobject_class, PROP_CONNECTION_SPEED,
- g_param_spec_uint ("connection-speed", "Connection Speed",
- "Network connection speed in kbps (0 = unknown)",
- 0, G_MAXUINT / 1000, DEFAULT_CONNECTION_SPEED,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
element_class->change_state = GST_DEBUG_FUNCPTR (gst_hls_demux_change_state);
gst_element_class_add_pad_template (element_class,
@@ -232,7 +224,6 @@ gst_hls_demux_init (GstHLSDemux * demux)
/* Properties */
demux->bitrate_limit = DEFAULT_BITRATE_LIMIT;
- demux->connection_speed = DEFAULT_CONNECTION_SPEED;
}
static void
@@ -247,9 +238,6 @@ gst_hls_demux_set_property (GObject * object, guint prop_id,
case PROP_BITRATE_LIMIT:
demux->bitrate_limit = g_value_get_float (value);
break;
- case PROP_CONNECTION_SPEED:
- demux->connection_speed = g_value_get_uint (value) * 1000;
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -269,9 +257,6 @@ gst_hls_demux_get_property (GObject * object, guint prop_id, GValue * value,
case PROP_BITRATE_LIMIT:
g_value_set_float (value, demux->bitrate_limit);
break;
- case PROP_CONNECTION_SPEED:
- g_value_set_uint (value, demux->connection_speed / 1000);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -488,13 +473,13 @@ gst_hls_demux_process_manifest (GstAdaptiveDemux * demux, GstBuffer * buf)
GError *err = NULL;
/* TODO seems like something that could be simplified */
- if (hlsdemux->connection_speed == 0) {
+ if (demux->connection_speed == 0) {
GST_M3U8_CLIENT_LOCK (hlsdemux->client);
child = hlsdemux->client->main->current_variant->data;
GST_M3U8_CLIENT_UNLOCK (hlsdemux->client);
} else {
GList *tmp = gst_m3u8_client_get_playlist_for_bitrate (hlsdemux->client,
- hlsdemux->connection_speed);
+ demux->connection_speed);
child = GST_M3U8 (tmp->data);
}
@@ -1074,11 +1059,6 @@ gst_hls_demux_change_playlist (GstHLSDemux * demux, guint max_bitrate,
stream = adaptive_demux->streams->data;
- /* If user specifies a connection speed never use a playlist with a bandwidth
- * superior than it */
- if (demux->connection_speed != 0 && max_bitrate > demux->connection_speed)
- max_bitrate = demux->connection_speed;
-
previous_variant = demux->client->main->current_variant;
current_variant = gst_m3u8_client_get_playlist_for_bitrate (demux->client,
max_bitrate);
diff --git a/ext/hls/gsthlsdemux.h b/ext/hls/gsthlsdemux.h
index c76cd0e56..a8e15ec97 100644
--- a/ext/hls/gsthlsdemux.h
+++ b/ext/hls/gsthlsdemux.h
@@ -76,7 +76,6 @@ struct _GstHLSDemux
/* Properties */
gfloat bitrate_limit; /* limit of the available bitrate to use */
- guint connection_speed; /* Network connection speed in kbps (0 = unknown) */
/* Streaming task */
gint64 next_download;
diff --git a/ext/smoothstreaming/gstmssdemux.c b/ext/smoothstreaming/gstmssdemux.c
index 09e375099..865e1059a 100644
--- a/ext/smoothstreaming/gstmssdemux.c
+++ b/ext/smoothstreaming/gstmssdemux.c
@@ -77,7 +77,6 @@
GST_DEBUG_CATEGORY (mssdemux_debug);
-#define DEFAULT_CONNECTION_SPEED 0
#define DEFAULT_MAX_QUEUE_SIZE_BUFFERS 0
#define DEFAULT_BITRATE_LIMIT 0.8
@@ -85,7 +84,6 @@ enum
{
PROP_0,
- PROP_CONNECTION_SPEED,
PROP_MAX_QUEUE_SIZE_BUFFERS,
PROP_BITRATE_LIMIT,
PROP_LAST
@@ -166,12 +164,6 @@ gst_mss_demux_class_init (GstMssDemuxClass * klass)
gobject_class->set_property = gst_mss_demux_set_property;
gobject_class->get_property = gst_mss_demux_get_property;
- g_object_class_install_property (gobject_class, PROP_CONNECTION_SPEED,
- g_param_spec_uint ("connection-speed", "Connection Speed",
- "Network connection speed in kbps (0 = unknown)",
- 0, G_MAXUINT / 1000, DEFAULT_CONNECTION_SPEED,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
#ifndef GST_REMOVE_DEPRECATED
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",
@@ -250,14 +242,6 @@ gst_mss_demux_set_property (GObject * object, guint prop_id,
GstMssDemux *mssdemux = GST_MSS_DEMUX (object);
switch (prop_id) {
- case PROP_CONNECTION_SPEED:
- GST_OBJECT_LOCK (mssdemux);
- mssdemux->connection_speed = g_value_get_uint (value) * 1000;
- mssdemux->update_bitrates = TRUE;
- GST_DEBUG_OBJECT (mssdemux, "Connection speed set to %" G_GUINT64_FORMAT,
- mssdemux->connection_speed);
- GST_OBJECT_UNLOCK (mssdemux);
- break;
case PROP_MAX_QUEUE_SIZE_BUFFERS:
mssdemux->data_queue_max_size = g_value_get_uint (value);
break;
@@ -277,9 +261,6 @@ gst_mss_demux_get_property (GObject * object, guint prop_id, GValue * value,
GstMssDemux *mssdemux = GST_MSS_DEMUX (object);
switch (prop_id) {
- case PROP_CONNECTION_SPEED:
- g_value_set_uint (value, mssdemux->connection_speed / 1000);
- break;
case PROP_MAX_QUEUE_SIZE_BUFFERS:
g_value_set_uint (value, mssdemux->data_queue_max_size);
break;
@@ -416,11 +397,9 @@ gst_mss_demux_setup_streams (GstAdaptiveDemux * demux)
return FALSE;
}
- GST_INFO_OBJECT (mssdemux, "Changing max bitrate to %" G_GUINT64_FORMAT,
- mssdemux->connection_speed);
- gst_mss_manifest_change_bitrate (mssdemux->manifest,
- mssdemux->connection_speed);
- mssdemux->update_bitrates = FALSE;
+ GST_INFO_OBJECT (mssdemux, "Changing max bitrate to %u",
+ demux->connection_speed);
+ gst_mss_manifest_change_bitrate (mssdemux->manifest, demux->connection_speed);
for (iter = streams; iter; iter = g_slist_next (iter)) {
GstPad *srcpad = NULL;
@@ -508,9 +487,6 @@ gst_mss_demux_stream_select_bitrate (GstAdaptiveDemuxStream * stream,
gboolean ret = FALSE;
bitrate *= mssdemux->bitrate_limit;
- if (mssdemux->connection_speed) {
- bitrate = MIN (mssdemux->connection_speed, bitrate);
- }
GST_DEBUG_OBJECT (stream->pad,
"Using stream download bitrate %" G_GUINT64_FORMAT, bitrate);
diff --git a/ext/smoothstreaming/gstmssdemux.h b/ext/smoothstreaming/gstmssdemux.h
index fe8a49d34..afd750853 100644
--- a/ext/smoothstreaming/gstmssdemux.h
+++ b/ext/smoothstreaming/gstmssdemux.h
@@ -70,10 +70,7 @@ struct _GstMssDemux {
guint n_videos;
guint n_audios;
- gboolean update_bitrates;
-
/* properties */
- guint64 connection_speed; /* in bps */
guint data_queue_max_size;
gfloat bitrate_limit;
};