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

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

Issue 2978623002: Implement H264 codec in Objective-C classes. (Closed)
Patch Set: Fix test after rebase. Created 3 years, 5 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 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
11 #import "WebRTC/RTCVideoCodec.h" 11 #import "WebRTC/RTCVideoCodec.h"
12 12
13 #import "RTCVideoCodec+Private.h" 13 #import "RTCVideoCodec+Private.h"
14 14
15 @implementation RTCEncodedImage 15 @implementation RTCEncodedImage
16 16
17 @synthesize buffer = _buffer; 17 @synthesize buffer = _buffer;
18 @synthesize encodedWidth = _encodedWidth; 18 @synthesize encodedWidth = _encodedWidth;
19 @synthesize encodedHeight = _encodedHeight; 19 @synthesize encodedHeight = _encodedHeight;
20 @synthesize timeStamp = _timeStamp; 20 @synthesize timeStamp = _timeStamp;
21 @synthesize captureTimeMs = _captureTimeMs; 21 @synthesize captureTimeMs = _captureTimeMs;
22 @synthesize ntpTimeMs = _ntpTimeMs; 22 @synthesize ntpTimeMs = _ntpTimeMs;
23 @synthesize isTimingFrame = _isTimingFrame; 23 @synthesize isTimingFrame = _isTimingFrame;
24 @synthesize encodeStartMs = _encodeStartMs; 24 @synthesize encodeStartMs = _encodeStartMs;
25 @synthesize encodeFinishMs = _encodeFinishMs; 25 @synthesize encodeFinishMs = _encodeFinishMs;
26 @synthesize frameType = _frameType; 26 @synthesize frameType = _frameType;
27 @synthesize rotation = _rotation; 27 @synthesize rotation = _rotation;
28 @synthesize completeFrame = _completeFrame; 28 @synthesize completeFrame = _completeFrame;
29 @synthesize qp = _qp; 29 @synthesize qp = _qp;
30 @synthesize contentType = _contentType;
30 31
31 - (instancetype)initWithEncodedImage:(webrtc::EncodedImage)encodedImage { 32 - (instancetype)initWithEncodedImage:(webrtc::EncodedImage)encodedImage {
32 if (self = [super init]) { 33 if (self = [super init]) {
33 // Wrap the buffer in NSData without copying, do not take ownership. 34 // Wrap the buffer in NSData without copying, do not take ownership.
34 _buffer = [NSData dataWithBytesNoCopy:encodedImage._buffer 35 _buffer = [NSData dataWithBytesNoCopy:encodedImage._buffer
35 length:encodedImage._length 36 length:encodedImage._length
36 freeWhenDone:NO]; 37 freeWhenDone:NO];
37 _encodedWidth = encodedImage._encodedWidth; 38 _encodedWidth = encodedImage._encodedWidth;
38 _encodedHeight = encodedImage._encodedHeight; 39 _encodedHeight = encodedImage._encodedHeight;
39 _timeStamp = encodedImage._timeStamp; 40 _timeStamp = encodedImage._timeStamp;
(...skipping 25 matching lines...) Expand all
65 encodedImage.timing_.encode_finish_ms = _encodeFinishMs; 66 encodedImage.timing_.encode_finish_ms = _encodeFinishMs;
66 encodedImage._frameType = webrtc::FrameType(_frameType); 67 encodedImage._frameType = webrtc::FrameType(_frameType);
67 encodedImage.rotation_ = webrtc::VideoRotation(_rotation); 68 encodedImage.rotation_ = webrtc::VideoRotation(_rotation);
68 encodedImage._completeFrame = _completeFrame; 69 encodedImage._completeFrame = _completeFrame;
69 encodedImage.qp_ = _qp ? _qp.intValue : -1; 70 encodedImage.qp_ = _qp ? _qp.intValue : -1;
70 71
71 return encodedImage; 72 return encodedImage;
72 } 73 }
73 74
74 @end 75 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698