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

Unified Diff: webrtc/api/objc/RTCRtpParameters.mm

Issue 1885473004: Adding codecs to the RtpParameters returned by an RtpSender. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Responding to review comments. Created 4 years, 8 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/api/objc/RTCRtpParameters.mm
diff --git a/webrtc/api/objc/RTCRtpParameters.mm b/webrtc/api/objc/RTCRtpParameters.mm
index e8c4a44ce5fac84c5d8b0778886d1e77ab0fe7ad..5e791066df1426392099b3dd0a5f093f29b19d72 100644
--- a/webrtc/api/objc/RTCRtpParameters.mm
+++ b/webrtc/api/objc/RTCRtpParameters.mm
@@ -9,11 +9,14 @@
*/
#import "RTCRtpParameters+Private.h"
+
+#import "RTCRtpCodecParameters+Private.h"
#import "RTCRtpEncodingParameters+Private.h"
@implementation RTCRtpParameters
@synthesize encodings = _encodings;
+@synthesize codecs = _codecs;
- (instancetype)init {
return [super init];
@@ -28,6 +31,13 @@
initWithNativeParameters:encoding]];
}
_encodings = encodings;
+
+ NSMutableArray *codecs = [[NSMutableArray alloc] init];
+ for (const auto &codec : nativeParameters.codecs) {
+ [codecs addObject:[[RTCRtpCodecParameters alloc]
+ initWithNativeParameters:codec]];
+ }
+ _codecs = codecs;
}
return self;
}
@@ -37,6 +47,9 @@
for (RTCRtpEncodingParameters *encoding in _encodings) {
parameters.encodings.push_back(encoding.nativeParameters);
}
+ for (RTCRtpCodecParameters *codec in _codecs) {
+ parameters.codecs.push_back(codec.nativeParameters);
+ }
return parameters;
}

Powered by Google App Engine
This is Rietveld 408576698