MythTV  master
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
H2645Parser Class Referenceabstract

#include <H2645Parser.h>

Inheritance diagram for H2645Parser:
Inheritance graph
[legend]
Collaboration diagram for H2645Parser:
Collaboration graph
[legend]

Public Types

enum  { MAX_SLICE_HEADER_SIZE = 256 }
 
enum  field_type { FRAME = 'F', FIELD_TOP = 'T', FIELD_BOTTOM = 'B' }
 
enum  NAL_unit_type { UNKNOWN = -1 }
 
enum  SLICE_type {
  SLICE_P = 0, SLICE_B = 1, SLICE_I = 2, SLICE_SP = 3,
  SLICE_SI = 4, SLICE_P_a = 5, SLICE_B_a = 6, SLICE_I_a = 7,
  SLICE_SP_a = 8, SLICE_SI_a = 9, SLICE_UNDEF = 10
}
 

Public Member Functions

 H2645Parser (void)
 
 H2645Parser (const H2645Parser &rhs)
 
virtual ~H2645Parser (void)
 
virtual uint32_t addBytes (const uint8_t *bytes, uint32_t byte_count, uint64_t stream_offset)=0
 
virtual void Reset (void)
 
virtual QString NAL_type_str (int8_t type)=0
 
bool stateChanged (void) const
 
bool onFrameStart (void) const
 
bool onKeyFrameStart (void) const
 
uint pictureWidth (void) const
 
uint pictureHeight (void) const
 
virtual uint pictureWidthCropped (void) const =0
 
virtual uint pictureHeightCropped (void) const =0
 
uint aspectRatio (void) const
 Computes aspect ratio from picture size and sample aspect ratio. More...
 
virtual void getFrameRate (FrameRate &result) const =0
 
virtual field_type getFieldType (void) const =0
 
uint64_t frameAUstreamOffset (void) const
 
uint64_t keyframeAUstreamOffset (void) const
 
uint64_t SPSstreamOffset (void) const
 
uint32_t GetTimeScale (void) const
 
uint32_t GetUnitsInTick (void) const
 
SCAN_t GetScanType (void) const
 

Protected Types

enum  constants { EXTENDED_SAR = 255 }
 

Protected Member Functions

void resetRBSP (void)
 
bool fillRBSP (const uint8_t *byteP, uint32_t byte_count, bool found_start_code)
 
void vui_parameters (GetBitContext *gb, bool hevc)
 

Protected Attributes

uint64_t m_framecnt {0}
 
uint64_t m_keyframecnt {0}
 
uint64_t m_totalframecnt {0}
 
uint64_t m_totalkeyframecnt {0}
 
uint64_t m_auOffset {0}
 
uint64_t m_frameStartOffset {0}
 
uint64_t m_keyframeStartOffset {0}
 
uint64_t m_pktOffset {0}
 
uint64_t m_spsOffset {0}
 
uint32_t m_consecutiveZeros {0}
 
uint32_t m_rbspBufferSize {188 * 2}
 
uint32_t m_rbspIndex {0}
 
uint32_t m_syncAccumulator {0xffffffff}
 
uint32_t m_timeScale {0}
 
uint32_t m_unitsInTick {0}
 
SCAN_t m_scanType {SCAN_t::PROGRESSIVE}
 
uint m_frameCropBottomOffset {0}
 
uint m_frameCropLeftOffset {0}
 
uint m_frameCropRightOffset {0}
 
uint m_frameCropTopOffset {0}
 
uint m_picHeight {0}
 
uint m_picWidth {0}
 
uint m_sarHeight {0}
 
uint m_sarWidth {0}
 
uint8_t * m_rbspBuffer {nullptr}
 
uint8_t m_aspectRatioIdc {0}
 
int8_t m_chromaFormatIdc {1}
 
bool m_auPending {false}
 
bool m_fixedRate {false}
 
bool m_haveUnfinishedNAL {false}
 
bool m_isKeyframe {false}
 
