| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 virtual Action OnReceiveRtp(const uint8_t* packet, size_t length) { | 61 virtual Action OnReceiveRtp(const uint8_t* packet, size_t length) { |
| 62 return SEND_PACKET; | 62 return SEND_PACKET; |
| 63 } | 63 } |
| 64 | 64 |
| 65 virtual Action OnReceiveRtcp(const uint8_t* packet, size_t length) { | 65 virtual Action OnReceiveRtcp(const uint8_t* packet, size_t length) { |
| 66 return SEND_PACKET; | 66 return SEND_PACKET; |
| 67 } | 67 } |
| 68 | 68 |
| 69 protected: | 69 protected: |
| 70 RtpRtcpObserver() : RtpRtcpObserver(0) {} |
| 70 explicit RtpRtcpObserver(int event_timeout_ms) | 71 explicit RtpRtcpObserver(int event_timeout_ms) |
| 71 : observation_complete_(false, false), | 72 : observation_complete_(false, false), |
| 72 parser_(RtpHeaderParser::Create()), | 73 parser_(RtpHeaderParser::Create()), |
| 73 timeout_ms_(event_timeout_ms) { | 74 timeout_ms_(event_timeout_ms) { |
| 74 parser_->RegisterRtpHeaderExtension(kRtpExtensionTransmissionTimeOffset, | 75 parser_->RegisterRtpHeaderExtension(kRtpExtensionTransmissionTimeOffset, |
| 75 kTOffsetExtensionId); | 76 kTOffsetExtensionId); |
| 76 parser_->RegisterRtpHeaderExtension(kRtpExtensionAbsoluteSendTime, | 77 parser_->RegisterRtpHeaderExtension(kRtpExtensionAbsoluteSendTime, |
| 77 kAbsSendTimeExtensionId); | 78 kAbsSendTimeExtensionId); |
| 78 parser_->RegisterRtpHeaderExtension(kRtpExtensionTransportSequenceNumber, | 79 parser_->RegisterRtpHeaderExtension(kRtpExtensionTransportSequenceNumber, |
| 79 kTransportSequenceNumberExtensionId); | 80 kTransportSequenceNumberExtensionId); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 return true; // Will never happen, makes compiler happy. | 142 return true; // Will never happen, makes compiler happy. |
| 142 } | 143 } |
| 143 | 144 |
| 144 RtpRtcpObserver* const observer_; | 145 RtpRtcpObserver* const observer_; |
| 145 TransportType transport_type_; | 146 TransportType transport_type_; |
| 146 }; | 147 }; |
| 147 } // namespace test | 148 } // namespace test |
| 148 } // namespace webrtc | 149 } // namespace webrtc |
| 149 | 150 |
| 150 #endif // WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ | 151 #endif // WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ |
| OLD | NEW |