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

Unified Diff: webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoEncoderSettings.mm

Issue 2987413002: ObjC: Implement HW codecs in ObjC instead of C++ (Closed)
Patch Set: Rebase against https://codereview.webrtc.org/2992233002 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoEncoderSettings.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoEncoderSettings.mm b/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoEncoderSettings.mm
index 018e76a74ed1b538463d4d5ea7fdd9b8cac42af4..af82e0c4f2fc1f8440675cfb0448a069daf6c461 100644
--- a/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoEncoderSettings.mm
+++ b/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoEncoderSettings.mm
@@ -25,6 +25,7 @@
@synthesize targetBitrate = _targetBitrate;
@synthesize maxFramerate = _maxFramerate;
@synthesize qpMax = _qpMax;
+@synthesize mode = _mode;
- (instancetype)initWithNativeVideoCodec:(const webrtc::VideoCodec *)videoCodec {
if (self = [super init]) {
@@ -42,31 +43,11 @@
_targetBitrate = videoCodec->targetBitrate;
_maxFramerate = videoCodec->maxFramerate;
_qpMax = videoCodec->qpMax;
+ _mode = (RTCVideoCodecMode)videoCodec->mode;
}
}
return self;
}
-- (std::unique_ptr<webrtc::VideoCodec>)createNativeVideoEncoderSettings {
- auto codecSettings = std::unique_ptr<webrtc::VideoCodec>(new webrtc::VideoCodec);
-
- rtc::Optional<webrtc::VideoCodecType> codecType =
- webrtc::PayloadNameToCodecType([NSString stdStringForString:_name]);
- if (codecType) {
- codecSettings->codecType = codecType.value();
- }
-
- codecSettings->width = _width;
- codecSettings->height = _height;
- codecSettings->startBitrate = _startBitrate;
- codecSettings->maxBitrate = _maxBitrate;
- codecSettings->minBitrate = _minBitrate;
- codecSettings->targetBitrate = _targetBitrate;
- codecSettings->maxFramerate = _maxFramerate;
- codecSettings->qpMax = _qpMax;
-
- return codecSettings;
-}
-
@end

Powered by Google App Engine
This is Rietveld 408576698