OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_UTILITY_H_ | 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_UTILITY_H_ |
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_UTILITY_H_ | 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_UTILITY_H_ |
13 | 13 |
14 #include <stddef.h> // size_t, ptrdiff_t | 14 #include <stddef.h> // size_t, ptrdiff_t |
15 | 15 |
| 16 #include <memory> |
| 17 |
16 #include "webrtc/base/scoped_ptr.h" | 18 #include "webrtc/base/scoped_ptr.h" |
17 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 19 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
18 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" | 20 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" |
19 #include "webrtc/typedefs.h" | 21 #include "webrtc/typedefs.h" |
20 | 22 |
21 namespace webrtc { | 23 namespace webrtc { |
22 namespace rtcp { | 24 namespace rtcp { |
23 class RtcpPacket; | 25 class RtcpPacket; |
24 } | 26 } |
25 namespace RTCPUtility { | 27 namespace RTCPUtility { |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 bool _validPacket; | 463 bool _validPacket; |
462 const uint8_t* _ptrRTCPData; | 464 const uint8_t* _ptrRTCPData; |
463 const uint8_t* _ptrRTCPBlockEnd; | 465 const uint8_t* _ptrRTCPBlockEnd; |
464 | 466 |
465 ParseState _state; | 467 ParseState _state; |
466 uint8_t _numberOfBlocks; | 468 uint8_t _numberOfBlocks; |
467 size_t num_skipped_blocks_; | 469 size_t num_skipped_blocks_; |
468 | 470 |
469 RTCPPacketTypes _packetType; | 471 RTCPPacketTypes _packetType; |
470 RTCPPacket _packet; | 472 RTCPPacket _packet; |
471 rtc::scoped_ptr<webrtc::rtcp::RtcpPacket> rtcp_packet_; | 473 std::unique_ptr<webrtc::rtcp::RtcpPacket> rtcp_packet_; |
472 }; | 474 }; |
473 | 475 |
474 class RTCPPacketIterator { | 476 class RTCPPacketIterator { |
475 public: | 477 public: |
476 RTCPPacketIterator(uint8_t* rtcpData, size_t rtcpDataLength); | 478 RTCPPacketIterator(uint8_t* rtcpData, size_t rtcpDataLength); |
477 ~RTCPPacketIterator(); | 479 ~RTCPPacketIterator(); |
478 | 480 |
479 const RtcpCommonHeader* Begin(); | 481 const RtcpCommonHeader* Begin(); |
480 const RtcpCommonHeader* Iterate(); | 482 const RtcpCommonHeader* Iterate(); |
481 const RtcpCommonHeader* Current(); | 483 const RtcpCommonHeader* Current(); |
482 | 484 |
483 private: | 485 private: |
484 uint8_t* const _ptrBegin; | 486 uint8_t* const _ptrBegin; |
485 uint8_t* const _ptrEnd; | 487 uint8_t* const _ptrEnd; |
486 | 488 |
487 uint8_t* _ptrBlock; | 489 uint8_t* _ptrBlock; |
488 | 490 |
489 RtcpCommonHeader _header; | 491 RtcpCommonHeader _header; |
490 }; | 492 }; |
491 } // namespace RTCPUtility | 493 } // namespace RTCPUtility |
492 } // namespace webrtc | 494 } // namespace webrtc |
493 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_UTILITY_H_ | 495 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_UTILITY_H_ |
OLD | NEW |