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

Side by Side Diff: media/cast/net/cast_transport_config.h

Issue 1515023002: Simplify interface for media/cast: CastTransportSenderImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add changes on tests. Created 4 years, 10 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 #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
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // Send a packet to the network. Returns false if the network is blocked 131 // Send a packet to the network. Returns false if the network is blocked
132 // and we should wait for |cb| to be called. It is not allowed to called 132 // and we should wait for |cb| to be called. It is not allowed to called
133 // SendPacket again until |cb| has been called. Any other errors that 133 // SendPacket again until |cb| has been called. Any other errors that
134 // occur will be reported through side channels, in such cases, this function 134 // occur will be reported through side channels, in such cases, this function
135 // will return true indicating that the channel is not blocked. 135 // will return true indicating that the channel is not blocked.
136 virtual bool SendPacket(PacketRef packet, const base::Closure& cb) = 0; 136 virtual bool SendPacket(PacketRef packet, const base::Closure& cb) = 0;
137 137
138 // Returns the number of bytes ever sent. 138 // Returns the number of bytes ever sent.
139 virtual int64_t GetBytesSent() = 0; 139 virtual int64_t GetBytesSent() = 0;
140 140
141 virtual void StartReceiving(
miu 2016/02/22 22:38:48 1. These methods don't belong in a "PacketSender"
xjz 2016/02/23 21:51:46 Agree. Will rename it in a following CL together w
142 const PacketReceiverCallbackWithStatus& packet_receiver) = 0;
143 virtual void StopReceiving() = 0;
144
141 virtual ~PacketSender() {} 145 virtual ~PacketSender() {}
142 }; 146 };
143 147
144 struct RtcpSenderInfo { 148 struct RtcpSenderInfo {
145 RtcpSenderInfo(); 149 RtcpSenderInfo();
146 ~RtcpSenderInfo(); 150 ~RtcpSenderInfo();
147 // First three members are used for lipsync. 151 // First three members are used for lipsync.
148 // Last two members are used for rtt. 152 // Last two members are used for rtt.
149 uint32_t ntp_seconds; 153 uint32_t ntp_seconds;
150 uint32_t ntp_fraction; 154 uint32_t ntp_fraction;
(...skipping 27 matching lines...) Expand all
178 lhs.ntp_fraction == rhs.ntp_fraction && 182 lhs.ntp_fraction == rhs.ntp_fraction &&
179 lhs.rtp_timestamp == rhs.rtp_timestamp && 183 lhs.rtp_timestamp == rhs.rtp_timestamp &&
180 lhs.send_packet_count == rhs.send_packet_count && 184 lhs.send_packet_count == rhs.send_packet_count &&
181 lhs.send_octet_count == rhs.send_octet_count; 185 lhs.send_octet_count == rhs.send_octet_count;
182 } 186 }
183 187
184 } // namespace cast 188 } // namespace cast
185 } // namespace media 189 } // namespace media
186 190
187 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_ 191 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698