Remove RTPVideoHeader::vp9() accessors.
TBR=stefan@webrtc.org
Bug: none
Change-Id: Ia2f728ea3377754a16a0b081e25c4479fe211b3e
Reviewed-on: https://webrtc-review.googlesource.com/93024
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24243}
diff --git a/modules/video_coding/jitter_buffer.cc b/modules/video_coding/jitter_buffer.cc
index 83f90e3..03a9845 100644
--- a/modules/video_coding/jitter_buffer.cc
+++ b/modules/video_coding/jitter_buffer.cc
@@ -127,10 +127,12 @@
Vp9SsMap::~Vp9SsMap() {}
bool Vp9SsMap::Insert(const VCMPacket& packet) {
- if (!packet.video_header.vp9().ss_data_available)
+ const auto& vp9_header =
+ absl::get<RTPVideoHeaderVP9>(packet.video_header.video_type_header);
+ if (!vp9_header.ss_data_available)
return false;
- ss_map_[packet.timestamp] = packet.video_header.vp9().gof;
+ ss_map_[packet.timestamp] = vp9_header.gof;
return true;
}
@@ -178,7 +180,9 @@
// TODO(asapersson): Update according to updates in RTP payload profile.
bool Vp9SsMap::UpdatePacket(VCMPacket* packet) {
- uint8_t gof_idx = packet->video_header.vp9().gof_idx;
+ auto& vp9_header =
+ absl::get<RTPVideoHeaderVP9>(packet->video_header.video_type_header);
+ uint8_t gof_idx = vp9_header.gof_idx;
if (gof_idx == kNoGofIdx)
return false; // No update needed.
@@ -189,14 +193,13 @@
if (gof_idx >= it->second.num_frames_in_gof)
return false; // Assume corresponding SS not yet received.
- RTPVideoHeaderVP9* vp9 = &packet->video_header.vp9();
- vp9->temporal_idx = it->second.temporal_idx[gof_idx];
- vp9->temporal_up_switch = it->second.temporal_up_switch[gof_idx];
+ vp9_header.temporal_idx = it->second.temporal_idx[gof_idx];
+ vp9_header.temporal_up_switch = it->second.temporal_up_switch[gof_idx];
// TODO(asapersson): Set vp9.ref_picture_id[i] and add usage.
- vp9->num_ref_pics = it->second.num_ref_pics[gof_idx];
+ vp9_header.num_ref_pics = it->second.num_ref_pics[gof_idx];
for (uint8_t i = 0; i < it->second.num_ref_pics[gof_idx]; ++i) {
- vp9->pid_diff[i] = it->second.pid_diff[gof_idx][i];
+ vp9_header.pid_diff[i] = it->second.pid_diff[gof_idx][i];
}
return true;
}