bool m_onAU {false}
 
bool m_onFrame {false}
 
bool m_onKeyFrame {false}
 
bool m_seenSPS {false}
 
bool m_separateColourPlaneFlag {false}
 
bool m_stateChanged {false}
 

Detailed Description

Definition at line 74 of file H2645Parser.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_SLICE_HEADER_SIZE 

Definition at line 76 of file H2645Parser.h.

◆ field_type

Enumerator
FRAME 
FIELD_TOP 
FIELD_BOTTOM 

Definition at line 80 of file H2645Parser.h.

◆ NAL_unit_type

Enumerator
UNKNOWN 

Definition at line 121 of file H2645Parser.h.

◆ SLICE_type

Enumerator
SLICE_P 
SLICE_B 
SLICE_I 
SLICE_SP 
SLICE_SI 
SLICE_P_a 
SLICE_B_a 
SLICE_I_a 
SLICE_SP_a 
SLICE_SI_a 
SLICE_UNDEF 

Definition at line 125 of file H2645Parser.h.

◆ constants

enum H2645Parser::constants
protected
Enumerator
EXTENDED_SAR 

Definition at line 140 of file H2645Parser.h.

Constructor & Destructor Documentation

◆ H2645Parser() [1/2]

H2645Parser::H2645Parser ( void  )

Definition at line 93 of file H2645Parser.cpp.

◆ H2645Parser() [2/2]

H2645Parser::H2645Parser ( const H2645Parser rhs)

◆ ~H2645Parser()

virtual H2645Parser::~H2645Parser ( void  )
inlinevirtual

Definition at line 88 of file H2645Parser.h.

Member Function Documentation

◆ addBytes()

virtual uint32_t H2645Parser::addBytes ( const uint8_t *  bytes,
uint32_t  byte_count,
uint64_t  stream_offset 
)
pure virtual

Implemented in HEVCParser, and AVCParser.

Referenced by DTVRecorder::FindH2645Keyframes().

◆ Reset()

void H2645Parser::Reset ( void  )
virtual

◆ NAL_type_str()

virtual QString H2645Parser::NAL_type_str ( int8_t  type)
pure virtual

Implemented in HEVCParser, and AVCParser.

◆ stateChanged()

bool H2645Parser::stateChanged ( void  ) const
inline

◆ onFrameStart()

bool H2645Parser::onFrameStart ( void  ) const
inline

◆ onKeyFrameStart()

bool H2645Parser::onKeyFrameStart ( void  ) const
inline

◆ pictureWidth()

uint H2645Parser::pictureWidth ( void  ) const
inline

Definition at line 102 of file H2645Parser.h.

Referenced by DTVRecorder::FindH2645Keyframes().

◆ pictureHeight()

uint H2645Parser::pictureHeight ( void  ) const
inline

Definition at line 103 of file H2645Parser.h.

Referenced by DTVRecorder::FindH2645Keyframes().

◆ pictureWidthCropped()

virtual uint H2645Parser::pictureWidthCropped ( void  ) const
pure virtual

Implemented in HEVCParser, and AVCParser.

Referenced by aspectRatio().

◆ pictureHeightCropped()

virtual uint H2645Parser::pictureHeightCropped ( void  ) const
pure virtual

Implemented in HEVCParser, and AVCParser.

Referenced by aspectRatio().

◆ aspectRatio()

uint H2645Parser::aspectRatio ( void  ) const

Computes aspect ratio from picture size and sample aspect ratio.

Definition at line 400 of file H2645Parser.cpp.

Referenced by DTVRecorder::FindH2645Keyframes().

◆ getFrameRate()

virtual void H2645Parser::getFrameRate ( FrameRate result) const
pure virtual

Implemented in HEVCParser, and AVCParser.

Referenced by DTVRecorder::FindH2645Keyframes().

◆ getFieldType()

virtual field_type H2645Parser::getFieldType ( void  ) const
pure virtual

Implemented in HEVCParser, and AVCParser.

Referenced by DTVRecorder::FindH2645Keyframes().

◆ frameAUstreamOffset()

uint64_t H2645Parser::frameAUstreamOffset ( void  ) const
inline

Definition at line 113 of file H2645Parser.h.

◆ keyframeAUstreamOffset()

uint64_t H2645Parser::keyframeAUstreamOffset ( void  ) const
inline

◆ SPSstreamOffset()

uint64_t H2645Parser::SPSstreamOffset ( void  ) const
inline

Definition at line 115 of file H2645Parser.h.

◆ GetTimeScale()

uint32_t H2645Parser::GetTimeScale ( void  ) const
inline

Definition at line 117 of file H2645Parser.h.

Referenced by DTVRecorder::FindH2645Keyframes().

◆ GetUnitsInTick()

uint32_t H2645Parser::GetUnitsInTick ( void  ) const
inline

Definition at line 118 of file H2645Parser.h.

Referenced by DTVRecorder::FindH2645Keyframes().

◆ GetScanType()

SCAN_t H2645Parser::GetScanType ( void  ) const
inline

Definition at line 119 of file H2645Parser.h.

Referenced by DTVRecorder::FindH2645Keyframes().

◆ resetRBSP()

void H2645Parser::resetRBSP ( void  )
protected

Definition at line 134 of file H2645Parser.cpp.

Referenced by AVCParser::addBytes(), HEVCParser::addBytes(), and AVCParser::Reset().

◆ fillRBSP()

bool H2645Parser::fillRBSP ( const uint8_t *  byteP,
uint32_t  byte_count,
bool  found_start_code 
)
protected

Definition at line 141 of file H2645Parser.cpp.

Referenced by AVCParser::addBytes(), and HEVCParser::addBytes().

◆ vui_parameters()

void H2645Parser::vui_parameters ( GetBitContext *  gb,
bool  hevc 
)
protected

Definition at line 229 of file H2645Parser.cpp.

Referenced by AVCParser::decode_SPS(), and HEVCParser::parseSPS().

Member Data Documentation

◆ m_framecnt

uint64_t H2645Parser::m_framecnt {0}
protected

Definition at line 148 of file H2645Parser.h.

Referenced by HEVCParser::addBytes(), and HEVCParser::processRBSP().

◆ m_keyframecnt

uint64_t H2645Parser::m_keyframecnt {0}
protected

Definition at line 149 of file H2645Parser.h.

Referenced by HEVCParser::addBytes(), and HEVCParser::processRBSP().

◆ m_totalframecnt

uint64_t H2645Parser::m_totalframecnt {0}
protected

Definition at line 150 of file H2645Parser.h.

Referenced by HEVCParser::addBytes(), and HEVCParser::processRBSP().

◆ m_totalkeyframecnt

uint64_t H2645Parser::m_totalkeyframecnt {0}
protected

Definition at line 151 of file H2645Parser.h.

Referenced by HEVCParser::addBytes(), and HEVCParser::processRBSP().

◆ m_auOffset

uint64_t H2645Parser::m_auOffset {0}
protected

Definition at line 152 of file H2645Parser.h.

Referenced by AVCParser::processRBSP(), HEVCParser::processRBSP(), and Reset().

◆ m_frameStartOffset

uint64_t H2645Parser::m_frameStartOffset {0}
protected

◆ m_keyframeStartOffset

uint64_t H2645Parser::m_keyframeStartOffset {0}
protected

◆ m_pktOffset

uint64_t H2645Parser::m_pktOffset {0}
protected

◆ m_spsOffset

uint64_t H2645Parser::m_spsOffset {0}
protected

◆ m_consecutiveZeros

uint32_t H2645Parser::m_consecutiveZeros {0}
protected

Definition at line 158 of file H2645Parser.h.

Referenced by fillRBSP(), and resetRBSP().

◆ m_rbspBufferSize

uint32_t H2645Parser::m_rbspBufferSize {188 * 2}
protected

