]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/controls.m
Applies part of patch from Tom Maguire. Adds controls for 1min/5min forward / backwar...
[vlc] / modules / gui / macosx / controls.m
index 6ab7a8fc9d45d490dbbd0770941af6524ed3fc6a..72efa55505f08d669de0b73e4b8940a97922d024 100644 (file)
         vlc_value_t time;
         time.i_time = 10 * 1000000;
         var_Set( p_input, "time-offset", time );
+        vout_OSDMessage( p_intf, _( "Jump +10 Seconds" ) );
+        vlc_object_release( p_input );
+    }
+}
+
+- (IBAction)forward1Min:(id)sender
+{
+    intf_thread_t * p_intf = [NSApp getIntf];
+    input_thread_t * p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT,
+                                                       FIND_ANYWHERE );
+    if( p_input != NULL )
+    {
+        vlc_value_t time;
+        time.i_time = 60 * 1000000;
+        var_Set( p_input, "time-offset", time );
+        vout_OSDMessage( p_intf, _( "Jump +1 Minute" ) );
+        vlc_object_release( p_input );
+    }
+}
+
+- (IBAction)forward5Min:(id)sender
+{
+    intf_thread_t * p_intf = [NSApp getIntf];
+    input_thread_t * p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT,
+                                                       FIND_ANYWHERE );
+    if( p_input != NULL )
+    {
+        vlc_value_t time;
+        time.i_time = 300 * 1000000;
+        var_Set( p_input, "time-offset", time );
+        vout_OSDMessage( p_intf, _( "Jump +5 Minutes" ) );
         vlc_object_release( p_input );
     }
 }
         vlc_value_t time;
         time.i_time = -10 * 1000000;
         var_Set( p_input, "time-offset", time );
+        vout_OSDMessage( p_intf, _( "Jump -10 Seconds" ) );
+        vlc_object_release( p_input );
+    }
+}
+
+- (IBAction)backward1Min:(id)sender
+{
+    intf_thread_t * p_intf = [NSApp getIntf];
+    input_thread_t * p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT,
+                                                       FIND_ANYWHERE );
+    if( p_input != NULL )
+    {
+        vlc_value_t time;
+        time.i_time = -60 * 1000000;
+        var_Set( p_input, "time-offset", time );
+        vout_OSDMessage( p_intf, _( "Jump -1 Minute" ) );
+        vlc_object_release( p_input );
+    }
+}
+
+- (IBAction)backward5Min:(id)sender
+{
+    intf_thread_t * p_intf = [NSApp getIntf];
+    input_thread_t * p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT,
+                                                       FIND_ANYWHERE );
+    if( p_input != NULL )
+    {
+        vlc_value_t time;
+        time.i_time = -300 * 1000000;
+        var_Set( p_input, "time-offset", time );
+        vout_OSDMessage( p_intf, _( "Jump -5 Minutes" ) );
         vlc_object_release( p_input );
     }
 }