Page 1 of 1

Get accurate playback position

Posted: 17 Sep 2012 17:55
by kostyan
I am writing an access module and would like to get the position of the currently displayed video frame within the video stream. Which module has this information available? I looked into video_output.c and few other files but didn't find it.

I understand that there might be no clean way to access this information being an access module, but maybe a dirty way to have something to start with :)

Appreciate any hints!

Best,
Konstantin

Re: Get accurate playback position

Posted: 17 Sep 2012 22:17
by Jean-Baptiste Kempf
Why do you need that from the access?

Re: Get accurate playback position

Posted: 17 Sep 2012 22:51
by Rémi Denis-Courmont
It makes no sense for an access to get that information. It's not even a defined notion at that level.

Re: Get accurate playback position

Posted: 18 Sep 2012 17:45
by kostyan
I want to know the exact amount of video in the pipe between me (that is, the access module) and the picture on the screen. It should be something around the value I returned replying to ACCESS_GET_PTS_DELAY but I would like to have the exact value.

Re: Get accurate playback position

Posted: 18 Sep 2012 21:17
by Rémi Denis-Courmont
Again, it's not even defined. You can't get that information. Live with it.

Re: Get accurate playback position

Posted: 19 Sep 2012 08:35
by kostyan
If it is not defined, then how does a video output know when a frame is late?

Re: Get accurate playback position

Posted: 19 Sep 2012 09:38
by Rémi Denis-Courmont
It is not defined at the access level. There may be no video output, or no video output yet, or no video output anymore, or the video may be going through a splitter with more than one outputs downstream. Also, even if there is exactly one video output, it's running asynchronously in a separate thread.

What you want does not exist within the current design of the player. It's as simple as that.

Re: Get accurate playback position

Posted: 19 Sep 2012 10:05
by kostyan
Thanks for the reply!

I am really not saying that it makes sense to have this information at the access level. Maybe it does and maybe it does not and I have to rethink the design of my code, and since you have more experience here, you are most probably right.

At the moment, however, I am just asking for a hint: where in any *.c file is there a place/line/function, where I can find the information about the position of the currently displayed frame. Assumptions: there exists exactly one video output and it is displaying the video on the screen (as opposite to, e.g., recording it to a file).

Even if you don't agree with the way I am currently going to use this information, a hint from anybody would be really welcome :)