[vlc-devel] [PATCH] 3-of-3: vlc-1.1.0 decoder buffer state
fenrir at elivagar.org
Thu Jun 24 20:25:16 CEST 2010
On Thu, 2010-06-24 at 11:49 +0200, Frank Enderle wrote:
> sorry - I forgot to fix the 'int i' thing. Please ignore my last Mail.
> Find the corrected patch attached.
void libvlc_media_player_get_buffer_state( libvlc_media_player_t *p_mi, int *pi_count, size_t *pi_size, libvlc_time_t *pi_length )
I am unsure of what information you really need. Because in the current
state I don't think it is really usable:
- count: it's not really useful as the number of blocks is not related
to the number of access unit (it depends on the demuxer).
- size: you don't have anything to compare it with (like bitrate)
- for all: you don't know on which ES it applies to, and it doesn't
take into account how much is already decoded by the decoders (up to
500ms in advanced).
So with low input caching, the normal state would be that they all are
If you simply want to have an information on the level of 'current
buffering' a better way would be to extract the value computed in
input_clock_Update used to detect 'late' data. It is the amount of data
expressed in time (in microsecond) already acquired and buffered (ie it
takes into account the data before and after the decoders not yet
If this information is enough/better for what you need, I could do the
input code part.
More information about the vlc-devel