Mailing List archive

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

[linux-dvb] Re: DVB API extension: DMX_GET_STC



Felix Domke wrote:
> Johannes Stezenbach wrote:
> >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)
> 
> Some hardware supports generating an interrupt on a specific STC, and 
> generally i think polling the STC from userspace is a bad idea.

Hm, I didn't even think of using interupts here ;|

Anyway, I don't need to poll. Whenever I get a subtitle page, I fetch the
current STC, calculate the time difference and set a timer.

> Maybe some DMX_SET_STC_NOTIFY (with same structure) together with a 
> POLLPRI (or something like this) which fires when the STC matches? (or 
> even a blocking DMX_WAIT_STC)

I'm not against adding that, but:
- it's more difficult to use in middleware, because you have to
  implement something that coordinates multiple concurrent
  "wait for that STC" calls (subtitles typically have 1..3 pages
  queued waiting for their PTS, and maybe other things need
  PTS synchronization, too)
- my hardware can only interrupt for STC0, not for STC1 :-(

If DMX_SET_STC_NOTIFY gets implemented, it would then generate an event
to be fetched with DMX_GET_EVENT. And DMX_GET_EVENT on a blocking file
descriptor will block until the next event comes, giving us the
functionality of DMX_WAIT_STC.

If you really need DMX_SET_STC_NOTIFY, say so. Otherwise I would like
to keep the API lean and mean for now.


Regards,
Johannes


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



Home | Main Index | Thread Index