Delete deprecated variant of VideoEncoder::Encode
Bug: webrtc:10379 Change-Id: I027ceb3323d3fea84f478131dee31dff77e4c0aa Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126228 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27346}
This commit is contained in:
@ -101,19 +101,6 @@ VideoEncoder::EncoderInfo::EncoderInfo(const EncoderInfo&) = default;
|
||||
|
||||
VideoEncoder::EncoderInfo::~EncoderInfo() = default;
|
||||
|
||||
// Implementations of the interface must implement one or the other of these two
|
||||
// methods.
|
||||
int32_t VideoEncoder::Encode(const VideoFrame& frame,
|
||||
const std::vector<VideoFrameType>* frame_types) {
|
||||
return Encode(frame, nullptr, frame_types);
|
||||
}
|
||||
|
||||
int32_t VideoEncoder::Encode(const VideoFrame& frame,
|
||||
const CodecSpecificInfo* codec_specific_info,
|
||||
const std::vector<VideoFrameType>* frame_types) {
|
||||
return Encode(frame, frame_types);
|
||||
}
|
||||
|
||||
int32_t VideoEncoder::SetRates(uint32_t bitrate, uint32_t framerate) {
|
||||
RTC_NOTREACHED() << "SetRate(uint32_t, uint32_t) is deprecated.";
|
||||
return -1;
|
||||
|
||||
@ -258,12 +258,7 @@ class RTC_EXPORT VideoEncoder {
|
||||
// WEBRTC_VIDEO_CODEC_MEMORY
|
||||
// WEBRTC_VIDEO_CODEC_ERROR
|
||||
virtual int32_t Encode(const VideoFrame& frame,
|
||||
const std::vector<VideoFrameType>* frame_types);
|
||||
// TODO(bugs.webrtc.org/10379): Deprecated. Delete, and make above method pure
|
||||
// virtual, as soon as downstream applications are updated.
|
||||
virtual int32_t Encode(const VideoFrame& frame,
|
||||
const CodecSpecificInfo* codec_specific_info,
|
||||
const std::vector<VideoFrameType>* frame_types);
|
||||
const std::vector<VideoFrameType>* frame_types) = 0;
|
||||
|
||||
// DEPRECATED! Instead use the one below:
|
||||
// void SetRateAllocation(const VideoBitrateAllocation&, DataRate, uint32)
|
||||
|
||||
@ -101,7 +101,6 @@ class MediaCodecVideoEncoder : public VideoEncoder {
|
||||
int32_t /* number_of_cores */,
|
||||
size_t /* max_payload_size */) override;
|
||||
int32_t Encode(const VideoFrame& input_image,
|
||||
const CodecSpecificInfo* /* codec_specific_info */,
|
||||
const std::vector<VideoFrameType>* frame_types) override;
|
||||
int32_t RegisterEncodeCompleteCallback(
|
||||
EncodedImageCallback* callback) override;
|
||||
@ -596,7 +595,6 @@ int32_t MediaCodecVideoEncoder::InitEncodeInternal(int width,
|
||||
|
||||
int32_t MediaCodecVideoEncoder::Encode(
|
||||
const VideoFrame& frame,
|
||||
const CodecSpecificInfo* /* codec_specific_info */,
|
||||
const std::vector<VideoFrameType>* frame_types) {
|
||||
RTC_DCHECK_CALLED_SEQUENTIALLY(&encoder_queue_checker_);
|
||||
if (sw_fallback_required_)
|
||||
|
||||
@ -120,7 +120,6 @@ int32_t VideoEncoderWrapper::Release() {
|
||||
|
||||
int32_t VideoEncoderWrapper::Encode(
|
||||
const VideoFrame& frame,
|
||||
const CodecSpecificInfo* /* codec_specific_info */,
|
||||
const std::vector<VideoFrameType>* frame_types) {
|
||||
if (!initialized_) {
|
||||
// Most likely initializing the codec failed.
|
||||
|
||||
@ -42,7 +42,6 @@ class VideoEncoderWrapper : public VideoEncoder {
|
||||
int32_t Release() override;
|
||||
|
||||
int32_t Encode(const VideoFrame& frame,
|
||||
const CodecSpecificInfo* codec_specific_info,
|
||||
const std::vector<VideoFrameType>* frame_types) override;
|
||||
|
||||
int32_t SetRateAllocation(const VideoBitrateAllocation& allocation,
|
||||
|
||||
@ -74,7 +74,6 @@ class ObjCVideoEncoder : public VideoEncoder {
|
||||
int32_t Release() override { return [encoder_ releaseEncoder]; }
|
||||
|
||||
int32_t Encode(const VideoFrame &frame,
|
||||
const CodecSpecificInfo *codec_specific_info,
|
||||
const std::vector<VideoFrameType> *frame_types) override {
|
||||
NSMutableArray<NSNumber *> *rtcFrameTypes = [NSMutableArray array];
|
||||
for (size_t i = 0; i < frame_types->size(); ++i) {
|
||||
|
||||
Reference in New Issue
Block a user