| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 break; | 135 break; |
| 136 case Packet::Rtcp: | 136 case Packet::Rtcp: |
| 137 voe_network_->ReceivedRTCPPacket(channel, p.data, p.len); | 137 voe_network_->ReceivedRTCPPacket(channel, p.data, p.len); |
| 138 break; | 138 break; |
| 139 } | 139 } |
| 140 ++transmitted_packets_; | 140 ++transmitted_packets_; |
| 141 } | 141 } |
| 142 return true; | 142 return true; |
| 143 } | 143 } |
| 144 | 144 |
| 145 mutable rtc::CriticalSection crit_; | 145 rtc::CriticalSection crit_; |
| 146 const rtc::scoped_ptr<webrtc::EventWrapper> packet_event_; | 146 const rtc::scoped_ptr<webrtc::EventWrapper> packet_event_; |
| 147 rtc::PlatformThread thread_; | 147 rtc::PlatformThread thread_; |
| 148 std::deque<Packet> packet_queue_ GUARDED_BY(crit_); | 148 std::deque<Packet> packet_queue_ GUARDED_BY(crit_); |
| 149 const int channel_; | 149 const int channel_; |
| 150 std::map<uint32_t, int> channels_ GUARDED_BY(crit_); | 150 std::map<uint32_t, int> channels_ GUARDED_BY(crit_); |
| 151 webrtc::VoENetwork* const voe_network_; | 151 webrtc::VoENetwork* const voe_network_; |
| 152 webrtc::Atomic32 transmitted_packets_; | 152 webrtc::Atomic32 transmitted_packets_; |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 // This fixture initializes the voice engine in addition to the work | 155 // This fixture initializes the voice engine in addition to the work |
| 156 // done by the before-initialization fixture. It also registers an error | 156 // done by the before-initialization fixture. It also registers an error |
| 157 // observer which will fail tests on error callbacks. This fixture is | 157 // observer which will fail tests on error callbacks. This fixture is |
| 158 // useful to tests that want to run before we have started any form of | 158 // useful to tests that want to run before we have started any form of |
| 159 // streaming through the voice engine. | 159 // streaming through the voice engine. |
| 160 class AfterInitializationFixture : public BeforeInitializationFixture { | 160 class AfterInitializationFixture : public BeforeInitializationFixture { |
| 161 public: | 161 public: |
| 162 AfterInitializationFixture(); | 162 AfterInitializationFixture(); |
| 163 virtual ~AfterInitializationFixture(); | 163 virtual ~AfterInitializationFixture(); |
| 164 | 164 |
| 165 protected: | 165 protected: |
| 166 rtc::scoped_ptr<TestErrorObserver> error_observer_; | 166 rtc::scoped_ptr<TestErrorObserver> error_observer_; |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 #endif // SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_TEST_BASE_AFTER_INIT_H_ | 169 #endif // SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_TEST_BASE_AFTER_INIT_H_ |
| OLD | NEW |