Delete legacy VideoEncoderFactory::CreateVideoEncoder

Bug: webrtc:15860
Change-Id: I892aeba67a4ea3be6d6551ff2dc88faaca0c7bd9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342940
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42033}
This commit is contained in:
Danil Chapovalov 2024-04-04 15:22:17 +02:00 committed by WebRTC LUCI CQ
parent f3a2ff2be1
commit 4dfe7ea5af
2 changed files with 3 additions and 20 deletions

View file

@ -34,10 +34,6 @@ class MockVideoEncoderFactory : public webrtc::VideoEncoderFactory {
Create,
(const Environment&, const SdpVideoFormat&),
(override));
MOCK_METHOD(std::unique_ptr<VideoEncoder>,
CreateVideoEncoder,
(const SdpVideoFormat&),
(override));
MOCK_METHOD(void, Die, ());
};

View file

@ -21,7 +21,6 @@
#include "api/video/render_resolution.h"
#include "api/video_codecs/sdp_video_format.h"
#include "api/video_codecs/video_encoder.h"
#include "rtc_base/checks.h"
namespace webrtc {
@ -97,21 +96,9 @@ class VideoEncoderFactory {
}
// Creates a VideoEncoder for the specified format.
virtual std::unique_ptr<VideoEncoder> Create(const Environment& env,
const SdpVideoFormat& format) {
return CreateVideoEncoder(format);
}
// Deprecated in favor of the `Create` above.
// TODO: bugs.webrtc.org/15860 - Make private when all callers are updated
// to use Create function above. Delete when all derived classes implement
// `Create` instead of this function.
virtual std::unique_ptr<VideoEncoder> CreateVideoEncoder(
const SdpVideoFormat& format) {
// Newer code shouldn't call this function,
// Older code should implement it in derived classes.
RTC_CHECK_NOTREACHED();
}
virtual std::unique_ptr<VideoEncoder> Create(
const Environment& env,
const SdpVideoFormat& format) = 0;
// This method creates a EncoderSelector to use for a VideoSendStream.
// (and hence should probably been called CreateEncoderSelector()).