Moved Opus-specific payload splitting into AudioDecoderOpus.
The biggest change to NetEq is the move from a primary flag, to a Priority with two separate levels: one set by RED splitting and one set by the codec itself. This allows us to unambigously prioritize "fallback" packets from these two sources. I've chosen what I believe is the sensible ordering: packets that the codec prioritizes are chosen first, regardless of if they are secondary RED packets or not. So if we were to use Opus w/ FEC in RED, we'd only do Opus FEC decoding if there was no RED packet that could cover the time slot. With this change, PayloadSplitter now only deals with RED packets. Maybe it should be renamed RedPayloadSplitter? BUG=webrtc:5805 Review-Url: https://codereview.webrtc.org/2342443005 Cr-Commit-Position: refs/heads/master@{#14347}
This commit is contained in:
@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_PAYLOAD_SPLITTER_H_
|
||||
#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_PAYLOAD_SPLITTER_H_
|
||||
|
||||
#include "webrtc/modules/audio_coding/neteq/payload_splitter.h"
|
||||
|
||||
#include "testing/gmock/include/gmock/gmock.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
class MockPayloadSplitter : public PayloadSplitter {
|
||||
public:
|
||||
MOCK_METHOD1(SplitRed,
|
||||
int(PacketList* packet_list));
|
||||
MOCK_METHOD2(SplitFec,
|
||||
int(PacketList* packet_list, DecoderDatabase* decoder_database));
|
||||
MOCK_METHOD2(CheckRedPayloads,
|
||||
int(PacketList* packet_list, const DecoderDatabase& decoder_database));
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_PAYLOAD_SPLITTER_H_
|
||||
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_RED_PAYLOAD_SPLITTER_H_
|
||||
#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_RED_PAYLOAD_SPLITTER_H_
|
||||
|
||||
#include "webrtc/modules/audio_coding/neteq/red_payload_splitter.h"
|
||||
|
||||
#include "testing/gmock/include/gmock/gmock.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
class MockRedPayloadSplitter : public RedPayloadSplitter {
|
||||
public:
|
||||
MOCK_METHOD1(SplitRed, bool(PacketList* packet_list));
|
||||
MOCK_METHOD2(CheckRedPayloads,
|
||||
int(PacketList* packet_list,
|
||||
const DecoderDatabase& decoder_database));
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_RED_PAYLOAD_SPLITTER_H_
|
||||
Reference in New Issue
Block a user