Set CodecSpecific.FrameInstrumentationData in RtpFrameObject ctor
Bug: webrtc:358039777 Change-Id: Ib0a663f06b293c62a4eb0689b82b3bf919cff25f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364282 Commit-Queue: Fanny Linderborg <linderborg@webrtc.org> Auto-Submit: Fanny Linderborg <linderborg@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43136}
This commit is contained in:
parent
f40be76a9a
commit
a49ab28fca
@ -175,22 +175,23 @@ RtpVideoFrameAssembler::Impl::AssembleFrames(
|
||||
|
||||
const video_coding::PacketBuffer::Packet& last_packet = *packet;
|
||||
result.push_back(std::make_unique<RtpFrameObject>(
|
||||
first_packet->seq_num(), //
|
||||
last_packet.seq_num(), //
|
||||
last_packet.marker_bit, //
|
||||
/*times_nacked=*/0, //
|
||||
/*first_packet_received_time=*/0, //
|
||||
/*last_packet_received_time=*/0, //
|
||||
first_packet->timestamp, //
|
||||
/*ntp_time_ms=*/0, //
|
||||
/*timing=*/VideoSendTiming(), //
|
||||
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, //
|
||||
/*packet_infos=*/RtpPacketInfos(), //
|
||||
first_packet->seq_num(), //
|
||||
last_packet.seq_num(), //
|
||||
last_packet.marker_bit, //
|
||||
/*times_nacked=*/0, //
|
||||
/*first_packet_received_time=*/0, //
|
||||
/*last_packet_received_time=*/0, //
|
||||
first_packet->timestamp, //
|
||||
/*ntp_time_ms=*/0, //
|
||||
/*timing=*/VideoSendTiming(), //
|
||||
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, //
|
||||
last_packet.video_header.frame_instrumentation_data, //
|
||||
/*packet_infos=*/RtpPacketInfos(), //
|
||||
std::move(bitstream)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,10 +12,13 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
|
||||
#include "absl/types/variant.h"
|
||||
#include "api/video/encoded_image.h"
|
||||
#include "api/video/video_timing.h"
|
||||
#include "common_video/frame_instrumentation_data.h"
|
||||
#include "rtc_base/checks.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -35,6 +38,9 @@ RtpFrameObject::RtpFrameObject(
|
||||
VideoContentType content_type,
|
||||
const RTPVideoHeader& video_header,
|
||||
const std::optional<webrtc::ColorSpace>& color_space,
|
||||
const std::optional<
|
||||
absl::variant<FrameInstrumentationSyncData, FrameInstrumentationData>>&
|
||||
frame_instrumentation_data,
|
||||
RtpPacketInfos packet_infos,
|
||||
rtc::scoped_refptr<EncodedImageBuffer> image_buffer)
|
||||
: image_buffer_(image_buffer),
|
||||
@ -49,6 +55,7 @@ RtpFrameObject::RtpFrameObject(
|
||||
|
||||
// TODO(philipel): Remove when encoded image is replaced by EncodedFrame.
|
||||
// VCMEncodedFrame members
|
||||
_codecSpecificInfo.frame_instrumentation_data = frame_instrumentation_data;
|
||||
CopyCodecSpecific(&rtp_video_header_);
|
||||
_payloadType = payload_type;
|
||||
SetRtpTimestamp(rtp_timestamp);
|
||||
|
||||
@ -14,8 +14,10 @@
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/types/variant.h"
|
||||
#include "api/video/encoded_frame.h"
|
||||
#include "api/video/video_frame_metadata.h"
|
||||
#include "common_video/frame_instrumentation_data.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -36,6 +38,9 @@ class RtpFrameObject : public EncodedFrame {
|
||||
VideoContentType content_type,
|
||||
const RTPVideoHeader& video_header,
|
||||
const std::optional<webrtc::ColorSpace>& color_space,
|
||||
const std::optional<absl::variant<FrameInstrumentationSyncData,
|
||||
FrameInstrumentationData>>&
|
||||
frame_instrumentation_data,
|
||||
RtpPacketInfos packet_infos,
|
||||
rtc::scoped_refptr<EncodedImageBuffer> image_buffer);
|
||||
|
||||
|
||||
@ -207,7 +207,8 @@ void RtpVideoStreamReceiverFrameTransformerDelegate::ManageFrame(
|
||||
/*rtp_timestamp=*/transformed_frame->GetTimestamp(),
|
||||
/*ntp_time_ms=*/0, timing, transformed_frame->GetPayloadType(),
|
||||
metadata.GetCodec(), metadata.GetRotation(), metadata.GetContentType(),
|
||||
video_header, video_header.color_space, RtpPacketInfos(),
|
||||
video_header, video_header.color_space,
|
||||
video_header.frame_instrumentation_data, RtpPacketInfos(),
|
||||
EncodedImageBuffer::Create(data.data(), data.size())));
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
#include <cstdio>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@ -50,8 +51,8 @@ std::unique_ptr<RtpFrameObject> CreateRtpFrameObject(
|
||||
/*last_packet_received_time=*/5, /*rtp_timestamp=*/6, /*ntp_time_ms=*/7,
|
||||
VideoSendTiming(), /*payload_type=*/8, video_header.codec,
|
||||
kVideoRotation_0, VideoContentType::UNSPECIFIED, video_header,
|
||||
std::nullopt, RtpPacketInfos({packet_info}),
|
||||
EncodedImageBuffer::Create(0));
|
||||
/*color_space=*/std::nullopt, /*frame_instrumentation_data=*/std::nullopt,
|
||||
RtpPacketInfos({packet_info}), EncodedImageBuffer::Create(0));
|
||||
}
|
||||
|
||||
std::unique_ptr<RtpFrameObject> CreateRtpFrameObject() {
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <map>
|
||||
#include <optional>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
@ -55,6 +56,7 @@ std::unique_ptr<RtpFrameObject> CreateFrame(
|
||||
VideoContentType::UNSPECIFIED,
|
||||
video_header,
|
||||
/*color_space=*/std::nullopt,
|
||||
/*frame_instrumentation_data=*/std::nullopt,
|
||||
RtpPacketInfos(),
|
||||
EncodedImageBuffer::Create(/*size=*/0));
|
||||
// clang-format on
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
|
||||
#include "modules/video_coding/rtp_vp8_ref_finder.h"
|
||||
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@ -93,6 +94,7 @@ class Frame {
|
||||
VideoContentType::UNSPECIFIED,
|
||||
video_header,
|
||||
/*color_space=*/std::nullopt,
|
||||
/*frame_instrumentation_data=*/std::nullopt,
|
||||
RtpPacketInfos(),
|
||||
EncodedImageBuffer::Create(/*size=*/0));
|
||||
// clang-format on
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
|
||||
#include "modules/video_coding/rtp_vp9_ref_finder.h"
|
||||
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@ -129,6 +130,7 @@ class Frame {
|
||||
VideoContentType::UNSPECIFIED,
|
||||
video_header,
|
||||
/*color_space=*/std::nullopt,
|
||||
/*frame_instrumentation_data=*/std::nullopt,
|
||||
RtpPacketInfos(),
|
||||
EncodedImageBuffer::Create(/*size=*/0));
|
||||
// clang-format on
|
||||
|
||||
@ -157,6 +157,7 @@ void FuzzOneInput(const uint8_t* data, size_t size) {
|
||||
VideoContentType::UNSPECIFIED,
|
||||
video_header,
|
||||
/*color_space=*/std::nullopt,
|
||||
/*frame_instrumentation_data=*/std::nullopt,
|
||||
RtpPacketInfos(),
|
||||
EncodedImageBuffer::Create(/*size=*/0));
|
||||
// clang-format on
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
#include "api/test/mock_frame_decryptor.h"
|
||||
@ -75,6 +76,7 @@ class BufferedFrameDecryptorTest : public ::testing::Test,
|
||||
VideoContentType::UNSPECIFIED,
|
||||
rtp_video_header,
|
||||
/*color_space=*/std::nullopt,
|
||||
/*frame_instrumentation_data=*/std::nullopt,
|
||||
RtpPacketInfos(),
|
||||
EncodedImageBuffer::Create(/*size=*/0));
|
||||
// clang-format on
|
||||
|
||||
@ -790,22 +790,23 @@ void RtpVideoStreamReceiver2::OnInsertedPacket(
|
||||
|
||||
const video_coding::PacketBuffer::Packet& last_packet = *packet;
|
||||
OnAssembledFrame(std::make_unique<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, //
|
||||
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)), //
|
||||
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, //
|
||||
last_packet.video_header.frame_instrumentation_data, //
|
||||
RtpPacketInfos(std::move(packet_infos)), //
|
||||
std::move(bitstream)));
|
||||
payloads.clear();
|
||||
packet_infos.clear();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user