]> git.sesse.net Git - vlc/commitdiff
use PL_**LOCK instead of vlc_mutex_lock
authorFelix Paul Kühne <fkuehne@videolan.org>
Tue, 6 May 2008 15:52:06 +0000 (17:52 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Tue, 6 May 2008 15:52:06 +0000 (17:52 +0200)
modules/gui/macosx/playlist.m

index 69cebaaf33fc6c3f5bf05a4f249609546aafd70e..762e8d929cd063b5e17eff827697abdfc3e396f9 100644 (file)
     if ( p_temp_item )
     {
         int i;
-        vlc_mutex_lock( &p_playlist->object_lock );
+        PL_LOCK;
 
         if( b_check )
         {
                 else if ( i == p_playlist->all_items.i_size - 1 )
                 {
                     vlc_object_release( p_playlist );
-                    vlc_mutex_unlock( &p_playlist->object_lock );
+                    PL_UNLOCK;
                     return NO;
                 }
             }
             p_temp_item = p_temp_item->p_parent;
             if( p_temp_item == p_node )
             {
-                 vlc_mutex_unlock( &p_playlist->object_lock );
-                 vlc_object_release( p_playlist );
-                 return YES;
+                PL_UNLOCK;
+                vlc_object_release( p_playlist );
+                return YES;
             }
         }
-        vlc_mutex_unlock( &p_playlist->object_lock );
+        PL_UNLOCK;
     }
 
     vlc_object_release( p_playlist );
 
     if( p_item->i_children > -1 ) // the item is a node
     {
-        vlc_mutex_lock( &p_playlist->object_lock );
+        PL_LOCK;
         playlist_RecursiveNodeSort( p_playlist, p_item, i_mode, ORDER_NORMAL );
-        vlc_mutex_unlock( &p_playlist->object_lock );
+        PL_UNLOCK;
     }
     else
     {
-        vlc_mutex_lock( &p_playlist->object_lock );
+        PL_LOCK;
         playlist_RecursiveNodeSort( p_playlist,
                 p_item->p_parent, i_mode, ORDER_NORMAL );
-        vlc_mutex_unlock( &p_playlist->object_lock );
+        PL_UNLOCK;
     }
     vlc_object_release( p_playlist );
     [self playlistUpdated];
         char *psz_temp;
         NSString *o_current_name, *o_current_author;
 
-        vlc_mutex_lock( &p_playlist->object_lock );
+        PL_LOCK;
         o_current_name = [NSString stringWithUTF8String:
             p_item->pp_children[i_current]->p_input->psz_name];
         psz_temp = input_ItemGetInfo( p_item->p_input ,
                    _("Meta-information"),_("Artist") );
         o_current_author = [NSString stringWithUTF8String: psz_temp];
         free( psz_temp);
-        vlc_mutex_unlock( &p_playlist->object_lock );
+        PL_UNLOCK;
 
         if( p_selected_item == p_item->pp_children[i_current] &&
                     b_selected_item_met == NO )
                 }
             }
 
-            vlc_mutex_lock( &p_playlist->object_lock );
-            // Acually detach the item from the old position
+            PL_LOCK;
+            // Actually detach the item from the old position
             if( playlist_NodeRemoveItem( p_playlist, p_item, p_old_parent ) ==
                 VLC_SUCCESS )
             {
                 // Reattach the item to the new position
                 playlist_NodeInsert( p_playlist, p_item, p_new_parent, i_new_index );
             }
-            vlc_mutex_unlock( &p_playlist->object_lock );
+            PL_UNLOCK;
         }
         [self playlistUpdated];
         i_row = [o_outline_view rowForItem:[o_outline_dict