7 #ifndef MEDIA_FILTERS_NALU_READER_H_
8 #define MEDIA_FILTERS_NALU_READER_H_
13 #include "packager/base/compiler_specific.h"
14 #include "packager/base/macros.h"
16 namespace edash_packager {
22 const uint8_t kIsAnnexbByteStream = 0;
37 H264_CodedSliceExtension = 20,
42 bool InitializeFromH264(
const uint8_t* data,
44 uint8_t start_code_size) WARN_UNUSED_RESULT;
46 const uint8_t* data()
const {
return data_; }
47 uint64_t data_size()
const {
return data_size_; }
48 uint64_t header_size()
const {
return header_size_; }
50 int ref_idc()
const {
return ref_idc_; }
51 int type()
const {
return type_; }
52 bool is_video_slice()
const {
return is_video_slice_; }
59 uint64_t header_size_;
65 DISALLOW_COPY_AND_ASSIGN(
Nalu);
83 const uint8_t* stream,
84 uint64_t stream_size);
96 static bool FindStartCode(
const uint8_t* data,
99 uint8_t* start_code_size);
110 kAnnexbByteStreamFormat,
121 bool LocateNaluByStartCode(uint64_t* nalu_size, uint8_t* start_code_size);
124 const uint8_t* stream_;
126 uint64_t stream_size_;
129 uint8_t nalu_length_size_;
139 #endif // MEDIA_FILTERS_NALU_READER_H_