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

Side by Side Diff: media/cast/net/cast_transport_config.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
« no previous file with comments | « media/cast/net/cast_transport.h ('k') | media/cast/net/cast_transport_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_ 5 #ifndef MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_
6 #define MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_ 6 #define MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory>
11 #include <string> 12 #include <string>
12 13
13 #include "base/callback.h" 14 #include "base/callback.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/stl_util.h" 15 #include "base/stl_util.h"
16 #include "media/cast/common/rtp_time.h" 16 #include "media/cast/common/rtp_time.h"
17 #include "media/cast/net/cast_transport_defines.h" 17 #include "media/cast/net/cast_transport_defines.h"
18 18
19 namespace media { 19 namespace media {
20 namespace cast { 20 namespace cast {
21 21
22 enum Codec { 22 enum Codec {
23 CODEC_UNKNOWN, 23 CODEC_UNKNOWN,
24 CODEC_AUDIO_OPUS, 24 CODEC_AUDIO_OPUS,
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 base::TimeTicks reference_time; 116 base::TimeTicks reference_time;
117 117
118 // Playout delay for this and all future frames. Used by the Adaptive 118 // Playout delay for this and all future frames. Used by the Adaptive
119 // Playout delay extension. Zero means no change. 119 // Playout delay extension. Zero means no change.
120 uint16_t new_playout_delay_ms; 120 uint16_t new_playout_delay_ms;
121 121
122 // The encoded signal data. 122 // The encoded signal data.
123 std::string data; 123 std::string data;
124 }; 124 };
125 125
126 typedef base::Callback<void(scoped_ptr<Packet> packet)> PacketReceiverCallback; 126 typedef base::Callback<void(std::unique_ptr<Packet> packet)>
127 typedef base::Callback<bool(scoped_ptr<Packet> packet)> 127 PacketReceiverCallback;
128 typedef base::Callback<bool(std::unique_ptr<Packet> packet)>
128 PacketReceiverCallbackWithStatus; 129 PacketReceiverCallbackWithStatus;
129 130
130 class PacketTransport { 131 class PacketTransport {
131 public: 132 public:
132 // Send a packet to the network. Returns false if the network is blocked 133 // Send a packet to the network. Returns false if the network is blocked
133 // and we should wait for |cb| to be called. It is not allowed to called 134 // and we should wait for |cb| to be called. It is not allowed to called
134 // SendPacket again until |cb| has been called. Any other errors that 135 // SendPacket again until |cb| has been called. Any other errors that
135 // occur will be reported through side channels, in such cases, this function 136 // occur will be reported through side channels, in such cases, this function
136 // will return true indicating that the channel is not blocked. 137 // will return true indicating that the channel is not blocked.
137 virtual bool SendPacket(PacketRef packet, const base::Closure& cb) = 0; 138 virtual bool SendPacket(PacketRef packet, const base::Closure& cb) = 0;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 lhs.ntp_fraction == rhs.ntp_fraction && 187 lhs.ntp_fraction == rhs.ntp_fraction &&
187 lhs.rtp_timestamp == rhs.rtp_timestamp && 188 lhs.rtp_timestamp == rhs.rtp_timestamp &&
188 lhs.send_packet_count == rhs.send_packet_count && 189 lhs.send_packet_count == rhs.send_packet_count &&
189 lhs.send_octet_count == rhs.send_octet_count; 190 lhs.send_octet_count == rhs.send_octet_count;
190 } 191 }
191 192
192 } // namespace cast 193 } // namespace cast
193 } // namespace media 194 } // namespace media
194 195
195 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_ 196 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_
OLDNEW
« no previous file with comments | « media/cast/net/cast_transport.h ('k') | media/cast/net/cast_transport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698