Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: V4 API proposal
Hi Johannes,
thanks for your proposal.
Johannes Stezenbach wrote:
>
> There is no "section" format for PS, so filtering the PSM and
> PSD is just the
> same as for A/V PES (the PSD even is in PES format). Also, if I'm not
> mistaken (plese correct me if I'm wrong), the MPEG-2 PS syntax is the
> same as the MPEG-1 System Stream syntax, so there are no additional
> requirements for the demux to process MPEG-1.
> My hardware manual tells me that it is also possible to filter PS
> on the sub_stream_id, which implies that the stream_id is 0xbd
> (private_stream_1). I can't find any more documentation on that,
> but I guess it's handy for DVD stuff.
>
> So I guess we'd need:
>
> struct dmx_sid_filter_params {
> u8 stream_id;
> u8 flags;
> #define DMX_SFF_NORMAL 0
> #define DMX_SFF_SUBSID 1
> };
> #define DMX_SET_SID_FILTER _IOW('o',99,struct dmx_sid_filter_params)
>
>
> DMX_SET_SOURCE should also have a stream_type parameter
> (TS, PS, AVPES), and DMX_SET_SID_FILTER would only be allowed when the
> demux is set to source_type PS and AVPES; DMX_SET_FILTER and
> DMX_SET_PES_FILTER
> would only be allowed for stream_type TS. Other combinations would
> return EINVAL (or whatever).
>
> (The nomenclature is confusing here; maybe all three filter types
> should be renamed like DMX_SET_PS_FILTER, DMX_SET_TS_PES_FILTER,
> DMX_SET_TS_SCT_FILTER?)
>
> > * you additionally get the SCR (like PCR; in case of PS)
>
> For PS the SCR is not associated with any particular stream_id, so
> it's not necessary to set a filter. The hardware will do it
> automatically, and DMX_GET_STC can be used to retrieve the SCR value
> (I guess).
>
The current state is:
typedef struct dmx_filter
{
uint8_t filter[DMX_FILTER_SIZE];
uint8_t mask[DMX_FILTER_SIZE];
uint8_t mode[DMX_FILTER_SIZE];
} dmx_filter_t;
struct dmx_sct_filter_params
{
uint16_t pid;
dmx_filter_t filter;
uint32_t timeout;
uint32_t flags;
#define DMX_CHECK_CRC 1
#define DMX_ONESHOT 2
#define DMX_IMMEDIATE_START 4
#define DMX_KERNEL_CLIENT 0x8000
};
struct dmx_pes_filter_params
{
uint16_t pid;
dmx_input_t input;
dmx_output_t output;
dmx_pes_type_t pes_type;
uint32_t flags;
};
struct dmx_sid_filter_params {
u8 stream_id;
u8 flags;
#define DMX_SFF_NORMAL 0
#define DMX_SFF_SUBSID 1
};
For sure section filtering is very special due to its
header filtering. PID and stream_id filtering seems to be
very common.
We could put the sub stream id together
with the stream_id in one word or we use the header filtering.
so we get :
struct dmx_filter_params
{
uint16_t id;
uint32_t flags;
dmx_input_t input; -> remove
dmx_output_t output; -> remove !?
dmx_pes_type_t pes_type; -> needed ???
};
with
DMX_SET_FILTER
and
struct dmx_ext_filter_params
{
uint16_t id;
uint32_t flags;
dmx_header_filter_t header_filter;
dmx_input_t input; -> remove
dmx_output_t output; -> remove !?
dmx_pes_type_t pes_type; -> needed ???
};
with
DMX_SET_EXT_FILTER ???
(Could be also used for PES ???)
If we get differnt APIs for differnt stream it would be better to have different divices.
Regards,
thomas
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index