Index: talk/app/webrtc/objc/RTCVideoTrack.mm |
diff --git a/talk/app/webrtc/objc/RTCVideoTrack.mm b/talk/app/webrtc/objc/RTCVideoTrack.mm |
index b32f05f35efd02d4905936732596cbe88e17bb48..877e92eb02a3b92b757d35a782087f32d123fc2e 100644 |
--- a/talk/app/webrtc/objc/RTCVideoTrack.mm |
+++ b/talk/app/webrtc/objc/RTCVideoTrack.mm |
@@ -78,7 +78,7 @@ |
- (void)dealloc { |
for (RTCVideoRendererAdapter *adapter in _adapters) { |
- self.nativeVideoTrack->RemoveRenderer(adapter.nativeVideoRenderer); |
+ self.nativeVideoTrack->RemoveSink(adapter.nativeVideoRenderer); |
} |
} |
@@ -91,7 +91,8 @@ |
RTCVideoRendererAdapter* adapter = |
[[RTCVideoRendererAdapter alloc] initWithVideoRenderer:renderer]; |
[_adapters addObject:adapter]; |
- self.nativeVideoTrack->AddRenderer(adapter.nativeVideoRenderer); |
+ self.nativeVideoTrack->AddOrUpdateSink(adapter.nativeVideoRenderer, |
+ rtc::VideoSinkWants()); |
} |
- (void)removeRenderer:(id<RTCVideoRenderer>)renderer { |
@@ -107,7 +108,7 @@ |
if (indexToRemove == NSNotFound) { |
return; |
} |
- self.nativeVideoTrack->RemoveRenderer(adapter.nativeVideoRenderer); |
+ self.nativeVideoTrack->RemoveSink(adapter.nativeVideoRenderer); |
[_adapters removeObjectAtIndex:indexToRemove]; |
} |