OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |