Remove NTP timestamp from PacketBuffer::Packet.
Bug: webrtc:12579 Change-Id: I64ca0ddb6f5c20bef5e9503955e0e4b4c484a1e7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211662 Commit-Queue: Philip Eliasson <philipel@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Sam Zackrisson <saza@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33448}
This commit is contained in:
parent
662b306bae
commit
7c7885c016
@ -37,13 +37,11 @@ namespace video_coding {
|
||||
|
||||
PacketBuffer::Packet::Packet(const RtpPacketReceived& rtp_packet,
|
||||
const RTPVideoHeader& video_header,
|
||||
int64_t ntp_time_ms,
|
||||
int64_t receive_time_ms)
|
||||
: marker_bit(rtp_packet.Marker()),
|
||||
payload_type(rtp_packet.PayloadType()),
|
||||
seq_num(rtp_packet.SequenceNumber()),
|
||||
timestamp(rtp_packet.Timestamp()),
|
||||
ntp_time_ms(ntp_time_ms),
|
||||
times_nacked(-1),
|
||||
video_header(video_header),
|
||||
packet_info(rtp_packet.Ssrc(),
|
||||
|
||||
@ -36,7 +36,6 @@ class PacketBuffer {
|
||||
Packet() = default;
|
||||
Packet(const RtpPacketReceived& rtp_packet,
|
||||
const RTPVideoHeader& video_header,
|
||||
int64_t ntp_time_ms,
|
||||
int64_t receive_time_ms);
|
||||
Packet(const Packet&) = delete;
|
||||
Packet(Packet&&) = delete;
|
||||
@ -62,8 +61,6 @@ class PacketBuffer {
|
||||
uint8_t payload_type = 0;
|
||||
uint16_t seq_num = 0;
|
||||
uint32_t timestamp = 0;
|
||||
// NTP time of the capture time in local timebase in milliseconds.
|
||||
int64_t ntp_time_ms = -1;
|
||||
int times_nacked = -1;
|
||||
|
||||
rtc::CopyOnWriteBuffer video_payload;
|
||||
|
||||
@ -35,7 +35,6 @@ void FuzzOneInput(const uint8_t* data, size_t size) {
|
||||
helper.CopyTo(&packet->payload_type);
|
||||
helper.CopyTo(&packet->seq_num);
|
||||
helper.CopyTo(&packet->timestamp);
|
||||
helper.CopyTo(&packet->ntp_time_ms);
|
||||
helper.CopyTo(&packet->times_nacked);
|
||||
|
||||
// Fuzz non-POD member of the packet.
|
||||
|
||||
@ -505,8 +505,7 @@ void RtpVideoStreamReceiver::OnReceivedPayloadData(
|
||||
const RTPVideoHeader& video) {
|
||||
RTC_DCHECK_RUN_ON(&worker_task_checker_);
|
||||
auto packet = std::make_unique<video_coding::PacketBuffer::Packet>(
|
||||
rtp_packet, video, ntp_estimator_.Estimate(rtp_packet.Timestamp()),
|
||||
clock_->TimeInMilliseconds());
|
||||
rtp_packet, video, clock_->TimeInMilliseconds());
|
||||
|
||||
// Try to extrapolate absolute capture time if it is missing.
|
||||
packet->packet_info.set_absolute_capture_time(
|
||||
@ -795,22 +794,22 @@ void RtpVideoStreamReceiver::OnInsertedPacket(
|
||||
|
||||
const video_coding::PacketBuffer::Packet& last_packet = *packet;
|
||||
OnAssembledFrame(std::make_unique<video_coding::RtpFrameObject>(
|
||||
first_packet->seq_num, //
|
||||
last_packet.seq_num, //
|
||||
last_packet.marker_bit, //
|
||||
max_nack_count, //
|
||||
min_recv_time, //
|
||||
max_recv_time, //
|
||||
first_packet->timestamp, //
|
||||
first_packet->ntp_time_ms, //
|
||||
last_packet.video_header.video_timing, //
|
||||
first_packet->payload_type, //
|
||||
first_packet->codec(), //
|
||||
last_packet.video_header.rotation, //
|
||||
last_packet.video_header.content_type, //
|
||||
first_packet->video_header, //
|
||||
last_packet.video_header.color_space, //
|
||||
RtpPacketInfos(std::move(packet_infos)), //
|
||||
first_packet->seq_num, //
|
||||
last_packet.seq_num, //
|
||||
last_packet.marker_bit, //
|
||||
max_nack_count, //
|
||||
min_recv_time, //
|
||||
max_recv_time, //
|
||||
first_packet->timestamp, //
|
||||
ntp_estimator_.Estimate(first_packet->timestamp), //
|
||||
last_packet.video_header.video_timing, //
|
||||
first_packet->payload_type, //
|
||||
first_packet->codec(), //
|
||||
last_packet.video_header.rotation, //
|
||||
last_packet.video_header.content_type, //
|
||||
first_packet->video_header, //
|
||||
last_packet.video_header.color_space, //
|
||||
RtpPacketInfos(std::move(packet_infos)), //
|
||||
std::move(bitstream)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -472,8 +472,7 @@ void RtpVideoStreamReceiver2::OnReceivedPayloadData(
|
||||
const RTPVideoHeader& video) {
|
||||
RTC_DCHECK_RUN_ON(&worker_task_checker_);
|
||||
auto packet = std::make_unique<video_coding::PacketBuffer::Packet>(
|
||||
rtp_packet, video, ntp_estimator_.Estimate(rtp_packet.Timestamp()),
|
||||
clock_->TimeInMilliseconds());
|
||||
rtp_packet, video, clock_->TimeInMilliseconds());
|
||||
|
||||
// Try to extrapolate absolute capture time if it is missing.
|
||||
packet->packet_info.set_absolute_capture_time(
|
||||
@ -765,22 +764,22 @@ void RtpVideoStreamReceiver2::OnInsertedPacket(
|
||||
|
||||
const video_coding::PacketBuffer::Packet& last_packet = *packet;
|
||||
OnAssembledFrame(std::make_unique<video_coding::RtpFrameObject>(
|
||||
first_packet->seq_num, //
|
||||
last_packet.seq_num, //
|
||||
last_packet.marker_bit, //
|
||||
max_nack_count, //
|
||||
min_recv_time, //
|
||||
max_recv_time, //
|
||||
first_packet->timestamp, //
|
||||
first_packet->ntp_time_ms, //
|
||||
last_packet.video_header.video_timing, //
|
||||
first_packet->payload_type, //
|
||||
first_packet->codec(), //
|
||||
last_packet.video_header.rotation, //
|
||||
last_packet.video_header.content_type, //
|
||||
first_packet->video_header, //
|
||||
last_packet.video_header.color_space, //
|
||||
RtpPacketInfos(std::move(packet_infos)), //
|
||||
first_packet->seq_num, //
|
||||
last_packet.seq_num, //
|
||||
last_packet.marker_bit, //
|
||||
max_nack_count, //
|
||||
min_recv_time, //
|
||||
max_recv_time, //
|
||||
first_packet->timestamp, //
|
||||
ntp_estimator_.Estimate(first_packet->timestamp), //
|
||||
last_packet.video_header.video_timing, //
|
||||
first_packet->payload_type, //
|
||||
first_packet->codec(), //
|
||||
last_packet.video_header.rotation, //
|
||||
last_packet.video_header.content_type, //
|
||||
first_packet->video_header, //
|
||||
last_packet.video_header.color_space, //
|
||||
RtpPacketInfos(std::move(packet_infos)), //
|
||||
std::move(bitstream)));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user