Definition at line 159 of file H2645Parser.h.

Referenced by fillRBSP(), and H2645Parser().

◆ m_rbspIndex

uint32_t H2645Parser::m_rbspIndex {0}
protected

◆ m_syncAccumulator

uint32_t H2645Parser::m_syncAccumulator {0xffffffff}
protected

Definition at line 161 of file H2645Parser.h.

Referenced by AVCParser::addBytes(), HEVCParser::addBytes(), and Reset().

◆ m_timeScale

uint32_t H2645Parser::m_timeScale {0}
protected

◆ m_unitsInTick

uint32_t H2645Parser::m_unitsInTick {0}
protected

◆ m_scanType

SCAN_t H2645Parser::m_scanType {SCAN_t::PROGRESSIVE}
protected

◆ m_frameCropBottomOffset

uint H2645Parser::m_frameCropBottomOffset {0}
protected

◆ m_frameCropLeftOffset

uint H2645Parser::m_frameCropLeftOffset {0}
protected

Definition at line 168 of file H2645Parser.h.

Referenced by AVCParser::decode_SPS(), HEVCParser::parseSPS(), and Reset().

◆ m_frameCropRightOffset

uint H2645Parser::m_frameCropRightOffset {0}
protected

◆ m_frameCropTopOffset

uint H2645Parser::m_frameCropTopOffset {0}
protected

Definition at line 170 of file H2645Parser.h.

Referenced by AVCParser::decode_SPS(), HEVCParser::parseSPS(), and Reset().

◆ m_picHeight

uint H2645Parser::m_picHeight {0}
protected

◆ m_picWidth

uint H2645Parser::m_picWidth {0}
protected

◆ m_sarHeight

uint H2645Parser::m_sarHeight {0}
protected

Definition at line 173 of file H2645Parser.h.

Referenced by aspectRatio(), HEVCParser::parseSPS(), Reset(), and vui_parameters().

◆ m_sarWidth

uint H2645Parser::m_sarWidth {0}
protected

Definition at line 174 of file H2645Parser.h.

Referenced by aspectRatio(), HEVCParser::parseSPS(), Reset(), and vui_parameters().

◆ m_rbspBuffer

uint8_t* H2645Parser::m_rbspBuffer {nullptr}
protected

◆ m_aspectRatioIdc

uint8_t H2645Parser::m_aspectRatioIdc {0}
protected

Definition at line 177 of file H2645Parser.h.

Referenced by aspectRatio(), Reset(), and vui_parameters().

◆ m_chromaFormatIdc

int8_t H2645Parser::m_chromaFormatIdc {1}
protected

◆ m_auPending

bool H2645Parser::m_auPending {false}
protected

◆ m_fixedRate

bool H2645Parser::m_fixedRate {false}
protected

Definition at line 182 of file H2645Parser.h.

Referenced by HEVCParser::parseVPS(), Reset(), and vui_parameters().

◆ m_haveUnfinishedNAL

bool H2645Parser::m_haveUnfinishedNAL {false}
protected

◆ m_isKeyframe

bool H2645Parser::m_isKeyframe {false}
protected

Definition at line 184 of file H2645Parser.h.

Referenced by AVCParser::decode_Header(), AVCParser::processRBSP(), and Reset().

◆ m_onAU

bool H2645Parser::m_onAU {false}
protected

Definition at line 185 of file H2645Parser.h.

Referenced by HEVCParser::newAU(), and HEVCParser::processRBSP().

◆ m_onFrame

bool H2645Parser::m_onFrame {false}
protected

◆ m_onKeyFrame

bool H2645Parser::m_onKeyFrame {false}
protected

◆ m_seenSPS

bool H2645Parser::m_seenSPS {false}
protected

◆ m_separateColourPlaneFlag

bool H2645Parser::m_separateColourPlaneFlag {false}
protected

◆ m_stateChanged

bool H2645Parser::m_stateChanged {false}
protected

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