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
7e413aa7
Commit
7e413aa7
authored
Jun 17, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use vlc_object_lock and vlc_object_unlock
parent
ef17f9a4
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
137 additions
and
137 deletions
+137
-137
modules/control/http/mvar.c
modules/control/http/mvar.c
+2
-2
modules/control/rc.c
modules/control/rc.c
+4
-4
modules/gui/macosx/controls.m
modules/gui/macosx/controls.m
+5
-5
modules/gui/macosx/interaction.m
modules/gui/macosx/interaction.m
+8
-8
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+2
-2
modules/gui/pda/pda.c
modules/gui/pda/pda.c
+6
-6
modules/gui/pda/pda_callbacks.c
modules/gui/pda/pda_callbacks.c
+5
-5
modules/gui/qt4/dialogs/interaction.cpp
modules/gui/qt4/dialogs/interaction.cpp
+2
-2
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+2
-2
modules/gui/qt4/qt4.hpp
modules/gui/qt4/qt4.hpp
+2
-2
modules/gui/skins2/commands/cmd_playtree.cpp
modules/gui/skins2/commands/cmd_playtree.cpp
+2
-2
modules/gui/skins2/vars/playtree.cpp
modules/gui/skins2/vars/playtree.cpp
+6
-6
modules/gui/wince/playlist.cpp
modules/gui/wince/playlist.cpp
+6
-6
modules/gui/wxwidgets/dialogs/interaction.cpp
modules/gui/wxwidgets/dialogs/interaction.cpp
+4
-4
modules/gui/wxwidgets/dialogs/vlm/vlm_wrapper.cpp
modules/gui/wxwidgets/dialogs/vlm/vlm_wrapper.cpp
+2
-2
modules/gui/wxwidgets/wxwidgets.cpp
modules/gui/wxwidgets/wxwidgets.cpp
+2
-2
modules/gui/wxwidgets/wxwidgets.hpp
modules/gui/wxwidgets/wxwidgets.hpp
+2
-2
modules/misc/lua/libs/playlist.c
modules/misc/lua/libs/playlist.c
+2
-2
modules/mux/rtp/rtcp.c
modules/mux/rtp/rtcp.c
+19
-19
src/control/playlist.c
src/control/playlist.c
+7
-7
src/input/item.c
src/input/item.c
+6
-6
src/interface/interface.c
src/interface/interface.c
+2
-2
src/misc/objects.c
src/misc/objects.c
+2
-2
src/misc/threads.c
src/misc/threads.c
+2
-2
src/playlist/control.c
src/playlist/control.c
+6
-6
src/playlist/engine.c
src/playlist/engine.c
+4
-4
src/playlist/loadsave.c
src/playlist/loadsave.c
+3
-3
src/stream_output/sap.c
src/stream_output/sap.c
+14
-14
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+8
-8
No files found.
modules/control/http/mvar.c
View file @
7e413aa7
...
...
@@ -287,9 +287,9 @@ mvar_t *mvar_PlaylistSetNew( intf_thread_t *p_intf, char *name,
playlist_t
*
p_pl
)
{
mvar_t
*
s
=
mvar_New
(
name
,
"set"
);
vlc_
mutex_lock
(
&
p_pl
->
object_lock
);
vlc_
object_lock
(
p_pl
);
PlaylistListNode
(
p_intf
,
p_pl
,
p_pl
->
p_root_category
,
name
,
s
,
0
);
vlc_
mutex_unlock
(
&
p_pl
->
object_lock
);
vlc_
object_unlock
(
p_pl
);
return
s
;
}
...
...
modules/control/rc.c
View file @
7e413aa7
...
...
@@ -535,17 +535,17 @@ static void Run( intf_thread_t *p_intf )
if
(
p_playlist
)
{
vlc_
mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_
object_lock
(
p_playlist
);
p_intf
->
p_sys
->
i_last_state
=
(
int
)
PLAYLIST_STOPPED
;
msg_rc
(
STATUS_CHANGE
"( stop state: 0 )"
);
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
}
}
if
(
(
p_input
!=
NULL
)
&&
!
p_input
->
b_dead
&&
!
p_input
->
b_die
&&
(
p_playlist
!=
NULL
)
)
{
vlc_
mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_
object_lock
(
p_playlist
);
if
(
(
p_intf
->
p_sys
->
i_last_state
!=
p_playlist
->
status
.
i_status
)
&&
(
p_playlist
->
status
.
i_status
==
PLAYLIST_STOPPED
)
)
{
...
...
@@ -566,7 +566,7 @@ static void Run( intf_thread_t *p_intf )
p_intf
->
p_sys
->
i_last_state
=
p_playlist
->
status
.
i_status
;
msg_rc
(
STATUS_CHANGE
"( pause state: 4 )"
);
}
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
}
if
(
p_input
&&
b_showpos
)
...
...
modules/gui/macosx/controls.m
View file @
7e413aa7
...
...
@@ -121,16 +121,16 @@
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
vlc_
mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_
object_lock
(
p_playlist
);
if
(
playlist_IsEmpty
(
p_playlist
)
)
{
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
vlc_object_release
(
p_playlist
);
[
o_main
intfOpenFileGeneric
:
(
id
)
sender
];
}
else
{
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
vlc_object_release
(
p_playlist
);
}
...
...
@@ -886,7 +886,7 @@
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
vlc_
mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_
object_lock
(
p_playlist
);
#define p_input p_playlist->p_input
...
...
@@ -997,7 +997,7 @@
[
o_main
setupMenus
];
/* Make sure video menu is up to date */
}
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
vlc_object_release
(
p_playlist
);
return
(
bEnabled
);
...
...
modules/gui/macosx/interaction.m
View file @
7e413aa7
...
...
@@ -247,7 +247,7 @@
-
(
void
)
sheetDidEnd
:(
NSWindow
*
)
o_sheet
returnCode
:(
int
)
i_return
contextInfo
:(
void
*
)
o_context
{
vlc_
mutex_lock
(
&
p_dialog
->
p_interaction
->
object_lock
);
vlc_
object_lock
(
p_dialog
->
p_interaction
);
if
(
i_return
==
NSAlertDefaultReturn
)
{
p_dialog
->
i_return
=
DIALOG_OK_YES
;
...
...
@@ -261,7 +261,7 @@
p_dialog
->
i_return
=
DIALOG_CANCELLED
;
}
p_dialog
->
i_status
=
ANSWERED_DIALOG
;
vlc_
mutex_unlock
(
&
p_dialog
->
p_interaction
->
object_lock
);
vlc_
object_unlock
(
p_dialog
->
p_interaction
);
}
-
(
void
)
updateDialog
...
...
@@ -347,10 +347,10 @@
-
(
IBAction
)
cancelAndClose
:(
id
)
sender
{
/* tell the core that the dialog was cancelled in a yes/no-style dialogue */
vlc_
mutex_lock
(
&
p_dialog
->
p_interaction
->
object_lock
);
vlc_
object_lock
(
p_dialog
->
p_interaction
);
p_dialog
->
i_return
=
DIALOG_CANCELLED
;
p_dialog
->
i_status
=
ANSWERED_DIALOG
;
vlc_
mutex_unlock
(
&
p_dialog
->
p_interaction
->
object_lock
);
vlc_
object_unlock
(
p_dialog
->
p_interaction
);
msg_Dbg
(
p_intf
,
"dialog cancelled"
);
}
...
...
@@ -358,16 +358,16 @@
{
/* tell core that the user wishes to cancel the dialogue
* Use this function if cancelling is optionally like in the progress-dialogue */
vlc_
mutex_lock
(
&
p_dialog
->
p_interaction
->
object_lock
);
vlc_
object_lock
(
p_dialog
->
p_interaction
);
p_dialog
->
b_cancelled
=
true
;
vlc_
mutex_unlock
(
&
p_dialog
->
p_interaction
->
object_lock
);
vlc_
object_unlock
(
p_dialog
->
p_interaction
);
msg_Dbg
(
p_intf
,
"cancelling dialog, will close it later on"
);
}
-
(
IBAction
)
okayAndClose
:(
id
)
sender
{
msg_Dbg
(
p_intf
,
"running okayAndClose"
);
vlc_
mutex_lock
(
&
p_dialog
->
p_interaction
->
object_lock
);
vlc_
object_lock
(
p_dialog
->
p_interaction
);
if
(
p_dialog
->
i_flags
==
DIALOG_LOGIN_PW_OK_CANCEL
)
{
p_dialog
->
psz_returned
[
0
]
=
strdup
(
[[
o_auth_login_fld
stringValue
]
UTF8String
]
);
...
...
@@ -377,7 +377,7 @@
p_dialog
->
psz_returned
[
0
]
=
strdup
(
[[
o_input_fld
stringValue
]
UTF8String
]
);
p_dialog
->
i_return
=
DIALOG_OK_YES
;
p_dialog
->
i_status
=
ANSWERED_DIALOG
;
vlc_
mutex_unlock
(
&
p_dialog
->
p_interaction
->
object_lock
);
vlc_
object_unlock
(
p_dialog
->
p_interaction
);
msg_Dbg
(
p_intf
,
"dialog acknowledged"
);
}
...
...
modules/gui/macosx/playlist.m
View file @
7e413aa7
...
...
@@ -1251,9 +1251,9 @@
i_type
=
ORDER_NORMAL
;
}
vlc_
mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_
object_lock
(
p_playlist
);
playlist_RecursiveNodeSort
(
p_playlist
,
p_playlist
->
p_root_category
,
i_mode
,
i_type
);
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
vlc_object_release
(
p_playlist
);
[
self
playlistUpdated
];
...
...
modules/gui/pda/pda.c
View file @
7e413aa7
...
...
@@ -417,7 +417,7 @@ static int Manage( intf_thread_t *p_intf )
input_thread_t
*
p_input
=
p_intf
->
p_sys
->
p_input
;
int64_t
i_time
=
0
,
i_length
=
0
;
vlc_
mutex_lock
(
&
p_input
->
object_lock
);
vlc_
object_lock
(
p_input
);
if
(
!
p_input
->
b_die
)
{
playlist_t
*
p_playlist
;
...
...
@@ -469,9 +469,9 @@ static int Manage( intf_thread_t *p_intf )
double
f_pos
=
(
double
)
newvalue
/
100
.
0
;
/* release the lock to be able to seek */
vlc_
mutex_unlock
(
&
p_input
->
object_lock
);
vlc_
object_unlock
(
p_input
);
var_SetFloat
(
p_input
,
"position"
,
f_pos
);
vlc_
mutex_lock
(
&
p_input
->
object_lock
);
vlc_
object_lock
(
p_input
);
/* Update the old value */
p_intf
->
p_sys
->
f_adj_oldvalue
=
newvalue
;
...
...
@@ -503,9 +503,9 @@ static int Manage( intf_thread_t *p_intf )
double
f_pos
=
(
double
)
newvalue
/
100
.
0
;
/* release the lock to be able to seek */
vlc_
mutex_unlock
(
&
p_input
->
object_lock
);
vlc_
object_unlock
(
p_input
);
var_SetFloat
(
p_input
,
"position"
,
f_pos
);
vlc_
mutex_lock
(
&
p_input
->
object_lock
);
vlc_
object_lock
(
p_input
);
/* Update the old value */
p_intf
->
p_sys
->
i_adj_oldvalue
=
newvalue
;
...
...
@@ -513,7 +513,7 @@ static int Manage( intf_thread_t *p_intf )
}
}
}
vlc_
mutex_unlock
(
&
p_input
->
object_lock
);
vlc_
object_unlock
(
p_input
);
}
else
if
(
p_intf
->
p_sys
->
b_playing
&&
!
intf_ShouldDie
(
p_intf
)
)
{
...
...
modules/gui/pda/pda_callbacks.c
View file @
7e413aa7
...
...
@@ -162,7 +162,7 @@ void PlaylistRebuildListStore( intf_thread_t *p_intf,
red.blue = 0;
red.green = 0;
#endif
vlc_
mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_
object_lock
(
p_playlist
);
for
(
i_dummy
=
0
;
i_dummy
<
playlist_CurrentSize
(
p_playlist
)
;
i_dummy
++
)
{
playlist_item_t
*
p_item
=
playlist_ItemGetById
(
p_playlist
,
i_dummy
,
true
);
...
...
@@ -178,7 +178,7 @@ void PlaylistRebuildListStore( intf_thread_t *p_intf,
-
1
);
}
}
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
}
/*****************************************************************
...
...
@@ -383,16 +383,16 @@ void onPlay(GtkButton *button, gpointer user_data)
if
(
p_playlist
)
{
vlc_
mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_
object_lock
(
p_playlist
);
if
(
playlist_CurrentSize
(
p_playlist
))
{
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
playlist_Play
(
p_playlist
);
gdk_window_lower
(
p_intf
->
p_sys
->
p_window
->
window
);
}
else
{
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
}
vlc_object_release
(
p_playlist
);
}
...
...
modules/gui/qt4/dialogs/interaction.cpp
View file @
7e413aa7
...
...
@@ -215,7 +215,7 @@ void InteractionDialog::otherB()
void
InteractionDialog
::
Finish
(
int
i_ret
)
{
vlc_
mutex_lock
(
&
p_dialog
->
p_interaction
->
object_lock
);
vlc_
object_lock
(
p_dialog
->
p_interaction
);
if
(
p_dialog
->
i_flags
&
DIALOG_LOGIN_PW_OK_CANCEL
)
{
...
...
@@ -235,7 +235,7 @@ void InteractionDialog::Finish( int i_ret )
p_dialog
->
b_cancelled
=
true
;
hide
();
vlc_
mutex_unlock
(
&
p_dialog
->
p_interaction
->
object_lock
);
vlc_
object_unlock
(
p_dialog
->
p_interaction
);
playlist_Signal
(
THEPL
);
}
modules/gui/qt4/qt4.cpp
View file @
7e413aa7
...
...
@@ -253,9 +253,9 @@ static void Close( vlc_object_t *p_this )
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
vlc_
mutex_lock
(
&
p_intf
->
object_lock
);
vlc_
object_lock
(
p_intf
);
p_intf
->
b_dead
=
true
;
vlc_
mutex_unlock
(
&
p_intf
->
object_lock
);
vlc_
object_unlock
(
p_intf
);
if
(
p_intf
->
p_sys
->
b_isDialogProvider
)
{
...
...
modules/gui/qt4/qt4.hpp
View file @
7e413aa7
...
...
@@ -64,8 +64,8 @@ struct intf_sys_t
};
#define THEPL p_intf->p_sys->p_playlist
#define QPL_LOCK vlc_
mutex_lock( &THEPL->object_lock
);
#define QPL_UNLOCK vlc_
mutex_unlock( &THEPL->object_lock
);
#define QPL_LOCK vlc_
object_lock( THEPL
);
#define QPL_UNLOCK vlc_
object_unlock( THEPL
);
#define THEDP DialogsProvider::getInstance()
#define THEMIM MainInputManager::getInstance( p_intf )
...
...
modules/gui/skins2/commands/cmd_playtree.cpp
View file @
7e413aa7
...
...
@@ -37,10 +37,10 @@ void CmdPlaytreeSort::execute()
/// \todo Choose sort method/order - Need more commands
/// \todo Choose the correct view
playlist_t
*
p_playlist
=
getIntf
()
->
p_sys
->
p_playlist
;
vlc_
mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_
object_lock
(
p_playlist
);
playlist_RecursiveNodeSort
(
p_playlist
,
p_playlist
->
p_root_onelevel
,
SORT_TITLE
,
ORDER_NORMAL
);
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
// Ask for rebuild
Playtree
&
rVar
=
VlcProc
::
instance
(
getIntf
()
)
->
getPlaytreeVar
();
...
...
modules/gui/skins2/vars/playtree.cpp
View file @
7e413aa7
...
...
@@ -52,7 +52,7 @@ Playtree::~Playtree()
void
Playtree
::
delSelected
()
{
Iterator
it
=
begin
();
vlc_
mutex_lock
(
&
getIntf
()
->
p_sys
->
p_playlist
->
object_lock
);
vlc_
object_lock
(
getIntf
()
->
p_sys
->
p_playlist
);
for
(
it
=
begin
();
it
!=
end
();
it
=
getNextVisibleItem
(
it
)
)
{
if
(
(
*
it
).
m_selected
&&
!
(
*
it
).
isReadonly
()
)
...
...
@@ -93,12 +93,12 @@ void Playtree::delSelected()
it
=
getNextVisibleItem
(
it
);
}
}
vlc_
mutex_unlock
(
&
getIntf
()
->
p_sys
->
p_playlist
->
object_lock
);
vlc_
object_unlock
(
getIntf
()
->
p_sys
->
p_playlist
);
}
void
Playtree
::
action
(
VarTree
*
pItem
)
{
vlc_
mutex_lock
(
&
m_pPlaylist
->
object_lock
);
vlc_
object_lock
(
m_pPlaylist
);
VarTree
::
Iterator
it
;
playlist_item_t
*
p_item
=
(
playlist_item_t
*
)
pItem
->
m_pData
;
...
...
@@ -114,7 +114,7 @@ void Playtree::action( VarTree *pItem )
{
playlist_Control
(
m_pPlaylist
,
PLAYLIST_VIEWPLAY
,
true
,
p_parent
,
p_item
);
}
vlc_
mutex_unlock
(
&
m_pPlaylist
->
object_lock
);
vlc_
object_unlock
(
m_pPlaylist
);
}
void
Playtree
::
onChange
()
...
...
@@ -213,7 +213,7 @@ void Playtree::buildNode( playlist_item_t *pNode, VarTree &rTree )
void
Playtree
::
buildTree
()
{
clear
();
vlc_
mutex_lock
(
&
m_pPlaylist
->
object_lock
);
vlc_
object_lock
(
m_pPlaylist
);
i_items_to_append
=
0
;
...
...
@@ -228,7 +228,7 @@ void Playtree::buildTree()
buildNode
(
m_pPlaylist
->
p_root_category
,
*
this
);
vlc_
mutex_unlock
(
&
m_pPlaylist
->
object_lock
);
vlc_
object_unlock
(
m_pPlaylist
);
// What is it ?
// checkParents( NULL );
}
...
...
modules/gui/wince/playlist.cpp
View file @
7e413aa7
...
...
@@ -595,7 +595,7 @@ void Playlist::UpdatePlaylist()
/* Update the colour of items */
vlc_
mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_
object_lock
(
p_playlist
);
if
(
p_intf
->
p_sys
->
i_playing
!=
p_playlist
->
i_index
)
{
// p_playlist->i_index in RED
...
...
@@ -604,7 +604,7 @@ void Playlist::UpdatePlaylist()
// if exists, p_intf->p_sys->i_playing in BLACK
p_intf
->
p_sys
->
i_playing
=
p_playlist
->
i_index
;
}
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
vlc_object_release
(
p_playlist
);
}
...
...
@@ -625,7 +625,7 @@ void Playlist::Rebuild()
ListView_DeleteAllItems
(
hListView
);
/* ...and rebuild it */
vlc_
mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_
object_lock
(
p_playlist
);
for
(
int
i
=
0
;
i
<
p_playlist
->
i_size
;
i
++
)
{
LVITEM
lv
;
...
...
@@ -639,7 +639,7 @@ void Playlist::Rebuild()
_FROMMB
(
p_playlist
->
pp_items
[
i
]
->
input
.
psz_name
)
);
UpdateItem
(
i
);
}
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
if
(
i_focused
)
ListView_SetItemState
(
hListView
,
i_focused
,
LVIS_FOCUSED
|
...
...
@@ -874,9 +874,9 @@ void Playlist::ShowInfos( HWND hwnd, int i_item )
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
return
;
vlc_
mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_
object_lock
(
p_playlist
);
playlist_item_t
*
p_item
=
playlist_ItemGetByPos
(
p_playlist
,
i_item
);
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
if
(
p_item
)
{
...
...
modules/gui/wxwidgets/dialogs/interaction.cpp
View file @
7e413aa7
...
...
@@ -235,7 +235,7 @@ void InteractionDialog::OnClear( wxCommandEvent& event )
{
#if 0
int i;
vlc_
mutex_lock( &p_dialog->p_interaction->object_lock
);
vlc_
object_lock( p_dialog->p_interaction
);
for( i = p_dialog->i_widgets - 1 ; i >= 0 ; i-- )
{
user_widget_t *p_widget = p_dialog->pp_widgets[i];
...
...
@@ -250,7 +250,7 @@ void InteractionDialog::OnClear( wxCommandEvent& event )
buttons_sizer->Remove( 3 );
buttons_panel->DestroyChildren();
input_widgets.clear();
vlc_
mutex_unlock( &p_dialog->p_interaction->object_lock
);
vlc_
object_unlock( p_dialog->p_interaction
);
Render();
#endif
}
...
...
@@ -263,7 +263,7 @@ void InteractionDialog::OnNoShow( wxCommandEvent& event )
void
InteractionDialog
::
Finish
(
int
i_ret
)
{
#if 0
vlc_
mutex_lock( &p_dialog->p_interaction->object_lock
);
vlc_
object_lock( p_dialog->p_interaction
);
vector<InputWidget>::iterator it = input_widgets.begin();
while ( it < input_widgets.end() )
{
...
...
@@ -274,6 +274,6 @@ void InteractionDialog::Finish( int i_ret )
Hide();
p_dialog->i_status = ANSWERED_DIALOG;
p_dialog->i_return = i_ret;
vlc_
mutex_unlock( &p_dialog->p_interaction->object_lock
);
vlc_
object_unlock( p_dialog->p_interaction
);
#endif
}
modules/gui/wxwidgets/dialogs/vlm/vlm_wrapper.cpp
View file @
7e413aa7
...
...
@@ -48,12 +48,12 @@ bool VLMWrapper::AttachVLM()
void VLMWrapper::LockVLM()
{
vlc_
mutex_lock( &p_vlm->object_lock
);
vlc_
object_lock( p_vlm
);
}
void VLMWrapper::UnlockVLM()
{
vlc_
mutex_unlock( &p_vlm->object_lock
);
vlc_
object_unlock( p_vlm
);
}
void VLMWrapper::AddBroadcast( const char* name, const char* input,
...
...
modules/gui/wxwidgets/wxwidgets.cpp
View file @
7e413aa7
...
...
@@ -231,9 +231,9 @@ static void Close( vlc_object_t *p_this )
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
vlc_
mutex_lock
(
&
p_intf
->
object_lock
);
vlc_
object_lock
(
p_intf
);
p_intf
->
b_dead
=
true
;
vlc_
mutex_unlock
(
&
p_intf
->
object_lock
);
vlc_
object_unlock
(
p_intf
);
if
(
p_intf
->
pf_show_dialog
)
{
...
...
modules/gui/wxwidgets/wxwidgets.hpp
View file @
7e413aa7
...
...
@@ -225,13 +225,13 @@ wxWindow *CreateDialogsProvider( intf_thread_t *p_intf, wxWindow *p_parent );
inline
void
LockPlaylist
(
intf_sys_t
*
p_sys
,
playlist_t
*
p_pl
)
{
if
(
p_sys
->
i_playlist_usage
++
==
0
)
vlc_
mutex_lock
(
&
p_pl
->
object_lock
);
vlc_
object_lock
(
p_pl
);
}
inline
void
UnlockPlaylist
(
intf_sys_t
*
p_sys
,
playlist_t
*
p_pl
)
{
if
(
--
p_sys
->
i_playlist_usage
==
0
)
vlc_
mutex_unlock
(
&
p_pl
->
object_lock
);
vlc_
object_unlock
(
p_pl
);
}
#endif
modules/misc/lua/libs/playlist.c
View file @
7e413aa7
...
...
@@ -362,7 +362,7 @@ static int vlclua_playlist_status( lua_State *L )
lua_pushstring( L, psz_uri );
free( psz_uri );
lua_pushnumber( L, config_GetInt( p_intf, "volume" ) );*/
vlc_
mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_
object_lock
(
p_playlist
);
switch
(
p_playlist
->
status
.
i_status
)
{
case
PLAYLIST_STOPPED
:
...
...
@@ -378,7 +378,7 @@ static int vlclua_playlist_status( lua_State *L )
lua_pushstring
(
L
,
"unknown"
);
break
;
}
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
/*i_count += 3;*/
}
else
...
...
modules/mux/rtp/rtcp.c
View file @
7e413aa7
...
...
@@ -76,7 +76,7 @@ int rtcp_add_client( vlc_object_t *p_this, uint32_t u_ssrc, uint32_t *i_pos )
rtcp_t
*
p_rtcp
=
(
rtcp_t
*
)
p_this
;
rtcp_client_t
*
p_client
=
NULL
;
vlc_
mutex_lock
(
&
p_rtcp
->
object_lock
);
vlc_
object_lock
(
p_rtcp
);
p_client
=
(
rtcp_client_t
*
)
malloc
(
sizeof
(
rtcp_client_t
)
);
if
(
!
p_client
)
return
VLC_ENOMEM
;
...
...
@@ -87,7 +87,7 @@ int rtcp_add_client( vlc_object_t *p_this, uint32_t u_ssrc, uint32_t *i_pos )
p_client
->
i_index
,
p_client
);
p_rtcp
->
i_clients
++
;
p_rtcp
->
u_clients
++
;
vlc_
mutex_unlock
(
&
p_rtcp
->
object_lock
);
vlc_
object_unlock
(
p_rtcp
);
return
VLC_SUCCESS
;
}
...
...
@@ -96,7 +96,7 @@ int rtcp_del_client( vlc_object_t *p_this, uint32_t u_ssrc )
rtcp_t
*
p_rtcp
=
(
rtcp_t
*
)
p_this
;
uint32_t
i_pos
=
0
;
vlc_
mutex_lock
(
&
p_rtcp
->
object_lock
);
vlc_
object_lock
(
p_rtcp
);
if
(
p_rtcp
->
pf_find_client
(
p_this
,
u_ssrc
,
&
i_pos
)
==
VLC_SUCCESS
)
{
rtcp_client_t
*
p_old
=
p_rtcp
->
pp_clients
[
i_pos
];
...
...
@@ -107,7 +107,7 @@ int rtcp_del_client( vlc_object_t *p_this, uint32_t u_ssrc )
p_rtcp
->
u_clients
--
;
/* BYE message is sent by rtcp_destroy_client() */
}
vlc_
mutex_unlock
(
&
p_rtcp
->
object_lock
);
vlc_
object_unlock
(
p_rtcp
);
return
VLC_SUCCESS
;
}
...
...
@@ -117,7 +117,7 @@ int rtcp_cleanup_clients( vlc_object_t *p_this )
rtcp_t
*
p_rtcp
=
(
rtcp_t
*
)
p_this
;
uint32_t
i
=
0
;
vlc_
mutex_lock
(
&
p_rtcp
->
object_lock
);
vlc_
object_lock
(
p_rtcp
);
for
(
i
=
0
;
i
<
p_rtcp
->
i_clients
;
i
++
)
{
rtcp_client_t
*
p_old
=
p_rtcp
->
pp_clients
[
i
];
...
...
@@ -131,7 +131,7 @@ int rtcp_cleanup_clients( vlc_object_t *p_this )
free
(
p_old
);
}
}
vlc_
mutex_unlock
(
&
p_rtcp
->
object_lock
);
vlc_
object_unlock
(
p_rtcp
);
return
VLC_SUCCESS
;
}
...
...
@@ -343,7 +343,7 @@ static int rtcp_decode_SR( vlc_object_t *p_this, rtcp_pkt_t *p_pkt )
if
(
result
==
VLC_EGENERIC
)
return
VLC_ENOMEM
;
}
vlc_
mutex_lock
(
&
p_rtcp
->
object_lock
);
vlc_
object_lock
(
p_rtcp
);
p_client
=
p_rtcp
->
pp_clients
[
i_pos
];
p_client
->
p_stats
->
u_SR_received
++
;
...
...
@@ -380,7 +380,7 @@ static int rtcp_decode_SR( vlc_object_t *p_this, rtcp_pkt_t *p_pkt )
p_client
->
p_stats
->
u_last_SR
,
p_client
->
p_stats
->
u_delay_since_last_SR
);
p_client
=
NULL
;
vlc_
mutex_unlock
(
&
p_rtcp
->
object_lock
);
vlc_
object_unlock
(
p_rtcp
);
}
return
VLC_SUCCESS
;
}
...
...
@@ -412,7 +412,7 @@ static int rtcp_decode_RR( vlc_object_t *p_this, rtcp_pkt_t *p_pkt )
return
VLC_ENOMEM
;
}
vlc_
mutex_lock
(
&
p_rtcp
->
object_lock
);
vlc_
object_lock
(
p_rtcp
);
p_client
=
p_rtcp
->
pp_clients
[
i_pos
];
p_client
->
p_stats
->
u_RR_received
++
;
...
...
@@ -443,7 +443,7 @@ static int rtcp_decode_RR( vlc_object_t *p_this, rtcp_pkt_t *p_pkt )
p_client
->
p_stats
->
u_last_SR
,
p_client
->
p_stats
->
u_delay_since_last_SR
);
p_client
=
NULL
;
vlc_
mutex_unlock
(
&
p_rtcp
->
object_lock
);
vlc_
object_unlock
(
p_rtcp
);
}
return
VLC_SUCCESS
;
}
...
...
@@ -478,7 +478,7 @@ static int rtcp_decode_SDES( vlc_object_t *p_this, rtcp_pkt_t *p_pkt )
return
VLC_ENOMEM
;
}
vlc_
mutex_lock
(
&
p_rtcp
->
object_lock
);
vlc_
object_lock
(
p_rtcp
);
p_client
=
p_rtcp
->
pp_clients
[
i_pos
];
u_item
=
bs_read
(
p_rtcp
->
bs
,
8
);
...
...
@@ -543,7 +543,7 @@ static int rtcp_decode_SDES( vlc_object_t *p_this, rtcp_pkt_t *p_pkt )
((
double
)(
0
.
9375
)
*
p_client
->
p_stats
->
u_avg_pkt_size
)
);
p_client
=
NULL
;
vlc_
mutex_unlock
(
&
p_rtcp
->
object_lock
);
vlc_
object_unlock
(
p_rtcp
);
}
return
VLC_SUCCESS
;
}
...
...
@@ -597,7 +597,7 @@ static int rtcp_decode_APP( vlc_object_t *p_this, rtcp_pkt_t *p_pkt )
return
VLC_ENOMEM
;
}
vlc_
mutex_lock
(
&
p_rtcp
->
object_lock
);
vlc_
object_lock
(
p_rtcp
);
p_client
=
p_rtcp
->
pp_clients
[
i_pos
];
for
(
i
=
0
;
i
<
4
;
i
++
)
...
...
@@ -613,7 +613,7 @@ static int rtcp_decode_APP( vlc_object_t *p_this, rtcp_pkt_t *p_pkt )
psz_data
=
(
char
*
)
malloc
(
p_pkt
->
u_length
);
if
(
!
psz_data
)
{
vlc_
mutex_unlock
(
&
p_rtcp
->
object_lock
);
vlc_
object_unlock
(
p_rtcp
);
return
VLC_EGENERIC
;
}
...
...
@@ -627,7 +627,7 @@ static int rtcp_decode_APP( vlc_object_t *p_this, rtcp_pkt_t *p_pkt )
p_pkt
->
report
.
app
.
u_length
=
p_pkt
->
u_length
;
p_client
=
NULL
;
vlc_
mutex_unlock
(
&
p_rtcp
->
object_lock
);
vlc_
object_unlock
(
p_rtcp
);
/* Just ignore this packet */
return
VLC_SUCCESS
;
...
...
@@ -866,7 +866,7 @@ block_t *rtcp_encode_SR( vlc_object_t *p_this, rtcp_pkt_t *p_pkt )
return
NULL
;
}
vlc_
mutex_lock
(
&
p_rtcp
->
object_lock
);
vlc_
object_lock
(
p_rtcp
);
p_client
=
p_rtcp
->
pp_clients
[
i_pos
];
p_stats
=
p_client
->
p_stats
;
...
...
@@ -884,7 +884,7 @@ block_t *rtcp_encode_SR( vlc_object_t *p_this, rtcp_pkt_t *p_pkt )
bs_write
(
s
,
32
,
p_stats
->
u_delay_since_last_SR
);
p_client
=
NULL
;
vlc_
mutex_unlock
(
&
p_rtcp
->
object_lock
);
vlc_
object_unlock
(
p_rtcp
);
/* possible SR extension */
return
p_block
;
...
...
@@ -927,7 +927,7 @@ block_t *rtcp_encode_RR( vlc_object_t *p_this, rtcp_pkt_t *p_pkt )
return
NULL
;
}
vlc_
mutex_lock
(
&
p_rtcp
->
object_lock
);
vlc_
object_lock
(
p_rtcp
);
p_client
=
p_rtcp
->
pp_clients
[
i_pos
];
p_stats
=
p_client
->
p_stats
;
...
...
@@ -945,7 +945,7 @@ block_t *rtcp_encode_RR( vlc_object_t *p_this, rtcp_pkt_t *p_pkt )
bs_write
(
s
,
32
,
p_stats
->
u_delay_since_last_RR
);
p_client
=
NULL
;
vlc_
mutex_unlock
(
&
p_rtcp
->
object_lock
);
vlc_
object_unlock
(
p_rtcp
);
/* possible RR extension */
return
p_block
;
...
...
src/control/playlist.c
View file @
7e413aa7
...
...
@@ -75,7 +75,7 @@ void libvlc_playlist_play( libvlc_instance_t *p_instance, int i_id,
if
(
!
playlist_was_locked
(
p_instance
)
)
{
playlist_mark_locked
(
p_instance
,
1
);
vlc_
mutex_lock
(
&
PL
->
object_lock
);
vlc_
object_lock
(
PL
);
did_lock
=
1
;
}
...
...
@@ -85,7 +85,7 @@ void libvlc_playlist_play( libvlc_instance_t *p_instance, int i_id,
{
if
(
did_lock
==
1
)
{
vlc_
mutex_unlock
(
&
PL
->
object_lock
);
vlc_
object_unlock
(
PL
);
playlist_mark_locked
(
p_instance
,
0
);
}
RAISEVOID
(
"Unable to find item"
);
...
...
@@ -95,7 +95,7 @@ void libvlc_playlist_play( libvlc_instance_t *p_instance, int i_id,
PL
->
status
.
p_node
,
p_item
);
if
(
did_lock
==
1
)
{
vlc_
mutex_unlock
(
&
PL
->
object_lock
);
vlc_
object_unlock
(
PL
);
playlist_mark_locked
(
p_instance
,
0
);
}
}
...
...
@@ -222,7 +222,7 @@ int libvlc_playlist_get_current_index ( libvlc_instance_t *p_instance,
void
libvlc_playlist_lock
(
libvlc_instance_t
*
p_instance
)
{
assert
(
PL
);
vlc_
mutex_lock
(
&
PL
->
object_lock
);
vlc_
object_lock
(
PL
);
p_instance
->
b_playlist_locked
=
1
;
}
...
...
@@ -230,7 +230,7 @@ void libvlc_playlist_unlock( libvlc_instance_t *p_instance )
{
assert
(
PL
);
p_instance
->
b_playlist_locked
=
0
;
vlc_
mutex_unlock
(
&
PL
->
object_lock
);
vlc_
object_unlock
(
PL
);
}
libvlc_media_player_t
*
libvlc_playlist_get_media_player
(
...
...
@@ -240,7 +240,7 @@ libvlc_media_player_t * libvlc_playlist_get_media_player(
libvlc_media_player_t
*
p_mi
;
assert
(
PL
);
vlc_
mutex_lock
(
&
PL
->
object_lock
);
vlc_
object_lock
(
PL
);
if
(
PL
->
p_input
)
{
p_mi
=
libvlc_media_player_new_from_input_thread
(
...
...
@@ -252,7 +252,7 @@ libvlc_media_player_t * libvlc_playlist_get_media_player(
p_mi
=
NULL
;
libvlc_exception_raise
(
p_e
,
"No active input"
);
}
vlc_
mutex_unlock
(
&
PL
->
object_lock
);
vlc_
object_unlock
(
PL
);
return
p_mi
;
}
...
...
src/input/item.c
View file @
7e413aa7
...
...
@@ -193,13 +193,13 @@ static void input_ItemDestroy ( gc_object_t *p_this )
input_ItemClean
(
p_input
);
vlc_
mutex_lock
(
&
p_obj
->
p_libvlc
->
object_lock
);
vlc_
object_lock
(
p_obj
->
p_libvlc
);
ARRAY_BSEARCH
(
priv
->
input_items
,
->
i_id
,
int
,
p_input
->
i_id
,
i
);
if
(
i
!=
-
1
)
ARRAY_REMOVE
(
priv
->
input_items
,
i
);
vlc_
mutex_unlock
(
&
p_obj
->
p_libvlc
->
object_lock
);
vlc_
object_unlock
(
p_obj
->
p_libvlc
);
free
(
p_input
);
}
...
...
@@ -310,13 +310,13 @@ input_item_t *__input_ItemGetById( vlc_object_t *p_obj, int i_id )
input_item_t
*
p_ret
=
NULL
;
int
i
;
vlc_
mutex_lock
(
&
p_obj
->
p_libvlc
->
object_lock
);
vlc_
object_lock
(
p_obj
->
p_libvlc
);
ARRAY_BSEARCH
(
priv
->
input_items
,
->
i_id
,
int
,
i_id
,
i
);
if
(
i
!=
-
1
)
p_ret
=
ARRAY_VAL
(
priv
->
input_items
,
i
);
vlc_
mutex_unlock
(
&
p_obj
->
p_libvlc
->
object_lock
);
vlc_
object_unlock
(
p_obj
->
p_libvlc
);
return
p_ret
;
}
...
...
@@ -347,10 +347,10 @@ input_item_t *input_ItemNewWithType( vlc_object_t *p_obj, const char *psz_uri,
input_ItemInit
(
p_obj
,
p_input
);
vlc_gc_init
(
p_input
,
input_ItemDestroy
,
(
void
*
)
p_obj
);
vlc_
mutex_lock
(
&
p_obj
->
p_libvlc
->
object_lock
);
vlc_
object_lock
(
p_obj
->
p_libvlc
);
p_input
->
i_id
=
++
priv
->
i_last_input_id
;
ARRAY_APPEND
(
priv
->
input_items
,
p_input
);
vlc_
mutex_unlock
(
&
p_obj
->
p_libvlc
->
object_lock
);
vlc_
object_unlock
(
p_obj
->
p_libvlc
);
p_input
->
b_fixed_name
=
false
;
...
...
src/interface/interface.c
View file @
7e413aa7
...
...
@@ -235,11 +235,11 @@ static void RunInterface( intf_thread_t *p_intf )
psz_intf
=
p_intf
->
psz_switch_intf
;
p_intf
->
psz_switch_intf
=
NULL
;
vlc_
mutex_lock
(
&
p_intf
->
object_lock
);
vlc_
object_lock
(
p_intf
);
p_intf
->
b_die
=
false
;
/* FIXME */
p_intf
->
b_dead
=
false
;
vlc_
mutex_unlock
(
&
p_intf
->
object_lock
);
vlc_
object_unlock
(
p_intf
);
p_intf
->
psz_intf
=
psz_intf
;
p_intf
->
p_module
=
module_Need
(
p_intf
,
"interface"
,
psz_intf
,
0
);
...
...
src/misc/objects.c
View file @
7e413aa7
...
...
@@ -611,7 +611,7 @@ void __vlc_object_kill( vlc_object_t *p_this )
vlc_object_internals_t
*
internals
=
vlc_internals
(
p_this
);
int
fd
;
vlc_
mutex_lock
(
&
p_this
->
object_lock
);
vlc_
object_lock
(
p_this
);
p_this
->
b_die
=
true
;
vlc_spin_lock
(
&
internals
->
spin
);
...
...
@@ -626,7 +626,7 @@ void __vlc_object_kill( vlc_object_t *p_this )
}
vlc_object_signal_unlocked
(
p_this
);
vlc_
mutex_unlock
(
&
p_this
->
object_lock
);
vlc_
object_unlock
(
p_this
);
if
(
p_this
->
i_object_type
==
VLC_OBJECT_LIBVLC
)
{
...
...
src/misc/threads.c
View file @
7e413aa7
...
...
@@ -489,7 +489,7 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line
boot
->
entry
=
func
;
boot
->
object
=
p_this
;
vlc_
mutex_lock
(
&
p_this
->
object_lock
);
vlc_
object_lock
(
p_this
);
#if defined( LIBVLC_USE_PTHREAD )
pthread_attr_t
attr
;
...
...
@@ -595,7 +595,7 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line
psz_name
,
psz_file
,
i_line
);
}
vlc_
mutex_unlock
(
&
p_this
->
object_lock
);
vlc_
object_unlock
(
p_this
);
return
i_ret
;
}
...
...
src/playlist/control.c
View file @
7e413aa7
...
...
@@ -174,14 +174,14 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
int
playlist_PreparseEnqueue
(
playlist_t
*
p_playlist
,
input_item_t
*
p_item
)
{
vlc_
mutex_lock
(
&
p_playlist
->
p_preparse
->
object_lock
);
vlc_
object_lock
(
p_playlist
->
p_preparse
);
vlc_gc_incref
(
p_item
);
INSERT_ELEM
(
p_playlist
->
p_preparse
->
pp_waiting
,
p_playlist
->
p_preparse
->
i_waiting
,
p_playlist
->
p_preparse
->
i_waiting
,
p_item
);
vlc_cond_signal
(
&
p_playlist
->
p_preparse
->
object_wait
);
vlc_
mutex_unlock
(
&
p_playlist
->
p_preparse
->
object_lock
);
vlc_
object_unlock
(
p_playlist
->
p_preparse
);
return
VLC_SUCCESS
;
}
...
...
@@ -190,11 +190,11 @@ int playlist_PreparseEnqueue( playlist_t *p_playlist,
int
playlist_PreparseEnqueueItem
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_item
)
{
vlc_
mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_
mutex_lock
(
&
p_playlist
->
p_preparse
->
object_lock
);
vlc_
object_lock
(
p_playlist
);
vlc_
object_lock
(
p_playlist
->
p_preparse
);
PreparseEnqueueItemSub
(
p_playlist
,
p_item
);
vlc_
mutex_unlock
(
&
p_playlist
->
p_preparse
->
object_lock
);
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
->
p_preparse
);
vlc_
object_unlock
(
p_playlist
);
return
VLC_SUCCESS
;
}
...
...
src/playlist/engine.c
View file @
7e413aa7
...
...
@@ -596,7 +596,7 @@ void playlist_FetcherLoop( playlist_fetcher_t *p_obj )
input_item_t
*
p_item
;
int
i_activity
;
vlc_
mutex_lock
(
&
p_obj
->
object_lock
);
vlc_
object_lock
(
p_obj
);
while
(
vlc_object_alive
(
p_obj
)
)
{
...
...
@@ -608,7 +608,7 @@ void playlist_FetcherLoop( playlist_fetcher_t *p_obj )
p_item
=
p_obj
->
pp_waiting
[
0
];
REMOVE_ELEM
(
p_obj
->
pp_waiting
,
p_obj
->
i_waiting
,
0
);
vlc_
mutex_unlock
(
&
p_obj
->
object_lock
);
vlc_
object_unlock
(
p_obj
);
if
(
p_item
)
{
int
i_ret
;
...
...
@@ -659,9 +659,9 @@ void playlist_FetcherLoop( playlist_fetcher_t *p_obj )
vlc_object_unlock
(
p_obj
);
/* Sleep at least 1ms */
msleep
(
(
i_activity
+
1
)
*
1000
);
vlc_
mutex_lock
(
&
p_obj
->
object_lock
);
vlc_
object_lock
(
p_obj
);
}
vlc_
mutex_unlock
(
&
p_obj
->
object_lock
);
vlc_
object_unlock
(
p_obj
);
}
static
void
VariablesInit
(
playlist_t
*
p_playlist
)
...
...
src/playlist/loadsave.c
View file @
7e413aa7
...
...
@@ -68,7 +68,7 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename ,
p_export
->
p_root
=
p_export_root
;
/* Lock the playlist */
vlc_
mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_
object_lock
(
p_playlist
);
p_playlist
->
p_private
=
(
void
*
)
p_export
;
/* And call the module ! All work is done now */
...
...
@@ -76,7 +76,7 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename ,
if
(
!
p_module
)
{
msg_Warn
(
p_playlist
,
"exporting playlist failed"
);
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
return
VLC_ENOOBJ
;
}
module_Unneed
(
p_playlist
,
p_module
);
...
...
@@ -86,7 +86,7 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename ,
free
(
p_export
->
psz_filename
);
free
(
p_export
);
p_playlist
->
p_private
=
NULL
;
vlc_
mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_
object_unlock
(
p_playlist
);
return
VLC_SUCCESS
;
}
...
...
src/stream_output/sap.c
View file @
7e413aa7
...
...
@@ -215,7 +215,7 @@ static void RunThread( vlc_object_t *p_this)
}
/* Find the session to announce */
vlc_
mutex_lock
(
&
p_sap
->
object_lock
);
vlc_
object_lock
(
p_sap
);
if
(
p_sap
->
i_sessions
>
p_sap
->
i_current_session
+
1
)
{
p_sap
->
i_current_session
++
;
...
...
@@ -226,12 +226,12 @@ static void RunThread( vlc_object_t *p_this)
}
else
{
vlc_
mutex_unlock
(
&
p_sap
->
object_lock
);
vlc_
object_unlock
(
p_sap
);
msleep
(
SAP_IDLE
);
continue
;
}
p_session
=
p_sap
->
pp_sessions
[
p_sap
->
i_current_session
];
vlc_
mutex_unlock
(
&
p_sap
->
object_lock
);
vlc_
object_unlock
(
p_sap
);
/* And announce it */
if
(
p_session
->
p_address
->
b_enabled
==
true
&&
...
...
@@ -256,11 +256,11 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap,
struct
sockaddr_storage
addr
;
socklen_t
addrlen
;
vlc_
mutex_lock
(
&
p_sap
->
object_lock
);
vlc_
object_lock
(
p_sap
);
addrlen
=
p_session
->
addrlen
;
if
((
addrlen
==
0
)
||
(
addrlen
>
sizeof
(
addr
)))
{
vlc_
mutex_unlock
(
&
p_sap
->
object_lock
);
vlc_
object_unlock
(
p_sap
);
msg_Err
(
p_sap
,
"No/invalid address specified for SAP announce"
);
return
VLC_EGENERIC
;
}
...
...
@@ -327,7 +327,7 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap,
{
msg_Err
(
p_sap
,
"Out-of-scope multicast address "
"not supported by SAP"
);
vlc_
mutex_unlock
(
&
p_sap
->
object_lock
);
vlc_
object_unlock
(
p_sap
);
return
VLC_EGENERIC
;
}
...
...
@@ -336,7 +336,7 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap,
}
default:
vlc_
mutex_unlock
(
&
p_sap
->
object_lock
);
vlc_
object_unlock
(
p_sap
);
msg_Err
(
p_sap
,
"Address family %d not supported by SAP"
,
addr
.
ss_family
);
return
VLC_EGENERIC
;
...
...
@@ -347,7 +347,7 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap,
if
(
i
)
{
vlc_
mutex_unlock
(
&
p_sap
->
object_lock
);
vlc_
object_unlock
(
p_sap
);
msg_Err
(
p_sap
,
"%s"
,
vlc_gai_strerror
(
i
)
);
return
VLC_EGENERIC
;
}
...
...
@@ -375,7 +375,7 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap,
malloc
(
sizeof
(
sap_address_t
)
);
if
(
!
p_address
)
{
vlc_
mutex_unlock
(
&
p_sap
->
object_lock
);
vlc_
object_unlock
(
p_sap
);
return
VLC_ENOMEM
;
}
p_address
->
psz_address
=
strdup
(
psz_addr
);
...
...
@@ -438,7 +438,7 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap,
default:
msg_Err
(
p_sap
,
"Address family %d not supported by SAP"
,
addr
.
ss_family
);
vlc_
mutex_unlock
(
&
p_sap
->
object_lock
);
vlc_
object_unlock
(
p_sap
);
return
VLC_EGENERIC
;
}
...
...
@@ -451,7 +451,7 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap,
if
(
p_sap_session
->
psz_data
==
NULL
)
{
free
(
p_session
->
psz_sdp
);
vlc_
mutex_unlock
(
&
p_sap
->
object_lock
);
vlc_
object_unlock
(
p_sap
);
return
VLC_ENOMEM
;
}
...
...
@@ -505,7 +505,7 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap,
msg_Dbg
(
p_sap
,
"%i addresses, %i sessions"
,
p_sap
->
i_addresses
,
p_sap
->
i_sessions
);
vlc_
mutex_unlock
(
&
p_sap
->
object_lock
);
vlc_
object_unlock
(
p_sap
);
return
VLC_SUCCESS
;
}
...
...
@@ -515,7 +515,7 @@ static int announce_SAPAnnounceDel( sap_handler_t *p_sap,
session_descriptor_t
*
p_session
)
{
int
i
;
vlc_
mutex_lock
(
&
p_sap
->
object_lock
);
vlc_
object_lock
(
p_sap
);
msg_Dbg
(
p_sap
,
"removing session %p from SAP"
,
p_session
);
...
...
@@ -542,7 +542,7 @@ static int announce_SAPAnnounceDel( sap_handler_t *p_sap,
msg_Dbg
(
p_sap
,
"%i announcements remaining"
,
p_sap
->
i_sessions
);
vlc_
mutex_unlock
(
&
p_sap
->
object_lock
);
vlc_
object_unlock
(
p_sap
);
return
VLC_SUCCESS
;
}
...
...
src/video_output/vout_intf.c
View file @
7e413aa7
...
...
@@ -158,17 +158,17 @@ void vout_ReleaseWindow( vout_thread_t *p_vout, void *p_window )
if
(
!
p_intf
)
return
;
vlc_
mutex_lock
(
&
p_intf
->
object_lock
);
vlc_
object_lock
(
p_intf
);
if
(
p_intf
->
b_dead
)
{
vlc_
mutex_unlock
(
&
p_intf
->
object_lock
);
vlc_
object_unlock
(
p_intf
);
return
;
}
if
(
!
p_intf
->
pf_release_window
)
{
msg_Err
(
p_vout
,
"no pf_release_window"
);
vlc_
mutex_unlock
(
&
p_intf
->
object_lock
);
vlc_
object_unlock
(
p_intf
);
vlc_object_release
(
p_intf
);
return
;
}
...
...
@@ -176,7 +176,7 @@ void vout_ReleaseWindow( vout_thread_t *p_vout, void *p_window )
p_intf
->
pf_release_window
(
p_intf
,
p_window
);
p_vout
->
p_parent_intf
=
NULL
;
vlc_
mutex_unlock
(
&
p_intf
->
object_lock
);
vlc_
object_unlock
(
p_intf
);
vlc_object_release
(
p_intf
);
}
...
...
@@ -188,22 +188,22 @@ int vout_ControlWindow( vout_thread_t *p_vout, void *p_window,
if
(
!
p_intf
)
return
VLC_EGENERIC
;
vlc_
mutex_lock
(
&
p_intf
->
object_lock
);
vlc_
object_lock
(
p_intf
);
if
(
p_intf
->
b_dead
)
{
vlc_
mutex_unlock
(
&
p_intf
->
object_lock
);
vlc_
object_unlock
(
p_intf
);
return
VLC_EGENERIC
;
}
if
(
!
p_intf
->
pf_control_window
)
{
msg_Err
(
p_vout
,
"no pf_control_window"
);
vlc_
mutex_unlock
(
&
p_intf
->
object_lock
);
vlc_
object_unlock
(
p_intf
);
return
VLC_EGENERIC
;
}
i_ret
=
p_intf
->
pf_control_window
(
p_intf
,
p_window
,
i_query
,
args
);
vlc_
mutex_unlock
(
&
p_intf
->
object_lock
);
vlc_
object_unlock
(
p_intf
);
return
i_ret
;
}
...
...
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