Mailing List archive

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

[linux-dvb] Re: V4 API proposal



Haber, Thomas wrote:
> Florian Schirmer wrote:
> 
> > When routing/demuxing TS you do that based on:
> > 
> > - PID
> > - Section filters
> 
> Yes you use 
>  * packet id for single pes streams (audio,video, ...)
>  * packet id [+ table id [+ n bytes section header Filter]] for sections
>  * additionally you get the PCR on a PID
>  
> > When routing/demuxing PS/AVPES/... you do that based on:
> > 
> > - Stream type
> > - camera angle
> > - language
> > - subtitle
> > - ...
> 
> No you only use
> 
>  * streamid for the streams (audio, video ,...) (corresponds to packetid)
>  * streamid for program stream map and program stream directory (somehow similar to tables)

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).

Regards,
Johannes


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



Home | Main Index | Thread Index