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

Side by Side Diff: webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.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: Fix merge mistake. 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 * 9 *
10 */ 10 */
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 << enc_ret << "."; 386 << enc_ret << ".";
387 ReportError(); 387 ReportError();
388 return WEBRTC_VIDEO_CODEC_ERROR; 388 return WEBRTC_VIDEO_CODEC_ERROR;
389 } 389 }
390 390
391 encoded_image_._encodedWidth = frame.width(); 391 encoded_image_._encodedWidth = frame.width();
392 encoded_image_._encodedHeight = frame.height(); 392 encoded_image_._encodedHeight = frame.height();
393 encoded_image_._timeStamp = frame.timestamp(); 393 encoded_image_._timeStamp = frame.timestamp();
394 encoded_image_.ntp_time_ms_ = frame.ntp_time_ms(); 394 encoded_image_.ntp_time_ms_ = frame.ntp_time_ms();
395 encoded_image_.capture_time_ms_ = frame.render_time_ms(); 395 encoded_image_.capture_time_ms_ = frame.render_time_ms();
396 encoded_image_.rotation_ = frame.rotation();
396 encoded_image_._frameType = EVideoFrameType_to_FrameType(info.eFrameType); 397 encoded_image_._frameType = EVideoFrameType_to_FrameType(info.eFrameType);
397 398
398 // Split encoded image up into fragments. This also updates |encoded_image_|. 399 // Split encoded image up into fragments. This also updates |encoded_image_|.
399 RTPFragmentationHeader frag_header; 400 RTPFragmentationHeader frag_header;
400 RtpFragmentize(&encoded_image_, &encoded_image_buffer_, frame, &info, 401 RtpFragmentize(&encoded_image_, &encoded_image_buffer_, frame, &info,
401 &frag_header); 402 &frag_header);
402 403
403 // Encoder can skip frames to save bandwidth in which case 404 // Encoder can skip frames to save bandwidth in which case
404 // |encoded_image_._length| == 0. 405 // |encoded_image_._length| == 0.
405 if (encoded_image_._length > 0) { 406 if (encoded_image_._length > 0) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 } 442 }
442 443
443 int32_t H264EncoderImpl::SetPeriodicKeyFrames(bool enable) { 444 int32_t H264EncoderImpl::SetPeriodicKeyFrames(bool enable) {
444 return WEBRTC_VIDEO_CODEC_OK; 445 return WEBRTC_VIDEO_CODEC_OK;
445 } 446 }
446 447
447 void H264EncoderImpl::OnDroppedFrame() { 448 void H264EncoderImpl::OnDroppedFrame() {
448 } 449 }
449 450
450 } // namespace webrtc 451 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/java/jni/androidmediaencoder_jni.cc ('k') | webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698