Page 1 of 1

About block_t::i_pts value

Posted: 24 Aug 2016 22:31
by coderXY
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.

Re: About block_t::i_pts value

Posted: 25 Aug 2016 05:27
by Rémi Denis-Courmont
It's microseconds. The origin is arbitrary.

Re: About block_t::i_pts value

Posted: 25 Aug 2016 09:09
by coderXY
Thanks for your answer (and time) Rémi.