2.6.9 IBMDStreamingAudioPacket Interface

The IBMDStreamingAudioPacket interface represents an audio packet.

Objects with an IBMDStreamingAudioPacket interface are passed to the IBMDStreamingH264InputCallback::H264AudioPacketArrived() callback.

The audio packet can contain compressed audio, such as MPEG-2 AAC audio, which can be passed to a suitable audio decoder for decoding and playback.

For some applications it may be more convenient to process audio packets instead of processing audio carried in transport stream packets.

Related Interfaces

Interface

Interface ID

Description

IBMDStreamingH264InputCallback

IID_IBMDStreamingH264InputCallback

An IBMDStreamingAudioPacket object interface is passed to IBMDStreamingH264InputCallback::H264AudioPacketArrived()

2.6.9.1 IBMDStreamingAudioPacket::GetCodec method

BMDStreamingAudioCodec IBMDStreamingAudioPacket::GetCodec();

The GetCodec method returns the codec describing the audio in the packet.

Returns:

The codec for the audio in the packet.

2.6.9.2 IBMDStreamingAudioPacket::GetPayloadSize method

long IBMDStreamingAudioPacket::GetPayloadSize();

The GetPayloadSize method gets the number of bytes in the audio packet.

Returns:

Audio packet size in bytes.

2.6.9.3 IBMDStreamingAudioPacket::GetBytes method

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

The GetBytes method returns a pointer to the data buffer of the audio packet.

Parameters:

buffer – Pointer to audio packet data buffer - only valid while object remains valid.

Return values:
  • E_POINTER – The buffer parameter is invalid

  • S_OK – Success

2.6.9.4 IBMDStreamingAudioPacket::GetPlayTime method

HRESULT IBMDStreamingAudioPacket::GetPlayTime(uint64_t requestedTimeScale, uint64_t *playTime);

The GetPlayTime method returns the time at which to playback the audio contained in the audio packet. The play time is in units of the requested time scale.

Parameters:
  • requestedTimeScale – Time scale for the displayTime

  • playTime – Time at which to play the audio

Return values:
  • E_POINTER – The playTime parameter is invalid

  • S_OK – Success