Index: webrtc/base/asyncpacketsocket.h |
diff --git a/webrtc/base/asyncpacketsocket.h b/webrtc/base/asyncpacketsocket.h |
index f0c221da1dec3fd4014be539224366d507fcac23..9b37594475a3a3640cbeef04a7c2e157d37decb2 100644 |
--- a/webrtc/base/asyncpacketsocket.h |
+++ b/webrtc/base/asyncpacketsocket.h |
@@ -34,10 +34,12 @@ struct PacketTimeUpdateParams { |
// This structure holds meta information for the packet which is about to send |
// over network. |
struct PacketOptions { |
- PacketOptions() : dscp(DSCP_NO_CHANGE) {} |
- explicit PacketOptions(DiffServCodePoint dscp) : dscp(dscp) {} |
+ PacketOptions() : dscp(DSCP_NO_CHANGE), transport_sequence_number(-1) {} |
+ PacketOptions(DiffServCodePoint dscp) |
+ : dscp(dscp), transport_sequence_number(-1) {} |
DiffServCodePoint dscp; |
+ int32 transport_sequence_number; // 16 bits, -1 represents "not set". |
pthatcher1
2015/09/25 23:24:58
I'm not to excited about something so RTP-specific
stefan-webrtc
2015/09/28 12:10:50
I could call it packet_id. I'm not sure that's a l
pthatcher1
2015/09/28 23:58:40
It's more generic because the layer that's doing t
stefan-webrtc
2015/10/02 13:29:12
I'm convinced. Fixed.
|
PacketTimeUpdateParams packet_time_params; |
}; |
@@ -61,6 +63,16 @@ inline PacketTime CreatePacketTime(int64 not_before) { |
return PacketTime(TimeMicros(), not_before); |
} |
+struct SentPacket { |
+ SentPacket() : transport_sequence_number(-1), send_time_ms(-1) {} |
+ SentPacket(int32 transport_sequence_number, int64 send_time_ms) |
+ : transport_sequence_number(transport_sequence_number), |
+ send_time_ms(send_time_ms) {} |
+ |
+ int32 transport_sequence_number; |
+ int64 send_time_ms; |
+}; |
+ |
// Provides the ability to receive packets asynchronously. Sends are not |
// buffered since it is acceptable to drop packets under high load. |
class AsyncPacketSocket : public sigslot::has_slots<> { |
@@ -109,6 +121,9 @@ class AsyncPacketSocket : public sigslot::has_slots<> { |
const SocketAddress&, |
const PacketTime&> SignalReadPacket; |
+ // Emitted each time a packet is sent. |
+ sigslot::signal2<AsyncPacketSocket*, const SentPacket&> SignalPacketSent; |
pthatcher1
2015/09/25 23:24:57
I don't actually see this implemented anywhere. D
stefan-webrtc
2015/09/28 12:10:50
It's implemented in Chromium here: https://coderev
|
+ |
// Emitted when the socket is currently able to send. |
sigslot::signal1<AsyncPacketSocket*> SignalReadyToSend; |