OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 | 52 |
53 - (void)dealloc { | 53 - (void)dealloc { |
54 for (RTCVideoRendererAdapter *adapter in _adapters) { | 54 for (RTCVideoRendererAdapter *adapter in _adapters) { |
55 self.nativeVideoTrack->RemoveRenderer(adapter.nativeVideoRenderer); | 55 self.nativeVideoTrack->RemoveRenderer(adapter.nativeVideoRenderer); |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 - (RTCVideoSource *)source { | 59 - (RTCVideoSource *)source { |
60 if (!_source) { | 60 if (!_source) { |
61 rtc::scoped_refptr<webrtc::VideoSourceInterface> source = | 61 rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> source = |
62 self.nativeVideoTrack->GetSource(); | 62 self.nativeVideoTrack->GetSource(); |
63 if (source) { | 63 if (source) { |
64 _source = [[RTCVideoSource alloc] initWithNativeVideoSource:source.get()]; | 64 _source = [[RTCVideoSource alloc] initWithNativeVideoSource:source.get()]; |
65 } | 65 } |
66 } | 66 } |
67 return _source; | 67 return _source; |
68 } | 68 } |
69 | 69 |
70 - (void)addRenderer:(id<RTCVideoRenderer>)renderer { | 70 - (void)addRenderer:(id<RTCVideoRenderer>)renderer { |
71 // Make sure we don't have this renderer yet. | 71 // Make sure we don't have this renderer yet. |
(...skipping 29 matching lines...) Expand all Loading... |
101 [_adapters removeObjectAtIndex:indexToRemove]; | 101 [_adapters removeObjectAtIndex:indexToRemove]; |
102 } | 102 } |
103 | 103 |
104 #pragma mark - Private | 104 #pragma mark - Private |
105 | 105 |
106 - (rtc::scoped_refptr<webrtc::VideoTrackInterface>)nativeVideoTrack { | 106 - (rtc::scoped_refptr<webrtc::VideoTrackInterface>)nativeVideoTrack { |
107 return static_cast<webrtc::VideoTrackInterface *>(self.nativeTrack.get()); | 107 return static_cast<webrtc::VideoTrackInterface *>(self.nativeTrack.get()); |
108 } | 108 } |
109 | 109 |
110 @end | 110 @end |
OLD | NEW |