コード例 #1
0
 private void UnregisterInteropCallbacks()
 {
     if (_selfHandle != IntPtr.Zero)
     {
         RemoteVideoTrackInterop.RemoteVideoTrack_RegisterI420AFrameCallback(_nativeHandle, null, IntPtr.Zero);
         RemoteVideoTrackInterop.RemoteVideoTrack_RegisterArgb32FrameCallback(_nativeHandle, null, IntPtr.Zero);
         Utils.ReleaseWrapperRef(_selfHandle);
         _selfHandle          = IntPtr.Zero;
         _interopCallbackArgs = null;
     }
 }
コード例 #2
0
 private void RegisterInteropCallbacks()
 {
     _interopCallbackArgs = new RemoteVideoTrackInterop.InteropCallbackArgs()
     {
         Track = this,
         I420AFrameCallback  = RemoteVideoTrackInterop.I420AFrameCallback,
         Argb32FrameCallback = RemoteVideoTrackInterop.Argb32FrameCallback,
     };
     _selfHandle = Utils.MakeWrapperRef(this);
     RemoteVideoTrackInterop.RemoteVideoTrack_RegisterI420AFrameCallback(
         _nativeHandle, _interopCallbackArgs.I420AFrameCallback, _selfHandle);
     RemoteVideoTrackInterop.RemoteVideoTrack_RegisterArgb32FrameCallback(
         _nativeHandle, _interopCallbackArgs.Argb32FrameCallback, _selfHandle);
 }