2014-11-01 06:10:48 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2014 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.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_
|
|
|
|
|
#define MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_
|
2014-11-01 06:10:48 +00:00
|
|
|
|
2017-11-13 14:10:02 +01:00
|
|
|
#include <memory>
|
2018-06-28 10:59:02 -07:00
|
|
|
#include <vector>
|
2017-11-13 14:10:02 +01:00
|
|
|
|
2024-03-11 13:17:45 +01:00
|
|
|
#include "absl/base/nullability.h"
|
|
|
|
|
#include "api/environment/environment.h"
|
2022-05-05 14:37:05 +02:00
|
|
|
#include "api/video_codecs/scalability_mode.h"
|
2018-06-28 10:59:02 -07:00
|
|
|
#include "api/video_codecs/sdp_video_format.h"
|
2024-03-11 13:17:45 +01:00
|
|
|
#include "api/video_codecs/video_encoder.h"
|
|
|
|
|
#include "api/video_codecs/vp9_profile.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "modules/video_coding/include/video_codec_interface.h"
|
2014-11-01 06:10:48 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
2018-06-28 10:59:02 -07:00
|
|
|
// Returns a vector with all supported internal VP9 profiles that we can
|
|
|
|
|
// negotiate in SDP, in order of preference.
|
2022-07-05 21:06:28 +09:00
|
|
|
std::vector<SdpVideoFormat> SupportedVP9Codecs(
|
|
|
|
|
bool add_scalability_modes = false);
|
2018-06-28 10:59:02 -07:00
|
|
|
|
2020-06-11 13:41:06 +02:00
|
|
|
// Returns a vector with all supported internal VP9 decode profiles in order of
|
|
|
|
|
// preference. These will be availble for receive-only connections.
|
|
|
|
|
std::vector<SdpVideoFormat> SupportedVP9DecoderCodecs();
|
|
|
|
|
|
2024-03-11 13:17:45 +01:00
|
|
|
struct Vp9EncoderSettings {
|
|
|
|
|
VP9Profile profile = VP9Profile::kProfile0;
|
|
|
|
|
};
|
|
|
|
|
absl::Nonnull<std::unique_ptr<VideoEncoder>> CreateVp9Encoder(
|
|
|
|
|
const Environment& env,
|
|
|
|
|
Vp9EncoderSettings settings = {});
|
|
|
|
|
|
2024-04-05 11:54:11 +02:00
|
|
|
class VP9Encoder {
|
2014-11-01 06:10:48 +00:00
|
|
|
public:
|
2022-05-05 14:37:05 +02:00
|
|
|
static bool SupportsScalabilityMode(ScalabilityMode scalability_mode);
|
2014-11-01 06:10:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class VP9Decoder : public VideoDecoder {
|
|
|
|
|
public:
|
2017-11-13 14:10:02 +01:00
|
|
|
static std::unique_ptr<VP9Decoder> Create();
|
2014-11-01 06:10:48 +00:00
|
|
|
|
2018-04-05 11:42:24 +02:00
|
|
|
~VP9Decoder() override {}
|
2014-11-01 06:10:48 +00:00
|
|
|
};
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_
|