Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: media/cast/net/rtcp/test_rtcp_packet_builder.h

Issue 1905763002: Convert //media/cast from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // A very simple packet builder class for building RTCP packets. 5 // A very simple packet builder class for building RTCP packets.
6 // Used for testing only. 6 // Used for testing only.
7 #ifndef MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_ 7 #ifndef MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_
8 #define MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_ 8 #define MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_
9 9
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 void AddPli(uint32_t remote_ssrc, uint32_t local_ssrc); 82 void AddPli(uint32_t remote_ssrc, uint32_t local_ssrc);
83 83
84 void AddReceiverLog(uint32_t remote_ssrc); 84 void AddReceiverLog(uint32_t remote_ssrc);
85 void AddReceiverFrameLog(uint32_t rtp_timestamp, 85 void AddReceiverFrameLog(uint32_t rtp_timestamp,
86 int num_events, 86 int num_events,
87 uint32_t event_timesamp_base); 87 uint32_t event_timesamp_base);
88 void AddReceiverEventLog(uint16_t event_data, 88 void AddReceiverEventLog(uint16_t event_data,
89 CastLoggingEvent event, 89 CastLoggingEvent event,
90 uint16_t event_timesamp_delta); 90 uint16_t event_timesamp_delta);
91 91
92 scoped_ptr<Packet> GetPacket(); 92 std::unique_ptr<Packet> GetPacket();
93 const uint8_t* Data(); 93 const uint8_t* Data();
94 int Length() { return kMaxIpPacketSize - big_endian_writer_.remaining(); } 94 int Length() { return kMaxIpPacketSize - big_endian_writer_.remaining(); }
95 base::BigEndianReader* Reader(); 95 base::BigEndianReader* Reader();
96 96
97 private: 97 private:
98 void AddRtcpHeader(int payload, int format_or_count); 98 void AddRtcpHeader(int payload, int format_or_count);
99 void PatchLengthField(); 99 void PatchLengthField();
100 100
101 // Where the length field of the current packet is. 101 // Where the length field of the current packet is.
102 // Note: 0 is not a legal value, it is used for "uninitialized". 102 // Note: 0 is not a legal value, it is used for "uninitialized".
103 uint8_t buffer_[kMaxIpPacketSize]; 103 uint8_t buffer_[kMaxIpPacketSize];
104 char* ptr_of_length_; 104 char* ptr_of_length_;
105 base::BigEndianWriter big_endian_writer_; 105 base::BigEndianWriter big_endian_writer_;
106 base::BigEndianReader big_endian_reader_; 106 base::BigEndianReader big_endian_reader_;
107 107
108 DISALLOW_COPY_AND_ASSIGN(TestRtcpPacketBuilder); 108 DISALLOW_COPY_AND_ASSIGN(TestRtcpPacketBuilder);
109 }; 109 };
110 110
111 } // namespace cast 111 } // namespace cast
112 } // namespace media 112 } // namespace media
113 113
114 #endif // MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_ 114 #endif // MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_
OLDNEW
« no previous file with comments | « media/cast/net/rtcp/rtcp_utility_unittest.cc ('k') | media/cast/net/rtcp/test_rtcp_packet_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698