OLD | NEW |
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 17 matching lines...) Expand all Loading... |
28 #include "webrtc/base/byteorder.h" | 28 #include "webrtc/base/byteorder.h" |
29 #include "webrtc/base/gunit.h" | 29 #include "webrtc/base/gunit.h" |
30 #include "talk/media/base/constants.h" | 30 #include "talk/media/base/constants.h" |
31 #include "talk/media/base/fakemediaengine.h" | 31 #include "talk/media/base/fakemediaengine.h" |
32 #include "talk/media/base/fakemediaprocessor.h" | 32 #include "talk/media/base/fakemediaprocessor.h" |
33 #include "talk/media/base/fakenetworkinterface.h" | 33 #include "talk/media/base/fakenetworkinterface.h" |
34 #include "talk/media/base/fakertp.h" | 34 #include "talk/media/base/fakertp.h" |
35 #include "talk/media/webrtc/fakewebrtccall.h" | 35 #include "talk/media/webrtc/fakewebrtccall.h" |
36 #include "talk/media/webrtc/fakewebrtcvoiceengine.h" | 36 #include "talk/media/webrtc/fakewebrtcvoiceengine.h" |
37 #include "talk/media/webrtc/webrtcvoiceengine.h" | 37 #include "talk/media/webrtc/webrtcvoiceengine.h" |
38 #include "webrtc/p2p/base/fakesession.h" | 38 #include "webrtc/p2p/base/faketransportcontroller.h" |
39 #include "talk/session/media/channel.h" | 39 #include "talk/session/media/channel.h" |
40 | 40 |
41 // Tests for the WebRtcVoiceEngine/VoiceChannel code. | 41 // Tests for the WebRtcVoiceEngine/VoiceChannel code. |
42 | 42 |
43 using cricket::kRtpAudioLevelHeaderExtension; | 43 using cricket::kRtpAudioLevelHeaderExtension; |
44 using cricket::kRtpAbsoluteSenderTimeHeaderExtension; | 44 using cricket::kRtpAbsoluteSenderTimeHeaderExtension; |
45 | 45 |
46 static const cricket::AudioCodec kPcmuCodec(0, "PCMU", 8000, 64000, 1, 0); | 46 static const cricket::AudioCodec kPcmuCodec(0, "PCMU", 8000, 64000, 1, 0); |
47 static const cricket::AudioCodec kIsacCodec(103, "ISAC", 16000, 32000, 1, 0); | 47 static const cricket::AudioCodec kIsacCodec(103, "ISAC", 16000, 32000, 1, 0); |
48 static const cricket::AudioCodec kOpusCodec(111, "opus", 48000, 64000, 2, 0); | 48 static const cricket::AudioCodec kOpusCodec(111, "opus", 48000, 64000, 2, 0); |
(...skipping 3579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3628 engine.Terminate(); | 3628 engine.Terminate(); |
3629 } | 3629 } |
3630 | 3630 |
3631 // Test that we set our preferred codecs properly. | 3631 // Test that we set our preferred codecs properly. |
3632 TEST(WebRtcVoiceEngineTest, SetRecvCodecs) { | 3632 TEST(WebRtcVoiceEngineTest, SetRecvCodecs) { |
3633 cricket::WebRtcVoiceEngine engine; | 3633 cricket::WebRtcVoiceEngine engine; |
3634 EXPECT_TRUE(engine.Init(rtc::Thread::Current())); | 3634 EXPECT_TRUE(engine.Init(rtc::Thread::Current())); |
3635 cricket::WebRtcVoiceMediaChannel channel(&engine); | 3635 cricket::WebRtcVoiceMediaChannel channel(&engine); |
3636 EXPECT_TRUE(channel.SetRecvCodecs(engine.codecs())); | 3636 EXPECT_TRUE(channel.SetRecvCodecs(engine.codecs())); |
3637 } | 3637 } |
OLD | NEW |