[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:41:17 PST 2015
https://bugzilla.gnome.org/show_bug.cgi?id=742979
GStreamer | gst-plugins-bad | git master
--- Comment #21 from Mathieu Duponchelle <mduponchelle1 at gmail.com> 2015-02-03 11:41:14 UTC ---
(In reply to comment #19)
> Review of attachment 295549 [details]:
>
> > 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.
The propery is indeed declared as CONSTRUCT_ONLY
> > 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?
I would think this info is still significant 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