Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: V4 API STC compare
Rob.McConnell@Zarlink.Com wrote:
>
> I am planning on adding a "DVB_DMX_SET_STC_COMPARE" ioctl to my driver to
> allow a compare event to be setup in hardware. When (and if) the STC event
> triggers (i.e. the value passed in by the syscall equals the actual STC
> value), the user process can determine this occurrence through using the
> standard "DVB_DMX_GET_EVENT" ioctl. Also a "DVB_DMX_CLR_STC_COMPARE" ioctl
> would be used to clear/cancel this event if need be (e.g. channel change).
Fine by me. The advantage of using that instead a userspace timer is
that it would work with trick modes (e.g. if someone wants subtitles
in slow motion).
> I plan on adding:
>
> #define DVB_DMX_NULL_EVENT
> #define DVB_DMX_STC_COMPARE_EVENT
>
> to the current list. If a process is waiting on this event and the
> "DVB_DMX_CLR_STC_COMPARE" ioctl is issued on the logical demux device, then
> the process would wake up and the event returned would be
> "DVB_DMX_NULL_EVENT".
What would DVB_DMX_NULL_EVENT be good for? Why not just return from the
blocking syscall with an appropriate errno?
Anyway, I would:
enum dvb_dmx_event_type {
DVB_DMX_RECORDING_EVENT,
DVB_DMX_STC_COMPARE_EVENT
};
struct dvb_dmx_stc_trigger {
int enable; // enable STC compare event
uint64_t stc; // 33-bit / 90kHz
};
struct dvb_dmx_event {
enum dvb_dmx_event_type type;
union {
struct {
enum dvb_dmx_recording_event_type event;
uint64_t bytes; /* still not clearly defined */
} recording;
uint64_t stc; // when DVB_DMX_STC_COMPARE_EVENT was queued
};
};
#define DMX_SET_STC_TRIGGER _IOW(DVB_IOCTL_BASE, 0x4d, struct dvb_dmx_stc_trigger)
#define DMX_GET_EVENT _IOR(DVB_IOCTL_BASE, 0x4e, struct dmx_event)
The DVB_DMX_CLR_STC_COMPARE operation would be done by DMX_SET_STC_TRIGGER
with "enable" == 0.
OK?
Johannes
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index