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 header_size()
const {
return header_size_; }
47 uint64_t payload_size()
const {
return payload_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_; }
59 uint64_t header_size_;
61 uint64_t payload_size_;
67 DISALLOW_COPY_AND_ASSIGN(
Nalu);
85 const uint8_t* stream,
86 uint64_t stream_size);
98 static bool FindStartCode(
const uint8_t* data,
101 uint8_t* start_code_size);
115 kAnnexbByteStreamFormat,
126 bool LocateNaluByStartCode(uint64_t* nalu_size, uint8_t* start_code_size);
129 const uint8_t* stream_;
131 uint64_t stream_size_;
134 uint8_t nalu_length_size_;
144 #endif // MEDIA_FILTERS_NALU_READER_H_