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

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

Issue 1917193008: Adding getParameters/setParameters APIs to RtpReceiver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2016 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
11 #import "RTCRtpSender+Private.h" 11 #import "RTCRtpReceiver+Private.h"
12 12
13 #import "RTCMediaStreamTrack+Private.h" 13 #import "RTCMediaStreamTrack+Private.h"
14 #import "RTCRtpParameters+Private.h" 14 #import "RTCRtpParameters+Private.h"
15 15
16 #include "webrtc/api/mediastreaminterface.h" 16 #include "webrtc/api/mediastreaminterface.h"
17 17
18 @implementation RTCRtpSender { 18 @implementation RTCRtpReceiver {
19 rtc::scoped_refptr<webrtc::RtpSenderInterface> _nativeRtpSender; 19 rtc::scoped_refptr<webrtc::RtpReceiverInterface> _nativeRtpReceiver;
20 } 20 }
21 21
22 - (instancetype)initWithNativeRtpSender: 22 - (instancetype)initWithNativeRtpReceiver:
23 (rtc::scoped_refptr<webrtc::RtpSenderInterface>)nativeRtpSender { 23 (rtc::scoped_refptr<webrtc::RtpReceiverInterface>)nativeRtpReceiver {
24 if (self = [super init]) { 24 if (self = [super init]) {
25 _nativeRtpSender = nativeRtpSender; 25 _nativeRtpReceiver = nativeRtpReceiver;
26 } 26 }
27 return self; 27 return self;
28 } 28 }
29 29
30 - (RTCRtpParameters *)parameters { 30 - (RTCRtpParameters *)parameters {
31 return [[RTCRtpParameters alloc] 31 return [[RTCRtpParameters alloc]
32 initWithNativeParameters:_nativeRtpSender->GetParameters()]; 32 initWithNativeParameters:_nativeRtpReceiver->GetParameters()];
33 } 33 }
34 34
35 - (BOOL)setParameters:(RTCRtpParameters *)parameters { 35 - (BOOL)setParameters:(RTCRtpParameters *)parameters {
36 return _nativeRtpSender->SetParameters(parameters.nativeParameters); 36 return _nativeRtpReceiver->SetParameters(parameters.nativeParameters);
37 } 37 }
38 38
39 - (RTCMediaStreamTrack *)track { 39 - (RTCMediaStreamTrack *)track {
40 rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> nativeTrack( 40 rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> nativeTrack(
41 _nativeRtpSender->track()); 41 _nativeRtpReceiver->track());
42 if (nativeTrack) { 42 if (nativeTrack) {
43 return [[RTCMediaStreamTrack alloc] initWithNativeTrack:nativeTrack]; 43 return [[RTCMediaStreamTrack alloc] initWithNativeTrack:nativeTrack];
44 } 44 }
45 return nil; 45 return nil;
46 } 46 }
47 47
48 @end 48 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698