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

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

Issue 2998293002: Make CodecType conversion functions non-optional. (Closed)
Patch Set: Keep old functions for backwards-compat 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 af82e0c4f2fc1f8440675cfb0448a069daf6c461..0fb8e46f2e2198f60c3737b27d38b4e86cd9647e 100644
--- a/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoEncoderSettings.mm
+++ b/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoEncoderSettings.mm
@@ -30,10 +30,8 @@
- (instancetype)initWithNativeVideoCodec:(const webrtc::VideoCodec *)videoCodec {
if (self = [super init]) {
if (videoCodec) {
- rtc::Optional<const char *> codecName = CodecTypeToPayloadName(videoCodec->codecType);
- if (codecName) {
- _name = [NSString stringWithUTF8String:codecName.value()];
- }
+ const char *codecName = CodecTypeToPayloadString(videoCodec->codecType);
+ _name = [NSString stringWithUTF8String:codecName];
_width = videoCodec->width;
_height = videoCodec->height;

Powered by Google App Engine
This is Rietveld 408576698