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

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: Fixing minor issues 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..cfd07f2600530243363b1577562418c2f40f39cd 100644
--- a/webrtc/api/objc/RTCRtpParameters.mm
+++ b/webrtc/api/objc/RTCRtpParameters.mm
@@ -9,11 +9,13 @@
*/
#import "RTCRtpParameters+Private.h"
tkchin_webrtc 2016/04/14 17:52:51 ditto add a blank line after interface import
Taylor Brandstetter 2016/04/14 18:17:22 Done.
+#import "RTCRtpCodecParameters+Private.h"
#import "RTCRtpEncodingParameters+Private.h"
@implementation RTCRtpParameters
@synthesize encodings = _encodings;
+@synthesize codecs = _codecs;
- (instancetype)init {
return [super init];
@@ -28,6 +30,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 +46,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