Commit efe6da33 authored by Andreas Schmidt's avatar Andreas Schmidt

Do not incorporate pacing in RTprop.

parent 14f6eb21
......@@ -78,22 +78,6 @@ static bool send_packet(PrrtSocket *sock_ptr, PrrtPacket *packet) {
memset(buf, 0, sizeof(buf));
prrtPacketLength_t length = PrrtPacket_size(packet);
check(PrrtPacket_encode(buf, MAX_PAYLOAD_LENGTH, packet), "Buffer too small.");
switch (PrrtPacket_type(packet)) {
case PACKET_TYPE_DATA:
XlapTimeStampCycle(sock_ptr, ts_data_packet, packet->sequenceNumber, LinkTransmitStart);
break;
case PACKET_TYPE_REDUNDANCY:
XlapTimeStampCycle(sock_ptr, ts_redundancy_packet, packet->sequenceNumber, LinkTransmitStart);
break;
case PACKET_TYPE_REPETITION:
case PACKET_TYPE_FEEDBACK:
case PACKET_TYPE_PRESENT_REDUNDANCY:
case PACKET_TYPE_CHANNEL_FEEDBACK:
default:;
}
prrtPacketLength_t payloadLength = packet->payloadLength;
if (sock_ptr->pacingEnabled && sock_ptr->nextSendTime != 0) {
debug(DEBUG_DATATRANSMITTER, "About to check for pacing.");
......@@ -130,6 +114,26 @@ static bool send_packet(PrrtSocket *sock_ptr, PrrtPacket *packet) {
sock_ptr->nextSendTime = now + pacingTime;
}
}
// Update timestamp
if(PrrtPacket_type(packet) == PACKET_TYPE_DATA) {
((PrrtPacketDataPayload*) (packet->payload))->timestamp = PrrtClock_get_current_time_us();
}
check(PrrtPacket_encode(buf, MAX_PAYLOAD_LENGTH, packet), "Buffer too small.");
switch (PrrtPacket_type(packet)) {
case PACKET_TYPE_DATA:
XlapTimeStampCycle(sock_ptr, ts_data_packet, packet->sequenceNumber, LinkTransmitStart);
break;
case PACKET_TYPE_REDUNDANCY:
XlapTimeStampCycle(sock_ptr, ts_redundancy_packet, packet->sequenceNumber, LinkTransmitStart);
break;
case PACKET_TYPE_REPETITION:
case PACKET_TYPE_FEEDBACK:
case PACKET_TYPE_PRESENT_REDUNDANCY:
case PACKET_TYPE_CHANNEL_FEEDBACK:
default:;
}
struct timespec timestamp;
uint64_t cyclestamp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment