Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
c3550b59
Commit
c3550b59
authored
Dec 14, 2004
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better fix for wx deadlock with preparse
A few fixes
parent
b20da1c5
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
43 additions
and
12 deletions
+43
-12
include/vlc_playlist.h
include/vlc_playlist.h
+2
-1
modules/access/directory.c
modules/access/directory.c
+1
-1
modules/gui/wxwindows/playlist.cpp
modules/gui/wxwindows/playlist.cpp
+8
-5
modules/gui/wxwindows/wxwindows.h
modules/gui/wxwindows/wxwindows.h
+2
-0
src/input/input.c
src/input/input.c
+1
-0
src/playlist/item-ext.c
src/playlist/item-ext.c
+5
-0
src/playlist/playlist.c
src/playlist/playlist.c
+6
-3
src/playlist/view.c
src/playlist/view.c
+18
-2
No files found.
include/vlc_playlist.h
View file @
c3550b59
...
...
@@ -290,7 +290,6 @@ VLC_EXPORT( playlist_item_t *, playlist_ChildSearchName, (playlist_item_t*, cons
VLC_EXPORT
(
int
,
playlist_NodeDelete
,
(
playlist_t
*
,
playlist_item_t
*
,
vlc_bool_t
)
);
VLC_EXPORT
(
int
,
playlist_NodeEmpty
,
(
playlist_t
*
,
playlist_item_t
*
,
vlc_bool_t
)
);
/* Tree walking */
playlist_item_t
*
playlist_FindNextFromParent
(
playlist_t
*
p_playlist
,
int
i_view
,
...
...
@@ -395,6 +394,8 @@ static inline vlc_bool_t playlist_IsEmpty( playlist_t * p_playlist )
return
(
b_empty
);
}
/**
* @}
*/
modules/access/directory.c
View file @
c3550b59
...
...
@@ -401,7 +401,7 @@ static int ReadDir( playlist_t *p_playlist,
/* Change the item to a node */
if
(
p_parent
->
i_children
==
-
1
)
{
playlist_ItemToNode
(
p_playlist
,
p_parent
);
playlist_
Lock
ItemToNode
(
p_playlist
,
p_parent
);
}
/* get the first directory entry */
...
...
modules/gui/wxwindows/playlist.cpp
View file @
c3550b59
...
...
@@ -60,7 +60,6 @@ static int ItemAppended( vlc_object_t *p_this, const char *psz_variable,
static
int
ItemDeleted
(
vlc_object_t
*
p_this
,
const
char
*
psz_variable
,
vlc_value_t
oval
,
vlc_value_t
nval
,
void
*
param
);
/*****************************************************************************
* Event Table.
*****************************************************************************/
...
...
@@ -405,6 +404,7 @@ Playlist::~Playlist()
var_DelCallback
(
p_playlist
,
"item-change"
,
ItemChanged
,
this
);
var_DelCallback
(
p_playlist
,
"playlist-current"
,
PlaylistNext
,
this
);
var_DelCallback
(
p_playlist
,
"intf-change"
,
PlaylistChanged
,
this
);
var_DelCallback
(
p_playlist
,
"item-append"
,
ItemAppended
,
this
);
var_DelCallback
(
p_playlist
,
"item-deleted"
,
ItemDeleted
,
this
);
vlc_object_release
(
p_playlist
);
}
...
...
@@ -1476,13 +1476,17 @@ void Playlist::OnPopupPreparse( wxMenuEvent& event )
{
return
;
}
Preparse
(
p_playlist
);
vlc_object_release
(
p_playlist
);
}
void
Playlist
::
Preparse
(
playlist_t
*
p_playlist
)
{
if
(
p_popup_item
!=
NULL
)
{
if
(
p_popup_item
->
i_children
==
-
1
)
{
wxMutexGuiLeave
();
playlist_PreparseEnqueue
(
p_playlist
,
&
p_popup_item
->
input
);
wxMutexGuiEnter
();
}
else
{
...
...
@@ -1494,11 +1498,10 @@ void Playlist::OnPopupPreparse( wxMenuEvent& event )
i_popup_item
=
FindItem
(
treectrl
->
GetRootItem
(),
p_parent
->
pp_children
[
i
]
);
p_popup_item
=
p_parent
->
pp_children
[
i
];
OnPopupPreparse
(
dummy
);
Preparse
(
p_playlist
);
}
}
}
vlc_object_release
(
p_playlist
);
}
void
Playlist
::
OnPopupDel
(
wxMenuEvent
&
event
)
...
...
modules/gui/wxwindows/wxwindows.h
View file @
c3550b59
...
...
@@ -855,6 +855,8 @@ private:
void
OnPopupInfo
(
wxMenuEvent
&
event
);
void
Rebuild
();
void
Preparse
(
playlist_t
*
p_playlist
);
/* Update */
void
UpdateNode
(
playlist_t
*
,
playlist_item_t
*
,
wxTreeItemId
);
void
UpdateNodeChildren
(
playlist_t
*
,
playlist_item_t
*
,
wxTreeItemId
);
...
...
src/input/input.c
View file @
c3550b59
...
...
@@ -304,6 +304,7 @@ int __input_Preparse( vlc_object_t *p_parent, input_item_t *p_item )
/* Create Object Variables for private use only */
input_ConfigVarInit
(
p_input
);
input_ControlVarInit
(
p_input
);
p_input
->
input
.
i_cr_average
=
var_GetInteger
(
p_input
,
"cr-average"
);
...
...
src/playlist/item-ext.c
View file @
c3550b59
...
...
@@ -622,6 +622,11 @@ int playlist_Replace( playlist_t *p_playlist, playlist_item_t *p_olditem,
* \return returns VLC_SUCCESS or an error
*/
int
playlist_Delete
(
playlist_t
*
p_playlist
,
int
i_id
)
{
return
playlist_DeleteInternal
(
p_playlist
,
i_id
);
}
int
playlist_DeleteInternal
(
playlist_t
*
p_playlist
,
int
i_id
,
vlc_bool_t
b_force
)
{
vlc_value_t
val
;
int
i
;
...
...
src/playlist/playlist.c
View file @
c3550b59
...
...
@@ -701,10 +701,13 @@ static void RunPreparse ( playlist_preparse_t *p_obj )
if
(
p_obj
->
i_waiting
>
0
)
{
input_Preparse
(
p_playlist
,
p_obj
->
pp_waiting
[
0
]
);
var_SetInteger
(
p_playlist
,
"item-change"
,
p_obj
->
pp_waiting
[
0
]
->
i_id
);
input_item_t
*
p_current
=
p_obj
->
pp_waiting
[
0
];
REMOVE_ELEM
(
p_obj
->
pp_waiting
,
p_obj
->
i_waiting
,
0
);
vlc_mutex_unlock
(
&
p_obj
->
object_lock
);
input_Preparse
(
p_playlist
,
p_current
);
var_SetInteger
(
p_playlist
,
"item-change"
,
p_current
->
i_id
);
vlc_mutex_lock
(
&
p_obj
->
object_lock
);
fprintf
(
stderr
,
"END
\n
"
);
}
b_sleep
=
(
p_obj
->
i_waiting
==
0
);
...
...
src/playlist/view.c
View file @
c3550b59
...
...
@@ -54,6 +54,11 @@ playlist_item_t *playlist_RecursiveFindPrev( playlist_t *p_playlist,
void
playlist_NodeDump
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_item
,
int
i_level
);
int
playlist_NodeDeleteInternal
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_root
,
vlc_bool_t
b_delete_items
,
vlc_bool_t
b_force
);
/**********************************************************************
* Exported View management functions
**********************************************************************/
...
...
@@ -122,6 +127,8 @@ int playlist_ViewInsert( playlist_t *p_playlist, int i_id, char *psz_name )
*/
int
playlist_ViewDelete
(
playlist_t
*
p_playlist
,
playlist_view_t
*
p_view
)
{
playlist_NodeDeleteInternal
(
p_playlist
,
p_view
->
p_root
,
VLC_TRUE
,
VLC_TRUE
);
REMOVE_ELEM
(
p_playlist
->
pp_views
,
p_playlist
->
i_views
,
0
);
return
VLC_SUCCESS
;
}
...
...
@@ -307,6 +314,8 @@ playlist_item_t * playlist_NodeCreate( playlist_t *p_playlist, int i_view,
/**
* Remove all the children of a node
*
* This function must be entered with the playlist lock
*
* \param p_playlist the playlist
* \param p_root the node
* \param b_delete_items do we have to delete the children items ?
...
...
@@ -348,6 +357,14 @@ int playlist_NodeEmpty( playlist_t *p_playlist, playlist_item_t *p_root,
*/
int
playlist_NodeDelete
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_root
,
vlc_bool_t
b_delete_items
)
{
return
playlist_NodeDeleteInternal
(
p_playlist
,
p_root
,
b_delete_items
,
VLC_FALSE
);
}
int
playlist_NodeDeleteInternal
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_root
,
vlc_bool_t
b_delete_items
,
vlc_bool_t
b_force
)
{
int
i
;
if
(
p_root
->
i_children
==
-
1
)
...
...
@@ -370,9 +387,8 @@ int playlist_NodeDelete( playlist_t *p_playlist, playlist_item_t *p_root,
}
}
/* Delete the node */
if
(
p_root
->
i_flags
&
PLAYLIST_RO_FLAG
)
if
(
p_root
->
i_flags
&
PLAYLIST_RO_FLAG
&&
!
b_force
)
{
msg_Dbg
(
p_playlist
,
"unable to remove node, write-protected"
);
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment