Get accurate playback position

This forum is about all development around libVLC.
kostyan
Blank Cone
Blank Cone
Posts: 34
Joined: 15 Jun 2012 12:07
VLC version: 2.1.0-git
Operating System: Linux
Location: Berlin, Germany

Get accurate playback position

Postby kostyan » 17 Sep 2012 17:55

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
Konstantin Miller
Technische Universität Berlin

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Get accurate playback position

Postby Jean-Baptiste Kempf » 17 Sep 2012 22:17

Why do you need that from the access?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Get accurate playback position

Postby Rémi Denis-Courmont » 17 Sep 2012 22:51

It makes no sense for an access to get that information. It's not even a defined notion at that level.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

kostyan
Blank Cone
Blank Cone
Posts: 34
Joined: 15 Jun 2012 12:07
VLC version: 2.1.0-git
Operating System: Linux
Location: Berlin, Germany

Re: Get accurate playback position

Postby kostyan » 18 Sep 2012 17:45

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.
Konstantin Miller
Technische Universität Berlin

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Get accurate playback position

Postby Rémi Denis-Courmont » 18 Sep 2012 21:17

Again, it's not even defined. You can't get that information. Live with it.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

kostyan
Blank Cone
Blank Cone
Posts: 34
Joined: 15 Jun 2012 12:07
VLC version: 2.1.0-git
Operating System: Linux
Location: Berlin, Germany

Re: Get accurate playback position

Postby kostyan » 19 Sep 2012 08:35

If it is not defined, then how does a video output know when a frame is late?
Konstantin Miller
Technische Universität Berlin

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Get accurate playback position

Postby Rémi Denis-Courmont » 19 Sep 2012 09:38

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

kostyan
Blank Cone
Blank Cone
Posts: 34
Joined: 15 Jun 2012 12:07
VLC version: 2.1.0-git
Operating System: Linux
Location: Berlin, Germany

Re: Get accurate playback position

Postby kostyan » 19 Sep 2012 10:05

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 :)
Konstantin Miller
Technische Universität Berlin


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 3 guests