[vlc-devel] commit: Remove FORWARD_S and BACKWARD_S from input state. (Jean-Paul Saman )

git version control git at videolan.org
Thu Nov 20 16:18:26 CET 2008


vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Thu Nov 20 14:33:37 2008 +0100| [57dda7ffd68f3d4052ea403d9536eb8f817ac30b] | committer: Jean-Paul Saman 

Remove FORWARD_S and BACKWARD_S from input state.

The input core does separate playing states for forward or backward direction from the playing state PLAYING_S. If one wants to know in what direction VLC is playing, then he needs to look at the sign value of the "rate" value. Backward playing direction has a negative "rate" value. Forward playing direction has a positive one.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=57dda7ffd68f3d4052ea403d9536eb8f817ac30b
---

 bindings/python/vlc_module.c          |    4 ----
 include/vlc/libvlc.h                  |    2 +-
 include/vlc/libvlc_structures.h       |    4 +---
 include/vlc/mediacontrol_structures.h |    1 -
 include/vlc_input.h                   |    2 --
 modules/control/rc.c                  |    2 --
 src/control/media_player.c            |   10 ----------
 7 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/bindings/python/vlc_module.c b/bindings/python/vlc_module.c
index 418e297..7a90a4b 100644
--- a/bindings/python/vlc_module.c
+++ b/bindings/python/vlc_module.c
@@ -150,10 +150,6 @@ initvlc( void )
                              mediacontrol_PlayingStatus );
     PyModule_AddIntConstant( p_module, "PauseStatus",
                              mediacontrol_PauseStatus );
-    PyModule_AddIntConstant( p_module, "ForwardStatus",
-                             mediacontrol_ForwardStatus );
-    PyModule_AddIntConstant( p_module, "BackwardStatus",
-                             mediacontrol_BackwardStatus );
     PyModule_AddIntConstant( p_module, "InitStatus",
                              mediacontrol_InitStatus );
     PyModule_AddIntConstant( p_module, "EndStatus",
diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h
index 80a3870..df79fb2 100644
--- a/include/vlc/libvlc.h
+++ b/include/vlc/libvlc.h
@@ -322,7 +322,7 @@ VLC_PUBLIC_API char * libvlc_media_get_meta(
  * Get current state of media descriptor object. Possible media states
  * are defined in libvlc_structures.c ( libvlc_NothingSpecial=0,
  * libvlc_Opening, libvlc_Buffering, libvlc_Playing, libvlc_Paused,
- * libvlc_Stopped, libvlc_Forward, libvlc_Backward, libvlc_Ended,
+ * libvlc_Stopped, libvlc_Ended,
  * libvlc_Error).
  *
  * @see libvlc_state_t
diff --git a/include/vlc/libvlc_structures.h b/include/vlc/libvlc_structures.h
index 867712f..a1b0a7e 100644
--- a/include/vlc/libvlc_structures.h
+++ b/include/vlc/libvlc_structures.h
@@ -130,7 +130,7 @@ typedef struct libvlc_media_player_t libvlc_media_player_t;
  *
  * Expected states by web plugins are:
  * IDLE/CLOSE=0, OPENING=1, BUFFERING=2, PLAYING=3, PAUSED=4,
- * STOPPING=5, FORWARD=6, BACKWARD=7, ENDED=8, ERROR=9
+ * STOPPING=5, ENDED=6, ERROR=7
  */
 typedef enum libvlc_state_t
 {
@@ -140,8 +140,6 @@ typedef enum libvlc_state_t
     libvlc_Playing,
     libvlc_Paused,
     libvlc_Stopped,
-    libvlc_Forward,
-    libvlc_Backward,
     libvlc_Ended,
     libvlc_Error
 } libvlc_state_t;
diff --git a/include/vlc/mediacontrol_structures.h b/include/vlc/mediacontrol_structures.h
index 30dea59..6a37482 100644
--- a/include/vlc/mediacontrol_structures.h
+++ b/include/vlc/mediacontrol_structures.h
@@ -75,7 +75,6 @@ typedef enum {
     mediacontrol_UndefinedStatus=0, mediacontrol_InitStatus,
     mediacontrol_BufferingStatus, mediacontrol_PlayingStatus,
     mediacontrol_PauseStatus,     mediacontrol_StopStatus,
-    mediacontrol_ForwardStatus,   mediacontrol_BackwardStatus,
     mediacontrol_EndStatus,       mediacontrol_ErrorStatus,
 } mediacontrol_PlayerStatus;
 
diff --git a/include/vlc_input.h b/include/vlc_input.h
index bb2a263..484dac6 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -398,8 +398,6 @@ typedef enum input_state_e
     PLAYING_S,
     PAUSE_S,
     STOP_S,
-    FORWARD_S,
-    BACKWARD_S,
     END_S,
     ERROR_S,
 } input_state_e;
diff --git a/modules/control/rc.c b/modules/control/rc.c
index cb6d0cf..7a57396 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -75,8 +75,6 @@ static const char *ppsz_input_state[] = {
     N_("Play"),
     N_("Pause"),
     N_("Stop"),
-    N_("Forward"),
-    N_("Backward"),
     N_("End"),
     N_("Error"),
 };
diff --git a/src/control/media_player.c b/src/control/media_player.c
index cea3d12..837949e 100644
--- a/src/control/media_player.c
+++ b/src/control/media_player.c
@@ -57,8 +57,6 @@ static const libvlc_state_t vlc_to_libvlc_state_array[] =
     [PLAYING_S]     = libvlc_Playing,
     [PAUSE_S]       = libvlc_Paused,
     [STOP_S]        = libvlc_Stopped,
-    [FORWARD_S]     = libvlc_Forward,
-    [BACKWARD_S]    = libvlc_Backward,
     [END_S]         = libvlc_Ended,
     [ERROR_S]       = libvlc_Error,
 };
@@ -172,14 +170,6 @@ input_state_changed( const vlc_event_t * event, void * p_userdata )
             libvlc_media_set_state( p_mi->p_md, libvlc_Stopped, NULL);
             forwarded_event.type = libvlc_MediaPlayerStopped;
             break;
-        case FORWARD_S:
-            libvlc_media_set_state( p_mi->p_md, libvlc_Forward, NULL);
-            forwarded_event.type = libvlc_MediaPlayerForward;
-            break;
-        case BACKWARD_S:
-            libvlc_media_set_state( p_mi->p_md, libvlc_Backward, NULL);
-            forwarded_event.type = libvlc_MediaPlayerBackward;
-            break;
         case END_S:
             libvlc_media_set_state( p_mi->p_md, libvlc_Ended, NULL);
             forwarded_event.type = libvlc_MediaPlayerEndReached;




More information about the vlc-devel mailing list