Skip to content

Commit f8dab55

Browse files
committed
chore: Rename queue_ts to queue_timestamp for consistency
1 parent 642dcf9 commit f8dab55

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

src/internal_modules/roc_packet/router.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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);

src/internal_modules/roc_packet/target_libuv/roc_packet/udp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace packet {
1414

1515
UDP::UDP()
1616
: receive_timestamp(0)
17-
, queue_ts(0) {
17+
, queue_timestamp(0) {
1818
memset(&request, 0, sizeof(request));
1919
}
2020

src/internal_modules/roc_packet/target_libuv/roc_packet/udp.h

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,30 @@ namespace packet {
2525
//! UDP packet.
2626
struct 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();

src/tests/roc_rtp/test_link_meter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)