Reland "Remove RTPVideoHeader::vp8() accessors."
This reverts commit 1811c04f22a26da3ed2832373a5c92a9786420c3.
Reason for revert: Downstream projects fixed.
Original change's description:
> Revert "Remove RTPVideoHeader::vp8() accessors."
>
> This reverts commit af7afc66427b0e9109e7d492f2805d63d239b914.
>
> Reason for revert: Break downstream projects.
>
> Original change's description:
> > Remove RTPVideoHeader::vp8() accessors.
> >
> > Bug: none
> > Change-Id: Ia7d65148fb36a8f26647bee8a876ce7217ff8a68
> > Reviewed-on: https://webrtc-review.googlesource.com/93321
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > 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@{#24626}
>
> TBR=danilchap@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,philipel@webrtc.org,holmer@google.com
>
> Change-Id: I3f7f19c0ea810c0fd988c59e6556bbea9b756b33
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: none
> Reviewed-on: https://webrtc-review.googlesource.com/98864
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24628}
TBR=danilchap@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,philipel@webrtc.org,holmer@google.com
Change-Id: I9246f36e638108ae4fc46c1ae4559c8205d50fc1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/98841
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24629}
diff --git a/call/rtp_payload_params.cc b/call/rtp_payload_params.cc
index 0dbe183..0c8b307 100644
--- a/call/rtp_payload_params.cc
+++ b/call/rtp_payload_params.cc
@@ -27,11 +27,12 @@
rtp->codec = info.codecType;
switch (info.codecType) {
case kVideoCodecVP8: {
- rtp->vp8().InitRTPVideoHeaderVP8();
- rtp->vp8().nonReference = info.codecSpecific.VP8.nonReference;
- rtp->vp8().temporalIdx = info.codecSpecific.VP8.temporalIdx;
- rtp->vp8().layerSync = info.codecSpecific.VP8.layerSync;
- rtp->vp8().keyIdx = info.codecSpecific.VP8.keyIdx;
+ auto& vp8_header = rtp->video_type_header.emplace<RTPVideoHeaderVP8>();
+ vp8_header.InitRTPVideoHeaderVP8();
+ vp8_header.nonReference = info.codecSpecific.VP8.nonReference;
+ vp8_header.temporalIdx = info.codecSpecific.VP8.temporalIdx;
+ vp8_header.layerSync = info.codecSpecific.VP8.layerSync;
+ vp8_header.keyIdx = info.codecSpecific.VP8.keyIdx;
rtp->simulcastIdx = spatial_index.value_or(0);
return;
}
@@ -171,13 +172,15 @@
state_.picture_id = (static_cast<uint16_t>(state_.picture_id) + 1) & 0x7FFF;
}
if (rtp_video_header->codec == kVideoCodecVP8) {
- rtp_video_header->vp8().pictureId = state_.picture_id;
+ auto& vp8_header =
+ absl::get<RTPVideoHeaderVP8>(rtp_video_header->video_type_header);
+ vp8_header.pictureId = state_.picture_id;
- if (rtp_video_header->vp8().temporalIdx != kNoTemporalIdx) {
- if (rtp_video_header->vp8().temporalIdx == 0) {
+ if (vp8_header.temporalIdx != kNoTemporalIdx) {
+ if (vp8_header.temporalIdx == 0) {
++state_.tl0_pic_idx;
}
- rtp_video_header->vp8().tl0PicIdx = state_.tl0_pic_idx;
+ vp8_header.tl0PicIdx = state_.tl0_pic_idx;
}
}
if (rtp_video_header->codec == kVideoCodecVP9) {