Page 1 of 1

Playback time used for screen capture(with scene filter)

Posted: 17 May 2015 16:08
by siva_kumaran
Hello all,

I am implementing a feature in scene filter for my study purpose. I want to capture the screen shot at a particular X second in a minute.
I have implemented user input in GUI to get that X second(time at which the screenshot to be captured).
"This X second has to be checked with the playback time."
I want help here,how to import the playback time function in "scene.c" which header file and function should i include.
currently i tried this below implementation which is working:
if(strm_sec == (double)(p_sys->i_time1)) //p_sys->i_time1 : user input in GUI to get that X second.
//strm_sec is a local counter which convert the frame count to sec which is not precious as playback time.
{
SnapshotRatio( p_filter, p_pic );
p_sys->i_frames++;
return p_pic;
}
when i googled for this, i came across hackerguide/variables. They gave a example for volume "float volumeStep = var_InheritFloat( p_this, "volume-step" );"
I want to import the playback function in scene filter module.

If something is not clear please let me know.
please help me.
Thanking you....

Re: Playback time used for screen capture(with scene filter)

Posted: 17 May 2015 16:47
by RĂ©mi Denis-Courmont
It is not very clear what you want. In video filters, the date field of each picture represents the intended display time.

Re: Playback time used for screen capture(with scene filter)

Posted: 21 May 2015 12:30
by siva_kumaran
Thank you for your reply...

In scene filter module.
I want to retrieve current playback position(not the system time), so that when the current playback position matches with my desired time, screen capture should occur.
I am more interested to get the seconds from the playback time. which function should i use to get the current playback position????

I read in another post saying that, currently in video filter module this feature is not available but demux module has the information about playback position.
But i really dont know which function holds this playback information....

Please help

Re: Playback time used for screen capture(with scene filter)

Posted: 21 May 2015 16:45
by siva_kumaran
can i use the below function to get the playback time??? correct me if i am wrong,
int64_t i_time = var_GetTime( p_input, "time" )

if so how to get the seconds parameter from it????