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

MPEG2 closed caption parser. More...

#include <MPEG2CCBitstreamParser.h>

Inheritance diagram for CMPEG2CCBitstreamParser:
ICCBitstreamParser

Public Member Functions

 CMPEG2CCBitstreamParser ()=default
 
 ~CMPEG2CCBitstreamParser () override=default
 
CCPictureType ParsePacket (DemuxPacket *pPacket, std::vector< CCaptionBlock > &tempBuffer, std::vector< CCaptionBlock > &reorderBuffer) override
 Parse MPEG2 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
 

Detailed Description

MPEG2 closed caption parser.

Extracts CEA-608/708 closed caption data from MPEG2 video streams. Searches for:

  • Picture headers (start code 0x00) to determine picture type (I/P/B)
  • User data (start code 0xb2) containing GA94 or CC closed caption payloads

Constructor & Destructor Documentation

◆ CMPEG2CCBitstreamParser()

CMPEG2CCBitstreamParser::CMPEG2CCBitstreamParser ( )
default

◆ ~CMPEG2CCBitstreamParser()

CMPEG2CCBitstreamParser::~CMPEG2CCBitstreamParser ( )
overridedefault

Member Function Documentation

◆ GetName()

const char * CMPEG2CCBitstreamParser::GetName ( ) const
inlineoverridevirtual

Get parser name for debugging/logging.

Returns
Human-readable parser name

Implements ICCBitstreamParser.

◆ ParsePacket()

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

Parse MPEG2 packet for closed caption data.

Scans the packet for MPEG2 start codes and extracts CC data from user data sections. Supports both GA94 and CC data formats.

Parameters
pPacketMPEG2 video packet with Annex B start codes
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: