Delete AudioDecoder method IncomingPacket
Only the ISAC codec had an non-trivial implementation, for its unused adaptive mode. This cl deletes that implementation, and the call from NetEq, and the interface method. Bug: webrtc:10098 Change-Id: Iaf7667e0ae867fc9d64286dff4c01a8ce0b6e2a4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153882 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29279}
This commit is contained in:
@ -335,15 +335,6 @@ TEST_F(NetEqImplTest, InsertPacket) {
|
||||
std::unique_ptr<MockAudioDecoder> mock_decoder(new MockAudioDecoder);
|
||||
EXPECT_CALL(*mock_decoder, Channels()).WillRepeatedly(Return(1));
|
||||
EXPECT_CALL(*mock_decoder, SampleRateHz()).WillRepeatedly(Return(8000));
|
||||
// BWE update function called with first packet.
|
||||
EXPECT_CALL(*mock_decoder,
|
||||
IncomingPacket(_, kPayloadLength, kFirstSequenceNumber,
|
||||
kFirstTimestamp, kFirstReceiveTime));
|
||||
// BWE update function called with second packet.
|
||||
EXPECT_CALL(
|
||||
*mock_decoder,
|
||||
IncomingPacket(_, kPayloadLength, kFirstSequenceNumber + 1,
|
||||
kFirstTimestamp + 160, kFirstReceiveTime + 155));
|
||||
EXPECT_CALL(*mock_decoder, Die()).Times(1); // Called when deleted.
|
||||
|
||||
*dec = std::move(mock_decoder);
|
||||
@ -595,8 +586,6 @@ TEST_F(NetEqImplTest, ReorderedPacket) {
|
||||
EXPECT_CALL(mock_decoder, SampleRateHz())
|
||||
.WillRepeatedly(Return(kSampleRateHz));
|
||||
EXPECT_CALL(mock_decoder, Channels()).WillRepeatedly(Return(1));
|
||||
EXPECT_CALL(mock_decoder, IncomingPacket(_, kPayloadLengthBytes, _, _, _))
|
||||
.WillRepeatedly(Return(0));
|
||||
EXPECT_CALL(mock_decoder, PacketDuration(_, kPayloadLengthBytes))
|
||||
.WillRepeatedly(Return(rtc::checked_cast<int>(kPayloadLengthSamples)));
|
||||
int16_t dummy_output[kPayloadLengthSamples] = {0};
|
||||
@ -837,8 +826,6 @@ TEST_F(NetEqImplTest, CodecInternalCng) {
|
||||
EXPECT_CALL(mock_decoder, SampleRateHz())
|
||||
.WillRepeatedly(Return(kSampleRateKhz * 1000));
|
||||
EXPECT_CALL(mock_decoder, Channels()).WillRepeatedly(Return(1));
|
||||
EXPECT_CALL(mock_decoder, IncomingPacket(_, kPayloadLengthBytes, _, _, _))
|
||||
.WillRepeatedly(Return(0));
|
||||
EXPECT_CALL(mock_decoder, PacketDuration(_, kPayloadLengthBytes))
|
||||
.WillRepeatedly(Return(rtc::checked_cast<int>(kPayloadLengthSamples)));
|
||||
// Packed duration when asking the decoder for more CNG data (without a new
|
||||
@ -1112,8 +1099,6 @@ TEST_F(NetEqImplTest, DecodedPayloadTooShort) {
|
||||
EXPECT_CALL(mock_decoder, SampleRateHz())
|
||||
.WillRepeatedly(Return(kSampleRateHz));
|
||||
EXPECT_CALL(mock_decoder, Channels()).WillRepeatedly(Return(1));
|
||||
EXPECT_CALL(mock_decoder, IncomingPacket(_, kPayloadLengthBytes, _, _, _))
|
||||
.WillRepeatedly(Return(0));
|
||||
EXPECT_CALL(mock_decoder, PacketDuration(_, _))
|
||||
.WillRepeatedly(Return(rtc::checked_cast<int>(kPayloadLengthSamples)));
|
||||
int16_t dummy_output[kPayloadLengthSamples] = {0};
|
||||
@ -1181,8 +1166,6 @@ TEST_F(NetEqImplTest, DecodingError) {
|
||||
EXPECT_CALL(mock_decoder, SampleRateHz())
|
||||
.WillRepeatedly(Return(kSampleRateHz));
|
||||
EXPECT_CALL(mock_decoder, Channels()).WillRepeatedly(Return(1));
|
||||
EXPECT_CALL(mock_decoder, IncomingPacket(_, kPayloadLengthBytes, _, _, _))
|
||||
.WillRepeatedly(Return(0));
|
||||
EXPECT_CALL(mock_decoder, PacketDuration(_, _))
|
||||
.WillRepeatedly(Return(rtc::checked_cast<int>(kFrameLengthSamples)));
|
||||
EXPECT_CALL(mock_decoder, ErrorCode()).WillOnce(Return(kDecoderErrorCode));
|
||||
@ -1297,8 +1280,6 @@ TEST_F(NetEqImplTest, DecodingErrorDuringInternalCng) {
|
||||
EXPECT_CALL(mock_decoder, SampleRateHz())
|
||||
.WillRepeatedly(Return(kSampleRateHz));
|
||||
EXPECT_CALL(mock_decoder, Channels()).WillRepeatedly(Return(1));
|
||||
EXPECT_CALL(mock_decoder, IncomingPacket(_, kPayloadLengthBytes, _, _, _))
|
||||
.WillRepeatedly(Return(0));
|
||||
EXPECT_CALL(mock_decoder, PacketDuration(_, _))
|
||||
.WillRepeatedly(Return(rtc::checked_cast<int>(kFrameLengthSamples)));
|
||||
EXPECT_CALL(mock_decoder, ErrorCode()).WillOnce(Return(kDecoderErrorCode));
|
||||
|
||||
Reference in New Issue
Block a user