| 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_ |
| 11 #define WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ | 11 #define WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ |
| 12 | 12 |
| 13 #include <map> | 13 #include <map> |
| 14 #include <memory> |
| 14 #include <vector> | 15 #include <vector> |
| 15 | 16 |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 17 | 18 |
| 18 #include "webrtc/base/criticalsection.h" | 19 #include "webrtc/base/criticalsection.h" |
| 19 #include "webrtc/base/event.h" | 20 #include "webrtc/base/event.h" |
| 20 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" | 21 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
| 21 #include "webrtc/test/constants.h" | 22 #include "webrtc/test/constants.h" |
| 22 #include "webrtc/test/direct_transport.h" | 23 #include "webrtc/test/direct_transport.h" |
| 23 #include "webrtc/typedefs.h" | 24 #include "webrtc/typedefs.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 timeout_ms_(event_timeout_ms) { | 63 timeout_ms_(event_timeout_ms) { |
| 63 parser_->RegisterRtpHeaderExtension(kRtpExtensionTransmissionTimeOffset, | 64 parser_->RegisterRtpHeaderExtension(kRtpExtensionTransmissionTimeOffset, |
| 64 kTOffsetExtensionId); | 65 kTOffsetExtensionId); |
| 65 parser_->RegisterRtpHeaderExtension(kRtpExtensionAbsoluteSendTime, | 66 parser_->RegisterRtpHeaderExtension(kRtpExtensionAbsoluteSendTime, |
| 66 kAbsSendTimeExtensionId); | 67 kAbsSendTimeExtensionId); |
| 67 parser_->RegisterRtpHeaderExtension(kRtpExtensionTransportSequenceNumber, | 68 parser_->RegisterRtpHeaderExtension(kRtpExtensionTransportSequenceNumber, |
| 68 kTransportSequenceNumberExtensionId); | 69 kTransportSequenceNumberExtensionId); |
| 69 } | 70 } |
| 70 | 71 |
| 71 rtc::Event observation_complete_; | 72 rtc::Event observation_complete_; |
| 72 const rtc::scoped_ptr<RtpHeaderParser> parser_; | 73 const std::unique_ptr<RtpHeaderParser> parser_; |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 const int timeout_ms_; | 76 const int timeout_ms_; |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 class PacketTransport : public test::DirectTransport { | 79 class PacketTransport : public test::DirectTransport { |
| 79 public: | 80 public: |
| 80 enum TransportType { kReceiver, kSender }; | 81 enum TransportType { kReceiver, kSender }; |
| 81 | 82 |
| 82 PacketTransport(Call* send_call, | 83 PacketTransport(Call* send_call, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 return true; // Will never happen, makes compiler happy. | 131 return true; // Will never happen, makes compiler happy. |
| 131 } | 132 } |
| 132 | 133 |
| 133 RtpRtcpObserver* const observer_; | 134 RtpRtcpObserver* const observer_; |
| 134 TransportType transport_type_; | 135 TransportType transport_type_; |
| 135 }; | 136 }; |
| 136 } // namespace test | 137 } // namespace test |
| 137 } // namespace webrtc | 138 } // namespace webrtc |
| 138 | 139 |
| 139 #endif // WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ | 140 #endif // WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ |
| OLD | NEW |