Add accessors to the types in the RTPVideoTypeHeader in RTPVideoHeader.

This CL is in preparation to change the RTPVideoTypeHeader into an absl::variant.

Bug: none
Change-Id: I1672d866df0395f3417d8e278cc67f017ab0ff98
Reviewed-on: https://webrtc-review.googlesource.com/87261
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23856}
diff --git a/modules/video_coding/video_packet_buffer_unittest.cc b/modules/video_coding/video_packet_buffer_unittest.cc
index 95bc171..58611ff 100644
--- a/modules/video_coding/video_packet_buffer_unittest.cc
+++ b/modules/video_coding/video_packet_buffer_unittest.cc
@@ -512,17 +512,13 @@
     packet.timestamp = timestamp;
     if (keyframe == kKeyFrame) {
       if (sps_pps_idr_is_keyframe_) {
-        packet.video_header.codecHeader.H264.nalus[0].type =
-            H264::NaluType::kSps;
-        packet.video_header.codecHeader.H264.nalus[1].type =
-            H264::NaluType::kPps;
-        packet.video_header.codecHeader.H264.nalus[2].type =
-            H264::NaluType::kIdr;
-        packet.video_header.codecHeader.H264.nalus_length = 3;
+        packet.video_header.h264().nalus[0].type = H264::NaluType::kSps;
+        packet.video_header.h264().nalus[1].type = H264::NaluType::kPps;
+        packet.video_header.h264().nalus[2].type = H264::NaluType::kIdr;
+        packet.video_header.h264().nalus_length = 3;
       } else {
-        packet.video_header.codecHeader.H264.nalus[0].type =
-            H264::NaluType::kIdr;
-        packet.video_header.codecHeader.H264.nalus_length = 1;
+        packet.video_header.h264().nalus[0].type = H264::NaluType::kIdr;
+        packet.video_header.h264().nalus_length = 1;
       }
     }
     packet.is_first_packet_in_frame = first == kFirst;
@@ -596,12 +592,12 @@
       new uint8_t[sizeof(data_data) + EncodedImage::kBufferPaddingBytesH264]);
 
   VCMPacket packet;
-  packet.video_header.codecHeader.H264.nalus_length = 1;
-  packet.video_header.codecHeader.H264.nalus[0].type = H264::NaluType::kIdr;
+  packet.video_header.h264().nalus_length = 1;
+  packet.video_header.h264().nalus[0].type = H264::NaluType::kIdr;
   packet.seqNum = seq_num;
   packet.codec = kVideoCodecH264;
   packet.insertStartCode = true;
-  packet.video_header.codecHeader.H264.packetization_type = kH264SingleNalu;
+  packet.video_header.h264().packetization_type = kH264SingleNalu;
   packet.dataPtr = data;
   packet.sizeBytes = sizeof(data_data);
   packet.is_first_packet_in_frame = true;
@@ -759,7 +755,7 @@
   EXPECT_TRUE(packet_buffer_->InsertPacket(&packet));
 
   packet.codec = kVideoCodecH264;
-  packet.video_header.codecHeader.H264.nalus_length = 1;
+  packet.video_header.h264().nalus_length = 1;
   packet.timestamp = 3;
   packet.seqNum = 3;
   EXPECT_TRUE(packet_buffer_->InsertPacket(&packet));
@@ -782,7 +778,7 @@
   packet.frameType = kVideoFrameKey;
   packet.is_first_packet_in_frame = true;
   packet.markerBit = true;
-  packet.video_header.codecHeader.H264.nalus_length = kMaxNalusPerPacket;
+  packet.video_header.h264().nalus_length = kMaxNalusPerPacket;
   packet.sizeBytes = 0;
   packet.dataPtr = nullptr;
   EXPECT_TRUE(packet_buffer_->InsertPacket(&packet));
@@ -877,8 +873,8 @@
 };
 
 TEST_F(TestPacketBufferH264IdrIsKeyframe, IdrIsKeyframe) {
-  packet_.video_header.codecHeader.H264.nalus[0].type = H264::NaluType::kIdr;
-  packet_.video_header.codecHeader.H264.nalus_length = 1;
+  packet_.video_header.h264().nalus[0].type = H264::NaluType::kIdr;
+  packet_.video_header.h264().nalus_length = 1;
 
   packet_buffer_->InsertPacket(&packet_);
 
@@ -887,10 +883,10 @@
 }
 
 TEST_F(TestPacketBufferH264IdrIsKeyframe, SpsPpsIdrIsKeyframe) {
-  packet_.video_header.codecHeader.H264.nalus[0].type = H264::NaluType::kSps;
-  packet_.video_header.codecHeader.H264.nalus[1].type = H264::NaluType::kPps;
-  packet_.video_header.codecHeader.H264.nalus[2].type = H264::NaluType::kIdr;
-  packet_.video_header.codecHeader.H264.nalus_length = 3;
+  packet_.video_header.h264().nalus[0].type = H264::NaluType::kSps;
+  packet_.video_header.h264().nalus[1].type = H264::NaluType::kPps;
+  packet_.video_header.h264().nalus[2].type = H264::NaluType::kIdr;
+  packet_.video_header.h264().nalus_length = 3;
 
   packet_buffer_->InsertPacket(&packet_);
 
@@ -906,8 +902,8 @@
 };
 
 TEST_F(TestPacketBufferH264SpsPpsIdrIsKeyframe, IdrIsNotKeyframe) {
-  packet_.video_header.codecHeader.H264.nalus[0].type = H264::NaluType::kIdr;
-  packet_.video_header.codecHeader.H264.nalus_length = 1;
+  packet_.video_header.h264().nalus[0].type = H264::NaluType::kIdr;
+  packet_.video_header.h264().nalus_length = 1;
 
   packet_buffer_->InsertPacket(&packet_);
 
@@ -916,9 +912,9 @@
 }
 
 TEST_F(TestPacketBufferH264SpsPpsIdrIsKeyframe, SpsPpsIsNotKeyframe) {
-  packet_.video_header.codecHeader.H264.nalus[0].type = H264::NaluType::kSps;
-  packet_.video_header.codecHeader.H264.nalus[1].type = H264::NaluType::kPps;
-  packet_.video_header.codecHeader.H264.nalus_length = 2;
+  packet_.video_header.h264().nalus[0].type = H264::NaluType::kSps;
+  packet_.video_header.h264().nalus[1].type = H264::NaluType::kPps;
+  packet_.video_header.h264().nalus_length = 2;
 
   packet_buffer_->InsertPacket(&packet_);
 
@@ -927,10 +923,10 @@
 }
 
 TEST_F(TestPacketBufferH264SpsPpsIdrIsKeyframe, SpsPpsIdrIsKeyframe) {
-  packet_.video_header.codecHeader.H264.nalus[0].type = H264::NaluType::kSps;
-  packet_.video_header.codecHeader.H264.nalus[1].type = H264::NaluType::kPps;
-  packet_.video_header.codecHeader.H264.nalus[2].type = H264::NaluType::kIdr;
-  packet_.video_header.codecHeader.H264.nalus_length = 3;
+  packet_.video_header.h264().nalus[0].type = H264::NaluType::kSps;
+  packet_.video_header.h264().nalus[1].type = H264::NaluType::kPps;
+  packet_.video_header.h264().nalus[2].type = H264::NaluType::kIdr;
+  packet_.video_header.h264().nalus_length = 3;
 
   packet_buffer_->InsertPacket(&packet_);