]> git.sesse.net Git - vlc/commitdiff
Remove redumdant b_play code
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 4 Jun 2008 16:50:20 +0000 (19:50 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 4 Jun 2008 16:51:09 +0000 (19:51 +0300)
include/vlc_interface.h
modules/gui/macosx/intf.m
modules/gui/qt4/qt4.cpp
modules/gui/skins2/src/skin_main.cpp
modules/gui/wince/wince.cpp
modules/gui/wxwidgets/wxwidgets.cpp
src/interface/interface.c
src/libvlc.c

index 23fa959525ae4b443c19a2ecf9734a57663ed08e..6e78ef2053a0eb6ea85d4534f2a36caf0b9b5683 100644 (file)
@@ -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 */
index 29ab5a046a7cdf3a70b328804d68e4ce01b7bb45..cc9e77f46bdb814c7aca4efcad7058bf2f9f0b2c 100644 (file)
@@ -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;
 
index 97ea6266bd8901fde3f6c1b261cece1abf0f4363..bba8a657396ebf73bfd4deddbfc1ffc39b5d336e 100644 (file)
@@ -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;
 
index 1e63337292997a6c9474a29137ef90e18b4e20a2..2784db7abf929aa322e73792572b4ea49d660b65 100644 (file)
@@ -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();
 
index 29b9dae72c69073e97e886d5b7f7973c088299a5..07306ec36d36a1437c46f324ed5ad52db54d1389 100644 (file)
@@ -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 )
     {
index 6cad37058b364d2a48b2823d64de9b86e9ca1d6b..13e1331322947c9da0e1b1c1d4489a16415f543c 100644 (file)
@@ -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;
 }
index 7a39c07af68384da9878dc7fa028e56b4bb7ac8f..1e15b8c1b98be9519ed448697a62e34ce2cad7ff 100644 (file)
@@ -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;
index ec267bc42f66e9ffb267826456d4b9f4db6075cf..5b2c7bc87f3ae73eb0bc16d4267dc106873b8658 100644 (file)
@@ -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 )
     {