diff options
author | Boyuan Yang <byang@debian.org> | 2023-11-27 22:46:32 -0500 |
---|---|---|
committer | Boyuan Yang <byang@debian.org> | 2023-11-27 22:46:32 -0500 |
commit | 7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d (patch) | |
tree | 4ed468528001d8e80e3be09413ae927ca2ac05ce /src/obu_parser.h | |
parent | 0d1e75e423265689dd49c7d6023d8bba70ca4d05 (diff) | |
parent | 19564cb4f77660cdb2f980ca619d4b979b9fe342 (diff) | |
download | libgav1-7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d.tar.gz libgav1-7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d.tar.bz2 libgav1-7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d.zip |
Update upstream source from tag 'upstream/0.19.0'
Update to upstream version '0.19.0'
with Debian dir a4233a4a247b06e8d6e36d07d059f03582d97721
Diffstat (limited to 'src/obu_parser.h')
-rw-r--r-- | src/obu_parser.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/obu_parser.h b/src/obu_parser.h index eba3370..594e86b 100644 --- a/src/obu_parser.h +++ b/src/obu_parser.h @@ -251,6 +251,15 @@ class ObuParser : public Allocable { // populated with a valid frame buffer. StatusCode ParseOneFrame(RefCountedBufferPtr* current_frame); + // Get the AV1CodecConfigurationBox as described in + // https://aomediacodec.github.io/av1-isobmff/#av1codecconfigurationbox. This + // does minimal bitstream parsing to obtain the necessary information to + // generate the av1c box. Returns a std::unique_ptr that contains the av1c + // data on success, nullptr otherwise. |av1c_size| must not be nullptr and + // will contain the size of the buffer pointed to by the std::unique_ptr. + static std::unique_ptr<uint8_t[]> GetAV1CodecConfigurationBox( + const uint8_t* data, size_t size, size_t* av1c_size); + // Getters. Only valid if ParseOneFrame() completes successfully. const Vector<ObuHeader>& obu_headers() const { return obu_headers_; } const ObuSequenceHeader& sequence_header() const { return sequence_header_; } @@ -356,6 +365,13 @@ class ObuParser : public Allocable { // otherwise. bool EnsureCurrentFrameIsNotNull(); + // Parses the basic bitstream information from the given AV1 stream in |data|. + // This is used for generating the AV1CodecConfigurationBox. + static StatusCode ParseBasicStreamInfo(const uint8_t* data, size_t size, + ObuSequenceHeader* sequence_header, + size_t* sequence_header_offset, + size_t* sequence_header_size); + // Parser elements. std::unique_ptr<RawBitReader> bit_reader_; const uint8_t* data_; |