xref: /aosp_15_r20/external/webrtc/modules/video_coding/codecs/vp8/include/vp8.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
2  *  Copyright (c) 2012 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 MODULES_VIDEO_CODING_CODECS_VP8_INCLUDE_VP8_H_
12 #define MODULES_VIDEO_CODING_CODECS_VP8_INCLUDE_VP8_H_
13 
14 #include <memory>
15 #include <vector>
16 
17 #include "api/video_codecs/video_encoder.h"
18 #include "api/video_codecs/vp8_frame_buffer_controller.h"
19 #include "modules/video_coding/include/video_codec_interface.h"
20 
21 namespace webrtc {
22 
23 // TODO(brandtr): Move these interfaces to the api/ folder.
24 class VP8Encoder {
25  public:
26   struct Settings {
27     // Allows for overriding the Vp8FrameBufferController used by the encoder.
28     // If unset, a default Vp8FrameBufferController will be instantiated
29     // internally.
30     std::unique_ptr<Vp8FrameBufferControllerFactory>
31         frame_buffer_controller_factory = nullptr;
32 
33     // Allows for overriding the resolution/bitrate limits exposed through
34     // VideoEncoder::GetEncoderInfo(). No override is done if empty.
35     std::vector<VideoEncoder::ResolutionBitrateLimits>
36         resolution_bitrate_limits = {};
37   };
38 
39   static std::unique_ptr<VideoEncoder> Create();
40   static std::unique_ptr<VideoEncoder> Create(Settings settings);
41 };
42 
43 class VP8Decoder {
44  public:
45   static std::unique_ptr<VideoDecoder> Create();
46 };
47 
48 }  // namespace webrtc
49 
50 #endif  // MODULES_VIDEO_CODING_CODECS_VP8_INCLUDE_VP8_H_
51