tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

bitstream_parser.h (1120B)


      1 /*
      2 *  Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
      3 *
      4 *  Use of this source code is governed by a BSD-style license
      5 *  that can be found in the LICENSE file in the root of the source
      6 *  tree. An additional intellectual property rights grant can be found
      7 *  in the file PATENTS.  All contributing project authors may
      8 *  be found in the AUTHORS file in the root of the source tree.
      9 */
     10 
     11 #ifndef API_VIDEO_CODECS_BITSTREAM_PARSER_H_
     12 #define API_VIDEO_CODECS_BITSTREAM_PARSER_H_
     13 
     14 #include <stddef.h>
     15 #include <stdint.h>
     16 
     17 #include <optional>
     18 
     19 #include "api/array_view.h"
     20 
     21 namespace webrtc {
     22 
     23 // This class is an interface for bitstream parsers.
     24 class BitstreamParser {
     25 public:
     26  virtual ~BitstreamParser() = default;
     27 
     28  // Parse an additional chunk of the bitstream.
     29  virtual void ParseBitstream(ArrayView<const uint8_t> bitstream) = 0;
     30 
     31  // Get the last extracted QP value from the parsed bitstream. If no QP
     32  // value could be parsed, returns std::nullopt.
     33  virtual std::optional<int> GetLastSliceQp() const = 0;
     34 };
     35 
     36 }  // namespace webrtc
     37 
     38 #endif  // API_VIDEO_CODECS_BITSTREAM_PARSER_H_