vdr-plugin-softhddevice-drm-gles 1.5.9-20e15de
h264parser.h
Go to the documentation of this file.
1
20#ifndef __H264PARSER_H
21#define __H264PARSER_H
22
23extern "C" {
24#include <libavcodec/avcodec.h>
25}
26
27typedef enum {
29 NALU_TYPE_IDR = (1 << 1),
30 NALU_TYPE_SEI = (1 << 2),
31 NALU_TYPE_SPS = (1 << 3),
32 NALU_TYPE_PPS = (1 << 4),
33 NALU_TYPE_AUD = (1 << 5)
35
40{
41public:
42 cH264Parser(AVPacket *);
43 int GetWidth(void) { return m_width; };
44 int GetHeight(void) { return m_height; };
45 bool IsIFrame(void);
46 bool IsMbaff(void) { return m_mbaff; };
47
48private:
49 AVPacket *m_pAvpkt;
50 const unsigned char *m_pStart;
51 unsigned short m_nLength;
53
54 int m_nalutype = 0;
55
56 int m_width = 0;
57 int m_height = 0;
58 bool m_mbaff = false;
59
60 unsigned int ReadBit(void);
61 unsigned int ReadBits(int);
62 unsigned int ReadExponentialGolombCode(void);
63 unsigned int ReadSE(void);
64};
65
66#endif
cH264Parser - H264 Parser class
Definition h264parser.h:40
unsigned int ReadSE(void)
unsigned int ReadBit(void)
unsigned int ReadBits(int)
int GetWidth(void)
Definition h264parser.h:43
bool IsIFrame(void)
unsigned short m_nLength
Definition h264parser.h:51
const unsigned char * m_pStart
Definition h264parser.h:50
int GetHeight(void)
Definition h264parser.h:44
int m_nCurrentBit
Definition h264parser.h:52
bool IsMbaff(void)
Definition h264parser.h:46
AVPacket * m_pAvpkt
Definition h264parser.h:49
unsigned int ReadExponentialGolombCode(void)
NalUnitTypes
Definition h264parser.h:27
@ NALU_TYPE_NON_IDR
Definition h264parser.h:28
@ NALU_TYPE_AUD
Definition h264parser.h:33
@ NALU_TYPE_SEI
Definition h264parser.h:30
@ NALU_TYPE_PPS
Definition h264parser.h:32
@ NALU_TYPE_SPS
Definition h264parser.h:31
@ NALU_TYPE_IDR
Definition h264parser.h:29