About block_t::i_pts value

This forum is about all development around libVLC.
coderXY
New Cone
New Cone
Posts: 4
Joined: 24 Aug 2016 22:12

About block_t::i_pts value

Postby coderXY » 24 Aug 2016 22:31

Hi everyone,

I'm using smem module to get decoded frame buffer and do my own rendering.
I get valid data in my postrender callback but in order to render it when it needs to, I have to retrieve the sample (presentation) time.
The last parameter of the callback is pts (presentation time) so this is what I need but I don't know how to interpret the value.

I ran my code multiple times and the value was always different for the first frame but the delta between the first and the second one is always the same.
So I guess it's kind of a date representation.
I read it was milliseconds since epoch time but it doesn't work for me.
It may be based on a clock so I would need to divide it by a certain value (frequency) but frankly I don't know.

Any hint would be great.

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

Re: About block_t::i_pts value

Postby Rémi Denis-Courmont » 25 Aug 2016 05:27

It's microseconds. The origin is arbitrary.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

coderXY
New Cone
New Cone
Posts: 4
Joined: 24 Aug 2016 22:12

Re: About block_t::i_pts value

Postby coderXY » 25 Aug 2016 09:09

Thanks for your answer (and time) Rémi.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 14 guests