Delete CodecSpecificInfo argument from VideoEncoder::Encode
Bug: webrtc:10379 Change-Id: If9f92eb1e5891df284881082c53f0b1db1c26a38 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125900 Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26992}
This commit is contained in:
@ -43,7 +43,6 @@ class MultiplexEncoderAdapter : public VideoEncoder {
|
||||
int number_of_cores,
|
||||
size_t max_payload_size) override;
|
||||
int Encode(const VideoFrame& input_image,
|
||||
const CodecSpecificInfo* codec_specific_info,
|
||||
const std::vector<FrameType>* frame_types) override;
|
||||
int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override;
|
||||
int SetRateAllocation(const VideoBitrateAllocation& bitrate,
|
||||
|
||||
@ -138,7 +138,6 @@ int MultiplexEncoderAdapter::InitEncode(const VideoCodec* inst,
|
||||
|
||||
int MultiplexEncoderAdapter::Encode(
|
||||
const VideoFrame& input_image,
|
||||
const CodecSpecificInfo* codec_specific_info,
|
||||
const std::vector<FrameType>* frame_types) {
|
||||
if (!encoded_complete_callback_) {
|
||||
return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
|
||||
@ -181,8 +180,7 @@ int MultiplexEncoderAdapter::Encode(
|
||||
++picture_index_;
|
||||
|
||||
// Encode YUV
|
||||
int rv = encoders_[kYUVStream]->Encode(input_image, codec_specific_info,
|
||||
&adjusted_frame_types);
|
||||
int rv = encoders_[kYUVStream]->Encode(input_image, &adjusted_frame_types);
|
||||
|
||||
// If we do not receive an alpha frame, we send a single frame for this
|
||||
// |picture_index_|. The receiver will receive |frame_count| as 1 which
|
||||
@ -208,8 +206,7 @@ int MultiplexEncoderAdapter::Encode(
|
||||
.set_rotation(input_image.rotation())
|
||||
.set_id(input_image.id())
|
||||
.build();
|
||||
rv = encoders_[kAXXStream]->Encode(alpha_image, codec_specific_info,
|
||||
&adjusted_frame_types);
|
||||
rv = encoders_[kAXXStream]->Encode(alpha_image, &adjusted_frame_types);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
@ -219,8 +219,7 @@ TEST_P(TestMultiplexAdapter, ConstructAndDestructEncoder) {
|
||||
|
||||
TEST_P(TestMultiplexAdapter, EncodeDecodeI420Frame) {
|
||||
std::unique_ptr<VideoFrame> input_frame = CreateInputFrame(false);
|
||||
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
|
||||
encoder_->Encode(*input_frame, nullptr, nullptr));
|
||||
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, encoder_->Encode(*input_frame, nullptr));
|
||||
EncodedImage encoded_frame;
|
||||
CodecSpecificInfo codec_specific_info;
|
||||
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
|
||||
@ -238,8 +237,7 @@ TEST_P(TestMultiplexAdapter, EncodeDecodeI420Frame) {
|
||||
|
||||
TEST_P(TestMultiplexAdapter, EncodeDecodeI420AFrame) {
|
||||
std::unique_ptr<VideoFrame> yuva_frame = CreateInputFrame(true);
|
||||
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
|
||||
encoder_->Encode(*yuva_frame, nullptr, nullptr));
|
||||
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, encoder_->Encode(*yuva_frame, nullptr));
|
||||
EncodedImage encoded_frame;
|
||||
CodecSpecificInfo codec_specific_info;
|
||||
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
|
||||
@ -264,8 +262,7 @@ TEST_P(TestMultiplexAdapter, EncodeDecodeI420AFrame) {
|
||||
|
||||
TEST_P(TestMultiplexAdapter, CheckSingleFrameEncodedBitstream) {
|
||||
std::unique_ptr<VideoFrame> input_frame = CreateInputFrame(false);
|
||||
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
|
||||
encoder_->Encode(*input_frame, nullptr, nullptr));
|
||||
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, encoder_->Encode(*input_frame, nullptr));
|
||||
EncodedImage encoded_frame;
|
||||
CodecSpecificInfo codec_specific_info;
|
||||
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
|
||||
@ -284,8 +281,7 @@ TEST_P(TestMultiplexAdapter, CheckSingleFrameEncodedBitstream) {
|
||||
|
||||
TEST_P(TestMultiplexAdapter, CheckDoubleFramesEncodedBitstream) {
|
||||
std::unique_ptr<VideoFrame> yuva_frame = CreateInputFrame(true);
|
||||
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
|
||||
encoder_->Encode(*yuva_frame, nullptr, nullptr));
|
||||
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, encoder_->Encode(*yuva_frame, nullptr));
|
||||
EncodedImage encoded_frame;
|
||||
CodecSpecificInfo codec_specific_info;
|
||||
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
|
||||
@ -311,8 +307,7 @@ TEST_P(TestMultiplexAdapter, ImageIndexIncreases) {
|
||||
std::unique_ptr<VideoFrame> yuva_frame = CreateInputFrame(true);
|
||||
const size_t expected_num_encoded_frames = 3;
|
||||
for (size_t i = 0; i < expected_num_encoded_frames; ++i) {
|
||||
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
|
||||
encoder_->Encode(*yuva_frame, nullptr, nullptr));
|
||||
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, encoder_->Encode(*yuva_frame, nullptr));
|
||||
EncodedImage encoded_frame;
|
||||
CodecSpecificInfo codec_specific_info;
|
||||
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
|
||||
|
||||
Reference in New Issue
Block a user