vdr 2.6.3
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Attributes | List of all members
cH264Parser Class Reference

Public Member Functions

 cH264Parser (void)
 
virtual int Parse (const uchar *Data, int Length, int Pid)
 
- Public Member Functions inherited from cFrameParser
 cFrameParser (void)
 
virtual ~cFrameParser ()
 
virtual int Parse (const uchar *Data, int Length, int Pid)=0
 
void SetDebug (bool Debug)
 
bool NewFrame (void)
 
bool IndependentFrame (void)
 
int IFrameTemporalReferenceOffset (void)
 
uint16_t FrameWidth (void)
 
uint16_t FrameHeight (void)
 
double FramesPerSecond (void)
 
bool Progressive (void)
 

Protected Member Functions

uchar GetByte (bool Raw=false)
 
uchar GetBit (void)
 
uint32_t GetBits (int Bits)
 
uint32_t GetGolombUe (void)
 
int32_t GetGolombSe (void)
 
void ParseAccessUnitDelimiter (void)
 
void ParseSequenceParameterSet (void)
 
void ParseSliceHeader (void)
 

Protected Attributes

cTsPayload tsPayload
 
uint32_t scanner
 
bool gotAccessUnitDelimiter
 
bool gotSequenceParameterSet
 
- Protected Attributes inherited from cFrameParser
bool debug
 
bool newFrame
 
bool independentFrame
 
int iFrameTemporalReferenceOffset
 
uint16_t frameWidth
 
uint16_t frameHeight
 
double framesPerSecond
 
bool progressive
 

Private Types

enum  eNalUnitType { nutCodedSliceNonIdr = 1 , nutCodedSliceIdr = 5 , nutSequenceParameterSet = 7 , nutAccessUnitDelimiter = 9 }
 

Private Attributes

uchar byte
 
int bit
 
int zeroBytes
 
bool separate_colour_plane_flag
 
int log2_max_frame_num
 
bool frame_mbs_only_flag
 

Detailed Description

Definition at line 1350 of file remux.c.

Member Enumeration Documentation

◆ eNalUnitType

Enumerator
nutCodedSliceNonIdr 
nutCodedSliceIdr 
nutSequenceParameterSet 
nutAccessUnitDelimiter 

Definition at line 1352 of file remux.c.

Constructor & Destructor Documentation

◆ cH264Parser()

cH264Parser::cH264Parser ( void  )

Sets up a new H.264 parser.

This class parses only the data absolutely necessary to determine the frame borders and field count of the given H264 material.

Definition at line 1389 of file remux.c.

References bit, EMPTY_SCANNER, frame_mbs_only_flag, gotAccessUnitDelimiter, gotSequenceParameterSet, log2_max_frame_num, scanner, separate_colour_plane_flag, and zeroBytes.

Member Function Documentation

◆ GetBit()

uchar cH264Parser::GetBit ( void  )
protected

◆ GetBits()

uint32_t cH264Parser::GetBits ( int  Bits)
protected

◆ GetByte()

uchar cH264Parser::GetByte ( bool  Raw = false)
protected

Gets the next data byte.

If Raw is true, no filtering will be done. With Raw set to false, if the byte sequence 0x000003 is encountered, the byte with 0x03 will be skipped.

Definition at line 1402 of file remux.c.

References bit, cTsPayload::GetByte(), tsPayload, and zeroBytes.

Referenced by GetBit(), Parse(), cH265Parser::Parse(), ParseAccessUnitDelimiter(), ParseSequenceParameterSet(), and cH265Parser::ParseSequenceParameterSet().

◆ GetGolombSe()

int32_t cH264Parser::GetGolombSe ( void  )
protected

Definition at line 1446 of file remux.c.

References GetGolombUe().

Referenced by ParseSequenceParameterSet(), and cH265Parser::ParseSequenceParameterSet().

◆ GetGolombUe()

uint32_t cH264Parser::GetGolombUe ( void  )
protected

◆ Parse()

int cH264Parser::Parse ( const uchar Data,
int  Length,
int  Pid 
)
virtual

Parses the given Data, which is a sequence of Length bytes of TS packets.

The payload in the TS packets with the given Pid is searched for just enough information to determine the beginning and type of the next video frame. Returns the number of bytes parsed. Upon return, the functions NewFrame() and IndependentFrame() can be called to retrieve the required information.

Implements cFrameParser.

Reimplemented in cH265Parser.

Definition at line 1458 of file remux.c.

References cTsPayload::AtPayloadStart(), dbgframes, cFrameParser::debug, EMPTY_SCANNER, cTsPayload::Eof(), GetByte(), gotAccessUnitDelimiter, gotSequenceParameterSet, cFrameParser::independentFrame, cFrameParser::newFrame, nutAccessUnitDelimiter, nutCodedSliceIdr, nutCodedSliceNonIdr, nutSequenceParameterSet, ParseAccessUnitDelimiter(), ParseSequenceParameterSet(), ParseSliceHeader(), scanner, cTsPayload::Setup(), cTsPayload::SkipPesHeader(), cTsPayload::Statistics(), tsPayload, TsPayloadStart(), and cTsPayload::Used().

◆ ParseAccessUnitDelimiter()

void cH264Parser::ParseAccessUnitDelimiter ( void  )
protected

Definition at line 1501 of file remux.c.

References dbgframes, cFrameParser::debug, GetByte(), and gotSequenceParameterSet.

Referenced by Parse().

◆ ParseSequenceParameterSet()

void cH264Parser::ParseSequenceParameterSet ( void  )
protected

◆ ParseSliceHeader()

void cH264Parser::ParseSliceHeader ( void  )
protected

Member Data Documentation

◆ bit

int cH264Parser::bit
private

Definition at line 1359 of file remux.c.

Referenced by cH264Parser(), GetBit(), and GetByte().

◆ byte

uchar cH264Parser::byte
private

Definition at line 1358 of file remux.c.

◆ frame_mbs_only_flag

bool cH264Parser::frame_mbs_only_flag
private

Definition at line 1364 of file remux.c.

Referenced by cH264Parser(), ParseSequenceParameterSet(), and ParseSliceHeader().

◆ gotAccessUnitDelimiter

bool cH264Parser::gotAccessUnitDelimiter
protected

Definition at line 1368 of file remux.c.

Referenced by cH264Parser(), Parse(), and ParseSequenceParameterSet().

◆ gotSequenceParameterSet

bool cH264Parser::gotSequenceParameterSet
protected

◆ log2_max_frame_num

int cH264Parser::log2_max_frame_num
private

Definition at line 1363 of file remux.c.

Referenced by cH264Parser(), ParseSequenceParameterSet(), and ParseSliceHeader().

◆ scanner

uint32_t cH264Parser::scanner
protected

Definition at line 1367 of file remux.c.

Referenced by cH264Parser(), Parse(), and cH265Parser::Parse().

◆ separate_colour_plane_flag

bool cH264Parser::separate_colour_plane_flag
private

◆ tsPayload

cTsPayload cH264Parser::tsPayload
protected

Definition at line 1366 of file remux.c.

Referenced by GetByte(), Parse(), and cH265Parser::Parse().

◆ zeroBytes

int cH264Parser::zeroBytes
private

Definition at line 1360 of file remux.c.

Referenced by cH264Parser(), and GetByte().


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