Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] DVB API extension: DMX_GET_STC



Hi all,

I'm currently working on a DVB subtitle implementation
(in case you're wondering: sorry, it's proprietary).

Anyway, for proper synchronization of DVB subtitles to
the video stream we need to access the STC (system time clock)
from userspace.


Background info:

Subtitle data comes in PES packages, and their PTS (presentation
time stamp) indicates when to display them in reference
to the STC.

The STC is a 33bit counter which is fed from the
PTSs of PES packets from the stream specified by
ioctl DMX_SET_PES_FILTER with DMX_OUT_DECODER and DMX_PES_PCR.
The demux implements a PLL and some filtering to remove
jitter etc. and get a stable clock. The STC is then used
by the MPEG decoder as the reference clock to synchronize audio and
video. It is common to use the video stream as PCR source.

For systems with more than one MPEG decoder the demux
usually provides more than one STC. The Linux DVB API
currently has an implicit connection from DMX_PES_PCR0
to the first MPEG decoder, DMX_PES_PCR1 to the second etc.


Proposal:

I want to keep it simple. What I need is:

  struct dmx_stc {
          uint     num; /* input: which STC? 0...n */
          uint64_t stc; /* output */
  };
  #define DMX_GET_STC  _IOWR('o', 50, struct dmx_stc)


Comments?

Regards,
Johannes


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index