mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
urisourcebin: Fix adaptive demuxer's property checking and buffering setting
- Add adaptive demuxer's 'connection-speed' property checking - Set adaptive demuxer q2 buffering property via urisrc use_buffering value https://bugzilla.gnome.org/show_bug.cgi?id=772550
This commit is contained in:
parent
9041db4680
commit
14ce96a459
1 changed files with 9 additions and 7 deletions
|
@ -968,7 +968,6 @@ pending_pad_blocked (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
|
|||
if (caps == NULL)
|
||||
caps = gst_pad_query_caps (pad, NULL);
|
||||
|
||||
/* FIXME: Don't do buffering if use_buffering is FALSE */
|
||||
slot = get_output_slot (urisrc, FALSE, TRUE, caps);
|
||||
|
||||
gst_caps_unref (caps);
|
||||
|
@ -1176,11 +1175,11 @@ get_output_slot (GstURISourceBin * urisrc, gboolean do_download,
|
|||
} else {
|
||||
if (is_adaptive) {
|
||||
GST_LOG_OBJECT (urisrc, "Adding queue for adaptive streaming stream");
|
||||
g_object_set (queue, "use-buffering", TRUE, "use-tags-bitrate", TRUE,
|
||||
"use-rate-estimate", FALSE, NULL);
|
||||
g_object_set (queue, "use-buffering", urisrc->use_buffering,
|
||||
"use-tags-bitrate", TRUE, "use-rate-estimate", FALSE, NULL);
|
||||
} else {
|
||||
GST_LOG_OBJECT (urisrc, "Adding queue for buffering");
|
||||
g_object_set (queue, "use-buffering", TRUE, NULL);
|
||||
g_object_set (queue, "use-buffering", urisrc->use_buffering, NULL);
|
||||
}
|
||||
g_object_set (queue, "ring-buffer-max-size",
|
||||
urisrc->ring_buffer_max_size, NULL);
|
||||
|
@ -1768,6 +1767,7 @@ make_demuxer (GstURISourceBin * urisrc, GstCaps * caps)
|
|||
{
|
||||
GList *factories, *eligible, *cur;
|
||||
GstElement *demuxer = NULL;
|
||||
GParamSpec *pspec;
|
||||
|
||||
GST_LOG_OBJECT (urisrc, "making new adaptive demuxer");
|
||||
|
||||
|
@ -1814,7 +1814,9 @@ make_demuxer (GstURISourceBin * urisrc, GstCaps * caps)
|
|||
"pad-removed", G_CALLBACK (pad_removed_cb), urisrc);
|
||||
|
||||
/* Propagate connection-speed property */
|
||||
/* FIXME: Check the property exists on the demuxer */
|
||||
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (demuxer),
|
||||
"connection-speed");
|
||||
if (pspec != NULL)
|
||||
g_object_set (demuxer,
|
||||
"connection-speed", urisrc->connection_speed / 1000, NULL);
|
||||
|
||||
|
|
Loading…
Reference in a new issue