[vlc-devel] [PATCH 1/3] ts demux: add support for dirac streams via registration_descriptor

David Flynn davidf+nntp at woaf.net
Sun Jun 29 23:23:59 CEST 2008


On 2008-06-29, Laurent Aimar <fenrir at via.ecp.fr> wrote:
> On Wed, Jun 25, 2008, David Flynn wrote:
>> +        else if( p_es->i_type == 0xd1 )
>  Btw, do you know why a private stream type is being used instead of a standard
> one like 0x06 ?

Welcome to the vagueness of H.222.0;  As far as i know, there is no advice
given on the meaning of stream_type in the presence of registration_descriptor.

The only point that 0x06 has in its favour is the meaning of
payload_unit_start indicator in ISO/IEC 13818-1:2000, p2.4.3.3:

"""
 When the payload of the Transport Stream packet contains PES packet
 data, the payload_unit_start_indicator has the following significance:
 a '1' indicates that the payload of this Transport Stream packet will
 commence with the first byte of a PES packet and a '0' indicates no PES
 packet shall start in this Transport Stream packet. If the
 payload_unit_start_indicator is set to '1', then one and only one PES
 packet starts in this Transport Stream packet. This also applies to
 private streams of stream_type 6
 ...
 The meaning of this bit for Transport Stream packets carrying only
 private data is not defined in this Specification.
"""

Now our mapping document specifies that the private data is carried in
PES packets.

So, we like VC-1, AC-3 (iirc), etc., pick a random number from the User
defined section of stream_type.

Infact given that we [will] (as have VC-1/AC-3) have a well defined
registration_descriptor, one has to wonder why any attention is given to
the stream_type -- as long as it didn't conflict, ie, keep to
UserDefined, (or for some private PES (0x6)).

This does also raise a question over demux/ts.c -- there is a huge
section that does (effectively):
switch (stream_type):
...
case n:
 /* load of code to check for registation descriptor */
 /* load of code to validate format_identifier */
 /* specific bits */
case m:
 /* load of code to check for registation descriptor */
 /* load of code to validate format_identifier */
 /* specific bits */
case ...
case x:
 /* load of code to check for registation descriptor */
 /* load of code to validate format_identifier */
 /* specific bits */

That could probably be made somewhat simpler?

Any thoughts / comments on the TS mapping are very welcome.

..david




More information about the vlc-devel mailing list