| OLD | NEW |
| 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.h" | 11 #import "RTCRtpSender+Private.h" |
| 12 | |
| 13 #import "webrtc/api/objc/RTCRtpParameters+Private.h" | |
| 14 #import "webrtc/api/objc/RTCRtpSender+Private.h" | |
| 15 #import "webrtc/api/objc/RTCMediaStreamTrack+Private.h" | |
| 16 | 12 |
| 17 #include "webrtc/api/mediastreaminterface.h" | 13 #include "webrtc/api/mediastreaminterface.h" |
| 18 #include "webrtc/api/rtpsenderinterface.h" | 14 |
| 15 #import "RTCMediaStreamTrack+Private.h" |
| 16 #import "RTCRtpParameters+Private.h" |
| 19 | 17 |
| 20 @implementation RTCRtpSender { | 18 @implementation RTCRtpSender { |
| 21 rtc::scoped_refptr<webrtc::RtpSenderInterface> _nativeRtpSender; | 19 rtc::scoped_refptr<webrtc::RtpSenderInterface> _nativeRtpSender; |
| 22 } | 20 } |
| 23 | 21 |
| 24 - (instancetype)initWithNativeRtpSender: | 22 - (instancetype)initWithNativeRtpSender: |
| 25 (rtc::scoped_refptr<webrtc::RtpSenderInterface>)nativeRtpSender { | 23 (rtc::scoped_refptr<webrtc::RtpSenderInterface>)nativeRtpSender { |
| 26 if (self = [super init]) { | 24 if (self = [super init]) { |
| 27 _nativeRtpSender = nativeRtpSender; | 25 _nativeRtpSender = nativeRtpSender; |
| 28 } | 26 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 41 - (RTCMediaStreamTrack *)track { | 39 - (RTCMediaStreamTrack *)track { |
| 42 rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> nativeTrack( | 40 rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> nativeTrack( |
| 43 _nativeRtpSender->track()); | 41 _nativeRtpSender->track()); |
| 44 if (nativeTrack) { | 42 if (nativeTrack) { |
| 45 return [[RTCMediaStreamTrack alloc] initWithNativeTrack:nativeTrack]; | 43 return [[RTCMediaStreamTrack alloc] initWithNativeTrack:nativeTrack]; |
| 46 } | 44 } |
| 47 return nil; | 45 return nil; |
| 48 } | 46 } |
| 49 | 47 |
| 50 @end | 48 @end |
| OLD | NEW |