Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2014-09-20 20:39:37 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2014-09-20 20:39:37 +0400
commit68e4e3d46b437e4673748541d0c8783765ebb90d (patch)
tree91020330bf11176ccb92f9b513cfd2a16f202ae4 /common
parentfe40cb6f67a348b49dd26d697673e3cb43d747c6 (diff)
Add a CH265Nalu class
Diffstat (limited to 'common')
-rw-r--r--common/DSUtilLite/H264Nalu.cpp10
-rw-r--r--common/DSUtilLite/H264Nalu.h9
2 files changed, 18 insertions, 1 deletions
diff --git a/common/DSUtilLite/H264Nalu.cpp b/common/DSUtilLite/H264Nalu.cpp
index 104bee9e..27825499 100644
--- a/common/DSUtilLite/H264Nalu.cpp
+++ b/common/DSUtilLite/H264Nalu.cpp
@@ -104,3 +104,13 @@ bool CH264Nalu::ReadNext()
return true;
}
+
+bool CH265Nalu::ReadNext()
+{
+ if (CH264Nalu::ReadNext()) {
+ nal_unit_type = (NALU_TYPE) ((m_pBuffer[m_nNALDataPos] >> 1) & 0x3F);
+ return true;
+ }
+
+ return false;
+}
diff --git a/common/DSUtilLite/H264Nalu.h b/common/DSUtilLite/H264Nalu.h
index fc9c1f20..1e680a5a 100644
--- a/common/DSUtilLite/H264Nalu.h
+++ b/common/DSUtilLite/H264Nalu.h
@@ -42,7 +42,7 @@ typedef enum
class CH264Nalu
{
-private :
+protected:
int forbidden_bit = 0; //! should be always FALSE
int nal_reference_idc = 0; //! NALU_PRIORITY_xxxx
NALU_TYPE nal_unit_type = NALU_TYPE_UNKNOWN; //! NALU_TYPE_xxxx
@@ -79,3 +79,10 @@ public :
void SetBuffer (const BYTE *pBuffer, size_t nSize, int nNALSize);
bool ReadNext();
};
+
+class CH265Nalu : public CH264Nalu
+{
+public:
+ CH265Nalu() : CH264Nalu() {};
+ bool ReadNext();
+};