OLD | NEW |
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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // Send a packet to the network. Returns false if the network is blocked | 132 // 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 | 133 // 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 | 134 // SendPacket again until |cb| has been called. Any other errors that |
135 // occur will be reported through side channels, in such cases, this function | 135 // occur will be reported through side channels, in such cases, this function |
136 // will return true indicating that the channel is not blocked. | 136 // will return true indicating that the channel is not blocked. |
137 virtual bool SendPacket(PacketRef packet, const base::Closure& cb) = 0; | 137 virtual bool SendPacket(PacketRef packet, const base::Closure& cb) = 0; |
138 | 138 |
139 // Returns the number of bytes ever sent. | 139 // Returns the number of bytes ever sent. |
140 virtual int64 GetBytesSent() = 0; | 140 virtual int64 GetBytesSent() = 0; |
141 | 141 |
| 142 // Set the send buffer size (in bytes) for the socket. |
| 143 // Returns a net error code. |
| 144 virtual int SetSendBufferSize(int32 size); |
| 145 |
142 virtual ~PacketSender() {} | 146 virtual ~PacketSender() {} |
143 }; | 147 }; |
144 | 148 |
145 struct RtcpSenderInfo { | 149 struct RtcpSenderInfo { |
146 RtcpSenderInfo(); | 150 RtcpSenderInfo(); |
147 ~RtcpSenderInfo(); | 151 ~RtcpSenderInfo(); |
148 // First three members are used for lipsync. | 152 // First three members are used for lipsync. |
149 // First two members are used for rtt. | 153 // First two members are used for rtt. |
150 uint32 ntp_seconds; | 154 uint32 ntp_seconds; |
151 uint32 ntp_fraction; | 155 uint32 ntp_fraction; |
(...skipping 27 matching lines...) Expand all Loading... |
179 lhs.ntp_fraction == rhs.ntp_fraction && | 183 lhs.ntp_fraction == rhs.ntp_fraction && |
180 lhs.rtp_timestamp == rhs.rtp_timestamp && | 184 lhs.rtp_timestamp == rhs.rtp_timestamp && |
181 lhs.send_packet_count == rhs.send_packet_count && | 185 lhs.send_packet_count == rhs.send_packet_count && |
182 lhs.send_octet_count == rhs.send_octet_count; | 186 lhs.send_octet_count == rhs.send_octet_count; |
183 } | 187 } |
184 | 188 |
185 } // namespace cast | 189 } // namespace cast |
186 } // namespace media | 190 } // namespace media |
187 | 191 |
188 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_ | 192 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_ |
OLD | NEW |