Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2182)

Unified Diff: webrtc/modules/video_coding/generic_encoder.cc

Issue 1886113003: Add rotation to EncodedImage and make sure it is passed through encoders. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: IOS Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/generic_encoder.cc
diff --git a/webrtc/modules/video_coding/generic_encoder.cc b/webrtc/modules/video_coding/generic_encoder.cc
index 2463cf5c7a53020ed701539e91ab2514d628d16a..818ebe8738ce098ebbdea39ee46b9d24d89d587d 100644
--- a/webrtc/modules/video_coding/generic_encoder.cc
+++ b/webrtc/modules/video_coding/generic_encoder.cc
@@ -145,13 +145,6 @@ int32_t VCMGenericEncoder::Encode(const VideoFrame& inputFrame,
rotation_ = inputFrame.rotation();
- // Keep track of the current frame rotation and apply to the output of the
- // encoder. There might not be exact as the encoder could have one frame delay
- // but it should be close enough.
- // TODO(pbos): Map from timestamp, this is racy (even if rotation_ is locked
- // properly, which it isn't). More than one frame may be in the pipeline.
- vcm_encoded_frame_callback_->SetRotation(rotation_);
-
int32_t result = encoder_->Encode(inputFrame, codecSpecificInfo, &frameTypes);
if (vcm_encoded_frame_callback_) {
@@ -233,7 +226,6 @@ VCMEncodedFrameCallback::VCMEncodedFrameCallback(
_mediaOpt(NULL),
_payloadType(0),
_internalSource(false),
- _rotation(kVideoRotation_0),
post_encode_callback_(post_encode_callback)
#ifdef DEBUG_ENCODER_BIT_STREAM
,
@@ -282,7 +274,7 @@ int32_t VCMEncodedFrameCallback::Encoded(
if (codecSpecificInfo) {
CopyCodecSpecific(codecSpecificInfo, rtpVideoHeaderPtr);
}
- rtpVideoHeader.rotation = _rotation;
+ rtpVideoHeader.rotation = encoded_image.rotation_;
int32_t callbackReturn = send_callback_->SendData(
_payloadType, encoded_image, fragmentationHeader, rtpVideoHeaderPtr);

Powered by Google App Engine
This is Rietveld 408576698