[vlc-devel] commit: Removed unused STOP_S input state. (Laurent Aimar )

Jean-Paul Saman jpsaman at videolan.org
Sat Dec 6 16:44:52 CET 2008


git version control wrote:
> vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Dec  4 22:36:37 2008 +0100| [f593c8f08cdb4bba1f078586cbe8b1fcb0fc4532] | committer: Laurent Aimar 
> 
> Removed unused STOP_S input state.
> 
>  The associated libvlc_MediaPlayerStopped and libvlc_Stopped value could
> probably be removed (not done as I do not know the maintainer opinion).
> 

Users of the webplugins Safari/Firefox/IE ActiveX and even libvlc want 
to be able to see the status of vlc media player. They want to be able 
to distinguish between:

- error condition
- buffering
- stopped
- paused
- playing

They use this information to give feedback to users that something is 
happening and use it to update their JavaScript buttons and other 
information.

I think we need to provide that information to users that want to 
leverage it in their applications.

Gtz
Jean-Paul Saman.

>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f593c8f08cdb4bba1f078586cbe8b1fcb0fc4532
> ---
> 
>  include/vlc_input.h        |    1 -
>  modules/control/dbus.c     |    2 +-
>  modules/gui/ncurses.c      |    4 ----
>  src/control/media_player.c |    5 -----
>  4 files changed, 1 insertions(+), 11 deletions(-)
> 
> diff --git a/include/vlc_input.h b/include/vlc_input.h
> index f241d7d..9bee572 100644
> --- a/include/vlc_input.h
> +++ b/include/vlc_input.h
> @@ -479,7 +479,6 @@ typedef enum input_state_e
>      BUFFERING_S,
>      PLAYING_S,
>      PAUSE_S,
> -    STOP_S,
>      END_S,
>      ERROR_S,
>  } input_state_e;
> diff --git a/modules/control/dbus.c b/modules/control/dbus.c
> index 28ffe2f..79aaca1 100644
> --- a/modules/control/dbus.c
> +++ b/modules/control/dbus.c
> @@ -942,7 +942,7 @@ static int StateChange( vlc_object_t *p_this, const char* psz_var,
>      }
>  
>      if( newval.i_int == PLAYING_S || newval.i_int == PAUSE_S ||
> -        newval.i_int == STOP_S ||  newval.i_int == END_S )
> +        newval.i_int == END_S )
>      {
>          StatusChangeSignal( p_sys->p_conn, (void*) p_intf );
>      }
> diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
> index aa04a67..74193f8 100644
> --- a/modules/gui/ncurses.c
> +++ b/modules/gui/ncurses.c
> @@ -1543,10 +1543,6 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
>          {
>              mvnprintw( y++, 0, COLS, _(" State    : Playing %s"), psz_state );
>          }
> -        else if( val.i_int == STOP_S )
> -        {
> -            mvnprintw( y++, 0, COLS, _(" State    : Stopped %s"), psz_state );
> -        }
>          else if( val.i_int == OPENING_S )
>          {
>              mvnprintw( y++, 0, COLS, _(" State    : Opening/Connecting %s"), psz_state );
> diff --git a/src/control/media_player.c b/src/control/media_player.c
> index 8a19193..c060dbc 100644
> --- a/src/control/media_player.c
> +++ b/src/control/media_player.c
> @@ -52,7 +52,6 @@ static const libvlc_state_t vlc_to_libvlc_state_array[] =
>      [BUFFERING_S]   = libvlc_Buffering,
>      [PLAYING_S]     = libvlc_Playing,
>      [PAUSE_S]       = libvlc_Paused,
> -    [STOP_S]        = libvlc_Stopped,
>      [END_S]         = libvlc_Ended,
>      [ERROR_S]       = libvlc_Error,
>  };
> @@ -161,10 +160,6 @@ input_state_changed( const vlc_event_t * event, void * p_userdata )
>              libvlc_media_set_state( p_mi->p_md, libvlc_Paused, NULL);
>              forwarded_event.type = libvlc_MediaPlayerPaused;
>              break;
> -        case STOP_S:
> -            libvlc_media_set_state( p_mi->p_md, libvlc_Stopped, NULL);
> -            forwarded_event.type = libvlc_MediaPlayerStopped;
> -            break;
>          case END_S:
>              libvlc_media_set_state( p_mi->p_md, libvlc_Ended, NULL);
>              forwarded_event.type = libvlc_MediaPlayerEndReached;
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
> 




More information about the vlc-devel mailing list