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

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

Issue 2986893002: Piggybacking simulcast id and ALR experiment id into video content type extension. (Closed)
Patch Set: Remove static initialization from VideoContentType and remove memoization in AlrDetector Created 3 years, 3 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
(...skipping 29 matching lines...) Expand all
40 _timeStamp = encodedImage._timeStamp; 40 _timeStamp = encodedImage._timeStamp;
41 _captureTimeMs = encodedImage.capture_time_ms_; 41 _captureTimeMs = encodedImage.capture_time_ms_;
42 _ntpTimeMs = encodedImage.ntp_time_ms_; 42 _ntpTimeMs = encodedImage.ntp_time_ms_;
43 _flags = encodedImage.timing_.flags; 43 _flags = encodedImage.timing_.flags;
44 _encodeStartMs = encodedImage.timing_.encode_start_ms; 44 _encodeStartMs = encodedImage.timing_.encode_start_ms;
45 _encodeFinishMs = encodedImage.timing_.encode_finish_ms; 45 _encodeFinishMs = encodedImage.timing_.encode_finish_ms;
46 _frameType = (RTCFrameType)encodedImage._frameType; 46 _frameType = (RTCFrameType)encodedImage._frameType;
47 _rotation = encodedImage.rotation_; 47 _rotation = encodedImage.rotation_;
48 _completeFrame = encodedImage._completeFrame; 48 _completeFrame = encodedImage._completeFrame;
49 _qp = encodedImage.qp_ == -1 ? nil : @(encodedImage.qp_); 49 _qp = encodedImage.qp_ == -1 ? nil : @(encodedImage.qp_);
50 _contentType = (encodedImage.content_type_ == webrtc::VideoContentType::SCRE ENSHARE) ? 50 _contentType = (encodedImage.content_type_ == webrtc::VideoContentType::Scre enshare()) ?
51 RTCVideoContentTypeScreenshare : 51 RTCVideoContentTypeScreenshare :
52 RTCVideoContentTypeUnspecified; 52 RTCVideoContentTypeUnspecified;
53 } 53 }
54 54
55 return self; 55 return self;
56 } 56 }
57 57
58 - (webrtc::EncodedImage)nativeEncodedImage { 58 - (webrtc::EncodedImage)nativeEncodedImage {
59 // Return the pointer without copying. 59 // Return the pointer without copying.
60 webrtc::EncodedImage encodedImage( 60 webrtc::EncodedImage encodedImage(
61 (uint8_t *)_buffer.bytes, (size_t)_buffer.length, (size_t)_buffer.length); 61 (uint8_t *)_buffer.bytes, (size_t)_buffer.length, (size_t)_buffer.length);
62 encodedImage._encodedWidth = _encodedWidth; 62 encodedImage._encodedWidth = _encodedWidth;
63 encodedImage._encodedHeight = _encodedHeight; 63 encodedImage._encodedHeight = _encodedHeight;
64 encodedImage._timeStamp = _timeStamp; 64 encodedImage._timeStamp = _timeStamp;
65 encodedImage.capture_time_ms_ = _captureTimeMs; 65 encodedImage.capture_time_ms_ = _captureTimeMs;
66 encodedImage.ntp_time_ms_ = _ntpTimeMs; 66 encodedImage.ntp_time_ms_ = _ntpTimeMs;
67 encodedImage.timing_.flags = _flags; 67 encodedImage.timing_.flags = _flags;
68 encodedImage.timing_.encode_start_ms = _encodeStartMs; 68 encodedImage.timing_.encode_start_ms = _encodeStartMs;
69 encodedImage.timing_.encode_finish_ms = _encodeFinishMs; 69 encodedImage.timing_.encode_finish_ms = _encodeFinishMs;
70 encodedImage._frameType = webrtc::FrameType(_frameType); 70 encodedImage._frameType = webrtc::FrameType(_frameType);
71 encodedImage.rotation_ = webrtc::VideoRotation(_rotation); 71 encodedImage.rotation_ = webrtc::VideoRotation(_rotation);
72 encodedImage._completeFrame = _completeFrame; 72 encodedImage._completeFrame = _completeFrame;
73 encodedImage.qp_ = _qp ? _qp.intValue : -1; 73 encodedImage.qp_ = _qp ? _qp.intValue : -1;
74 encodedImage.content_type_ = (_contentType == RTCVideoContentTypeScreenshare) ? 74 encodedImage.content_type_ = (_contentType == RTCVideoContentTypeScreenshare) ?
75 webrtc::VideoContentType::SCREENSHARE : 75 webrtc::VideoContentType::Screenshare() :
76 webrtc::VideoContentType::UNSPECIFIED; 76 webrtc::VideoContentType::Unspecified();
77 77
78 return encodedImage; 78 return encodedImage;
79 } 79 }
80 80
81 @end 81 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698