MPEG2_TRANSPORT_STRIDE Structure
Microsoft DirectShow 9.0 |
MPEG2_TRANSPORT_STRIDE Structure
The MPEG2_TRANSPORT_STRIDE structure describes the format of MPEG-2 transport stream (TS) packets. This structure allows for transports streams in which the 188-byte transport packets are not contiguous. For the purpose of this documentation, such packets are referred to as stride packets.
Stride packets are identified by the following media type:
Major Type | MEDIATYPE_Stream |
Subtype | MEDIASUBTYPE_MPEG2_TRANSPORT_STRIDE |
Format Type | FORMAT_None |
The format block (pbFormat) is optional. If the format block is included, it must begin with an MPEG2_TRANSPORT_STRIDE structure. This structure defines the layout of the transport packet within the stride packet. If the format block is NULL, the packets are assumed to use a set of default values; see the Remarks section for details.
Syntax
struct MPEG2_TRANSPORT_STRIDE { DWORD dwOffset DWORD dwPacketLength DWORD dwStride };
Members
dwOffset
Specifies the offset, in bytes, from the beginning of the packet to the first byte of the embedded transport packet. The value must range from zero to (dwStride - dwPacketLength)
, inclusive.
dwPacketLength
Specifies the length of the embedded transport packet, in bytes. For standard MPEG-2 transport packets, the value must be 188 bytes.
dwStride
Specifies the length of the entire stride packet, in bytes. The value must be at least (dwOffset + dwPacketLength)
.
Remarks
The following diagram illustrates the relations between the structure members.
Input buffers that contain multiplexed stride packets have some restrictions:
- Stride packets must be packed contiguously within the buffer.
- No bytes may precede the first stride packet or follow the last stride packet.
- An integral number of stride packets must fit in the buffer; that is, buffer length % dwStride equals zero.
There is no restriction on the number of stride packets per buffer.
If the media type does not contain a format block (pbFormat is NULL), the following default values are used:
- dwOffset: 0
- dwPacketLength: 188
- dwStride: 188
Requirements
Header: Dshow.h.
See Also