tor-browser

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

vp9.h (1822B)


      1 /*
      2 *  Copyright (c) 2014 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 
     12 #ifndef MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_
     13 #define MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_
     14 
     15 #include <memory>
     16 #include <vector>
     17 
     18 #include "absl/base/nullability.h"
     19 #include "api/environment/environment.h"
     20 #include "api/video_codecs/scalability_mode.h"
     21 #include "api/video_codecs/sdp_video_format.h"
     22 #include "api/video_codecs/video_decoder.h"
     23 #include "api/video_codecs/video_encoder.h"
     24 #include "api/video_codecs/vp9_profile.h"
     25 
     26 namespace webrtc {
     27 
     28 // Returns a vector with all supported internal VP9 profiles that we can
     29 // negotiate in SDP, in order of preference.
     30 std::vector<SdpVideoFormat> SupportedVP9Codecs(
     31    bool add_scalability_modes = false);
     32 
     33 // Returns a vector with all supported internal VP9 decode profiles in order of
     34 // preference. These will be availble for receive-only connections.
     35 std::vector<SdpVideoFormat> SupportedVP9DecoderCodecs();
     36 
     37 struct Vp9EncoderSettings {
     38  VP9Profile profile = VP9Profile::kProfile0;
     39 };
     40 absl_nonnull std::unique_ptr<VideoEncoder> CreateVp9Encoder(
     41    const Environment& env,
     42    Vp9EncoderSettings settings = {});
     43 
     44 class VP9Encoder {
     45 public:
     46  static bool SupportsScalabilityMode(ScalabilityMode scalability_mode);
     47 };
     48 
     49 class VP9Decoder : public VideoDecoder {
     50 public:
     51  static std::unique_ptr<VP9Decoder> Create();
     52 
     53  ~VP9Decoder() override {}
     54 };
     55 }  // namespace webrtc
     56 
     57 #endif  // MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_