Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CH264AVCCBitstreamParser Class Reference

H.264 AVCC format closed caption parser. More...

#include <H264AVCCBitstreamParser.h>

Inheritance diagram for CH264AVCCBitstreamParser:
CH264CCBitstreamParser ICCBitstreamParser

Public Member Functions

 CH264AVCCBitstreamParser ()=default
 
 ~CH264AVCCBitstreamParser () override=default
 
CCPictureType ParsePacket (DemuxPacket *pPacket, std::vector< CCaptionBlock > &tempBuffer, std::vector< CCaptionBlock > &reorderBuffer) override
 Parse AVCC packet for closed caption data.
 
const char * GetName () const override
 Get parser name for debugging/logging.
 
- Public Member Functions inherited from ICCBitstreamParser
virtual ~ICCBitstreamParser ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from CH264CCBitstreamParser
void ProcessSEIPayload (std::span< const uint8_t > buf, double pts, std::vector< CCaptionBlock > &tempBuffer)
 Process SEI payload containing closed caption data.
 
CCPictureType DetectSliceType (std::span< const uint8_t > buf)
 Detect slice type from H.264 slice header.
 

Detailed Description

H.264 AVCC format closed caption parser.

Parses H.264 streams in AVCC (AVC1) format used by MP4/MKV containers. AVCC uses length-prefixed NAL units:

  • 4-byte big-endian length prefix
  • NAL unit data (length bytes)
  • Repeat for each NAL unit

Extracts CC data from SEI NAL units (type 6) with payload type 4.

Constructor & Destructor Documentation

◆ CH264AVCCBitstreamParser()

CH264AVCCBitstreamParser::CH264AVCCBitstreamParser ( )
default

◆ ~CH264AVCCBitstreamParser()

CH264AVCCBitstreamParser::~CH264AVCCBitstreamParser ( )
overridedefault

Member Function Documentation

◆ GetName()

const char * CH264AVCCBitstreamParser::GetName ( ) const
inlineoverridevirtual

Get parser name for debugging/logging.

Returns
Human-readable parser name

Implements ICCBitstreamParser.

◆ ParsePacket()

CCPictureType CH264AVCCBitstreamParser::ParsePacket ( DemuxPacket * pPacket,
std::vector< CCaptionBlock > & tempBuffer,
std::vector< CCaptionBlock > & reorderBuffer )
overridevirtual

Parse AVCC packet for closed caption data.

Iterates through length-prefixed NAL units, extracting CC data from SEI payloads and detecting picture type from slice headers.

Parameters
pPacketH.264 video packet in AVCC format
tempBufferTemporary buffer for CC data from reference frames
reorderBufferReorder buffer for CC data
Returns
Picture type (I_FRAME, P_FRAME, or OTHER)

Implements ICCBitstreamParser.


The documentation for this class was generated from the following files: