private void RegisterArgb32VideoFrameCallback() { _interopCallbackArgs = new VideoTrackSourceInterop.InteropCallbackArgs() { Source = this, Argb32FrameCallback = VideoTrackSourceInterop.Argb32FrameCallback, }; _selfHandle = Utils.MakeWrapperRef(this); VideoTrackSourceInterop.VideoTrackSource_RegisterArgb32FrameCallback( _nativeHandle, _interopCallbackArgs.Argb32FrameCallback, _selfHandle); }
private void UnregisterArgb32VideoFrameCallback() { VideoTrackSourceInterop.VideoTrackSource_RegisterFrameCallback(_nativeHandle, null, IntPtr.Zero); Utils.ReleaseWrapperRef(_selfHandle); _interopCallbackArgs = null; }