[vlc-devel] re : Questions on buffer management ...

gbazin at altern.org gbazin at altern.org
Wed Jun 4 11:06:14 CEST 2003


> How does VLC read the file at the correct rate?  That is 
> basically what i'm trying to find out -- can anyone 
> illuminate me?
>

The reading in the demux is synchronised to the input's clock and is based on the PCR (program clock reference) info read from the stream by the demux. input_ClockManageRef() is the function that is used to insure the reading is done at the correct pace. It will make the demux sleep until we reach the next PCR time. i_mux_rate has nothing to do with this, it is just used to calculate the time length of a stream based on the file size.
Also don't forget that the input_SplitBuffer(), etc.. functions already have an underlying buffering mechanism (so we can pf_read() big chunks at a time).

Hope this helps,

--
Gildas
-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list