[vlc-devel] Re: How to timestamp output picture ?

Gildas Bazin gbazin at netcourrier.com
Sat Nov 29 15:18:55 CET 2003


On Thursday 27 November 2003 17:03, Olivier Aubert wrote:
> Hello
> 
> I am in the process of polishing a snapshot module for VLC, which allows
> external applications to ask for snapshots of the displayed movie. For
> this, I create a dummy video output module which keeps a cache of
> rendered pictures.
> 
> I would like to add timestamps to these cached snapshots, for the
> special case of seekable streams where we can have the notion of an
> absolute position in ms from the movie start, or even better, a frame
> number. For the moment, I infer this from the position in the stream
> (through input_Tell), but it is not very clean nor accurate.
> 
> I read through various pieces of code, but I found nothing that could
> allow me to attach an absolute timestamp or frame number to a
> p_picture_t fed to a video output module.
> 
> Could some knowledgeable person confirm this impression, or give me
> another direction to investigate ?
> 

I think var_Get( p_input, "time", &time ) will give you what you are looking 
for. Not all demuxers support the DEMUX_GET_TIME call though so when this 
gives you back 0, you should either use input_Tell() or var_Get( p_input, 
"position", &time ) .

--
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