[vlc-devel] commit: Remove redumdant b_play code ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed Jun 4 18:49:28 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Jun 4 19:50:20 2008 +0300| [ed2a403f13bf8265d16ec5a721f8b27e07945e79]
Remove redumdant b_play code
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ed2a403f13bf8265d16ec5a721f8b27e07945e79
---
include/vlc_interface.h | 1 -
modules/gui/macosx/intf.m | 6 ------
modules/gui/qt4/qt4.cpp | 9 ---------
modules/gui/skins2/src/skin_main.cpp | 16 ----------------
modules/gui/wince/wince.cpp | 13 -------------
modules/gui/wxwidgets/wxwidgets.cpp | 16 ----------------
src/interface/interface.c | 4 ----
src/libvlc.c | 1 -
8 files changed, 0 insertions(+), 66 deletions(-)
diff --git a/include/vlc_interface.h b/include/vlc_interface.h
index 23fa959..6e78ef2 100644
--- a/include/vlc_interface.h
+++ b/include/vlc_interface.h
@@ -54,7 +54,6 @@ struct intf_thread_t
VLC_COMMON_MEMBERS
/* Thread properties and locks */
- bool b_play;
bool b_should_run_on_first_thread;
/* Specific interfaces */
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 29ab5a0..cc9e77f 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -108,7 +108,6 @@ int OpenIntf ( vlc_object_t *p_this )
p_intf->p_sys->o_sendport = [[NSPort port] retain];
p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
- p_intf->b_play = true;
p_intf->pf_run = Run;
p_intf->b_should_run_on_first_thread = true;
@@ -560,11 +559,6 @@ static VLCMain *_o_sharedMainInstance = nil;
p_playlist = pl_Yield( p_intf );
- /* Check if we need to start playing */
- if( p_intf->b_play )
- {
- playlist_Control( p_playlist, PLAYLIST_PLAY, false );
- }
var_Create( p_playlist, "fullscreen", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
val.b_bool = false;
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 97ea626..bba8a65 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -235,9 +235,6 @@ static int Open( vlc_object_t *p_this )
p_intf->p_sys->p_playlist = pl_Yield( p_intf );
p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
- /* We support play on start */
- p_intf->b_play = true;
-
return VLC_SUCCESS;
}
@@ -353,12 +350,6 @@ static void Init( intf_thread_t *p_intf )
app->installTranslator( &qtTranslator );
#endif //ENABLE_NLS
- /* Start playing if needed */
- if( !p_intf->pf_show_dialog && p_intf->b_play )
- {
- playlist_Control( THEPL, PLAYLIST_PLAY, false );
- }
-
/* Explain to the core how to show a dialog :D */
p_intf->pf_show_dialog = ShowDialog;
diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index 1e63337..2784db7 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -163,9 +163,6 @@ static int Open( vlc_object_t *p_this )
Dialogs::instance( p_intf );
ThemeRepository::instance( p_intf );
- // We support play on start
- p_intf->b_play = true;
-
return( VLC_SUCCESS );
}
@@ -252,19 +249,6 @@ static void Run( intf_thread_t *p_intf )
// Get the instance of OSLoop
OSLoop *loop = OSFactory::instance( p_intf )->getOSLoop();
- // Check if we need to start playing
- if( p_intf->b_play )
- {
- playlist_t *p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( p_playlist )
- {
- playlist_Control( p_playlist, PLAYLIST_PLAY, false );
- vlc_object_release( p_playlist );
- }
- }
-
// Enter the main event loop
loop->run();
diff --git a/modules/gui/wince/wince.cpp b/modules/gui/wince/wince.cpp
index 29b9dae..07306ec 100644
--- a/modules/gui/wince/wince.cpp
+++ b/modules/gui/wince/wince.cpp
@@ -253,19 +253,6 @@ static void MainLoop( intf_thread_t *p_intf )
/* OK, initialization is over */
vlc_thread_ready( p_intf );
- /* Check if we need to start playing */
- if( !p_intf->pf_show_dialog && p_intf->b_play )
- {
- playlist_t *p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( p_playlist )
- {
- playlist_Play( p_playlist );
- vlc_object_release( p_playlist );
- }
- }
-
// Main message loop
while( GetMessage( &msg, NULL, 0, 0 ) > 0 )
{
diff --git a/modules/gui/wxwidgets/wxwidgets.cpp b/modules/gui/wxwidgets/wxwidgets.cpp
index 6cad370..13e1331 100644
--- a/modules/gui/wxwidgets/wxwidgets.cpp
+++ b/modules/gui/wxwidgets/wxwidgets.cpp
@@ -208,9 +208,6 @@ static int Open( vlc_object_t *p_this )
p_intf->pf_show_dialog = NULL;
- /* We support play on start */
- p_intf->b_play = true;
-
p_intf->p_sys->b_video_autosize =
config_GetInt( p_intf, "wx-autosize" );
@@ -390,19 +387,6 @@ bool Instance::OnInit()
/* OK, initialization is over */
vlc_thread_ready( p_intf );
- /* Check if we need to start playing */
- if( !p_intf->pf_show_dialog && p_intf->b_play )
- {
- playlist_t *p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( p_playlist )
- {
- playlist_Control( p_playlist, PLAYLIST_PLAY, false );
- vlc_object_release( p_playlist );
- }
- }
-
/* Return TRUE to tell program to continue (FALSE would terminate) */
return TRUE;
}
diff --git a/src/interface/interface.c b/src/interface/interface.c
index 7a39c07..1e15b8c 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -99,7 +99,6 @@ intf_thread_t* __intf_Create( vlc_object_t *p_this, const char *psz_module )
p_intf->pf_request_window = NULL;
p_intf->pf_release_window = NULL;
p_intf->pf_control_window = NULL;
- p_intf->b_play = false;
p_intf->b_interaction = false;
p_intf->b_should_run_on_first_thread = false;
@@ -224,9 +223,6 @@ static void RunInterface( intf_thread_t *p_intf )
vlc_object_unlock( p_intf );
}
- /* Reset play on start status */
- p_intf->b_play = false;
-
if( !p_intf->psz_switch_intf )
{
break;
diff --git a/src/libvlc.c b/src/libvlc.c
index ec267bc..5b2c7bc 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -1133,7 +1133,6 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc, char const *psz_module )
}
/* Try to run the interface */
- p_intf->b_play = false; /* TODO: remove b_play completely */
i_err = intf_RunThread( p_intf );
if( i_err )
{
More information about the vlc-devel
mailing list