Changeset 494ace96d068ee8e4b6b689da0ae469c0c0e4fe3
- Timestamp:
- 07/21/08 09:56:10
(2 months ago)
- Author:
- Rémi Duraffort <ivoire@videolan.org>
- git-committer:
- Rémi Duraffort <ivoire@videolan.org> 1216626970 +0200
- git-parent:
[a518149f3478fc8bc984b114a1821d0fd83cecab]
- git-author:
- Rémi Duraffort <ivoire@videolan.org> 1216625856 +0200
- Message:
Use pl_Locked and pl_Unlocked
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r23613e6 |
r494ace9 |
|
| 202 | 202 | p_item = p_playlist->status.p_item; |
|---|
| 203 | 203 | else |
|---|
| 204 | | p_item = playlist_ItemGetByInput( p_playlist, p_current, false ); |
|---|
| | 204 | p_item = playlist_ItemGetByInput( p_playlist, p_current, pl_Unlocked ); |
|---|
| 205 | 205 | |
|---|
| 206 | 206 | if( p_item ) |
|---|
| … | … | |
| 421 | 421 | } |
|---|
| 422 | 422 | |
|---|
| 423 | | p_item_in_category = playlist_ItemToNode( p_playlist, p_parent, false ); |
|---|
| | 423 | p_item_in_category = playlist_ItemToNode( p_playlist, p_parent, pl_Unlocked ); |
|---|
| 424 | 424 | playlist_ItemSetName( p_parent, "Audio CD" ); |
|---|
| 425 | 425 | var_SetInteger( p_playlist, "item-change", p_parent->p_input->i_id ); |
|---|
| … | … | |
| 496 | 496 | p_item_in_category, |
|---|
| 497 | 497 | PLAYLIST_APPEND, PLAYLIST_END, NULL, NULL, |
|---|
| 498 | | false ); |
|---|
| | 498 | pl_Unlocked ); |
|---|
| 499 | 499 | vlc_gc_decref( p_input_item ); |
|---|
| 500 | 500 | free( psz_uri ); free( psz_opt ); free( psz_name ); |
|---|
| ree7537e |
r494ace9 |
|
| 883 | 883 | if( p_input ) |
|---|
| 884 | 884 | { |
|---|
| 885 | | p_item = playlist_ItemGetByInput( p_playlist, input_GetItem(p_input), false ); |
|---|
| | 885 | p_item = playlist_ItemGetByInput( p_playlist, input_GetItem(p_input), pl_Unlocked ); |
|---|
| 886 | 886 | |
|---|
| 887 | 887 | if( p_item == p_playlist->status.p_item && !b_single_track ) |
|---|
| … | … | |
| 925 | 925 | |
|---|
| 926 | 926 | if( !p_cdda->b_nav_mode ) |
|---|
| 927 | | playlist_ItemToNode( p_playlist, p_item, false ); |
|---|
| | 927 | playlist_ItemToNode( p_playlist, p_item, pl_Unlocked ); |
|---|
| 928 | 928 | |
|---|
| 929 | 929 | for( i = 0 ; i < p_cdda->i_tracks ; i++ ) |
|---|
| r8d82c48 |
r494ace9 |
|
| 221 | 221 | |
|---|
| 222 | 222 | p_current_input = input_GetItem( p_input ); |
|---|
| 223 | | p_current = playlist_ItemGetByInput( p_playlist, p_current_input, false ); |
|---|
| | 223 | p_current = playlist_ItemGetByInput( p_playlist, p_current_input, pl_Unlocked ); |
|---|
| 224 | 224 | |
|---|
| 225 | 225 | if( !p_current ) |
|---|
| … | … | |
| 255 | 255 | p_current->p_input->i_type = ITEM_TYPE_DIRECTORY; |
|---|
| 256 | 256 | p_item_in_category = playlist_ItemToNode( p_playlist, p_current, |
|---|
| 257 | | false ); |
|---|
| | 257 | pl_Unlocked ); |
|---|
| 258 | 258 | |
|---|
| 259 | 259 | ReadDir( p_access, p_playlist, psz_name, i_mode, |
|---|
| … | … | |
| 541 | 541 | PLAYLIST_NO_REBUILD, |
|---|
| 542 | 542 | PLAYLIST_END, NULL, NULL, |
|---|
| 543 | | false ); |
|---|
| | 543 | pl_Unlocked ); |
|---|
| 544 | 544 | vlc_gc_decref( p_input ); |
|---|
| 545 | 545 | if( i_ret != VLC_SUCCESS ) |
|---|
| ra518149 |
r494ace9 |
|
| 878 | 878 | playlist_add_t *p_add = newval.p_address; |
|---|
| 879 | 879 | playlist_item_t *p_item; |
|---|
| 880 | | p_item = playlist_ItemGetById( p_playlist, p_add->i_node, false ); |
|---|
| | 880 | p_item = playlist_ItemGetById( p_playlist, p_add->i_node, pl_Unlocked ); |
|---|
| 881 | 881 | assert( p_item ); |
|---|
| 882 | 882 | while( p_item->p_parent ) |
|---|
| ra518149 |
r494ace9 |
|
| 1300 | 1300 | { |
|---|
| 1301 | 1301 | /* play the first item and add the others afterwards */ |
|---|
| 1302 | | playlist_item_t *p_item = playlist_ItemGetByInput( p_playlist, p_input, true ); |
|---|
| | 1302 | playlist_item_t *p_item = playlist_ItemGetByInput( p_playlist, p_input, pl_Locked ); |
|---|
| 1303 | 1303 | playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true, NULL, |
|---|
| 1304 | 1304 | p_item ); |
|---|
| r7e413aa |
r494ace9 |
|
| 139 | 139 | (mtime_t) 0, |
|---|
| 140 | 140 | (const char **) ppsz_options, i_pos, |
|---|
| 141 | | true, false ); |
|---|
| | 141 | true, pl_Unlocked ); |
|---|
| 142 | 142 | } |
|---|
| 143 | 143 | |
|---|
| … | … | |
| 166 | 166 | for( i_dummy = 0; i_dummy < playlist_CurrentSize(p_playlist) ; i_dummy++ ) |
|---|
| 167 | 167 | { |
|---|
| 168 | | playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_dummy, true ); |
|---|
| | 168 | playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_dummy, pl_Locked ); |
|---|
| 169 | 169 | if( p_item ) |
|---|
| 170 | 170 | { |
|---|
| ra518149 |
r494ace9 |
|
| 169 | 169 | playlist_item_t *p_target = |
|---|
| 170 | 170 | playlist_ItemGetById( p_playlist, targetItem->i_id, |
|---|
| 171 | | true ); |
|---|
| | 171 | pl_Locked ); |
|---|
| 172 | 172 | playlist_item_t *p_src = playlist_ItemGetById( p_playlist, srcId, |
|---|
| 173 | | true ); |
|---|
| | 173 | pl_Locked ); |
|---|
| 174 | 174 | |
|---|
| 175 | 175 | if( !p_target || !p_src ) |
|---|
| … | … | |
| 184 | 184 | playlist_item_t *p_parent = |
|---|
| 185 | 185 | playlist_ItemGetById( p_playlist, parentItem->i_id, |
|---|
| 186 | | true ); |
|---|
| | 186 | pl_Locked ); |
|---|
| 187 | 187 | if( !p_parent ) |
|---|
| 188 | 188 | { |
|---|
| … | … | |
| 261 | 261 | PL_LOCK; |
|---|
| 262 | 262 | playlist_item_t *p_item = playlist_ItemGetById( p_playlist, item->i_id, |
|---|
| 263 | | true); |
|---|
| | 263 | pl_Locked ); |
|---|
| 264 | 264 | activateItem( p_item ); |
|---|
| 265 | 265 | PL_UNLOCK; |
|---|
| … | … | |
| 549 | 549 | if( !nodeItem ) goto end; |
|---|
| 550 | 550 | |
|---|
| 551 | | p_item = playlist_ItemGetById( p_playlist, p_add->i_item, true ); |
|---|
| | 551 | p_item = playlist_ItemGetById( p_playlist, p_add->i_item, pl_Locked ); |
|---|
| 552 | 552 | if( !p_item || p_item->i_flags & PLAYLIST_DBL_FLAG ) goto end; |
|---|
| 553 | 553 | if( i_depth == DEPTH_SEL && p_item->p_parent && |
|---|
| … | … | |
| 618 | 618 | { |
|---|
| 619 | 619 | playlist_item_t *p_node = playlist_ItemGetById( p_playlist, root->i_id, |
|---|
| 620 | | true ); |
|---|
| | 620 | pl_Locked ); |
|---|
| 621 | 621 | UpdateNodeChildren( p_node, root ); |
|---|
| 622 | 622 | } |
|---|
| … | … | |
| 640 | 640 | { |
|---|
| 641 | 641 | playlist_item_t *p_item = playlist_ItemGetById( p_playlist, item->i_id, |
|---|
| 642 | | true ); |
|---|
| | 642 | pl_Locked ); |
|---|
| 643 | 643 | UpdateTreeItem( p_item, item, signal, force ); |
|---|
| 644 | 644 | } |
|---|
| … | … | |
| 700 | 700 | PL_LOCK; |
|---|
| 701 | 701 | playlist_item_t *p_item = playlist_ItemGetById( p_playlist, item->i_id, |
|---|
| 702 | | true ); |
|---|
| | 702 | pl_Locked ); |
|---|
| 703 | 703 | if( !p_item ) |
|---|
| 704 | 704 | { |
|---|
| … | … | |
| 757 | 757 | playlist_item_t *p_root = playlist_ItemGetById( p_playlist, |
|---|
| 758 | 758 | rootItem->i_id, |
|---|
| 759 | | true ); |
|---|
| | 759 | pl_Locked ); |
|---|
| 760 | 760 | if( p_root ) |
|---|
| 761 | 761 | { |
|---|
| … | … | |
| 778 | 778 | playlist_item_t *p_root = playlist_ItemGetById( p_playlist, |
|---|
| 779 | 779 | rootItem->i_id, |
|---|
| 780 | | true ); |
|---|
| | 780 | pl_Locked ); |
|---|
| 781 | 781 | assert( p_root ); |
|---|
| 782 | 782 | char *psz_name = search_text.toUtf8().data(); |
|---|
| … | … | |
| 793 | 793 | PL_LOCK; |
|---|
| 794 | 794 | playlist_item_t *p_item = playlist_ItemGetById( p_playlist, |
|---|
| 795 | | itemId( index ), true ); |
|---|
| | 795 | itemId( index ), pl_Locked ); |
|---|
| 796 | 796 | if( p_item ) |
|---|
| 797 | 797 | { |
|---|
| … | … | |
| 871 | 871 | { |
|---|
| 872 | 872 | playlist_item_t *p_item = playlist_ItemGetById( p_playlist, |
|---|
| 873 | | i_popup_item,true ); |
|---|
| | 873 | i_popup_item, |
|---|
| | 874 | pl_Locked ); |
|---|
| 874 | 875 | activateItem( p_item ); |
|---|
| 875 | 876 | } |
|---|
| … | … | |
| 881 | 882 | playlist_item_t *p_item = playlist_ItemGetById( p_playlist, |
|---|
| 882 | 883 | i_popup_item, |
|---|
| 883 | | false ); |
|---|
| | 884 | pl_Unlocked ); |
|---|
| 884 | 885 | if( p_item ) |
|---|
| 885 | 886 | { |
|---|
| r99f299c |
r494ace9 |
|
| 318 | 318 | QPL_LOCK; |
|---|
| 319 | 319 | playlist_item_t *p_item = playlist_ItemGetById( THEPL, i_root_id, |
|---|
| 320 | | true ); |
|---|
| | 320 | pl_Locked ); |
|---|
| 321 | 321 | assert( p_item ); |
|---|
| 322 | 322 | p_item = playlist_GetPreferredNode( THEPL, p_item ); |
|---|
| ra518149 |
r494ace9 |
|
| 448 | 448 | playlist_AddExt( THEPL, qtu( mrl ), "Streaming", |
|---|
| 449 | 449 | PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, |
|---|
| 450 | | -1, &psz_option, 1, true, false ); |
|---|
| | 450 | -1, &psz_option, 1, true, pl_Unlocked ); |
|---|
| 451 | 451 | } |
|---|
| 452 | 452 | } |
|---|
| ra518149 |
r494ace9 |
|
| 176 | 176 | { |
|---|
| 177 | 177 | playlist_item_t *p_item = playlist_ItemGetById( |
|---|
| 178 | | m_pPlaylist, p_add->i_item, false ); |
|---|
| | 178 | m_pPlaylist, p_add->i_item, pl_Unlocked ); |
|---|
| 179 | 179 | if( !p_item ) return; |
|---|
| 180 | 180 | UString *pName = new UString( getIntf(), |
|---|
| r00b9584 |
r494ace9 |
|
| 882 | 882 | playlist_BothAddInput( p_playlist, p_input, parentNode, |
|---|
| 883 | 883 | PLAYLIST_APPEND, PLAYLIST_END, &i_cat, NULL, |
|---|
| 884 | | false ); |
|---|
| | 884 | pl_Unlocked ); |
|---|
| 885 | 885 | vlc_gc_decref( p_input ); |
|---|
| 886 | 886 | /* TODO: do this better by storing ids */ |
|---|
| ree7537e |
r494ace9 |
|
| 173 | 173 | return playlist_AddExt( PL, psz_uri, psz_name, |
|---|
| 174 | 174 | PLAYLIST_INSERT, PLAYLIST_END, -1, ppsz_options, |
|---|
| 175 | | i_options, 1, false ); |
|---|
| | 175 | i_options, 1, pl_Unlocked ); |
|---|
| 176 | 176 | } |
|---|
| 177 | 177 | |
|---|
| r8134316 |
r494ace9 |
|
| 963 | 963 | playlist_t *p_playlist = pl_Yield( p_libvlc ); |
|---|
| 964 | 964 | playlist_AddExt( p_playlist, val.psz_string, NULL, PLAYLIST_INSERT, 0, |
|---|
| 965 | | -1, NULL, 0, true, false ); |
|---|
| | 965 | -1, NULL, 0, true, pl_Unlocked ); |
|---|
| 966 | 966 | pl_Release( p_libvlc ); |
|---|
| 967 | 967 | } |
|---|
| … | … | |
| 1296 | 1296 | playlist_AddExt( p_playlist, ppsz_argv[i_opt], NULL, PLAYLIST_INSERT, |
|---|
| 1297 | 1297 | 0, -1, ( i_options ? &ppsz_argv[i_opt + 1] : NULL ), |
|---|
| 1298 | | i_options, true, false ); |
|---|
| | 1298 | i_options, true, pl_Unlocked ); |
|---|
| 1299 | 1299 | pl_Release( p_vlc ); |
|---|
| 1300 | 1300 | } |
|---|
| r1fe2080 |
r494ace9 |
|
| 337 | 337 | PLAYLIST_END, -1, |
|---|
| 338 | 338 | (char const **)( i_options ? &ppsz_argv[i_opt+1] : NULL ), |
|---|
| 339 | | i_options, true, false ); |
|---|
| | 339 | i_options, true, pl_Unlocked ); |
|---|
| 340 | 340 | |
|---|
| 341 | 341 | i_opt += i_options; |
|---|
| ree7537e |
r494ace9 |
|
| 88 | 88 | { |
|---|
| 89 | 89 | p_item_in_category = playlist_ItemToNode( p_playlist, |
|---|
| 90 | | p_item_in_category, true ); |
|---|
| | 90 | p_item_in_category, pl_Locked ); |
|---|
| 91 | 91 | p_item_in_category->p_input->i_type = ITEM_TYPE_PLAYLIST; |
|---|
| 92 | 92 | } |
|---|
| … | … | |
| 95 | 95 | p_item_in_category, |
|---|
| 96 | 96 | PLAYLIST_APPEND | PLAYLIST_SPREPARSE , PLAYLIST_END, |
|---|
| 97 | | NULL, NULL, true ); |
|---|
| | 97 | NULL, NULL, pl_Locked ); |
|---|
| 98 | 98 | |
|---|
| 99 | 99 | if( i_ret == VLC_SUCCESS && b_play ) |
|---|
| … | … | |
| 314 | 314 | { |
|---|
| 315 | 315 | playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_id, |
|---|
| 316 | | true ); |
|---|
| | 316 | pl_Locked ); |
|---|
| 317 | 317 | if( !p_item ) return VLC_EGENERIC; |
|---|
| 318 | 318 | return DeleteInner( p_playlist, p_item, true ); |
|---|