| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #ifndef WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ | 10 #ifndef WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 class RtpRtcpObserver { | 36 class RtpRtcpObserver { |
| 37 public: | 37 public: |
| 38 enum Action { | 38 enum Action { |
| 39 SEND_PACKET, | 39 SEND_PACKET, |
| 40 DROP_PACKET, | 40 DROP_PACKET, |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 virtual ~RtpRtcpObserver() {} | 43 virtual ~RtpRtcpObserver() {} |
| 44 | 44 |
| 45 virtual bool Wait() { | 45 virtual bool Wait() { |
| 46 if (field_trial::FindFullName("WebRTC-QuickPerfTest") == "Enabled") { | 46 if (field_trial::IsEnabled("WebRTC-QuickPerfTest")) { |
| 47 observation_complete_.Wait(kShortTimeoutMs); | 47 observation_complete_.Wait(kShortTimeoutMs); |
| 48 return true; | 48 return true; |
| 49 } | 49 } |
| 50 return observation_complete_.Wait(timeout_ms_); | 50 return observation_complete_.Wait(timeout_ms_); |
| 51 } | 51 } |
| 52 | 52 |
| 53 virtual Action OnSendRtp(const uint8_t* packet, size_t length) { | 53 virtual Action OnSendRtp(const uint8_t* packet, size_t length) { |
| 54 return SEND_PACKET; | 54 return SEND_PACKET; |
| 55 } | 55 } |
| 56 | 56 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 return true; // Will never happen, makes compiler happy. | 141 return true; // Will never happen, makes compiler happy. |
| 142 } | 142 } |
| 143 | 143 |
| 144 RtpRtcpObserver* const observer_; | 144 RtpRtcpObserver* const observer_; |
| 145 TransportType transport_type_; | 145 TransportType transport_type_; |
| 146 }; | 146 }; |
| 147 } // namespace test | 147 } // namespace test |
| 148 } // namespace webrtc | 148 } // namespace webrtc |
| 149 | 149 |
| 150 #endif // WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ | 150 #endif // WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ |
| OLD | NEW |