]> git.sesse.net Git - vlc/commitdiff
* OSX compiles again (BEWARE it is still SEVERELY broken)
authorDerk-Jan Hartman <hartman@videolan.org>
Wed, 23 Jun 2004 10:29:30 +0000 (10:29 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Wed, 23 Jun 2004 10:29:30 +0000 (10:29 +0000)
modules/gui/macosx/controls.m
modules/gui/macosx/intf.m

index 5f12f1066129cd5e0934926bbdc5cbf18b7b69b7..b355a432948e1d9373f6afcb831ff3e38409e9c6 100644 (file)
     [o_volumeslider setFloatValue: (float)(i_volume / AOUT_VOLUME_STEP)];
 
     vout_OSDMessage( p_intf, DEFAULT_CHAN, "Vol %d%%", 
-                    i_volume*100/AOUT_VOLUME_MAX );
+                    i_volume*200/AOUT_VOLUME_MAX );
 }
 
 - (IBAction)windowAction:(id)sender
     {
         if( p_playlist != NULL && p_input != NULL )
         {
-            vlc_mutex_lock( &p_input->stream.stream_lock );
-            bEnabled = p_input->stream.b_pace_control;
-            vlc_mutex_unlock( &p_input->stream.stream_lock );
+            bEnabled = p_input->input.b_can_pace_control;
         }
         else
         {
         else
         {
             bEnabled = p_playlist->i_size > 1;
-
-            if( p_input != NULL )
-            {
-                vlc_mutex_lock( &p_input->stream.stream_lock );
-                bEnabled |= p_input->stream.i_area_nb > 1;
-                vlc_mutex_unlock( &p_input->stream.stream_lock );
-            }
         }
     }
     else if( [[o_mi title] isEqualToString: _NS("Random")] )
     {
         if( p_playlist != NULL && p_input != NULL )
         {
-            vlc_mutex_lock( &p_input->stream.stream_lock );
-            bEnabled = p_input->stream.b_seekable;
-            vlc_mutex_unlock( &p_input->stream.stream_lock );
+            bEnabled = TRUE; /* FIXME p_input seekable */
         }
         else
         {
index ce741394cafe502d274042a3d4a3466d820586a8..8a1f567abf14c1e665209186cdf6d041d9a07519 100644 (file)
@@ -84,9 +84,9 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
 void E_(CloseIntf) ( vlc_object_t *p_this )
 {
     intf_thread_t *p_intf = (intf_thread_t*) p_this;
-
+    
     msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
-
+    
     [p_intf->p_sys->o_sendport release];
     [p_intf->p_sys->o_pool release];
 
@@ -728,14 +728,10 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
                     vlc_value_t val;
 
                     /* New input or stream map change */
-                    if( p_input->stream.b_changed )
-                    {
                         msg_Dbg( p_intf, "stream has changed, refreshing interface" );
                         p_intf->p_sys->b_playing = TRUE;
                         p_intf->p_sys->b_current_title_update = 1;
-                        p_input->stream.b_changed = 0;
                         p_intf->p_sys->b_intf_update = TRUE;
-                    }
 
                     if( var_Get( (vlc_object_t *)p_input, "intf-change", &val )
                         >= 0 && val.b_bool )
@@ -845,18 +841,14 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
 
         if( ( b_input = ( p_input != NULL ) ) )
         {
-            vlc_mutex_lock( &p_input->stream.stream_lock );
-
             /* seekable streams */
-            b_seekable = p_input->stream.b_seekable;
+            b_seekable = (BOOL)f_slider_old;
 
             /* check wether slow/fast motion is possible*/
-            b_control = p_input->stream.b_pace_control; 
+            b_control = p_input->input.b_can_pace_control; 
 
             /* chapters & titles */
-            b_chapters = p_input->stream.i_area_nb > 1; 
-            vlc_mutex_unlock( &p_input->stream.stream_lock );
+            //b_chapters = p_input->stream.i_area_nb > 1; 
         }
 
         [o_btn_stop setEnabled: b_input];
@@ -899,7 +891,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
         NSString * o_time;
         mtime_t i_seconds;
 
-        if( p_input->stream.b_seekable )
+        if( (BOOL)f_slider_old )
         {
             vlc_value_t pos;
             float f_updated;
@@ -1177,7 +1169,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
         mtime_t i_seconds;
         NSString * o_time;
 
-        if( p_input->stream.b_seekable )
+        if( (BOOL)f_slider_old )
         {
                 vlc_value_t pos;
                 pos.f_float = f_updated / 10000.;
@@ -1216,7 +1208,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
     }
 
     /* FIXME - Wait here until all vouts are terminated because
-       libvlc's VLC_Stop destroys interfaces before vouts, which isn't
+       libvlc's VLC_CleanUp destroys interfaces before vouts, which isn't
        good on OS X. We definitly need a cleaner way to handle this,
        but this may hopefully be good enough for now.
          -- titer 2003/11/22 */
@@ -1265,8 +1257,8 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
         o_msg_lock = nil;
     }
 
-    [NSApp terminate: nil];
     [NSApp stop: nil];
+    [NSApp terminate: nil];
 
     /* write cached user defaults to disk */
     [[NSUserDefaults standardUserDefaults] synchronize];