Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
ed344453
Commit
ed344453
authored
Jul 24, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use pl_Yield and pl_Release instead of vlc_object_find.
parent
4a6b8ccc
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
102 additions
and
158 deletions
+102
-158
modules/gui/beos/InterfaceWindow.cpp
modules/gui/beos/InterfaceWindow.cpp
+2
-3
modules/gui/beos/ListViews.cpp
modules/gui/beos/ListViews.cpp
+6
-12
modules/gui/beos/PlayListWindow.cpp
modules/gui/beos/PlayListWindow.cpp
+2
-3
modules/gui/pda/pda.c
modules/gui/pda/pda.c
+4
-5
modules/gui/pda/pda_callbacks.c
modules/gui/pda/pda_callbacks.c
+15
-21
modules/gui/wince/dialogs.cpp
modules/gui/wince/dialogs.cpp
+4
-6
modules/gui/wince/interface.cpp
modules/gui/wince/interface.cpp
+9
-14
modules/gui/wince/iteminfo.cpp
modules/gui/wince/iteminfo.cpp
+2
-3
modules/gui/wince/menus.cpp
modules/gui/wince/menus.cpp
+2
-4
modules/gui/wince/open.cpp
modules/gui/wince/open.cpp
+2
-4
modules/gui/wince/playlist.cpp
modules/gui/wince/playlist.cpp
+46
-68
modules/gui/wince/timer.cpp
modules/gui/wince/timer.cpp
+4
-8
modules/video_output/caca.c
modules/video_output/caca.c
+2
-3
modules/video_output/msw/directx.c
modules/video_output/msw/directx.c
+2
-4
No files found.
modules/gui/beos/InterfaceWindow.cpp
View file @
ed344453
...
@@ -203,8 +203,7 @@ InterfaceWindow::InterfaceWindow( intf_thread_t * _p_intf, BRect frame,
...
@@ -203,8 +203,7 @@ InterfaceWindow::InterfaceWindow( intf_thread_t * _p_intf, BRect frame,
fLastUpdateTime
(
system_time
()
),
fLastUpdateTime
(
system_time
()
),
fSettings
(
new
BMessage
(
'
sett
'
)
)
fSettings
(
new
BMessage
(
'
sett
'
)
)
{
{
p_playlist
=
(
playlist_t
*
)
p_playlist
=
pl_Yield
(
p_intf
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
var_AddCallback
(
p_playlist
,
"intf-change"
,
PlaylistChanged
,
this
);
var_AddCallback
(
p_playlist
,
"intf-change"
,
PlaylistChanged
,
this
);
var_AddCallback
(
p_playlist
,
"item-change"
,
PlaylistChanged
,
this
);
var_AddCallback
(
p_playlist
,
"item-change"
,
PlaylistChanged
,
this
);
...
@@ -355,7 +354,7 @@ InterfaceWindow::~InterfaceWindow()
...
@@ -355,7 +354,7 @@ InterfaceWindow::~InterfaceWindow()
}
}
if
(
p_playlist
)
if
(
p_playlist
)
{
{
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
#if 0
#if 0
if( fPlaylistWindow )
if( fPlaylistWindow )
...
...
modules/gui/beos/ListViews.cpp
View file @
ed344453
...
@@ -690,13 +690,11 @@ PlaylistView::MouseDown( BPoint where )
...
@@ -690,13 +690,11 @@ PlaylistView::MouseDown( BPoint where )
// only do something if user clicked the same item twice
// only do something if user clicked the same item twice
if ( fLastClickedItem == item )
if ( fLastClickedItem == item )
{
{
playlist_t * p_playlist;
playlist_t * p_playlist = pl_Yield( p_intf );
p_playlist = (playlist_t *) vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist )
if( p_playlist )
{
{
playlist_Goto( p_playlist, i );
playlist_Goto( p_playlist, i );
vlc_object_r
elease( p_playlist );
pl_R
elease( p_playlist );
}
}
handled = true;
handled = true;
}
}
...
@@ -1079,9 +1077,7 @@ PlaylistView::SetDisplayMode( uint32 mode )
...
@@ -1079,9 +1077,7 @@ PlaylistView::SetDisplayMode( uint32 mode )
BListItem*
BListItem*
PlaylistView::_PlayingItem() const
PlaylistView::_PlayingItem() const
{
{
playlist_t * p_playlist;
playlist_t * p_playlist = pl_Yield( p_intf );
p_playlist = (playlist_t *) vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( !p_playlist )
if( !p_playlist )
{
{
...
@@ -1089,7 +1085,7 @@ PlaylistView::_PlayingItem() const
...
@@ -1089,7 +1085,7 @@ PlaylistView::_PlayingItem() const
}
}
BListItem * item = ItemAt( p_playlist->i_index );
BListItem * item = ItemAt( p_playlist->i_index );
vlc_object_r
elease( p_playlist );
pl_R
elease( p_playlist );
return item;
return item;
}
}
...
@@ -1103,9 +1099,7 @@ PlaylistView::_SetPlayingIndex( BListItem* playingItem )
...
@@ -1103,9 +1099,7 @@ PlaylistView::_SetPlayingIndex( BListItem* playingItem )
{
{
if ( item == playingItem )
if ( item == playingItem )
{
{
playlist_t * p_playlist;
playlist_t * p_playlist = pl_Yield( p_intf );
p_playlist = (playlist_t *) vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( !p_playlist )
if( !p_playlist )
{
{
...
@@ -1115,7 +1109,7 @@ PlaylistView::_SetPlayingIndex( BListItem* playingItem )
...
@@ -1115,7 +1109,7 @@ PlaylistView::_SetPlayingIndex( BListItem* playingItem )
playlist_Goto( p_playlist, i );
playlist_Goto( p_playlist, i );
SetCurrent( i );
SetCurrent( i );
vlc_object_r
elease( p_playlist );
pl_R
elease( p_playlist );
break;
break;
}
}
}
}
...
...
modules/gui/beos/PlayListWindow.cpp
View file @
ed344453
...
@@ -291,11 +291,10 @@ PlayListWindow::UpdatePlaylist( bool rebuild )
...
@@ -291,11 +291,10 @@ PlayListWindow::UpdatePlaylist( bool rebuild )
if( rebuild )
if( rebuild )
fListView->RebuildList();
fListView->RebuildList();
p_playlist = (playlist_t *)
p_playlist = pl_Yield( p_intf );
vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
fListView->SetCurrent( p_playlist->i_index );
fListView->SetCurrent( p_playlist->i_index );
fListView->SetPlaying( p_playlist->status.i_status == PLAYLIST_RUNNING );
fListView->SetPlaying( p_playlist->status.i_status == PLAYLIST_RUNNING );
vlc_object_r
elease( p_playlist );
pl_R
elease( p_playlist );
_CheckItemsEnableState();
_CheckItemsEnableState();
}
}
...
...
modules/gui/pda/pda.c
View file @
ed344453
...
@@ -288,7 +288,7 @@ static void Run( intf_thread_t *p_intf )
...
@@ -288,7 +288,7 @@ static void Run( intf_thread_t *p_intf )
gtk_tree_view_column_set_sort_column_id(p_column, 2);
gtk_tree_view_column_set_sort_column_id(p_column, 2);
#endif
#endif
/* update the playlist */
/* update the playlist */
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
p_playlist
=
pl_Yield
(
p_intf
);
p_playlist_store
=
gtk_list_store_new
(
3
,
p_playlist_store
=
gtk_list_store_new
(
3
,
G_TYPE_STRING
,
/* Filename */
G_TYPE_STRING
,
/* Filename */
G_TYPE_STRING
,
/* Time */
G_TYPE_STRING
,
/* Time */
...
@@ -296,7 +296,7 @@ static void Run( intf_thread_t *p_intf )
...
@@ -296,7 +296,7 @@ static void Run( intf_thread_t *p_intf )
PlaylistRebuildListStore
(
p_intf
,
p_playlist_store
,
p_playlist
);
PlaylistRebuildListStore
(
p_intf
,
p_playlist_store
,
p_playlist
);
gtk_tree_view_set_model
(
GTK_TREE_VIEW
(
p_intf
->
p_sys
->
p_tvplaylist
),
GTK_TREE_MODEL
(
p_playlist_store
));
gtk_tree_view_set_model
(
GTK_TREE_VIEW
(
p_intf
->
p_sys
->
p_tvplaylist
),
GTK_TREE_MODEL
(
p_playlist_store
));
g_object_unref
(
p_playlist_store
);
g_object_unref
(
p_playlist_store
);
vlc_object_r
elease
(
p_playlist
);
/* Free the playlist */
pl_R
elease
(
p_playlist
);
/* Free the playlist */
gtk_tree_selection_set_mode
(
gtk_tree_view_get_selection
(
GTK_TREE_VIEW
(
p_intf
->
p_sys
->
p_tvplaylist
)),
GTK_SELECTION_MULTIPLE
);
gtk_tree_selection_set_mode
(
gtk_tree_view_get_selection
(
GTK_TREE_VIEW
(
p_intf
->
p_sys
->
p_tvplaylist
)),
GTK_SELECTION_MULTIPLE
);
/* Column properties */
/* Column properties */
...
@@ -426,8 +426,7 @@ static int Manage( intf_thread_t *p_intf )
...
@@ -426,8 +426,7 @@ static int Manage( intf_thread_t *p_intf )
p_intf
->
p_sys
->
b_playing
=
1
;
p_intf
->
p_sys
->
b_playing
=
1
;
/* update playlist interface */
/* update playlist interface */
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_playlist
=
pl_Yield
(
p_intf
);
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
!=
NULL
)
if
(
p_playlist
!=
NULL
)
{
{
p_liststore
=
gtk_list_store_new
(
3
,
p_liststore
=
gtk_list_store_new
(
3
,
...
@@ -437,7 +436,7 @@ static int Manage( intf_thread_t *p_intf )
...
@@ -437,7 +436,7 @@ static int Manage( intf_thread_t *p_intf )
PlaylistRebuildListStore
(
p_intf
,
p_liststore
,
p_playlist
);
PlaylistRebuildListStore
(
p_intf
,
p_liststore
,
p_playlist
);
gtk_tree_view_set_model
(
p_intf
->
p_sys
->
p_tvplaylist
,
(
GtkTreeModel
*
)
p_liststore
);
gtk_tree_view_set_model
(
p_intf
->
p_sys
->
p_tvplaylist
,
(
GtkTreeModel
*
)
p_liststore
);
g_object_unref
(
p_liststore
);
g_object_unref
(
p_liststore
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
/* Manage the slider */
/* Manage the slider */
...
...
modules/gui/pda/pda_callbacks.c
View file @
ed344453
...
@@ -94,8 +94,7 @@ static void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options,
...
@@ -94,8 +94,7 @@ static void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options,
int
i_id
,
i_pos
=
0
;
int
i_id
,
i_pos
=
0
;
GtkTreeView
*
p_tvplaylist
=
NULL
;
GtkTreeView
*
p_tvplaylist
=
NULL
;
p_playlist
=
(
playlist_t
*
)
p_playlist
=
pl_Yield
(
p_intf
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
if
(
p_playlist
==
NULL
)
{
/* Bail out when VLC's playlist object is not found. */
{
/* Bail out when VLC's playlist object is not found. */
...
@@ -147,7 +146,7 @@ static void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options,
...
@@ -147,7 +146,7 @@ static void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options,
free
(
ppsz_options
);
free
(
ppsz_options
);
}
}
}
}
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
void
PlaylistRebuildListStore
(
intf_thread_t
*
p_intf
,
void
PlaylistRebuildListStore
(
intf_thread_t
*
p_intf
,
...
@@ -379,7 +378,7 @@ void onPause(GtkButton *button, gpointer user_data)
...
@@ -379,7 +378,7 @@ void onPause(GtkButton *button, gpointer user_data)
void
onPlay
(
GtkButton
*
button
,
gpointer
user_data
)
void
onPlay
(
GtkButton
*
button
,
gpointer
user_data
)
{
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
GTK_WIDGET
(
button
)
);
intf_thread_t
*
p_intf
=
GtkGetIntf
(
GTK_WIDGET
(
button
)
);
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
if
(
p_playlist
)
if
(
p_playlist
)
{
{
...
@@ -394,19 +393,18 @@ void onPlay(GtkButton *button, gpointer user_data)
...
@@ -394,19 +393,18 @@ void onPlay(GtkButton *button, gpointer user_data)
{
{
vlc_object_unlock
(
p_playlist
);
vlc_object_unlock
(
p_playlist
);
}
}
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
}
}
void
onStop
(
GtkButton
*
button
,
gpointer
user_data
)
void
onStop
(
GtkButton
*
button
,
gpointer
user_data
)
{
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
GTK_WIDGET
(
button
)
);
intf_thread_t
*
p_intf
=
GtkGetIntf
(
GTK_WIDGET
(
button
)
);
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
FIND_ANYWHERE
);
if
(
p_playlist
)
if
(
p_playlist
)
{
{
playlist_Stop
(
p_playlist
);
playlist_Stop
(
p_playlist
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
gdk_window_raise
(
p_intf
->
p_sys
->
p_window
->
window
);
gdk_window_raise
(
p_intf
->
p_sys
->
p_window
->
window
);
}
}
}
}
...
@@ -773,8 +771,7 @@ void onPlaylistRow(GtkTreeView *treeview, GtkTreePath *path,
...
@@ -773,8 +771,7 @@ void onPlaylistRow(GtkTreeView *treeview, GtkTreePath *path,
{
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
GTK_WIDGET
(
treeview
)
);
intf_thread_t
*
p_intf
=
GtkGetIntf
(
GTK_WIDGET
(
treeview
)
);
GtkTreeSelection
*
p_selection
=
gtk_tree_view_get_selection
(
treeview
);
GtkTreeSelection
*
p_selection
=
gtk_tree_view_get_selection
(
treeview
);
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
if
(
p_playlist
==
NULL
)
{
{
...
@@ -805,15 +802,14 @@ void onPlaylistRow(GtkTreeView *treeview, GtkTreePath *path,
...
@@ -805,15 +802,14 @@ void onPlaylistRow(GtkTreeView *treeview, GtkTreePath *path,
i_skip
=
i_row
-
p_playlist
->
i_current_index
;
i_skip
=
i_row
-
p_playlist
->
i_current_index
;
playlist_Skip
(
p_playlist
,
i_skip
);
playlist_Skip
(
p_playlist
,
i_skip
);
}
}
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
void
onUpdatePlaylist
(
GtkButton
*
button
,
gpointer
user_data
)
void
onUpdatePlaylist
(
GtkButton
*
button
,
gpointer
user_data
)
{
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
FIND_ANYWHERE
);
GtkTreeView
*
p_tvplaylist
=
NULL
;
GtkTreeView
*
p_tvplaylist
=
NULL
;
if
(
p_playlist
==
NULL
)
if
(
p_playlist
==
NULL
)
...
@@ -838,7 +834,7 @@ void onUpdatePlaylist(GtkButton *button, gpointer user_data)
...
@@ -838,7 +834,7 @@ void onUpdatePlaylist(GtkButton *button, gpointer user_data)
g_object_unref
(
p_model
);
g_object_unref
(
p_model
);
}
}
}
}
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
static
void
deleteItemFromPlaylist
(
gpointer
data
,
gpointer
user_data
)
static
void
deleteItemFromPlaylist
(
gpointer
data
,
gpointer
user_data
)
...
@@ -849,8 +845,7 @@ static void deleteItemFromPlaylist(gpointer data, gpointer user_data)
...
@@ -849,8 +845,7 @@ static void deleteItemFromPlaylist(gpointer data, gpointer user_data)
void
onDeletePlaylist
(
GtkButton
*
button
,
gpointer
user_data
)
void
onDeletePlaylist
(
GtkButton
*
button
,
gpointer
user_data
)
{
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
FIND_ANYWHERE
);
GtkTreeView
*
p_tvplaylist
;
GtkTreeView
*
p_tvplaylist
;
/* Delete an arbitrary item from the playlist */
/* Delete an arbitrary item from the playlist */
...
@@ -912,15 +907,14 @@ void onDeletePlaylist(GtkButton *button, gpointer user_data)
...
@@ -912,15 +907,14 @@ void onDeletePlaylist(GtkButton *button, gpointer user_data)
g_object_unref
(
p_store
);
g_object_unref
(
p_store
);
}
}
}
}
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
void
onClearPlaylist
(
GtkButton
*
button
,
gpointer
user_data
)
void
onClearPlaylist
(
GtkButton
*
button
,
gpointer
user_data
)
{
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
FIND_ANYWHERE
);
GtkTreeView
*
p_tvplaylist
;
GtkTreeView
*
p_tvplaylist
;
int
item
;
int
item
;
...
@@ -933,7 +927,7 @@ void onClearPlaylist(GtkButton *button, gpointer user_data)
...
@@ -933,7 +927,7 @@ void onClearPlaylist(GtkButton *button, gpointer user_data)
{
{
msg_Err
(
p_playlist
,
"fix pda delete"
);
msg_Err
(
p_playlist
,
"fix pda delete"
);
}
}
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
// Remove all entries from the Playlist widget.
// Remove all entries from the Playlist widget.
p_tvplaylist
=
(
GtkTreeView
*
)
lookup_widget
(
GTK_WIDGET
(
button
),
"tvPlaylist"
);
p_tvplaylist
=
(
GtkTreeView
*
)
lookup_widget
(
GTK_WIDGET
(
button
),
"tvPlaylist"
);
...
@@ -1045,7 +1039,7 @@ void onAddTranscodeToPlaylist(GtkButton *button, gpointer user_data)
...
@@ -1045,7 +1039,7 @@ void onAddTranscodeToPlaylist(GtkButton *button, gpointer user_data)
}
}
/* Update the playlist */
/* Update the playlist */
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
if
(
p_playlist
==
NULL
)
return
;
if
(
p_playlist
==
NULL
)
return
;
/* Get all the options. */
/* Get all the options. */
...
...
modules/gui/wince/dialogs.cpp
View file @
ed344453
...
@@ -332,8 +332,7 @@ void DialogsProvider::OnOpenFileSimple( int i_arg )
...
@@ -332,8 +332,7 @@ void DialogsProvider::OnOpenFileSimple( int i_arg )
TCHAR
szFile
[
MAX_PATH
]
=
_T
(
"
\0
"
);
TCHAR
szFile
[
MAX_PATH
]
=
_T
(
"
\0
"
);
static
TCHAR
szFilter
[]
=
_T
(
"All (*.*)
\0
*.*
\0
"
);
static
TCHAR
szFilter
[]
=
_T
(
"All (*.*)
\0
*.*
\0
"
);
playlist_t
*
p_playlist
=
(
playlist_t
*
)
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
return
;
if
(
p_playlist
==
NULL
)
return
;
memset
(
&
ofn
,
0
,
sizeof
(
OPENFILENAME
)
);
memset
(
&
ofn
,
0
,
sizeof
(
OPENFILENAME
)
);
...
@@ -367,7 +366,7 @@ void DialogsProvider::OnOpenFileSimple( int i_arg )
...
@@ -367,7 +366,7 @@ void DialogsProvider::OnOpenFileSimple( int i_arg )
PLAYLIST_APPEND
|
(
i_arg
?
PLAYLIST_GO
:
0
),
PLAYLIST_END
);
PLAYLIST_APPEND
|
(
i_arg
?
PLAYLIST_GO
:
0
),
PLAYLIST_END
);
}
}
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
void
DialogsProvider
::
OnOpenDirectory
(
int
i_arg
)
void
DialogsProvider
::
OnOpenDirectory
(
int
i_arg
)
...
@@ -406,8 +405,7 @@ void DialogsProvider::OnOpenDirectory( int i_arg )
...
@@ -406,8 +405,7 @@ void DialogsProvider::OnOpenDirectory( int i_arg )
if
(
!
SUCCEEDED
(
SHGetMalloc
(
&
p_malloc
)
)
)
goto
error
;
if
(
!
SUCCEEDED
(
SHGetMalloc
(
&
p_malloc
)
)
)
goto
error
;
p_playlist
=
(
playlist_t
*
)
p_playlist
=
pl_Yield
(
p_intf
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
!
p_playlist
)
goto
error
;
if
(
!
p_playlist
)
goto
error
;
memset
(
&
bi
,
0
,
sizeof
(
BROWSEINFO
)
);
memset
(
&
bi
,
0
,
sizeof
(
BROWSEINFO
)
);
...
@@ -433,7 +431,7 @@ void DialogsProvider::OnOpenDirectory( int i_arg )
...
@@ -433,7 +431,7 @@ void DialogsProvider::OnOpenDirectory( int i_arg )
error:
error:
if
(
p_malloc
)
p_malloc
->
Release
();
if
(
p_malloc
)
p_malloc
->
Release
();
if
(
p_playlist
)
vlc_object_r
elease
(
p_playlist
);
if
(
p_playlist
)
pl_R
elease
(
p_playlist
);
#ifdef UNDER_CE
#ifdef UNDER_CE
FreeLibrary
(
ceshell_dll
);
FreeLibrary
(
ceshell_dll
);
...
...
modules/gui/wince/interface.cpp
View file @
ed344453
...
@@ -637,8 +637,7 @@ void Interface::OnShowDialog( int i_dialog_event )
...
@@ -637,8 +637,7 @@ void Interface::OnShowDialog( int i_dialog_event )
void
Interface
::
OnPlayStream
(
void
)
void
Interface
::
OnPlayStream
(
void
)
{
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
return
;
if
(
p_playlist
==
NULL
)
return
;
if
(
p_playlist
->
i_size
)
if
(
p_playlist
->
i_size
)
...
@@ -653,7 +652,7 @@ void Interface::OnPlayStream( void )
...
@@ -653,7 +652,7 @@ void Interface::OnPlayStream( void )
/* No stream was playing, start one */
/* No stream was playing, start one */
playlist_Play
(
p_playlist
);
playlist_Play
(
p_playlist
);
TogglePlayButton
(
PLAYING_S
);
TogglePlayButton
(
PLAYING_S
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
;
return
;
}
}
...
@@ -673,14 +672,13 @@ void Interface::OnPlayStream( void )
...
@@ -673,14 +672,13 @@ void Interface::OnPlayStream( void )
TogglePlayButton
(
state
.
i_int
);
TogglePlayButton
(
state
.
i_int
);
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
vlc_object_release
(
p_playlist
);
}
}
else
else
{
{
/* If the playlist is empty, open a file requester instead */
/* If the playlist is empty, open a file requester instead */
vlc_object_release
(
p_playlist
);
OnShowDialog
(
ID_FILE_QUICKOPEN
);
OnShowDialog
(
ID_FILE_QUICKOPEN
);
}
}
pl_Release
(
p_playlist
);
}
}
void
Interface
::
TogglePlayButton
(
int
i_playing_status
)
void
Interface
::
TogglePlayButton
(
int
i_playing_status
)
...
@@ -812,33 +810,30 @@ void Interface::VolumeUpdate()
...
@@ -812,33 +810,30 @@ void Interface::VolumeUpdate()
void
Interface
::
OnStopStream
(
void
)
void
Interface
::
OnStopStream
(
void
)
{
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
return
;
if
(
p_playlist
==
NULL
)
return
;
playlist_Stop
(
p_playlist
);
playlist_Stop
(
p_playlist
);
TogglePlayButton
(
PAUSE_S
);
TogglePlayButton
(
PAUSE_S
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
void
Interface
::
OnPrevStream
(
void
)
void
Interface
::
OnPrevStream
(
void
)
{
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
return
;
if
(
p_playlist
==
NULL
)
return
;
playlist_Prev
(
p_playlist
);
playlist_Prev
(
p_playlist
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
void
Interface
::
OnNextStream
(
void
)
void
Interface
::
OnNextStream
(
void
)
{
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
return
;
if
(
p_playlist
==
NULL
)
return
;
playlist_Next
(
p_playlist
);
playlist_Next
(
p_playlist
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
void
Interface
::
OnSlowStream
(
void
)
void
Interface
::
OnSlowStream
(
void
)
...
...
modules/gui/wince/iteminfo.cpp
View file @
ed344453
...
@@ -269,12 +269,11 @@ void ItemInfoDialog::OnOk()
...
@@ -269,12 +269,11 @@ void ItemInfoDialog::OnOk()
vlc_mutex_lock
(
&
p_item
->
input
.
lock
);
vlc_mutex_lock
(
&
p_item
->
input
.
lock
);
bool
b_old_enabled
=
p_item
->
b_enabled
;
bool
b_old_enabled
=
p_item
->
b_enabled
;
playlist_t
*
p_playlist
=
(
playlist_t
*
)
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
!=
NULL
)
if
(
p_playlist
!=
NULL
)
{
{
b_state
=
SendMessage
(
enabled_checkbox
,
BM_GETCHECK
,
0
,
0
);
b_state
=
SendMessage
(
enabled_checkbox
,
BM_GETCHECK
,
0
,
0
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
p_item
->
b_enabled
=
(
b_state
&
BST_CHECKED
)
?
true
:
false
;
p_item
->
b_enabled
=
(
b_state
&
BST_CHECKED
)
?
true
:
false
;
...
...
modules/gui/wince/menus.cpp
View file @
ed344453
...
@@ -221,15 +221,13 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point )
...
@@ -221,15 +221,13 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point )
}
}
else
else
{
{
playlist_t
*
p_playlist
=
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
&&
p_playlist
->
i_size
)
if
(
p_playlist
&&
p_playlist
->
i_size
)
{
{
AppendMenu
(
hmenu
,
MF_SEPARATOR
,
0
,
_T
(
""
)
);
AppendMenu
(
hmenu
,
MF_SEPARATOR
,
0
,
_T
(
""
)
);
AppendMenu
(
hmenu
,
MF_STRING
,
PlayStream_Event
,
_T
(
"Play"
)
);
AppendMenu
(
hmenu
,
MF_STRING
,
PlayStream_Event
,
_T
(
"Play"
)
);
}
}
if
(
p_playlist
)
vlc_object_r
elease
(
p_playlist
);
if
(
p_playlist
)
pl_R
elease
(
p_playlist
);
}
}
AppendMenu
(
hmenu
,
MF_POPUP
|
MF_STRING
,
(
UINT
)
MiscMenu
(
p_intf
),
AppendMenu
(
hmenu
,
MF_POPUP
|
MF_STRING
,
(
UINT
)
MiscMenu
(
p_intf
),
...
...
modules/gui/wince/open.cpp
View file @
ed344453
...
@@ -609,9 +609,7 @@ void OpenDialog::OnOk()
...
@@ -609,9 +609,7 @@ void OpenDialog::OnOk()
ComboBox_SetCurSel
(
mrl_combo
,
ComboBox_GetCount
(
mrl_combo
)
-
1
);
ComboBox_SetCurSel
(
mrl_combo
,
ComboBox_GetCount
(
mrl_combo
)
-
1
);
/* Update the playlist */
/* Update the playlist */
playlist_t
*
p_playlist
=
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
return
;
if
(
p_playlist
==
NULL
)
return
;
for
(
int
i
=
0
;
i
<
i_args
;
i
++
)
for
(
int
i
=
0
;
i
<
i_args
;
i
++
)
...
@@ -657,7 +655,7 @@ void OpenDialog::OnOk()
...
@@ -657,7 +655,7 @@ void OpenDialog::OnOk()
free
(
pp_args
[
i_args
]
);
free
(
pp_args
[
i_args
]
);
if
(
!
i_args
)
free
(
pp_args
);
if
(
!
i_args
)
free
(
pp_args
);
}
}
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
/*****************************************************************************
/*****************************************************************************
...
...
modules/gui/wince/playlist.cpp
View file @
ed344453
This diff is collapsed.
Click to expand it.
modules/gui/wince/timer.cpp
View file @
ed344453
...
@@ -52,13 +52,11 @@ Timer::Timer( intf_thread_t *_p_intf, HWND hwnd, Interface *_p_main_interface)
...
@@ -52,13 +52,11 @@ Timer::Timer( intf_thread_t *_p_intf, HWND hwnd, Interface *_p_main_interface)
i_old_rate
=
INPUT_RATE_DEFAULT
;
i_old_rate
=
INPUT_RATE_DEFAULT
;
/* Register callback for the intf-popupmenu variable */
/* Register callback for the intf-popupmenu variable */
playlist_t
*
p_playlist
=
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
!=
NULL
)
if
(
p_playlist
!=
NULL
)
{
{
var_AddCallback
(
p_playlist
,
"intf-popupmenu"
,
PopupMenuCB
,
p_intf
);
var_AddCallback
(
p_playlist
,
"intf-popupmenu"
,
PopupMenuCB
,
p_intf
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
SetTimer
(
hwnd
,
1
,
200
/*milliseconds*/
,
NULL
);
SetTimer
(
hwnd
,
1
,
200
/*milliseconds*/
,
NULL
);
...
@@ -67,13 +65,11 @@ Timer::Timer( intf_thread_t *_p_intf, HWND hwnd, Interface *_p_main_interface)
...
@@ -67,13 +65,11 @@ Timer::Timer( intf_thread_t *_p_intf, HWND hwnd, Interface *_p_main_interface)
Timer
::~
Timer
()
Timer
::~
Timer
()
{
{
/* Unregister callback */
/* Unregister callback */
playlist_t
*
p_playlist
=
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
!=
NULL
)
if
(
p_playlist
!=
NULL
)
{
{
var_DelCallback
(
p_playlist
,
"intf-popupmenu"
,
PopupMenuCB
,
p_intf
);
var_DelCallback
(
p_playlist
,
"intf-popupmenu"
,
PopupMenuCB
,
p_intf
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
}
}
...
...
modules/video_output/caca.c
View file @
ed344453
...
@@ -371,12 +371,11 @@ static int Manage( vout_thread_t *p_vout )
...
@@ -371,12 +371,11 @@ static int Manage( vout_thread_t *p_vout )
break
;
break
;
case
CACA_EVENT_QUIT
:
case
CACA_EVENT_QUIT
:
{
{
p_playlist
=
vlc_object_find
(
p_vout
,
p_playlist
=
pl_Yield
(
p_vout
);
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
)
if
(
p_playlist
)
{
{
playlist_Stop
(
p_playlist
);
playlist_Stop
(
p_playlist
);
vlc_object_release
(
p_playlis
t
);
pl_Release
(
p_vou
t
);
}
}
vlc_object_kill
(
p_vout
->
p_libvlc
);
vlc_object_kill
(
p_vout
->
p_libvlc
);
break
;
break
;
...
...
modules/video_output/msw/directx.c
View file @
ed344453
...
@@ -2123,17 +2123,15 @@ static int WallpaperCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -2123,17 +2123,15 @@ static int WallpaperCallback( vlc_object_t *p_this, char const *psz_cmd,
if
(
(
newval
.
b_bool
&&
!
p_vout
->
p_sys
->
b_wallpaper
)
||
if
(
(
newval
.
b_bool
&&
!
p_vout
->
p_sys
->
b_wallpaper
)
||
(
!
newval
.
b_bool
&&
p_vout
->
p_sys
->
b_wallpaper
)
)
(
!
newval
.
b_bool
&&
p_vout
->
p_sys
->
b_wallpaper
)
)
{
{
playlist_t
*
p_playlist
;
playlist_t
*
p_playlist
=
pl_Yield
(
p_vout
)
;
p_playlist
=
vlc_object_find
(
p_this
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
)
if
(
p_playlist
)
{
{
/* Modify playlist as well because the vout might have to be
/* Modify playlist as well because the vout might have to be
* restarted */
* restarted */
var_Create
(
p_playlist
,
"directx-wallpaper"
,
VLC_VAR_BOOL
);
var_Create
(
p_playlist
,
"directx-wallpaper"
,
VLC_VAR_BOOL
);
var_Set
(
p_playlist
,
"directx-wallpaper"
,
newval
);
var_Set
(
p_playlist
,
"directx-wallpaper"
,
newval
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
p_vout
->
p_sys
->
i_changes
|=
DX_WALLPAPER_CHANGE
;
p_vout
->
p_sys
->
i_changes
|=
DX_WALLPAPER_CHANGE
;
...
...
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