Index: webrtc/api/objc/RTCVideoTrack.mm |
diff --git a/webrtc/api/objc/RTCVideoTrack.mm b/webrtc/api/objc/RTCVideoTrack.mm |
index 5834af761bafa4bd5d0310daf8be2e452da83479..a32ea7bc7c19a7693156cb41a21b0b65464c6bcd 100644 |
--- a/webrtc/api/objc/RTCVideoTrack.mm |
+++ b/webrtc/api/objc/RTCVideoTrack.mm |
@@ -52,7 +52,7 @@ |
- (void)dealloc { |
for (RTCVideoRendererAdapter *adapter in _adapters) { |
- self.nativeVideoTrack->RemoveRenderer(adapter.nativeVideoRenderer); |
+ self.nativeVideoTrack->RemoveSink(adapter.nativeVideoRenderer); |
} |
} |
@@ -79,7 +79,8 @@ |
RTCVideoRendererAdapter* adapter = |
[[RTCVideoRendererAdapter alloc] initWithNativeRenderer:renderer]; |
[_adapters addObject:adapter]; |
- self.nativeVideoTrack->AddRenderer(adapter.nativeVideoRenderer); |
+ self.nativeVideoTrack->AddOrUpdateSink(adapter.nativeVideoRenderer, |
+ rtc::VideoSinkWants()); |
} |
- (void)removeRenderer:(id<RTCVideoRenderer>)renderer { |
@@ -97,7 +98,7 @@ |
} |
RTCVideoRendererAdapter *adapterToRemove = |
[_adapters objectAtIndex:indexToRemove]; |
- self.nativeVideoTrack->RemoveRenderer(adapterToRemove.nativeVideoRenderer); |
+ self.nativeVideoTrack->RemoveSink(adapterToRemove.nativeVideoRenderer); |
[_adapters removeObjectAtIndex:indexToRemove]; |
} |