IPlfApiTsDmxAbstract |
This document describes the API of a demultiplexer for MPEG transport streams.
The function of a TS Demux is to filter specific content (e.g. PES packets, sections) from one transport stream (TS). The client can specify several criteria for filtering. The filtered data is routed to decoders or (client) middleware stacks. Several types of filters exist, each with their own filter criteria.
The TS Demux can have a number of Streams. A Stream models a stream of data. One buffer is being used per Stream for all data that is being filtered by the filters associated with this Stream. This buffer is not explicitly modelled. When the data is actually being routed to a client, the client has to manage the buffer explicitly.
A TPH Filter is a transport packet header filter that allows setting of filter criteria on some other fields than the PID. Figure 1‑1 shows the structure of a transport packet header. For explanation of the semantics of the data, see [5].
Figure 1‑1: Structure of a transport packet header
Typically, a Stream has one PID or TPH Filter. Only for remultiplexing of a single program (as defined in [5]), a Stream can have more of these filters. Each component of a program is conveyed on a separate PID. So, a PID or TPH Filter is needed for each component to be filtered.
Each PID Filter can have specialized filters attached to do additional filtering on the output of the PID Filters. These specialized filters are the following:
� PES Filters to filter PES packets,
� PES Notifiers to notify PES packets to clients,
� Section Filters for filtering of MPEG-2 sections.
TPH Filters can only have PES Filters and Notifiers attached. Each PID or TPH Filter can have at most one PES Notifier attached to notify PES packets to clients.
PID or TPH Filters can only have one type of specialized filters attached.
The demultiplexer also has PCR Filters. A PCR Filter is used for filtering Program Clock Reference (PCR) data and routing it to a System Time Clock recovery mechanism. A PCR is a time stamp from which the timing of decoders is derived.
The descrambler and the demultiplexer are tightly bound and come in dedicated pairs (e.g. the TS demultiplexer and the DVB descrambler). That is why the interface of the Descrambler is also described in this document.
Content providers can protect their content through scrambling. The Descrambler descrambles streams at various levels (TS, PES, and section). Descrambling is only possible if the Descrambler has the right descrambling keys. If a customer is entitled to get access to the descrambled content, the client can get access to the proper descrambling keys which will then be fed to the Descrambler.
Figure 1‑2 shows some TS Demux concepts.
Figure 1‑2: Demultiplexer concepts
Figure 1‑3 shows a typical scenario: playing a program. The thin arrows indicate associations among objects and the thick ones the direction of filtered data.
Streams �stream1', �stream2', and �stream3' extract respectively video, audio, and subtitles from the incoming transport stream and route their data to the respective decoders. Stream �stream4' filters Teletext data and routes it to memory after applying PES header filtering using a PES Filter. Streams �stream5' and �stream6' filter meta-data from the incoming transport stream that tells among other things on which PIDs the components of the program are conveyed. Stream �stream7' filters ECMs from the incoming transport stream. For filtering EMMs another Stream with a Section Filter is needed. This is not shown in the picture as it would make it too crowded. This meta-data is packed in sections.
Parameters | retval | Indicates whether requests can be made to the demux. |
Parameters | pid | PID of the transport streams packets that carry the required section. |
BufferSize | Input parameter representing buffer size. | |
CrcMode | Input parameter representing CRC mode. | |
cookie | Cookie that will be returned on every notification of a section. | |
ContinuousMode | Start the filter in continuous mode (TRUE) or in one-shot mode (FALSE). | |
FilterDepth | Input parameter representing filter depth. | |
ModeArray | The mode value for the section filter. It indicates per bit whether positive filtering ('0') or negative filter ('1') should be applied to the corresponding bit in the data. | |
MatchArray | The match value for the section filter. | |
MaskArray | The mask value for the section filter. | |
error | Output parameter returning the error code. | |
retval | Returns the subscription ID corresponding to this request. This ID is used for updating, parsing and canceling this request. |
Parameters | subscrId | The subscription ID which was returned by RequestFilter(). |
FilterDepth | Input parameter representing filter depth. | |
ModeArray | The mode value for the section filter. | |
MatchArray | The match value for the section filter. | |
MaskArray | The mask value for the section filter. | |
error | Output parameter returning the error code. | |
retval | Returns TRUE if the section filter parameters were successfully updated and FALSE otherwise. |
Parameters | subscrId | The subscription ID which was returned by RequestFilter(). |
error | Output parameter returning error code. |
Parameters | pid | PID of the transport streams packets that carry the required section. |
BufferSize | Input parameter representing buffer size. | |
CrcMode | Input parameter representing CRC mode. | |
cookie | Cookie that will be returned on every notification of a section. | |
ContinuousMode | Start the filter in continuous mode (TRUE) or in one-shot mode (FALSE). | |
timeout | Defines the timeout after which any received section data will be notified, in case nothing is received anymore | |
listLength | The maximum number of sections in the list | |
FilterDepth | Input parameter representing filter depth. | |
ModeArray | The mode value for the section filter. It indicates per bit whether positive filtering ('0') or negative filter ('1') should be applied to the corresponding bit in the data. | |
MatchArray | The match value for the section filter. | |
MaskArray | The mask value for the section filter. | |
error | Output parameter returning the error code. | |
retval | Returns the subscription ID corresponding to this request. This ID is used for updating, parsing and canceling this request. |
Parameters | subscrId | The subscription ID which was returned by RequestFilter(). |
FilterDepth | Input parameter representing filter depth. | |
ModeArray | The mode value for the section filter. | |
MatchArray | The match value for the section filter. | |
MaskArray | The mask value for the section filter. | |
error | Output parameter returning the error code. | |
retval | Returns TRUE if the section filter parameters were successfully updated and FALSE otherwise. |
Parameters | subscrId | The subscription ID which was returned by RequestFilter(). |
error | Output parameter returning error code. |
Parameters | pid | The PID of the TS packets that carry the required section. |
BufferSize | Input parameter representing buffer size. | |
cookie | Cookie that will be returned on every notification of a PES. | |
FilterDepth | Input parameter representing filter depth. | |
MatchArray | The match value for the PES filter. | |
MaskArray | The mask value for the PES filter. | |
error | Output parameter returning error code. | |
retval | Returns the subscription ID corresponding to this request. This ID is used for updating, parsing and canceling this request. |
Parameters | subscrId | The subscription ID which was returned by RequestPes(). |
error | Output parameter returning error code. |
Parameters | streamtype | The video stream type |
supported | Output parameter returning the supportedness. | |
error | Output parameter returning error code. |
Parameters | streamtype | The video stream type |
error | Output parameter returning error code. |
Parameters | streamtype | Output parameter returning the video stream type |
error | Output parameter returning error code. |
Parameters | streamtype | The audio stream type |
supported | Output parameter returning the supportedness. | |
error | Output parameter returning error code. |
Parameters | streamtype | The audio stream type |
error | Output parameter returning error code. |
Parameters | streamtype | Output parameter returning the audio stream type |
error | Output parameter returning error code. |
Parameters | streamtype | The pcr stream type |
supported | Output parameter returning the supportedness. | |
error | Output parameter returning error code. |
Parameters | streamtype | The pcr stream type |
error | Output parameter returning error code. |
Parameters | streamtype | Output parameter returning the pcr stream type |
error | Output parameter returning error code. |
Parameters | pid | Output parameter returning packet ID. |
error | Output parameter returning error code. |
Parameters | pid | Output parameter returning packet ID. |
error | Output parameter returning error code. |
Parameters | pid | Output parameter returning packet ID. |
error | Output parameter returning error code. |
Parameters | pid | Output parameter returning packet ID. |
error | Output parameter returning error code. |
Parameters | pid | Input parameter containing packet ID. |
error | Output parameter returning error code. |
Parameters | pid | Input parameter containing packet ID. |
error | Output parameter returning error code. |
Parameters | pid | Input parameter containing packet ID. |
error | Output parameter returning error code. |
Parameters | pid | Input parameter containing packet ID. |
error | Output parameter returning error code. |
Parameters | error | Output parameter returning error code. |
Parameters | error | Output parameter returning error code. |
Parameters | error | Output parameter returning error code. |
Parameters | error | Output parameter returning error code. |
Parameters | MediaType | Input parameter media type. |
error | Output parameter returning error code. | |
retval | Output parameter returning scrambling status. |
Parameters | subsrId | Identification of the section. |
datacookie | Cookie that was passed in the notification. | |
error | Output parameter returning error code. |
Parameters | subsrId | Identification of the section. |
listcookie | Cookie that was passed in the notification. | |
error | Output parameter returning error code. |
Parameters | subsrId | Identification of the PES filter. |
datacookie | Cookie that was passed in the notification. | |
error | Output parameter returning error code. |