示例#1
0
 internal VlcStateChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData)
     : base(Args, UserData)
 {
     _NewState = base.Args.media_state_changed.new_state;
 }
示例#2
0
 internal VlcTimeChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData)
     : base(Args, UserData)
 {
 }
 internal VlcSeekableChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData)
     : base(Args, UserData)
 {
 }
示例#4
0
 internal VlcStateChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData, VlcState NewState)
     : base(Args, UserData)
 {
     _NewState = NewState;
 }
 internal VlcPositionChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData)
     : base(Args, UserData)
 {
 }
示例#6
0
 internal VlcEventArgs(VlcCallbackArgs Args, IntPtr UserData)
 {
     _Args     = Args;
     _UserData = UserData;
 }
示例#7
0
 internal VlcEventArgs(VlcCallbackArgs Args, IntPtr UserData)
 {
     _Args = Args;
     _UserData = UserData;
 }
 internal VlcStateChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData)
     : base(Args, UserData)
 {
     _NewState = base.Args.media_state_changed.new_state;
 }
 internal VlcStateChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData, VlcState NewState)
     : base(Args, UserData)
 {
     _NewState = NewState;
 }
示例#10
0
 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;
         }
     }
 }
示例#11
0
 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);
     }
 }