Mailing List archive

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

[linux-dvb] AW: Re: API changes (was: C/A routing Question)



Hi,

>> Yes, let's throw the dvr device out.
>
>ok. We still need a precise API proposal.

Here we go:

New IOCTLs:

int ioctl(int fd, int request = DMX_ADD_FILTER, struct dmx_filter_params
*params);

typedef enum
{
	DMX_FMT_TS,
	DMX_FMT_PES,
	DMX_FMT_SEC,
	DMX_FMT_PES_HDR,
	DMX_FMT_STC,
	DMX_FMT_ES,
	...
} dmx_format_t;

typedef enum
{
	DMX_DEC_NONE,
	DMX_DEC_VIDEO0,
	DMX_DEC_VIDEO1,
	DMX_DEC_VIDEO2,
	DMX_DEC_AUDIO0,
	DMX_DEC_AUDIO1,
	DMX_DEC_AUDIO2,
	DMX_DEC_PCR0,
	DMX_DEC_PCR1,
	DMX_DEC_PCR2,
	...
} dmx_decoder_t;

struct dmx_filter_params
{
	uint32_t num;
	uint16_t pid;
	uint32_t fe_map;
#define FE_ALL 0
#define FE_MEM 1
#define FE_HW1 2
#define FE_HW2 4
#define FE_HW2 8
	dmx_format_t format;
	dmx_decoder_t decoder;
	dmx_filter_t sec_filter;
	uint32_t sec_timeout;
	uint32_t sec_flags;
#define DMX_CHECK_CRC 1
#define DMX_ONESHOT 2
#define DMX_IMMEDIATE_START 4
}

- Will add filters.
- All output will be routed to the same fd. 
- Some restrictions apply: Only filters of the same type (TS or PES or SEC)
are allowed.
- Num must be unique (or should be set by the demux?)
- Merging in section support is not necessesary but makes sense (IMHO)
- dmx_decoder_t can be split into just a single type of every decoder and
then adding a new uint32_t dec_num; field. Dunno what is more reasonable.
- Internally each filter still maps into a single feed. So there is no need
to fiddle around with any device driver. (Hopefully :)
- I've added an fe_map in favour to a SELECT_SOURCE IOCTL. Makes more sense
i think. Now you can select the fe on the fly.
- The old interface can be mapped with sane defaults (eg FE_ALL) to the new
interface if we want to maintain compatibility.

int ioctl(int fd, int request = DMX_DEL_FILTER, uint32_t num);

- Will remove filters
- num must be the value as specified (or returned) by the DMX_ADD_FILTER
IOCTL.

Comments?

Bye,
   Florian




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



Home | Main Index | Thread Index