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:
@ -81,7 +81,7 @@ TEST_P(SplitIlbcTest, NumFrames) {
|
||||
};
|
||||
|
||||
const auto results = decoder.ParsePayload(
|
||||
generate_payload(frame_length_bytes_ * num_frames_), 0, true);
|
||||
generate_payload(frame_length_bytes_ * num_frames_), 0);
|
||||
EXPECT_EQ(num_frames_, results.size());
|
||||
|
||||
size_t frame_num = 0;
|
||||
@ -123,7 +123,7 @@ TEST(IlbcTest, SplitTooLargePayload) {
|
||||
AudioDecoderIlbc decoder;
|
||||
constexpr size_t kPayloadLengthBytes = 950;
|
||||
const auto results =
|
||||
decoder.ParsePayload(rtc::Buffer(kPayloadLengthBytes), 0, true);
|
||||
decoder.ParsePayload(rtc::Buffer(kPayloadLengthBytes), 0);
|
||||
EXPECT_TRUE(results.empty());
|
||||
}
|
||||
|
||||
@ -132,7 +132,7 @@ TEST(IlbcTest, SplitUnevenPayload) {
|
||||
AudioDecoderIlbc decoder;
|
||||
constexpr size_t kPayloadLengthBytes = 39; // Not an even number of frames.
|
||||
const auto results =
|
||||
decoder.ParsePayload(rtc::Buffer(kPayloadLengthBytes), 0, true);
|
||||
decoder.ParsePayload(rtc::Buffer(kPayloadLengthBytes), 0);
|
||||
EXPECT_TRUE(results.empty());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user