From f8d81d33ed1354e7a9d267253cb9ca0bf4349658 Mon Sep 17 00:00:00 2001 From: philipel Date: Wed, 1 Aug 2018 17:13:08 +0200 Subject: [PATCH] Add members for the codec agnostic descriptor to RTPVideoHeader. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TBR=danilchap@webrtc.org Bug: webrtc:9361, webrtc:9582 Change-Id: I0303fc89bafab59e68ec81979e0e4372e79a4f51 Reviewed-on: https://webrtc-review.googlesource.com/91866 Reviewed-by: Sami Kalliomäki Commit-Queue: Philip Eliasson Cr-Commit-Position: refs/heads/master@{#24170} --- DEPS | 1 + modules/rtp_rtcp/BUILD.gn | 1 + modules/rtp_rtcp/source/rtp_video_header.cc | 12 ++-------- modules/rtp_rtcp/source/rtp_video_header.h | 25 +++++++++++++++------ 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/DEPS b/DEPS index b63a818b6e..82d485f10e 100644 --- a/DEPS +++ b/DEPS @@ -1046,6 +1046,7 @@ include_rules = [ "+rtc_tools", # Abseil whitelist. + "+absl/container/inlined_vector.h", "+absl/memory/memory.h", "+absl/types/optional.h", "+absl/types/variant.h", diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn index ae82e3b960..df56b21eeb 100644 --- a/modules/rtp_rtcp/BUILD.gn +++ b/modules/rtp_rtcp/BUILD.gn @@ -267,6 +267,7 @@ rtc_source_set("rtp_video_header") { "../../:webrtc_common", "../../api/video:video_frame", "../../modules/video_coding:codec_globals_headers", + "//third_party/abseil-cpp/absl/container:inlined_vector", "//third_party/abseil-cpp/absl/types:variant", ] } diff --git a/modules/rtp_rtcp/source/rtp_video_header.cc b/modules/rtp_rtcp/source/rtp_video_header.cc index 020a52e689..cab0d2e320 100644 --- a/modules/rtp_rtcp/source/rtp_video_header.cc +++ b/modules/rtp_rtcp/source/rtp_video_header.cc @@ -12,16 +12,8 @@ namespace webrtc { -RTPVideoHeader::RTPVideoHeader() - : width(), - height(), - rotation(), - playout_delay(), - content_type(), - video_timing(), - is_first_packet_in_frame(), - simulcastIdx(), - codec() {} +RTPVideoHeader::RTPVideoHeader() : playout_delay(), video_timing() {} RTPVideoHeader::RTPVideoHeader(const RTPVideoHeader& other) = default; +RTPVideoHeader::~RTPVideoHeader() = default; } // namespace webrtc diff --git a/modules/rtp_rtcp/source/rtp_video_header.h b/modules/rtp_rtcp/source/rtp_video_header.h index 49e2d2978c..e59de20903 100644 --- a/modules/rtp_rtcp/source/rtp_video_header.h +++ b/modules/rtp_rtcp/source/rtp_video_header.h @@ -10,6 +10,7 @@ #ifndef MODULES_RTP_RTCP_SOURCE_RTP_VIDEO_HEADER_H_ #define MODULES_RTP_RTCP_SOURCE_RTP_VIDEO_HEADER_H_ +#include "absl/container/inlined_vector.h" #include "absl/types/variant.h" #include "api/video/video_content_type.h" #include "api/video/video_rotation.h" @@ -27,6 +28,8 @@ struct RTPVideoHeader { RTPVideoHeader(); RTPVideoHeader(const RTPVideoHeader& other); + ~RTPVideoHeader(); + // TODO(philipel): Remove when downstream projects have been updated. RTPVideoHeaderVP8& vp8() { if (!absl::holds_alternative(video_type_header)) @@ -70,15 +73,23 @@ struct RTPVideoHeader { return absl::get(video_type_header); } - uint16_t width; - uint16_t height; - VideoRotation rotation; + // Information for generic codec descriptor. + int64_t frame_id = 0; + int spatial_index = 0; + int temporal_index = 0; + absl::InlinedVector dependencies; + absl::InlinedVector higher_spatial_layers; + + uint16_t width = 0; + uint16_t height = 0; + VideoRotation rotation = VideoRotation::kVideoRotation_0; + VideoContentType content_type = VideoContentType::UNSPECIFIED; + bool is_first_packet_in_frame = false; + uint8_t simulcastIdx = 0; + VideoCodecType codec = VideoCodecType::kVideoCodecUnknown; + PlayoutDelay playout_delay; - VideoContentType content_type; VideoSendTiming video_timing; - bool is_first_packet_in_frame; - uint8_t simulcastIdx; - VideoCodecType codec; // TODO(philipel): remove mutable when downstream projects have been updated. mutable RTPVideoTypeHeader video_type_header; };