public void SetVideoCallbacks(VlcMediaPlayerInstance mediaPlayerInstance, LockVideoCallback lockVideoCallback, UnlockVideoCallback unlockVideoCallback, DisplayVideoCallback displayVideoCallback, IntPtr userData) { if (mediaPlayerInstance == IntPtr.Zero) { throw new ArgumentException("Media player instance is not initialized."); } myLibraryLoader.GetInteropDelegate <SetVideoCallbacks>().Invoke(mediaPlayerInstance, lockVideoCallback, unlockVideoCallback, displayVideoCallback, userData); }
/// <summary> /// Sets the video callbacks to render decoded video to a custom area in memory. /// The media player will hold a reference on the IVideoCallbacks parameter /// </summary> /// <remarks> /// Rendering video into custom memory buffers is considerably less efficient than rendering in a custom window as normal. /// See libvlc_video_set_callbacks for detailed explanations /// </remarks> /// <param name="lockVideo"> /// Callback to lock video memory (must not be NULL) /// </param> /// <param name="unlockVideo"> /// Callback to unlock video memory (or NULL if not needed) /// </param> /// <param name="display"> /// Callback to display video (or NULL if not needed) /// </param> /// <param name="userData"> /// Private pointer for the three callbacks (as first parameter). /// This parameter will be overriden if <see cref="SetVideoFormatCallbacks"/> is used /// </param> public void SetVideoCallbacks(LockVideoCallback lockVideo, UnlockVideoCallback unlockVideo, DisplayVideoCallback display, IntPtr userData) { if (lockVideo == null) { throw new ArgumentNullException(nameof(lockVideo)); } this._lockVideoCallbackReference = lockVideo; this._unlockVideoCallbackReference = unlockVideo; this._displayVideoCallbackReference = display; this.Manager.SetVideoCallbacks(this.myMediaPlayerInstance, this._lockVideoCallbackReference, this._unlockVideoCallbackReference, this._displayVideoCallbackReference, userData); }
public void SetVideoCallbacks(LockVideoCallback lockVideoCallback, UnlockVideoCallback unlockVideoCallback, DisplayVideoCallback displayVideoCallback, IntPtr userData) { myManager.GetInteropDelegate <SetVideoCallbacks>().Invoke(this.Pointer, lockVideoCallback, unlockVideoCallback, displayVideoCallback, userData); }