diff options
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/demux.h | 3 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dmxdev.c | 11 | ||||
-rw-r--r-- | linux/include/linux/dvb/dmx.h | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/demux.h b/linux/drivers/media/dvb/dvb-core/demux.h index 1042bdab1..d1dfa8b5e 100644 --- a/linux/drivers/media/dvb/dvb-core/demux.h +++ b/linux/drivers/media/dvb/dvb-core/demux.h @@ -286,6 +286,9 @@ struct dmx_demux_s { int (*disconnect_frontend) (struct dmx_demux_s* demux); int (*get_pes_pids) (struct dmx_demux_s* demux, __u16 *pids); + + int (*get_stc) (struct dmx_demux_s* demux, unsigned int num, + uint64_t *stc, unsigned int *base); }; typedef struct dmx_demux_s dmx_demux_t; diff --git a/linux/drivers/media/dvb/dvb-core/dmxdev.c b/linux/drivers/media/dvb/dvb-core/dmxdev.c index c54e397cd..b7034c0f2 100644 --- a/linux/drivers/media/dvb/dvb-core/dmxdev.c +++ b/linux/drivers/media/dvb/dvb-core/dmxdev.c @@ -960,6 +960,17 @@ static int dvb_demux_do_ioctl(struct inode *inode, struct file *file, dmxdev->demux->get_pes_pids(dmxdev->demux, (uint16_t *)parg); break; + case DMX_GET_STC: + if (!dmxdev->demux->get_stc) { + ret=-EINVAL; + break; + } + ret = dmxdev->demux->get_stc(dmxdev->demux, + ((struct dmx_stc *)parg)->num, + &((struct dmx_stc *)parg)->stc, + &((struct dmx_stc *)parg)->base); + break; + default: ret=-EINVAL; } diff --git a/linux/include/linux/dvb/dmx.h b/linux/include/linux/dvb/dmx.h index 3c704088d..089b21734 100644 --- a/linux/include/linux/dvb/dmx.h +++ b/linux/include/linux/dvb/dmx.h @@ -158,6 +158,12 @@ typedef enum { DMX_SOURCE_DVR3 } dmx_source_t; +struct dmx_stc { + unsigned int num; /* input : which STC? 0..N */ + unsigned int base; /* output: divisor for stc to get 90 kHz clock */ + uint64_t stc; /* output: stc in 'base'*90 kHz units */ +}; + #define DMX_START _IO('o',41) #define DMX_STOP _IO('o',42) @@ -168,6 +174,7 @@ typedef enum { #define DMX_GET_PES_PIDS _IOR('o',47,uint16_t[5]) #define DMX_GET_CAPS _IOR('o',48,dmx_caps_t) #define DMX_SET_SOURCE _IOW('o',49,dmx_source_t) +#define DMX_GET_STC _IOWR('o',50,struct dmx_stc) #endif /*_DVBDMX_H_*/ |