Delete deprecated AudioDecoderFactory::MakeAudioDecoder
Bug: webrtc:356878416 Change-Id: I672796e5ec749c3ae0141802922951d4fc562d78 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359680 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/main@{#42938}
This commit is contained in:
parent
40a038efa4
commit
45065a749d
@ -21,7 +21,6 @@
|
|||||||
#include "api/audio_codecs/audio_format.h"
|
#include "api/audio_codecs/audio_format.h"
|
||||||
#include "api/environment/environment.h"
|
#include "api/environment/environment.h"
|
||||||
#include "api/ref_count.h"
|
#include "api/ref_count.h"
|
||||||
#include "rtc_base/checks.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -46,25 +45,10 @@ class AudioDecoderFactory : public RefCountInterface {
|
|||||||
// Note: Implementations need to be robust against combinations other than
|
// Note: Implementations need to be robust against combinations other than
|
||||||
// one encoder, one decoder getting the same ID; such decoders must still
|
// one encoder, one decoder getting the same ID; such decoders must still
|
||||||
// work.
|
// work.
|
||||||
[[deprecated("bugs.webrtc.org/356878416 - Use `Create` instead")]] //
|
|
||||||
virtual std::unique_ptr<AudioDecoder>
|
|
||||||
MakeAudioDecoder(const SdpAudioFormat& format,
|
|
||||||
std::optional<AudioCodecPairId> codec_pair_id) {
|
|
||||||
RTC_DCHECK_NOTREACHED();
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: bugs.webrtc.org/356878416 - Make pure virtual when implemented by
|
|
||||||
// derived classes instead of the MakeAudioDecoder.
|
|
||||||
virtual absl::Nullable<std::unique_ptr<AudioDecoder>> Create(
|
virtual absl::Nullable<std::unique_ptr<AudioDecoder>> Create(
|
||||||
const Environment& env,
|
const Environment& env,
|
||||||
const SdpAudioFormat& format,
|
const SdpAudioFormat& format,
|
||||||
std::optional<AudioCodecPairId> codec_pair_id) {
|
std::optional<AudioCodecPairId> codec_pair_id) = 0;
|
||||||
#pragma clang diagnostic push
|
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
||||||
return MakeAudioDecoder(format, codec_pair_id);
|
|
||||||
#pragma clang diagnostic pop
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|||||||
@ -360,6 +360,7 @@ if (!build_with_chromium) {
|
|||||||
"../api:scoped_refptr",
|
"../api:scoped_refptr",
|
||||||
"../api/audio_codecs:audio_codecs_api", # TODO(kwiberg): Remove this
|
"../api/audio_codecs:audio_codecs_api", # TODO(kwiberg): Remove this
|
||||||
# dependency.
|
# dependency.
|
||||||
|
"../api/environment",
|
||||||
"../api/environment:environment_factory",
|
"../api/environment:environment_factory",
|
||||||
"../api/neteq:neteq_api",
|
"../api/neteq:neteq_api",
|
||||||
"../api/rtc_event_log:rtc_event_log",
|
"../api/rtc_event_log:rtc_event_log",
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
#include "api/audio_codecs/audio_decoder.h"
|
#include "api/audio_codecs/audio_decoder.h"
|
||||||
#include "api/audio_codecs/audio_decoder_factory.h"
|
#include "api/audio_codecs/audio_decoder_factory.h"
|
||||||
#include "api/audio_codecs/audio_format.h"
|
#include "api/audio_codecs/audio_format.h"
|
||||||
|
#include "api/environment/environment.h"
|
||||||
#include "api/function_view.h"
|
#include "api/function_view.h"
|
||||||
#include "api/make_ref_counted.h"
|
#include "api/make_ref_counted.h"
|
||||||
#include "api/neteq/neteq.h"
|
#include "api/neteq/neteq.h"
|
||||||
@ -219,7 +220,8 @@ class ReplacementAudioDecoderFactory : public AudioDecoderFactory {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<AudioDecoder> MakeAudioDecoder(
|
std::unique_ptr<AudioDecoder> Create(
|
||||||
|
const Environment& env,
|
||||||
const SdpAudioFormat& format,
|
const SdpAudioFormat& format,
|
||||||
std::optional<AudioCodecPairId> codec_pair_id) override {
|
std::optional<AudioCodecPairId> codec_pair_id) override {
|
||||||
auto replacement_file = std::make_unique<test::ResampleInputAudioFile>(
|
auto replacement_file = std::make_unique<test::ResampleInputAudioFile>(
|
||||||
|
|||||||
@ -223,6 +223,7 @@ rtc_library("audio_test_common") {
|
|||||||
deps = [
|
deps = [
|
||||||
"../api/audio_codecs:audio_codecs_api",
|
"../api/audio_codecs:audio_codecs_api",
|
||||||
"../api/environment",
|
"../api/environment",
|
||||||
|
"../rtc_base:buffer",
|
||||||
"../rtc_base:checks",
|
"../rtc_base:checks",
|
||||||
"//third_party/abseil-cpp/absl/memory",
|
"//third_party/abseil-cpp/absl/memory",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -11,12 +11,20 @@
|
|||||||
#ifndef TEST_AUDIO_DECODER_PROXY_FACTORY_H_
|
#ifndef TEST_AUDIO_DECODER_PROXY_FACTORY_H_
|
||||||
#define TEST_AUDIO_DECODER_PROXY_FACTORY_H_
|
#define TEST_AUDIO_DECODER_PROXY_FACTORY_H_
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <optional>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "api/audio_codecs/audio_codec_pair_id.h"
|
||||||
#include "api/audio_codecs/audio_decoder.h"
|
#include "api/audio_codecs/audio_decoder.h"
|
||||||
#include "api/audio_codecs/audio_decoder_factory.h"
|
#include "api/audio_codecs/audio_decoder_factory.h"
|
||||||
|
#include "api/audio_codecs/audio_format.h"
|
||||||
|
#include "api/environment/environment.h"
|
||||||
|
#include "rtc_base/buffer.h"
|
||||||
|
#include "rtc_base/checks.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace test {
|
namespace test {
|
||||||
@ -39,7 +47,8 @@ class AudioDecoderProxyFactory : public AudioDecoderFactory {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<AudioDecoder> MakeAudioDecoder(
|
std::unique_ptr<AudioDecoder> Create(
|
||||||
|
const Environment& /* env */,
|
||||||
const SdpAudioFormat& /* format */,
|
const SdpAudioFormat& /* format */,
|
||||||
std::optional<AudioCodecPairId> /* codec_pair_id */) override {
|
std::optional<AudioCodecPairId> /* codec_pair_id */) override {
|
||||||
return std::make_unique<DecoderProxy>(decoder_);
|
return std::make_unique<DecoderProxy>(decoder_);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user