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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 static const VideoCodec kVideoCodecs[] = { | 48 static const VideoCodec kVideoCodecs[] = { |
49 VideoCodec(99, "H264", 100, 200, 300, 0), | 49 VideoCodec(99, "H264", 100, 200, 300, 0), |
50 VideoCodec(100, "VP8", 100, 200, 300, 0), | 50 VideoCodec(100, "VP8", 100, 200, 300, 0), |
51 VideoCodec(96, "rtx", 100, 200, 300, 0), | 51 VideoCodec(96, "rtx", 100, 200, 300, 0), |
52 }; | 52 }; |
53 | 53 |
54 class FakeMediaController : public webrtc::MediaControllerInterface { | 54 class FakeMediaController : public webrtc::MediaControllerInterface { |
55 public: | 55 public: |
56 explicit FakeMediaController(webrtc::Call* call) : call_(call) { | 56 explicit FakeMediaController(webrtc::Call* call) : call_(call) { |
57 DCHECK(nullptr != call); | 57 RTC_DCHECK(nullptr != call); |
58 } | 58 } |
59 ~FakeMediaController() override {} | 59 ~FakeMediaController() override {} |
60 webrtc::Call* call_w() override { return call_; } | 60 webrtc::Call* call_w() override { return call_; } |
61 private: | 61 private: |
62 webrtc::Call* call_; | 62 webrtc::Call* call_; |
63 }; | 63 }; |
64 | 64 |
65 class ChannelManagerTest : public testing::Test { | 65 class ChannelManagerTest : public testing::Test { |
66 protected: | 66 protected: |
67 ChannelManagerTest() : fake_call_(webrtc::Call::Config()), | 67 ChannelManagerTest() : fake_call_(webrtc::Call::Config()), |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 EXPECT_FALSE(cm_->SetVideoRtxEnabled(false)); | 592 EXPECT_FALSE(cm_->SetVideoRtxEnabled(false)); |
593 | 593 |
594 // Can set again after terminate. | 594 // Can set again after terminate. |
595 cm_->Terminate(); | 595 cm_->Terminate(); |
596 EXPECT_TRUE(cm_->SetVideoRtxEnabled(true)); | 596 EXPECT_TRUE(cm_->SetVideoRtxEnabled(true)); |
597 cm_->GetSupportedVideoCodecs(&codecs); | 597 cm_->GetSupportedVideoCodecs(&codecs); |
598 EXPECT_TRUE(ContainsMatchingCodec(codecs, rtx_codec)); | 598 EXPECT_TRUE(ContainsMatchingCodec(codecs, rtx_codec)); |
599 } | 599 } |
600 | 600 |
601 } // namespace cricket | 601 } // namespace cricket |
OLD | NEW |