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

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCEncodedImage.mm

Issue 2989803002: ObjC style fix for injectable video codecs (Closed)
Patch Set: Created 3 years, 4 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
« no previous file with comments | « no previous file | webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCRtpFragmentationHeader.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2017 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 _encodeFinishMs = encodedImage.timing_.encode_finish_ms; 44 _encodeFinishMs = encodedImage.timing_.encode_finish_ms;
45 _frameType = (RTCFrameType)encodedImage._frameType; 45 _frameType = (RTCFrameType)encodedImage._frameType;
46 _rotation = encodedImage.rotation_; 46 _rotation = encodedImage.rotation_;
47 _completeFrame = encodedImage._completeFrame; 47 _completeFrame = encodedImage._completeFrame;
48 _qp = encodedImage.qp_ == -1 ? nil : @(encodedImage.qp_); 48 _qp = encodedImage.qp_ == -1 ? nil : @(encodedImage.qp_);
49 } 49 }
50 50
51 return self; 51 return self;
52 } 52 }
53 53
54 - (webrtc::EncodedImage)toCpp { 54 - (webrtc::EncodedImage)nativeEncodedImage {
55 // Return the pointer without copying. 55 // Return the pointer without copying.
56 webrtc::EncodedImage encodedImage( 56 webrtc::EncodedImage encodedImage(
57 (uint8_t *)_buffer.bytes, (size_t)_buffer.length, (size_t)_buffer.length); 57 (uint8_t *)_buffer.bytes, (size_t)_buffer.length, (size_t)_buffer.length);
58 encodedImage._encodedWidth = _encodedWidth; 58 encodedImage._encodedWidth = _encodedWidth;
59 encodedImage._encodedHeight = _encodedHeight; 59 encodedImage._encodedHeight = _encodedHeight;
60 encodedImage._timeStamp = _timeStamp; 60 encodedImage._timeStamp = _timeStamp;
61 encodedImage.capture_time_ms_ = _captureTimeMs; 61 encodedImage.capture_time_ms_ = _captureTimeMs;
62 encodedImage.ntp_time_ms_ = _ntpTimeMs; 62 encodedImage.ntp_time_ms_ = _ntpTimeMs;
63 encodedImage.timing_.is_timing_frame = _isTimingFrame; 63 encodedImage.timing_.is_timing_frame = _isTimingFrame;
64 encodedImage.timing_.encode_start_ms = _encodeStartMs; 64 encodedImage.timing_.encode_start_ms = _encodeStartMs;
65 encodedImage.timing_.encode_finish_ms = _encodeFinishMs; 65 encodedImage.timing_.encode_finish_ms = _encodeFinishMs;
66 encodedImage._frameType = webrtc::FrameType(_frameType); 66 encodedImage._frameType = webrtc::FrameType(_frameType);
67 encodedImage.rotation_ = webrtc::VideoRotation(_rotation); 67 encodedImage.rotation_ = webrtc::VideoRotation(_rotation);
68 encodedImage._completeFrame = _completeFrame; 68 encodedImage._completeFrame = _completeFrame;
69 encodedImage.qp_ = _qp ? _qp.intValue : -1; 69 encodedImage.qp_ = _qp ? _qp.intValue : -1;
70 70
71 return encodedImage; 71 return encodedImage;
72 } 72 }
73 73
74 @end 74 @end
OLDNEW
« no previous file with comments | « no previous file | webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCRtpFragmentationHeader.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698