internal VlcStateChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData) : base(Args, UserData) { _NewState = base.Args.media_state_changed.new_state; }
internal VlcTimeChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData) : base(Args, UserData) { }
internal VlcSeekableChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData) : base(Args, UserData) { }
internal VlcStateChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData, VlcState NewState) : base(Args, UserData) { _NewState = NewState; }
internal VlcPositionChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData) : base(Args, UserData) { }
internal VlcEventArgs(VlcCallbackArgs Args, IntPtr UserData) { _Args = Args; _UserData = UserData; }
private void OnStateChanged(ref VlcCallbackArgs Args, IntPtr UserData) { if (this.StateChanged != null) { switch (Args.EventType) { case VlcEventType.MediaPlayerNothingSpecial: StateChanged(this, new VlcStateChangedEventArgs(Args, UserData, VlcState.NothingSpecial)); break; case VlcEventType.MediaPlayerOpening: StateChanged(this, new VlcStateChangedEventArgs(Args, UserData, VlcState.Opening)); break; case VlcEventType.MediaPlayerBuffering: StateChanged(this, new VlcStateChangedEventArgs(Args, UserData, VlcState.Buffering)); break; case VlcEventType.MediaPlayerPlaying: StateChanged(this, new VlcStateChangedEventArgs(Args, UserData, VlcState.Playing)); break; case VlcEventType.MediaPlayerPaused: StateChanged(this, new VlcStateChangedEventArgs(Args, UserData, VlcState.Paused)); break; case VlcEventType.MediaPlayerStopped: StateChanged(this, new VlcStateChangedEventArgs(Args, UserData, VlcState.Stopped)); break; case VlcEventType.MediaPlayerForward: StateChanged(this, new VlcStateChangedEventArgs(Args, UserData, VlcState.Forward)); break; case VlcEventType.MediaPlayerBackward: StateChanged(this, new VlcStateChangedEventArgs(Args, UserData, VlcState.Backward)); break; case VlcEventType.MediaPlayerEndReached: StateChanged(this, new VlcStateChangedEventArgs(Args, UserData, VlcState.Ended)); break; case VlcEventType.MediaPlayerEncounteredError: StateChanged(this, new VlcStateChangedEventArgs(Args, UserData, VlcState.Error)); break; } } }
private void OnPausableChanged(ref VlcCallbackArgs Args, IntPtr UserData) { if (PausableChanged != null) { PausableChanged(this, new VlcPausableChangedEventArgs(Args, UserData)); } else if (cbPausableChanged != null && _EventManager.IsAttached(VlcEventType.MediaPlayerPausableChanged)) { //No one is listening to this event... Remove it to save resources. _EventManager.DetachEvent(VlcEventType.MediaPlayerPausableChanged, cbPausableChanged, IntPtr.Zero); } }