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,
43 uint64_t size) WARN_UNUSED_RESULT;
45 const uint8_t* data()
const {
return data_; }
46 uint64_t data_size()
const {
return data_size_; }
47 uint64_t header_size()
const {
return header_size_; }
49 int ref_idc()
const {
return ref_idc_; }
50 int type()
const {
return type_; }
51 bool is_video_slice()
const {
return is_video_slice_; }
58 uint64_t header_size_;
64 DISALLOW_COPY_AND_ASSIGN(
Nalu);
82 const uint8_t* stream,
83 uint64_t stream_size);
95 static bool FindStartCode(
const uint8_t* data,
98 uint8_t* start_code_size);
112 kAnnexbByteStreamFormat,
123 bool LocateNaluByStartCode(uint64_t* nalu_size, uint8_t* start_code_size);
126 const uint8_t* stream_;
128 uint64_t stream_size_;
131 uint8_t nalu_length_size_;
141 #endif // MEDIA_FILTERS_NALU_READER_H_