From 5dacece70cc0f5e90a1d15d077e427f728ed3aa2 Mon Sep 17 00:00:00 2001 From: philipel Date: Thu, 26 Sep 2019 10:59:41 +0200 Subject: [PATCH] Removed unused _rotation_set variable from EncodedFrame. Bug: none Change-Id: I398417541fb66e58b0ad90c4b17c5d36eb61a004 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154520 Reviewed-by: Niels Moller Commit-Queue: Philip Eliasson Cr-Commit-Position: refs/heads/master@{#29316} --- modules/video_coding/encoded_frame.cc | 4 +--- modules/video_coding/encoded_frame.h | 5 ----- modules/video_coding/frame_buffer.cc | 2 -- modules/video_coding/frame_object.cc | 2 -- 4 files changed, 1 insertion(+), 12 deletions(-) diff --git a/modules/video_coding/encoded_frame.cc b/modules/video_coding/encoded_frame.cc index c7a74904c8..bbbd9bce9c 100644 --- a/modules/video_coding/encoded_frame.cc +++ b/modules/video_coding/encoded_frame.cc @@ -25,8 +25,7 @@ VCMEncodedFrame::VCMEncodedFrame() _renderTimeMs(-1), _payloadType(0), _missingFrame(false), - _codec(kVideoCodecGeneric), - _rotation_set(false) { + _codec(kVideoCodecGeneric) { _codecSpecificInfo.codecType = kVideoCodecGeneric; } @@ -52,7 +51,6 @@ void VCMEncodedFrame::Reset() { rotation_ = kVideoRotation_0; content_type_ = VideoContentType::UNSPECIFIED; timing_.flags = VideoSendTiming::kInvalid; - _rotation_set = false; } void VCMEncodedFrame::CopyCodecSpecific(const RTPVideoHeader* header) { diff --git a/modules/video_coding/encoded_frame.h b/modules/video_coding/encoded_frame.h index ac9cf50a9b..27ad107850 100644 --- a/modules/video_coding/encoded_frame.h +++ b/modules/video_coding/encoded_frame.h @@ -130,11 +130,6 @@ class VCMEncodedFrame : protected EncodedImage { bool _missingFrame; CodecSpecificInfo _codecSpecificInfo; webrtc::VideoCodecType _codec; - - // Video rotation is only set along with the last packet for each frame - // (same as marker bit). This |_rotation_set| is only for debugging purpose - // to ensure we don't set it twice for a frame. - bool _rotation_set; }; } // namespace webrtc diff --git a/modules/video_coding/frame_buffer.cc b/modules/video_coding/frame_buffer.cc index 937c9bedbe..c49cde67d1 100644 --- a/modules/video_coding/frame_buffer.cc +++ b/modules/video_coding/frame_buffer.cc @@ -145,9 +145,7 @@ VCMFrameBufferEnum VCMFrameBuffer::InsertPacket(const VCMPacket& packet, // frame (I-frame or IDR frame in H.264 (AVC), or an IRAP picture in H.265 // (HEVC)). if (packet.markerBit) { - RTC_DCHECK(!_rotation_set); rotation_ = packet.video_header.rotation; - _rotation_set = true; content_type_ = packet.video_header.content_type; if (packet.video_header.video_timing.flags != VideoSendTiming::kInvalid) { timing_.encode_start_ms = diff --git a/modules/video_coding/frame_object.cc b/modules/video_coding/frame_object.cc index f16d132570..4e124bb83c 100644 --- a/modules/video_coding/frame_object.cc +++ b/modules/video_coding/frame_object.cc @@ -79,7 +79,6 @@ RtpFrameObject::RtpFrameObject( // (HEVC)). rotation_ = last_packet->video_header.rotation; SetColorSpace(last_packet->video_header.color_space); - _rotation_set = true; content_type_ = last_packet->video_header.content_type; if (last_packet->video_header.video_timing.flags != VideoSendTiming::kInvalid) { @@ -161,7 +160,6 @@ RtpFrameObject::RtpFrameObject( rotation_ = rotation; SetColorSpace(color_space); - _rotation_set = true; content_type_ = content_type; if (timing.flags != VideoSendTiming::kInvalid) { // ntp_time_ms_ may be -1 if not estimated yet. This is not a problem,