webrtc/modules/video_coding/codecs/vp8/include/vp8.h
Rasmus Brandt 52dd621a92 libvpx-vp8: Add external configurability of resolution/bitrate limits.
Bug: webrtc:11436
Change-Id: Iae34caf579e0931344c1b8706c7e561a5410c170
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171112
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30870}
2020-03-24 13:32:59 +00:00

55 lines
1.8 KiB
C++

/*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef MODULES_VIDEO_CODING_CODECS_VP8_INCLUDE_VP8_H_
#define MODULES_VIDEO_CODING_CODECS_VP8_INCLUDE_VP8_H_
#include <memory>
#include <vector>
#include "api/video_codecs/video_encoder.h"
#include "api/video_codecs/vp8_frame_buffer_controller.h"
#include "modules/video_coding/include/video_codec_interface.h"
#include "rtc_base/deprecation.h"
namespace webrtc {
// TODO(brandtr): Move these interfaces to the api/ folder.
class VP8Encoder {
public:
struct Settings {
// Allows for overriding the Vp8FrameBufferController used by the encoder.
// If unset, a default Vp8FrameBufferController will be instantiated
// internally.
std::unique_ptr<Vp8FrameBufferControllerFactory>
frame_buffer_controller_factory = nullptr;
// Allows for overriding the resolution/bitrate limits exposed through
// VideoEncoder::GetEncoderInfo(). No override is done if empty.
std::vector<VideoEncoder::ResolutionBitrateLimits>
resolution_bitrate_limits = {};
};
static std::unique_ptr<VideoEncoder> Create();
static std::unique_ptr<VideoEncoder> Create(Settings settings);
RTC_DEPRECATED static std::unique_ptr<VideoEncoder> Create(
std::unique_ptr<Vp8FrameBufferControllerFactory>
frame_buffer_controller_factory);
};
class VP8Decoder {
public:
static std::unique_ptr<VideoDecoder> Create();
};
} // namespace webrtc
#endif // MODULES_VIDEO_CODING_CODECS_VP8_INCLUDE_VP8_H_