Chromium Code Reviews| Index: media/filters/h264_parser.h |
| diff --git a/media/filters/h264_parser.h b/media/filters/h264_parser.h |
| index 45020af61344b8228259bfc2a4868b1b7cfd8a9d..f34573c7cd904ed1ecbdf82e712b13f9a6ca7cab 100644 |
| --- a/media/filters/h264_parser.h |
| +++ b/media/filters/h264_parser.h |
| @@ -10,13 +10,17 @@ |
| #include <sys/types.h> |
| #include <map> |
| +#include <vector> |
| #include "base/basictypes.h" |
| #include "media/base/media_export.h" |
| +#include "media/base/ranges.h" |
| #include "media/filters/h264_bit_reader.h" |
| namespace media { |
| +struct SubsampleEntry; |
| + |
| // For explanations of each struct and its members, see H.264 specification |
| // at http://www.itu.int/rec/T-REC-H.264. |
| struct MEDIA_EXPORT H264NALU { |
| @@ -337,7 +341,11 @@ class MEDIA_EXPORT H264Parser { |
| void Reset(); |
| // Set current stream pointer to |stream| of |stream_size| in bytes, |
| // |stream| owned by caller. |
| + // |subsamples| contains information about what parts of |stream| are |
| + // encrypted. |
| void SetStream(const uint8* stream, off_t stream_size); |
| + void SetEncryptedStream(const uint8* stream, off_t stream_size, |
| + const std::vector<SubsampleEntry>& subsamples); |
| // Read the stream to find the next NALU, identify it and return |
| // that information in |*nalu|. This advances the stream to the beginning |
| @@ -392,6 +400,11 @@ class MEDIA_EXPORT H264Parser { |
| // - the size in bytes of the start code is returned in |*start_code_size|. |
| bool LocateNALU(off_t* nalu_size, off_t* start_code_size); |
| + // Wrapper for FindStartCode() that skips over start codes that |
| + // may appear outside of |clear_ranges_|. |
| + bool FindStartCodeInClearRanges(const uint8* data, off_t data_size, |
|
xhwang
2014/07/16 05:06:13
Comment about the meaning of the returned value.
acolwell GONE FROM CHROMIUM
2014/07/28 19:43:12
Done.
|
| + off_t* offset, off_t* start_code_size); |
| + |
| // Exp-Golomb code parsing as specified in chapter 9.1 of the spec. |
| // Read one unsigned exp-Golomb code from the stream and return in |*val|. |
| Result ReadUE(int* val); |
| @@ -441,6 +454,9 @@ class MEDIA_EXPORT H264Parser { |
| SPSById active_SPSes_; |
| PPSById active_PPSes_; |
| + Ranges<const uint8*> clear_ranges_; |
| + size_t clear_range_index_; |
|
xhwang
2014/07/16 05:06:13
Comment this variable.
acolwell GONE FROM CHROMIUM
2014/07/28 19:43:12
Variable no longer exists.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(H264Parser); |
| }; |