[Bug 742979] adaptivedemux: Adaptive bitrate algorithm does not react fast enough to declining bitrate
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Tue Feb 3 03:04:44 PST 2015
https://bugzilla.gnome.org/show_bug.cgi?id=742979
GStreamer | gst-plugins-bad | git master
A Ashley <bugzilla> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #295549|none |needs-work
status| |
--- Comment #19 from A Ashley <bugzilla at ashley-family.net> 2015-02-03 11:04:38 UTC ---
Review of attachment 295549:
--> (https://bugzilla.gnome.org/review?bug=742979&attachment=295549)
> static void
>+gst_adaptive_demux_set_property (GObject * object, guint prop_id,
>+ const GValue * value, GParamSpec * pspec)
>+{
>+ GstAdaptiveDemux *demux = GST_ADAPTIVE_DEMUX (object);
>+
>+ switch (prop_id) {
>+ case PROP_LOOKBACK_FRAGMENTS:
>+ demux->num_lookback_fragments = g_value_get_uint (value);
>+ break;
>+ default:
>+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
>+ break;
>+ }
>+}
>+
Probably should check if demux has already been started. Given the current
code, increasing the buffer size after start will cause a buffer overflow.
I think that either the property should not be changeable after start, or the
buffer needs to re-allocated if the property is changed.
> static guint64
>-gst_adaptive_demux_stream_update_current_bitrate (GstAdaptiveDemuxStream *
>- stream)
>+_update_average_bitrate (GstAdaptiveDemux * demux,
>+ GstAdaptiveDemuxStream * stream, guint64 new_bitrate)
>+{
>+ gint index = stream->moving_index % demux->num_lookback_fragments;
>+
>+ stream->moving_bitrate -= stream->fragment_bitrates[index];
>+ stream->fragment_bitrates[index] = new_bitrate;
>+ stream->moving_bitrate += new_bitrate;
>+
>+ stream->moving_index += 1;
>+
>+ if (stream->moving_index > demux->num_lookback_fragments)
>+ return stream->moving_bitrate / demux->num_lookback_fragments;
>+ return stream->moving_bitrate / stream->moving_index;
>+}
Should this be reset after a seek?
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list