Reland of Rename RTPVideoHeader.isFirstPacket to .is_first_packet_in_frame.
Add RTC_DEPRACATed anonymous unions to not break downstream projects.
Orignal issue's description:
> commit 0ad21111fcc57a7e978edba3c4263f0062d7f9ff
> Author: danilchap <danilchap@webrtc.org>
> Date: Mon Dec 19 09:36:33 2016 -0800
>
> Revert of Rename RTPVideoHeader.isFirstPacket to
> .is_first_packet_in_frame. (patchset #1 id:1 of
> https://codereview.webrtc.org/2574943003/ )
>
> Reason for revert:
> breaks downstream project.
>
> Can you make this change in a compatible way using anonymous
> union:
> union {
> bool is_first_packet_in_frame;
> RTC_DEPRECATED bool isFirstPacket;
> };
> (unfortunetly this this treak breaks braced initialization in
> rtp_rtcp_impl_unittest.cc,
> so that should be rewritting in a more classic way)
>
> Original issue's description:
> > Rename RTPVideoHeader.isFirstPacket to
> > .is_first_packet_in_frame.
> >
> > Name should represent the actual meaning.
> >
> > BUG=None
> >
> > Review-Url: https://codereview.webrtc.org/2574943003
> > Cr-Commit-Position: refs/heads/master@{#15684}
> > Committed:
> > https://chromium.googlesource.com/external/webrtc/+/efde90838055f44ca05863ba020ca02c88b6d14c
>
> TBR=stefan@webrtc.org,sprang@webrtc.org,johan@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days
> ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=None
>
> Review-Url: https://codereview.webrtc.org/2589783003
> Cr-Commit-Position: refs/heads/master@{#15686}
>
BUG=None
Review-Url: https://codereview.webrtc.org/2614503002
Cr-Commit-Position: refs/heads/master@{#15987}
diff --git a/webrtc/modules/video_coding/decoding_state_unittest.cc b/webrtc/modules/video_coding/decoding_state_unittest.cc
index c147354..1edd1e3 100644
--- a/webrtc/modules/video_coding/decoding_state_unittest.cc
+++ b/webrtc/modules/video_coding/decoding_state_unittest.cc
@@ -32,7 +32,7 @@
VCMFrameBuffer frame;
VCMFrameBuffer frame_key;
VCMPacket packet;
- packet.isFirstPacket = true;
+ packet.is_first_packet_in_frame = true;
packet.timestamp = 1;
packet.seqNum = 0xffff;
packet.frameType = kVideoFrameDelta;
@@ -52,7 +52,7 @@
frame.Reset();
packet.frameType = kVideoFrameDelta;
// Use pictureId
- packet.isFirstPacket = false;
+ packet.is_first_packet_in_frame = false;
packet.video_header.codecHeader.VP8.pictureId = 0x0002;
EXPECT_LE(0, frame.InsertPacket(packet, 0, kNoErrors, frame_data));
EXPECT_FALSE(dec_state.ContinuousFrame(&frame));
@@ -260,7 +260,7 @@
// A key frame is always a base layer.
frame.Reset();
packet.frameType = kVideoFrameKey;
- packet.isFirstPacket = 1;
+ packet.is_first_packet_in_frame = 1;
packet.timestamp = 5;
packet.seqNum = 5;
packet.video_header.codecHeader.VP8.tl0PicIdx = 2;
@@ -284,7 +284,7 @@
EXPECT_TRUE(dec_state.full_sync());
frame.Reset();
packet.frameType = kVideoFrameDelta;
- packet.isFirstPacket = 1;
+ packet.is_first_packet_in_frame = 1;
packet.timestamp = 8;
packet.seqNum = 8;
packet.video_header.codecHeader.VP8.tl0PicIdx = 4;
@@ -299,7 +299,7 @@
// Insert a non-ref frame - should update sync value.
frame.Reset();
packet.frameType = kVideoFrameDelta;
- packet.isFirstPacket = 1;
+ packet.is_first_packet_in_frame = 1;
packet.timestamp = 9;
packet.seqNum = 9;
packet.video_header.codecHeader.VP8.tl0PicIdx = 4;
@@ -319,7 +319,7 @@
frame.Reset();
dec_state.Reset();
packet.frameType = kVideoFrameDelta;
- packet.isFirstPacket = 1;
+ packet.is_first_packet_in_frame = 1;
packet.markerBit = 1;
packet.timestamp = 0;
packet.seqNum = 0;
@@ -333,7 +333,7 @@
// Layer 2 - 2 packets (insert one, lose one).
frame.Reset();
packet.frameType = kVideoFrameDelta;
- packet.isFirstPacket = 1;
+ packet.is_first_packet_in_frame = 1;
packet.markerBit = 0;
packet.timestamp = 1;
packet.seqNum = 1;
@@ -346,7 +346,7 @@
// Layer 1
frame.Reset();
packet.frameType = kVideoFrameDelta;
- packet.isFirstPacket = 1;
+ packet.is_first_packet_in_frame = 1;
packet.markerBit = 1;
packet.timestamp = 2;
packet.seqNum = 3;
@@ -450,7 +450,7 @@
VCMDecodingState dec_state;
VCMFrameBuffer frame;
VCMPacket packet;
- packet.isFirstPacket = true;
+ packet.is_first_packet_in_frame = true;
packet.timestamp = 1;
packet.seqNum = 0xffff;
uint8_t data[] = "I need a data pointer for this test!";
@@ -493,7 +493,7 @@
VCMDecodingState dec_state;
VCMFrameBuffer frame;
VCMPacket packet;
- packet.isFirstPacket = true;
+ packet.is_first_packet_in_frame = true;
packet.timestamp = 1;
packet.seqNum = 0xffff;
uint8_t data[] = "I need a data pointer for this test!";
@@ -548,7 +548,7 @@
VCMDecodingState dec_state;
VCMFrameBuffer frame;
VCMPacket packet;
- packet.isFirstPacket = true;
+ packet.is_first_packet_in_frame = true;
packet.timestamp = 1;
packet.seqNum = 0xffff;
uint8_t data[] = "I need a data pointer for this test!";