[vlc-devel] How can I retrieve current playback time in VLC video filter module?

Waqas abdalian_17 at hotmail.com
Fri Jan 2 08:14:11 CET 2015

Hi all,
I want to manipulate an image that lies within the predefined set of playback times (for example from 3 second mark to 6 second mark). However, I can't retrieve the playback time within the video filter module. The struct picture_t contains a member "date" that holds the display date but not the timestamp starting from zero when the playback started. There is apparently no way I can determine what is the current playback position especially after the user performs a seek operation using the seek bar.So, how do I determine the current playback position within the "video filter" module that stays consistent even after a seek operation?Here is the sample code that will simply drop frames from 60 sec to 120 sec. If I do seek operation, these marks of 60 and 120 secs are no longer valid.
Any help is highly appreciated!
picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
    filter_sys_t *p_sys = p_filter->p_sys;
    // save the start date
    if ( p_sys->start == -1 )
        p_sys->start = p_pic->date;    
    if ( p_pic->date > p_sys->start + 60000000 && p_pic->date < p_sys->start + 120000000)
        picture_Release( p_pic );
         return NULL;
    return p_pic;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150102/88db9857/attachment.html>

More information about the vlc-devel mailing list