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

Side by Side Diff: talk/media/webrtc/webrtcvoiceengine_unittest.cc

Issue 1246913005: TransportController refactoring (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Set media engine on voice channel Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2008 Google Inc. 3 * Copyright 2008 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 22 matching lines...) Expand all
33 #include "webrtc/base/byteorder.h" 33 #include "webrtc/base/byteorder.h"
34 #include "webrtc/base/gunit.h" 34 #include "webrtc/base/gunit.h"
35 #include "talk/media/base/constants.h" 35 #include "talk/media/base/constants.h"
36 #include "talk/media/base/fakemediaengine.h" 36 #include "talk/media/base/fakemediaengine.h"
37 #include "talk/media/base/fakemediaprocessor.h" 37 #include "talk/media/base/fakemediaprocessor.h"
38 #include "talk/media/base/fakenetworkinterface.h" 38 #include "talk/media/base/fakenetworkinterface.h"
39 #include "talk/media/base/fakertp.h" 39 #include "talk/media/base/fakertp.h"
40 #include "talk/media/webrtc/fakewebrtccall.h" 40 #include "talk/media/webrtc/fakewebrtccall.h"
41 #include "talk/media/webrtc/fakewebrtcvoiceengine.h" 41 #include "talk/media/webrtc/fakewebrtcvoiceengine.h"
42 #include "talk/media/webrtc/webrtcvoiceengine.h" 42 #include "talk/media/webrtc/webrtcvoiceengine.h"
43 #include "webrtc/p2p/base/fakesession.h" 43 #include "webrtc/p2p/base/faketransportcontroller.h"
44 #include "talk/session/media/channel.h" 44 #include "talk/session/media/channel.h"
45 45
46 // Tests for the WebRtcVoiceEngine/VoiceChannel code. 46 // Tests for the WebRtcVoiceEngine/VoiceChannel code.
47 47
48 using cricket::kRtpAudioLevelHeaderExtension; 48 using cricket::kRtpAudioLevelHeaderExtension;
49 using cricket::kRtpAbsoluteSenderTimeHeaderExtension; 49 using cricket::kRtpAbsoluteSenderTimeHeaderExtension;
50 50
51 static const cricket::AudioCodec kPcmuCodec(0, "PCMU", 8000, 64000, 1, 0); 51 static const cricket::AudioCodec kPcmuCodec(0, "PCMU", 8000, 64000, 1, 0);
52 static const cricket::AudioCodec kIsacCodec(103, "ISAC", 16000, 32000, 1, 0); 52 static const cricket::AudioCodec kIsacCodec(103, "ISAC", 16000, 32000, 1, 0);
53 static const cricket::AudioCodec kOpusCodec(111, "opus", 48000, 64000, 2, 0); 53 static const cricket::AudioCodec kOpusCodec(111, "opus", 48000, 64000, 2, 0);
(...skipping 3602 matching lines...) Expand 10 before | Expand all | Expand 10 after
3656 // deleting logic, i.e., deleting |send_ch| will reset the associate send 3656 // deleting logic, i.e., deleting |send_ch| will reset the associate send
3657 // channel of |recv_ch|.This is not a common case, since, normally, only the 3657 // channel of |recv_ch|.This is not a common case, since, normally, only the
3658 // default channel can be associated. However, the default is not deletable. 3658 // default channel can be associated. However, the default is not deletable.
3659 // So we force the |recv_ch| to associate with a non-default channel. 3659 // So we force the |recv_ch| to associate with a non-default channel.
3660 EXPECT_EQ(0, voe_.AssociateSendChannel(recv_ch, send_ch)); 3660 EXPECT_EQ(0, voe_.AssociateSendChannel(recv_ch, send_ch));
3661 EXPECT_EQ(voe_.GetAssociateSendChannel(recv_ch), send_ch); 3661 EXPECT_EQ(voe_.GetAssociateSendChannel(recv_ch), send_ch);
3662 3662
3663 EXPECT_TRUE(channel_->RemoveSendStream(2)); 3663 EXPECT_TRUE(channel_->RemoveSendStream(2));
3664 EXPECT_EQ(voe_.GetAssociateSendChannel(recv_ch), -1); 3664 EXPECT_EQ(voe_.GetAssociateSendChannel(recv_ch), -1);
3665 } 3665 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698