2.6.11 IBMDStreamingH264NALParser Interface

The IBMDStreamingH264NALParser interface is used to retrieve video codec settings from a NAL packet.

A reference to an IBMDStreamingH264NALParser interface may be obtained from CoCreateInstance() on platforms with native COM support or from CreateBMDStreamingH264NALParser() on other platforms.

2.6.11.1 IBMDStreamingH264NALParser::IsNALSequenceParameterSet method

HRESULT IBMDStreamingH264NALParser::IsNALSequenceParameterSet(IBMDStreamingH264NALPacket *nal);

The IsNALSequenceParameterSet method parses the specified NAL packet to determine if the Sequence Parameter Set (SPS) decoding parameter has been set in the NAL packet.

Parameters:

nal – The NAL Packet to query for the state of the sequence parameter.

Return values:
  • S_FALSE – The sequence parameter of the NAL packet is not set.

  • S_OK – The sequence parameter of the NAL packet is set.

2.6.11.2 IBMDStreamingH264NALParser::IsNALPictureParameterSet method

HRESULT IBMDStreamingH264NALParser::IsNALPictureParameterSet(IBMDStreamingH264NALPacket *nal);

The IsNALPictureParameterSet method parses the specified NAL packet to determine if the Picture Parameter Set (PPS) decoding parameter has been set in the NAL packet. This information can be used to configure a decoder for decoding the video contained in the NAL packet.

Parameters:

nal – The NAL Packet to query for the state of the picture parameter.

Return values:
  • S_FALSE – The picture parameter of the NAL packet is not set.

  • S_OK – The picture parameter of the NAL packet is set.

2.6.11.3 IBMDStreamingH264NALParser::GetProfileAndLevelFromSPS method

HRESULT IBMDStreamingH264NALParser::GetProfileAndLevelFromSPS(IBMDStreamingH264NALPacket *nal, uint32_t *profileIdc, uint32_t *profileCompatability, uint32_t *levelIdc);

The GetProfileAndLevelFromSPS method parses the specified NAL packet and returns the H.264 profile, level and profile compatibility flags. These values can be used to determine if the video contained in the NAL packet can be decoded by a certain H.264 decoder.

Parameters:
  • nal – The NAL Packet to query for the profile and level.

  • profileIdc – The H.264 profile for this NAL packet.

  • profileCompatability – The set of profile constraint flags for this NAL packet.

  • levelIdc – The H.264 level for this NAL packet.

Return values:
  • E_POINTER – One or more parameters are invalid.

  • E_FAIL – Failure

  • S_OK – Success