]> git.sesse.net Git - vlc/blobdiff - modules/control/hotkeys.c
Remove most stray semi-colons in module descriptions
[vlc] / modules / control / hotkeys.c
index fd0e99f07a1ebc77c441d79714637436a537e34d..73b0e718279d798ef51c418f7c7316d5239d8e90 100644 (file)
@@ -95,12 +95,12 @@ static void ClearChannels  ( intf_thread_t *, vout_thread_t * );
 #define BOOKMARK10_TEXT   N_("Playlist bookmark 10")
 #define BOOKMARK_LONGTEXT N_("Define playlist bookmarks.")
 
-vlc_module_begin();
-    set_shortname( N_("Hotkeys") );
-    set_description( N_("Hotkeys management interface") );
-    set_capability( "interface", 0 );
-    set_callbacks( Open, Close );
-vlc_module_end();
+vlc_module_begin ()
+    set_shortname( N_("Hotkeys") )
+    set_description( N_("Hotkeys management interface") )
+    set_capability( "interface", 0 )
+    set_callbacks( Open, Close )
+vlc_module_end ()
 
 /*****************************************************************************
  * Open: initialize interface
@@ -149,7 +149,7 @@ static void Run( intf_thread_t *p_intf )
     vout_thread_t *p_vout = NULL;
     vlc_value_t val;
     int i;
-    playlist_t *p_playlist = pl_Yield( p_intf );
+    playlist_t *p_playlist = pl_Hold( p_intf );
     int canc = vlc_savecancel();
 
     vlc_cleanup_push( __pl_Release, p_intf );
@@ -174,11 +174,7 @@ static void Run( intf_thread_t *p_intf )
         canc = vlc_savecancel();
 
         /* Update the input */
-        PL_LOCK;
-        p_input = p_playlist->p_input;
-        if( p_input )
-            vlc_object_yield( p_input );
-        PL_UNLOCK;
+        p_input = playlist_CurrentInput( p_playlist );
 
         /* Update the vout */
         p_last_vout = p_vout;
@@ -197,8 +193,7 @@ static void Run( intf_thread_t *p_intf )
         /* Quit */
         if( i_action == ACTIONID_QUIT )
         {
-            if( p_playlist )
-                playlist_Stop( p_playlist );
+            playlist_Stop( p_playlist );
             vlc_object_kill( p_intf->p_libvlc );
             vlc_object_kill( p_intf );
             ClearChannels( p_intf, p_vout );
@@ -704,6 +699,12 @@ static void Run( intf_thread_t *p_intf )
             {
                 playlist_Stop( p_playlist );
             }
+            else if( i_action == ACTIONID_FRAME_NEXT )
+            {
+                var_SetVoid( p_input, "frame-next" );
+                vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
+                                 _("Next frame") );
+            }
             else if( i_action == ACTIONID_FASTER )
             {
                 var_SetVoid( p_input, "rate-faster" );
@@ -947,7 +948,7 @@ static void PlayBookmark( intf_thread_t *p_intf, int i_num )
 {
     vlc_value_t val;
     char psz_bookmark_name[11];
-    playlist_t *p_playlist = pl_Yield( p_intf );
+    playlist_t *p_playlist = pl_Hold( p_intf );
 
     sprintf( psz_bookmark_name, "bookmark%i", i_num );
     var_Create( p_intf, psz_bookmark_name, VLC_VAR_STRING|VLC_VAR_DOINHERIT );
@@ -973,14 +974,15 @@ static void PlayBookmark( intf_thread_t *p_intf, int i_num )
 
 static void SetBookmark( intf_thread_t *p_intf, int i_num )
 {
-    playlist_t *p_playlist = pl_Yield( p_intf );
+    playlist_t *p_playlist = pl_Hold( p_intf );
     char psz_bookmark_name[11];
     sprintf( psz_bookmark_name, "bookmark%i", i_num );
     var_Create( p_intf, psz_bookmark_name,
                 VLC_VAR_STRING|VLC_VAR_DOINHERIT );
-    if( p_playlist->status.p_item )
+    playlist_item_t * p_item = playlist_CurrentPlayingItem( p_playlist );
+    if( p_item )
     {
-        char *psz_uri = input_item_GetURI( p_playlist->status.p_item->p_input );
+        char *psz_uri = input_item_GetURI( p_item->p_input );
         config_PutPsz( p_intf, psz_bookmark_name, psz_uri);
         msg_Info( p_intf, "setting playlist bookmark %i to %s", i_num, psz_uri);
         free( psz_uri );