Add rotation to EncodedImage and make sure it is passed through encoders.

This fix a potential race where the rotation information of a sent frame does not match the encoded frame.

BUG=webrtc:5783
TEST= Run ApprtcDemo on IOs and Android with and without capture to texture and both VP8 and H264.
R=magjed@webrtc.org, pbos@webrtc.org, tkchin@webrtc.org
TBR=tkchin_webrtc // For IOS changes.

Review URL: https://codereview.webrtc.org/1886113003 .

Cr-Commit-Position: refs/heads/master@{#12426}
This commit is contained in:
Per
2016-04-19 15:01:23 +02:00
parent 0fa0a97cf3
commit ba7dc723b0
15 changed files with 175 additions and 142 deletions

View File

@ -48,7 +48,6 @@ class VCMEncodedFrameCallback : public EncodedImageCallback {
void SetInternalSource(bool internal_source) {
internal_source_ = internal_source;
}
void SetRotation(VideoRotation rotation) { rotation_ = rotation; }
void SignalLastEncoderImplementationUsed(
const char* encoder_implementation_name);
@ -57,7 +56,6 @@ class VCMEncodedFrameCallback : public EncodedImageCallback {
media_optimization::MediaOptimization* media_opt_;
uint8_t payload_type_;
bool internal_source_;
VideoRotation rotation_;
EncodedImageCallback* post_encode_callback_;
};
@ -96,7 +94,6 @@ class VCMGenericEncoder {
const bool internal_source_;
rtc::CriticalSection params_lock_;
EncoderParameters encoder_params_ GUARDED_BY(params_lock_);
VideoRotation rotation_;
bool is_screenshare_;
};