Commit c5bd872c authored by Eric Petit's avatar Eric Petit

Some clean-up. Playlist works again.

parent ae6f2253
......@@ -2,7 +2,7 @@
* intf_beos.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: Interface.cpp,v 1.2 2002/09/30 18:30:27 titer Exp $
* $Id: Interface.cpp,v 1.3 2002/10/10 23:11:52 titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -71,6 +71,10 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
}
p_intf->p_sys->p_input = NULL;
p_intf->p_sys->p_vlc_wrapper = new Intf_VLCWrapper( p_intf );
p_intf->p_sys->p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
p_intf->pf_run = Run;
......@@ -124,6 +128,13 @@ static void Run( intf_thread_t *p_intf )
{
while( !p_intf->b_die )
{
if( p_intf->p_sys->p_input == NULL )
{
p_intf->p_sys->p_input =
(input_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_INPUT,
FIND_ANYWHERE );
}
/* Update the input */
if( p_intf->p_sys->p_input != NULL )
{
......@@ -135,13 +146,6 @@ static void Run( intf_thread_t *p_intf )
/* Manage the slider */
p_intf->p_sys->p_window->updateInterface();
}
if( p_intf->p_sys->p_input == NULL )
{
p_intf->p_sys->p_input =
(input_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_INPUT,
FIND_ANYWHERE );
}
/* Wait a bit */
msleep( INTF_IDLE_SLEEP );
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* PlayListWindow.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: PlayListWindow.cpp,v 1.2 2002/09/30 18:30:27 titer Exp $
* $Id: PlayListWindow.cpp,v 1.3 2002/10/10 23:11:52 titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -58,12 +58,14 @@ enum
*****************************************************************************/
PlayListWindow::PlayListWindow( BRect frame, const char* name,
playlist_t *playlist,
InterfaceWindow* mainWindow )
InterfaceWindow* mainWindow,
intf_thread_t *p_interface )
: BWindow( frame, name, B_FLOATING_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
B_WILL_ACCEPT_FIRST_CLICK | B_ASYNCHRONOUS_CONTROLS ),
fPlaylist( playlist ),
fMainWindow( mainWindow )
{
this->p_intf = p_interface;
SetName( "playlist" );
// set up the main menu bar
......@@ -222,7 +224,7 @@ void
PlayListWindow::ReallyQuit()
{
Lock();
Hide();
Hide();
Quit();
}
......@@ -232,7 +234,7 @@ PlayListWindow::ReallyQuit()
void
PlayListWindow::UpdatePlaylist( bool rebuild )
{
/* if ( rebuild )
if ( rebuild )
{
// remove all items
int32 count = fListView->CountItems();
......@@ -241,8 +243,8 @@ PlayListWindow::UpdatePlaylist( bool rebuild )
// rebuild listview from VLC's playlist
for ( int i = 0; i < fPlaylist->i_size; i++ )
fListView->AddItem( new PlaylistItem( fPlaylist->p_item[i].psz_name ) );
fListView->AddItem( new PlaylistItem( fPlaylist->pp_items[i]->psz_name ) );
}
fListView->SetCurrent( fPlaylist->i_index );
fListView->SetPlaying( Intf_VLCWrapper::is_playing() ); */
fListView->SetPlaying( p_intf->p_sys->p_vlc_wrapper->is_playing() );
}
......@@ -2,7 +2,7 @@
* PlayListWindow.h: BeOS interface window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: PlayListWindow.h,v 1.2 2002/09/30 18:30:27 titer Exp $
* $Id: PlayListWindow.h,v 1.3 2002/10/10 23:11:52 titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au>
......@@ -40,7 +40,8 @@ class PlayListWindow : public BWindow
PlayListWindow(BRect frame,
const char* name,
playlist_t* playlist,
InterfaceWindow* mainWindow );
InterfaceWindow* mainWindow,
intf_thread_t *p_interface );
virtual ~PlayListWindow();
// BWindow
......@@ -54,11 +55,13 @@ class PlayListWindow : public BWindow
private:
playlist_t* fPlaylist;
PlaylistView* fListView;
BView* fBackgroundView;
BMenuBar* fMenuBar;
InterfaceWindow* fMainWindow;
playlist_t * fPlaylist;
PlaylistView * fListView;
BView * fBackgroundView;
BMenuBar * fMenuBar;
InterfaceWindow * fMainWindow;
intf_thread_t * p_intf;
};
#endif // BEOS_PLAY_LIST_WINDOW_H
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* intf_vlc_wrapper.h: BeOS plugin for vlc (derived from MacOS X port )
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: VlcWrapper.h,v 1.2 2002/09/30 18:30:27 titer Exp $
* $Id: VlcWrapper.h,v 1.3 2002/10/10 23:11:52 titer Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -24,6 +24,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
class InterfaceWindow;
class Intf_VLCWrapper;
/*****************************************************************************
* intf_sys_t: description and status of FB interface
......@@ -33,8 +34,9 @@ struct intf_sys_t
InterfaceWindow * p_window;
char i_key;
/* The input thread */
input_thread_t * p_input;
input_thread_t * p_input;
playlist_t * p_playlist;
aout_instance_t * p_aout;
/* DVD mode */
vlc_bool_t b_disabled_menus;
......@@ -43,6 +45,8 @@ struct intf_sys_t
int i_part;
int i_saved_volume;
int i_channel;
Intf_VLCWrapper * p_vlc_wrapper;
};
/* Intf_VLCWrapper is a singleton class
......@@ -143,8 +147,8 @@ public:
void loop();
//private:
Intf_VLCWrapper( intf_thread_t *p_if );
es_descriptor_t * p_audio_es;
Intf_VLCWrapper( intf_thread_t *p_intf );
es_descriptor_t * p_audio_es;
intf_thread_t *p_intf;
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment