webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.h
Danil Chapovalov b4913a549f Add factory functions to pass Environment to VideoEncoders
Bug: webrtc:15860
Change-Id: I4a9d2678dcfe5b0f178863242e27600fcc95325d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342480
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41879}
2024-03-12 09:43:14 +00:00

38 lines
1.3 KiB
C++

/*
* Copyright (c) 2020 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_AV1_LIBAOM_AV1_ENCODER_H_
#define MODULES_VIDEO_CODING_CODECS_AV1_LIBAOM_AV1_ENCODER_H_
#include <map>
#include <memory>
#include "absl/base/nullability.h"
#include "api/environment/environment.h"
#include "api/video_codecs/video_encoder.h"
namespace webrtc {
struct LibaomAv1EncoderSettings {
// A map of max pixel count --> cpu speed.
std::map<int, int> max_pixel_count_to_cpu_speed;
};
absl::Nonnull<std::unique_ptr<VideoEncoder>> CreateLibaomAv1Encoder(
const Environment& env,
LibaomAv1EncoderSettings settings = {});
// Deprecated, Use CreateLibaomAv1Encoder above, bugs.webrtc.org/15860
using LibaomAv1EncoderAuxConfig = LibaomAv1EncoderSettings;
std::unique_ptr<VideoEncoder> CreateLibaomAv1Encoder();
std::unique_ptr<VideoEncoder> CreateLibaomAv1Encoder(
const LibaomAv1EncoderAuxConfig& aux_config);
} // namespace webrtc
#endif // MODULES_VIDEO_CODING_CODECS_AV1_LIBAOM_AV1_ENCODER_H_