Remove RTPTypeHeader union and use RTPVideoHeader directly.

Bug: none
Change-Id: I2abd7d1cfb423ca989158167eb0502b44bc3a04a
Reviewed-on: https://webrtc-review.googlesource.com/87103
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@{#23855}
This commit is contained in:
philipel 2018-07-04 16:55:55 +02:00 committed by Commit Bot
parent c480e9d7a8
commit 011dc6427a
2 changed files with 8 additions and 10 deletions

View File

@ -63,17 +63,14 @@ struct RTPVideoHeader {
VideoCodecType codec;
RTPVideoTypeHeader codecHeader;
};
union RTPTypeHeader {
RTPVideoHeader Video;
};
struct WebRtcRTPHeader {
RTPVideoHeader& video_header() { return video; }
const RTPVideoHeader& video_header() const { return video; }
RTPVideoHeader video;
RTPHeader header;
FrameType frameType;
// TODO(philipel): Remove with RTPTypeHeader.
RTPVideoHeader& video_header() { return type.Video; }
const RTPVideoHeader& video_header() const { return type.Video; }
RTPTypeHeader type;
// NTP time of the capture time in local timebase in milliseconds.
int64_t ntp_time_ms;
};

View File

@ -52,12 +52,13 @@ class RtpPacketizer {
class RtpDepacketizer {
public:
struct ParsedPayload {
RTPVideoHeader& video_header() { return video; }
const RTPVideoHeader& video_header() const { return video; }
RTPVideoHeader video;
const uint8_t* payload;
size_t payload_length;
FrameType frame_type;
RTPVideoHeader& video_header() { return type.Video; }
const RTPVideoHeader& video_header() const { return type.Video; }
RTPTypeHeader type;
};
static RtpDepacketizer* Create(VideoCodecType type);