Chromium Code Reviews| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 | 120 |
| 121 // The encoded signal data. | 121 // The encoded signal data. |
| 122 std::string data; | 122 std::string data; |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 typedef std::vector<uint8> Packet; | 125 typedef std::vector<uint8> Packet; |
| 126 typedef scoped_refptr<base::RefCountedData<Packet> > PacketRef; | 126 typedef scoped_refptr<base::RefCountedData<Packet> > PacketRef; |
| 127 typedef std::vector<PacketRef> PacketList; | 127 typedef std::vector<PacketRef> PacketList; |
| 128 | 128 |
| 129 typedef base::Callback<void(scoped_ptr<Packet> packet)> PacketReceiverCallback; | 129 typedef base::Callback<void(scoped_ptr<Packet> packet)> PacketReceiverCallback; |
| 130 typedef base::Callback<bool(scoped_ptr<Packet> packet)> | |
| 131 PacketReceiverCallbackWithStatus; | |
|
miu
2014/12/04 04:18:53
Did you intend to keep this name change? I don't
hubbe
2014/12/05 23:57:20
It returns a bool, that's the status.
| |
| 130 | 132 |
| 131 class PacketSender { | 133 class PacketSender { |
| 132 public: | 134 public: |
| 133 // Send a packet to the network. Returns false if the network is blocked | 135 // Send a packet to the network. Returns false if the network is blocked |
| 134 // and we should wait for |cb| to be called. It is not allowed to called | 136 // and we should wait for |cb| to be called. It is not allowed to called |
| 135 // SendPacket again until |cb| has been called. Any other errors that | 137 // SendPacket again until |cb| has been called. Any other errors that |
| 136 // occur will be reported through side channels, in such cases, this function | 138 // occur will be reported through side channels, in such cases, this function |
| 137 // will return true indicating that the channel is not blocked. | 139 // will return true indicating that the channel is not blocked. |
| 138 virtual bool SendPacket(PacketRef packet, const base::Closure& cb) = 0; | 140 virtual bool SendPacket(PacketRef packet, const base::Closure& cb) = 0; |
| 139 | 141 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 lhs.ntp_fraction == rhs.ntp_fraction && | 182 lhs.ntp_fraction == rhs.ntp_fraction && |
| 181 lhs.rtp_timestamp == rhs.rtp_timestamp && | 183 lhs.rtp_timestamp == rhs.rtp_timestamp && |
| 182 lhs.send_packet_count == rhs.send_packet_count && | 184 lhs.send_packet_count == rhs.send_packet_count && |
| 183 lhs.send_octet_count == rhs.send_octet_count; | 185 lhs.send_octet_count == rhs.send_octet_count; |
| 184 } | 186 } |
| 185 | 187 |
| 186 } // namespace cast | 188 } // namespace cast |
| 187 } // namespace media | 189 } // namespace media |
| 188 | 190 |
| 189 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_ | 191 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_ |
| OLD | NEW |