Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(961)

Unified Diff: webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc

Issue 1371043003: Unify FrameType and VideoFrameType. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc
index 5c3b81383069bf1b2b693defcb903f777f16a8ce..b652f554c2fd1e1b4848e0447f355f817798ffc5 100644
--- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc
+++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc
@@ -92,7 +92,7 @@ class PacketizationCallbackStubOldApi : public AudioPacketizationCallback {
public:
PacketizationCallbackStubOldApi()
: num_calls_(0),
- last_frame_type_(kFrameEmpty),
+ last_frame_type_(kSkipFrame),
last_payload_type_(-1),
last_timestamp_(0),
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()) {}
@@ -408,19 +408,12 @@ class AudioCodingModuleTestWithComfortNoiseOldApi
const struct {
int ix;
FrameType type;
- } expectation[] = {{2, kAudioFrameCN},
- {5, kFrameEmpty},
- {8, kFrameEmpty},
- {11, kAudioFrameCN},
- {14, kFrameEmpty},
- {17, kFrameEmpty},
- {20, kAudioFrameCN},
- {23, kFrameEmpty},
- {26, kFrameEmpty},
- {29, kFrameEmpty},
- {32, kAudioFrameCN},
- {35, kFrameEmpty},
- {38, kFrameEmpty}};
+ } expectation[] = {
hlundin-webrtc 2015/10/01 08:54:04 I'd rather you didn't reformat this.
pbos-webrtc 2015/10/06 15:42:45 Done. But clang-format is awesome. :(
+ {2, kAudioFrameCN}, {5, kSkipFrame}, {8, kSkipFrame},
+ {11, kAudioFrameCN}, {14, kSkipFrame}, {17, kSkipFrame},
+ {20, kAudioFrameCN}, {23, kSkipFrame}, {26, kSkipFrame},
+ {29, kSkipFrame}, {32, kAudioFrameCN}, {35, kSkipFrame},
+ {38, kSkipFrame}};
for (int i = 0; i < kLoops; ++i) {
int num_calls_before = packet_cb_.num_calls();
EXPECT_EQ(i / blocks_per_packet, num_calls_before);
@@ -440,7 +433,7 @@ class AudioCodingModuleTestWithComfortNoiseOldApi
// Checks that the transport callback is invoked once per frame period of the
// underlying speech encoder, even when comfort noise is produced.
-// Also checks that the frame type is kAudioFrameCN or kFrameEmpty.
+// Also checks that the frame type is kAudioFrameCN or kSkipFrame.
// This test and the next check the same thing, but differ in the order of
// speech codec and CNG registration.
TEST_F(AudioCodingModuleTestWithComfortNoiseOldApi,

Powered by Google App Engine
This is Rietveld 408576698