Update more VideoEncoder implementations to drop CodecSpecificInfo input
Followup to https://webrtc-review.googlesource.com/c/src/+/125900. Bug: webrtc:10379 Change-Id: If81c50c862bbcfd65a3cf7000c8327ebafe519c3 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126002 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27016}
This commit is contained in:
@ -383,7 +383,6 @@ int32_t H264EncoderImpl::SetRateAllocation(
|
||||
|
||||
int32_t H264EncoderImpl::Encode(
|
||||
const VideoFrame& input_frame,
|
||||
const CodecSpecificInfo* codec_specific_info,
|
||||
const std::vector<VideoFrameType>* frame_types) {
|
||||
if (encoders_.empty()) {
|
||||
ReportError();
|
||||
|
||||
@ -67,7 +67,6 @@ class H264EncoderImpl : public H264Encoder {
|
||||
// The result of encoding - an EncodedImage and RTPFragmentationHeader - are
|
||||
// passed to the encode complete callback.
|
||||
int32_t Encode(const VideoFrame& frame,
|
||||
const CodecSpecificInfo* codec_specific_info,
|
||||
const std::vector<VideoFrameType>* frame_types) override;
|
||||
|
||||
EncoderInfo GetEncoderInfo() const override;
|
||||
|
||||
@ -105,13 +105,13 @@ TEST_F(VideoProcessorTest, ProcessFrames_FixedFramerate) {
|
||||
.WillRepeatedly(Return(I420Buffer::Create(kWidth, kHeight)));
|
||||
EXPECT_CALL(
|
||||
encoder_mock_,
|
||||
Encode(Property(&VideoFrame::timestamp, 1 * 90000 / kFramerateFps), _, _))
|
||||
Encode(Property(&VideoFrame::timestamp, 1 * 90000 / kFramerateFps), _))
|
||||
.Times(1);
|
||||
q_.SendTask([this] { video_processor_->ProcessFrame(); });
|
||||
|
||||
EXPECT_CALL(
|
||||
encoder_mock_,
|
||||
Encode(Property(&VideoFrame::timestamp, 2 * 90000 / kFramerateFps), _, _))
|
||||
Encode(Property(&VideoFrame::timestamp, 2 * 90000 / kFramerateFps), _))
|
||||
.Times(1);
|
||||
q_.SendTask([this] { video_processor_->ProcessFrame(); });
|
||||
|
||||
@ -131,7 +131,7 @@ TEST_F(VideoProcessorTest, ProcessFrames_VariableFramerate) {
|
||||
EXPECT_CALL(frame_reader_mock_, ReadFrame())
|
||||
.WillRepeatedly(Return(I420Buffer::Create(kWidth, kHeight)));
|
||||
EXPECT_CALL(encoder_mock_,
|
||||
Encode(Property(&VideoFrame::timestamp, kStartTimestamp), _, _))
|
||||
Encode(Property(&VideoFrame::timestamp, kStartTimestamp), _))
|
||||
.Times(1);
|
||||
q_.SendTask([this] { video_processor_->ProcessFrame(); });
|
||||
|
||||
@ -145,7 +145,7 @@ TEST_F(VideoProcessorTest, ProcessFrames_VariableFramerate) {
|
||||
EXPECT_CALL(encoder_mock_,
|
||||
Encode(Property(&VideoFrame::timestamp,
|
||||
kStartTimestamp + 90000 / kNewFramerateFps),
|
||||
_, _))
|
||||
_))
|
||||
.Times(1);
|
||||
q_.SendTask([this] { video_processor_->ProcessFrame(); });
|
||||
|
||||
|
||||
@ -736,7 +736,6 @@ size_t LibvpxVp8Encoder::SteadyStateSize(int sid, int tid) {
|
||||
}
|
||||
|
||||
int LibvpxVp8Encoder::Encode(const VideoFrame& frame,
|
||||
const CodecSpecificInfo* codec_specific_info,
|
||||
const std::vector<VideoFrameType>* frame_types) {
|
||||
RTC_DCHECK_EQ(frame.width(), codec_.width);
|
||||
RTC_DCHECK_EQ(frame.height(), codec_.height);
|
||||
|
||||
@ -46,7 +46,6 @@ class LibvpxVp8Encoder : public VideoEncoder {
|
||||
size_t max_payload_size) override;
|
||||
|
||||
int Encode(const VideoFrame& input_image,
|
||||
const CodecSpecificInfo* codec_specific_info,
|
||||
const std::vector<VideoFrameType>* frame_types) override;
|
||||
|
||||
int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override;
|
||||
|
||||
@ -485,7 +485,7 @@ TEST_F(TestVp8Impl, KeepsTimestampOnReencode) {
|
||||
.WillRepeatedly(Return(vpx_codec_err_t::VPX_CODEC_OK));
|
||||
|
||||
auto delta_frame = std::vector<VideoFrameType>{kVideoFrameDelta};
|
||||
encoder.Encode(*NextInputFrame(), nullptr, &delta_frame);
|
||||
encoder.Encode(*NextInputFrame(), &delta_frame);
|
||||
}
|
||||
|
||||
TEST_F(TestVp8Impl, GetEncoderInfoFpsAllocationNoLayers) {
|
||||
|
||||
@ -713,7 +713,6 @@ uint32_t VP9EncoderImpl::MaxIntraTarget(uint32_t optimal_buffer_size) {
|
||||
}
|
||||
|
||||
int VP9EncoderImpl::Encode(const VideoFrame& input_image,
|
||||
const CodecSpecificInfo* codec_specific_info,
|
||||
const std::vector<VideoFrameType>* frame_types) {
|
||||
if (!inited_) {
|
||||
return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
|
||||
|
||||
@ -44,7 +44,6 @@ class VP9EncoderImpl : public VP9Encoder {
|
||||
size_t max_payload_size) override;
|
||||
|
||||
int Encode(const VideoFrame& input_image,
|
||||
const CodecSpecificInfo* codec_specific_info,
|
||||
const std::vector<VideoFrameType>* frame_types) override;
|
||||
|
||||
int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override;
|
||||
|
||||
Reference in New Issue
Block a user