| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 static const uint32_t kSsrcs4[] = {1, 2, 3, 4}; | 52 static const uint32_t kSsrcs4[] = {1, 2, 3, 4}; |
| 53 static const int kVideoWidth = 640; | 53 static const int kVideoWidth = 640; |
| 54 static const int kVideoHeight = 360; | 54 static const int kVideoHeight = 360; |
| 55 static const int kFramerate = 30; | 55 static const int kFramerate = 30; |
| 56 | 56 |
| 57 inline bool IsEqualCodec(const cricket::VideoCodec& a, | 57 inline bool IsEqualCodec(const cricket::VideoCodec& a, |
| 58 const cricket::VideoCodec& b) { | 58 const cricket::VideoCodec& b) { |
| 59 return a.id == b.id && a.name == b.name; | 59 return a.id == b.id && a.name == b.name; |
| 60 } | 60 } |
| 61 | 61 |
| 62 namespace std { | |
| 63 inline std::ostream& operator<<(std::ostream& s, const cricket::VideoCodec& c) { | |
| 64 s << "{" << c.name << "(" << c.id << ")" | |
| 65 << "}"; | |
| 66 return s; | |
| 67 } | |
| 68 } // namespace std | |
| 69 | |
| 70 template<class E, class C> | 62 template<class E, class C> |
| 71 class VideoMediaChannelTest : public testing::Test, | 63 class VideoMediaChannelTest : public testing::Test, |
| 72 public sigslot::has_slots<> { | 64 public sigslot::has_slots<> { |
| 73 protected: | 65 protected: |
| 74 VideoMediaChannelTest<E, C>() | 66 VideoMediaChannelTest<E, C>() |
| 75 : call_(webrtc::Call::Create(webrtc::Call::Config(&event_log_))) {} | 67 : call_(webrtc::Call::Create(webrtc::Call::Config(&event_log_))) {} |
| 76 | 68 |
| 77 virtual cricket::VideoCodec DefaultCodec() = 0; | 69 virtual cricket::VideoCodec DefaultCodec() = 0; |
| 78 | 70 |
| 79 virtual cricket::StreamParams DefaultSendStreamParams() { | 71 virtual cricket::StreamParams DefaultSendStreamParams() { |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 std::unique_ptr<C> channel_; | 936 std::unique_ptr<C> channel_; |
| 945 cricket::FakeNetworkInterface network_interface_; | 937 cricket::FakeNetworkInterface network_interface_; |
| 946 cricket::FakeVideoRenderer renderer_; | 938 cricket::FakeVideoRenderer renderer_; |
| 947 cricket::VideoMediaChannel::Error media_error_; | 939 cricket::VideoMediaChannel::Error media_error_; |
| 948 | 940 |
| 949 // Used by test cases where 2 streams are run on the same channel. | 941 // Used by test cases where 2 streams are run on the same channel. |
| 950 cricket::FakeVideoRenderer renderer2_; | 942 cricket::FakeVideoRenderer renderer2_; |
| 951 }; | 943 }; |
| 952 | 944 |
| 953 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT | 945 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT |
| OLD | NEW |