File tree Expand file tree Collapse file tree 4 files changed +17
-9
lines changed
internal_modules/roc_packet Expand file tree Collapse file tree 4 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ status::StatusCode Router::write(const PacketPtr& packet) {
5656 if (Route* route = find_route_ (packet->flags ())) {
5757 if (allow_route_ (*route, *packet)) {
5858 if (packet->udp ()) {
59- packet->udp ()->queue_ts = core::timestamp (core::ClockUnix);
59+ packet->udp ()->queue_timestamp = core::timestamp (core::ClockUnix);
6060 }
6161
6262 return route->writer ->write (packet);
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ namespace packet {
1414
1515UDP::UDP ()
1616 : receive_timestamp(0 )
17- , queue_ts (0 ) {
17+ , queue_timestamp (0 ) {
1818 memset (&request, 0 , sizeof (request));
1919}
2020
Original file line number Diff line number Diff line change @@ -25,22 +25,30 @@ namespace packet {
2525// ! UDP packet.
2626struct UDP {
2727 // ! Source address.
28+ // ! @remarks
29+ // ! Address from which packet was / will be sent.
2830 address::SocketAddr src_addr;
2931
3032 // ! Destination address.
33+ // ! @remarks
34+ // ! Address to which packet was / will be sent.
3135 address::SocketAddr dst_addr;
3236
3337 // ! Packet receive timestamp (RTS), nanoseconds since Unix epoch.
38+ // ! @remarks
39+ // ! It points to a moment when packets was grabbed by network thread.
3440 core::nanoseconds_t receive_timestamp;
3541
36- // ! Timestamp in ns since unix-epoch. It points to a moment when
37- // ! the packet was transferred to a sink-thread, that "consumes"
38- // ! this packet. The reason to have it separate is that this
39- // ! allows us to account additional jitter introduced by
40- // ! thread-switch time.
41- core::nanoseconds_t queue_ts ;
42+ // ! Packet queue timestamp (QTS), nanoseconds since Unix epoch.
43+ // ! @remarks
44+ // ! It points to a moment when the packet was transferred to a sink-thread,
45+ // ! that "consumes" this packet. The reason to have it separate is that this
46+ // ! allows us to account additional jitter introduced by thread-switch time.
47+ core::nanoseconds_t queue_timestamp ;
4248
4349 // ! Sender request state.
50+ // ! @remarks
51+ // ! Used by network thread.
4452 uv_udp_send_t request;
4553
4654 UDP ();
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ packet::PacketPtr new_packet(packet::seqnum_t sn) {
3535 packet->add_flags (packet::Packet::FlagRTP | packet::Packet::FlagUDP);
3636 packet->rtp ()->payload_type = PayloadType_L16_Stereo;
3737 packet->rtp ()->seqnum = sn;
38- packet->udp ()->queue_ts = 666 ;
38+ packet->udp ()->queue_timestamp = 666 ;
3939
4040 return packet;
4141}
You can’t perform that action at this time.
0 commit comments