2.6.10 IBMDStreamingMPEG2TSPacket Interface

The IBMDStreamingMPEG2TSPacket interface represents an MPEG-2 transport stream packet as defined by ISO/IEC 13818-1.

Objects with an IBMDStreamingMPEG2TSPacket interface are passed to the IBMDStreamingH264InputCallback::MPEG2TSPacketArrived() callback.

The MPEG-2 transport stream packet can contain compressed audio or video together with metadata for decoding and synchronizing audio and video streams.

For some applications it may be more convenient to process transport stream packets as an alternative to processing NAL video packets and audio packets separately.

Related Interfaces

Interface

Interface ID

Description

IBMDStreamingH264InputCallback

IID_IBMDStreamingH264InputCallback

An IBMDStreamingMPEG2TSPacket object interface is passed to IBMDStreamingH264InputCallback::MPEG2TSPacketArrived()

2.6.10.1 IBMDStreamingMPEG2TSPacket::GetPayloadSize method

long IBMDStreamingMPEG2TSPacket::GetPayloadSize();

The GetPayloadSize method returns the number of bytes in the MPEG-2 transport stream packet including the header.

Returns:

The size of the MPEG TS packet in bytes.

2.6.10.2 IBMDStreamingMPEG2TSPacket::GetBytes method

HRESULT IBMDStreamingMPEG2TSPacket::GetBytes(void **buffer);

The GetBytes method returns a pointer to the data buffer of the MPEG-2 transport stream packet.

Parameters:

buffer – Pointer to MPEG-2 transport stream packet data buffer only valid while object remains valid.

Return values:
  • E_POINTER – The buffer parameter is invalid

  • E_FAIL – Failure

  • S_OK – Success