Change RTPVideoTypeHeader to absl::variant and move RTPVideoHeader into its own h/cc file.
Bug: none Change-Id: If28f57c5ae250afbb47c5d20c9854e9a11182642 Reviewed-on: https://webrtc-review.googlesource.com/87561 Reviewed-by: Stefan Holmer <stefan@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Philip Eliasson <philipel@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23904}
This commit is contained in:
@ -179,6 +179,7 @@ rtc_static_library("video_coding") {
|
||||
"../rtp_rtcp:rtp_rtcp_format",
|
||||
"../utility:utility",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
"//third_party/abseil-cpp/absl/types:variant",
|
||||
]
|
||||
}
|
||||
|
||||
@ -221,6 +222,10 @@ rtc_source_set("codec_globals_headers") {
|
||||
"codecs/vp8/include/vp8_globals.h",
|
||||
"codecs/vp9/include/vp9_globals.h",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"../../rtc_base:checks",
|
||||
]
|
||||
}
|
||||
|
||||
rtc_source_set("video_coding_utility") {
|
||||
|
||||
@ -16,6 +16,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "rtc_base/checks.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
// The packetization types that we support: single, aggregated, and fragmented.
|
||||
|
||||
@ -161,7 +161,7 @@ absl::optional<RTPVideoTypeHeader> RtpFrameObject::GetCodecHeader() const {
|
||||
VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num_);
|
||||
if (!packet)
|
||||
return absl::nullopt;
|
||||
return packet->video_header.codecHeader;
|
||||
return packet->video_header.video_type_header;
|
||||
}
|
||||
|
||||
} // namespace video_coding
|
||||
|
||||
@ -86,7 +86,7 @@ void VCMPacket::Reset() {
|
||||
insertStartCode = false;
|
||||
width = 0;
|
||||
height = 0;
|
||||
memset(&video_header, 0, sizeof(RTPVideoHeader));
|
||||
video_header = {};
|
||||
}
|
||||
|
||||
void VCMPacket::CopyCodecSpecifics(const RTPVideoHeader& videoHeader) {
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
|
||||
#include "absl/types/variant.h"
|
||||
#include "modules/video_coding/frame_object.h"
|
||||
#include "modules/video_coding/packet_buffer.h"
|
||||
#include "rtc_base/checks.h"
|
||||
@ -247,7 +248,8 @@ RtpFrameReferenceFinder::FrameDecision RtpFrameReferenceFinder::ManageFrameVp8(
|
||||
return kDrop;
|
||||
}
|
||||
|
||||
const RTPVideoHeaderVP8& codec_header = rtp_codec_header->VP8;
|
||||
const RTPVideoHeaderVP8& codec_header =
|
||||
absl::get<RTPVideoHeaderVP8>(*rtp_codec_header);
|
||||
|
||||
if (codec_header.pictureId == kNoPictureId ||
|
||||
codec_header.temporalIdx == kNoTemporalIdx ||
|
||||
@ -398,7 +400,8 @@ RtpFrameReferenceFinder::FrameDecision RtpFrameReferenceFinder::ManageFrameVp9(
|
||||
return kDrop;
|
||||
}
|
||||
|
||||
const RTPVideoHeaderVP9& codec_header = rtp_codec_header->VP9;
|
||||
const RTPVideoHeaderVP9& codec_header =
|
||||
absl::get<RTPVideoHeaderVP9>(*rtp_codec_header);
|
||||
|
||||
if (codec_header.picture_id == kNoPictureId ||
|
||||
codec_header.temporal_idx == kNoTemporalIdx ||
|
||||
|
||||
Reference in New Issue
Block a user