Commit 18efcf5c authored by Clément Stenac's avatar Clément Stenac

* Add switch to skins

* Fixes to dialog singletons
* Forgotten files (definitions of aout_Visual*, unimplemented at the moment)
parent f4978776
...@@ -1027,11 +1027,11 @@ libdvdnav: libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2 ...@@ -1027,11 +1027,11 @@ libdvdnav: libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2
patch -p 0 < Patches/libdvdnav-mactel.patch patch -p 0 < Patches/libdvdnav-mactel.patch
(cd $@; ./autogen.sh noconfig) (cd $@; ./autogen.sh noconfig)
.dvdnav: libdvdnav .dvdcss .dvdnav: libdvdnav
ifdef HAVE_WIN32 ifdef HAVE_WIN32
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) -Dssize_t=long" && make && make install) (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) -Dssize_t=long" && make && make install)
else else
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) CFLAGS="$(CFLAGS) -Dlseek64=lseek -Doff64_t=off_t" && make && make install) (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) CFLAGS="$(CFLAGS) -Dlseek64=lseek -Doff64_t=off_t" && make && make install)
endif endif
$(INSTALL_NAME) $(INSTALL_NAME)
touch $@ touch $@
......
...@@ -200,6 +200,12 @@ VLC_EXPORT( int, __aout_VolumeMute, ( vlc_object_t *, audio_volume_t * ) ); ...@@ -200,6 +200,12 @@ VLC_EXPORT( int, __aout_VolumeMute, ( vlc_object_t *, audio_volume_t * ) );
VLC_EXPORT( int, aout_Restart, ( aout_instance_t * p_aout ) ); VLC_EXPORT( int, aout_Restart, ( aout_instance_t * p_aout ) );
VLC_EXPORT( int, aout_FindAndRestart, ( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ) ); VLC_EXPORT( int, aout_FindAndRestart, ( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ) );
VLC_EXPORT( int, aout_ChannelsRestart, ( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ) ); VLC_EXPORT( int, aout_ChannelsRestart, ( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ) );
VLC_EXPORT( void, aout_EnableFilter, (vlc_object_t *, const char *, vlc_bool_t )); VLC_EXPORT( void, aout_EnableFilter, (vlc_object_t *, const char *, vlc_bool_t ));
#define aout_VisualNext(a) aout_VisualChange( VLC_OBJECT(a),1 )
#define aout_VisualPrev(a) aout_VisualChange( VLC_OBJECT(a),-1 )
VLC_EXPORT( char *, aout_VisualChange, (vlc_object_t *, int ) );
#endif /* _VLC_AUDIO_OUTPUT_H */ #endif /* _VLC_AUDIO_OUTPUT_H */
...@@ -537,6 +537,7 @@ struct module_symbols_t ...@@ -537,6 +537,7 @@ struct module_symbols_t
void (*vout_EnableFilter_inner) (vout_thread_t *, char *,vlc_bool_t , vlc_bool_t); void (*vout_EnableFilter_inner) (vout_thread_t *, char *,vlc_bool_t , vlc_bool_t);
void (*aout_EnableFilter_inner) (vlc_object_t *, const char *, vlc_bool_t); void (*aout_EnableFilter_inner) (vlc_object_t *, const char *, vlc_bool_t);
void (*playlist_NodesPairCreate_inner) (playlist_t *, char *, playlist_item_t **, playlist_item_t **, vlc_bool_t); void (*playlist_NodesPairCreate_inner) (playlist_t *, char *, playlist_item_t **, playlist_item_t **, vlc_bool_t);
char * (*aout_VisualChange_inner) (vlc_object_t *, int);
}; };
# if defined (__PLUGIN__) # if defined (__PLUGIN__)
# define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner # define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner
...@@ -1008,6 +1009,7 @@ struct module_symbols_t ...@@ -1008,6 +1009,7 @@ struct module_symbols_t
# define vout_EnableFilter (p_symbols)->vout_EnableFilter_inner # define vout_EnableFilter (p_symbols)->vout_EnableFilter_inner
# define aout_EnableFilter (p_symbols)->aout_EnableFilter_inner # define aout_EnableFilter (p_symbols)->aout_EnableFilter_inner
# define playlist_NodesPairCreate (p_symbols)->playlist_NodesPairCreate_inner # define playlist_NodesPairCreate (p_symbols)->playlist_NodesPairCreate_inner
# define aout_VisualChange (p_symbols)->aout_VisualChange_inner
# elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__) # elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
/****************************************************************** /******************************************************************
* STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access. * STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access.
...@@ -1482,6 +1484,7 @@ struct module_symbols_t ...@@ -1482,6 +1484,7 @@ struct module_symbols_t
((p_symbols)->vout_EnableFilter_inner) = vout_EnableFilter; \ ((p_symbols)->vout_EnableFilter_inner) = vout_EnableFilter; \
((p_symbols)->aout_EnableFilter_inner) = aout_EnableFilter; \ ((p_symbols)->aout_EnableFilter_inner) = aout_EnableFilter; \
((p_symbols)->playlist_NodesPairCreate_inner) = playlist_NodesPairCreate; \ ((p_symbols)->playlist_NodesPairCreate_inner) = playlist_NodesPairCreate; \
((p_symbols)->aout_VisualChange_inner) = aout_VisualChange; \
(p_symbols)->net_ConvertIPv4_deprecated = NULL; \ (p_symbols)->net_ConvertIPv4_deprecated = NULL; \
(p_symbols)->__playlist_ItemNew_deprecated = NULL; \ (p_symbols)->__playlist_ItemNew_deprecated = NULL; \
(p_symbols)->__playlist_ItemCopy_deprecated = NULL; \ (p_symbols)->__playlist_ItemCopy_deprecated = NULL; \
......
...@@ -40,7 +40,11 @@ public: ...@@ -40,7 +40,11 @@ public:
instance = new StreamInfoDialog( p_intf); instance = new StreamInfoDialog( p_intf);
return instance; return instance;
} }
static void killInstance() { if( instance ) delete instance; } static void killInstance()
{
if( instance ) delete instance;
instance= NULL;
}
virtual ~StreamInfoDialog(); virtual ~StreamInfoDialog();
bool need_update; bool need_update;
private: private:
......
...@@ -299,6 +299,11 @@ QStringList DialogsProvider::showSimpleOpen() ...@@ -299,6 +299,11 @@ QStringList DialogsProvider::showSimpleOpen()
p_intf->p_libvlc->psz_homedir, FileTypes ); p_intf->p_libvlc->psz_homedir, FileTypes );
} }
void DialogsProvider::switchToSkins()
{
var_SetString( p_intf, "intf-switch", "skins2" );
}
void DialogsProvider::bookmarksDialog() void DialogsProvider::bookmarksDialog()
{ {
} }
......
...@@ -52,7 +52,11 @@ public: ...@@ -52,7 +52,11 @@ public:
instance = new DialogsProvider( p_intf ); instance = new DialogsProvider( p_intf );
return instance; return instance;
} }
static void killInstance() { if( instance ) delete instance; } static void killInstance()
{
if( instance ) delete instance;
instance=NULL;
}
virtual ~DialogsProvider(); virtual ~DialogsProvider();
QTimer *fixed_timer; QTimer *fixed_timer;
protected: protected:
...@@ -91,6 +95,7 @@ public slots: ...@@ -91,6 +95,7 @@ public slots:
void openDirectory(); void openDirectory();
void openMLDirectory(); void openMLDirectory();
void quit(); void quit();
void switchToSkins();
}; };
#endif #endif
...@@ -624,7 +624,6 @@ void MainInterface::updateOnTimer() ...@@ -624,7 +624,6 @@ void MainInterface::updateOnTimer()
if( p_intf->b_die ) if( p_intf->b_die )
{ {
QApplication::closeAllWindows(); QApplication::closeAllWindows();
DialogsProvider::killInstance();
QApplication::quit(); QApplication::quit();
} }
if( need_components_update ) if( need_components_update )
......
...@@ -198,9 +198,15 @@ QMenu *QVLCMenu::InterfacesMenu( intf_thread_t *p_intf, QMenu *current ) ...@@ -198,9 +198,15 @@ QMenu *QVLCMenu::InterfacesMenu( intf_thread_t *p_intf, QMenu *current )
objects.push_back( p_intf->i_object_id ); objects.push_back( p_intf->i_object_id );
QMenu *menu = Populate( p_intf, current, varnames, objects ); QMenu *menu = Populate( p_intf, current, varnames, objects );
if( !p_intf->pf_show_dialog )
{
menu->addSeparator();
menu->addAction( qtr("Switch to skins"), THEDP, SLOT(switchToSkins()) );
}
CONNECT( menu, aboutToShow(), THEDP->menusUpdateMapper, map() ); CONNECT( menu, aboutToShow(), THEDP->menusUpdateMapper, map() );
THEDP->menusUpdateMapper->setMapping( menu, 4 ); THEDP->menusUpdateMapper->setMapping( menu, 4 );
return menu; return menu;
} }
......
...@@ -139,6 +139,7 @@ static void Init( intf_thread_t *p_intf ) ...@@ -139,6 +139,7 @@ static void Init( intf_thread_t *p_intf )
app->setQuitOnLastWindowClosed( false ); app->setQuitOnLastWindowClosed( false );
app->exec(); app->exec();
MainInputManager::killInstance(); MainInputManager::killInstance();
DialogsProvider::killInstance();
delete p_intf->p_sys->p_mi; delete p_intf->p_sys->p_mi;
} }
...@@ -149,8 +150,7 @@ static void ShowDialog( intf_thread_t *p_intf, int i_dialog_event, int i_arg, ...@@ -149,8 +150,7 @@ static void ShowDialog( intf_thread_t *p_intf, int i_dialog_event, int i_arg,
intf_dialog_args_t *p_arg ) intf_dialog_args_t *p_arg )
{ {
DialogEvent *event = new DialogEvent( i_dialog_event, i_arg, p_arg ); DialogEvent *event = new DialogEvent( i_dialog_event, i_arg, p_arg );
QApplication::postEvent( DialogsProvider::getInstance( p_intf ), QApplication::postEvent( THEDP, static_cast<QEvent*>(event) );
static_cast<QEvent*>(event) );
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -529,3 +529,12 @@ void aout_EnableFilter( vlc_object_t *p_this, const char *psz_name, ...@@ -529,3 +529,12 @@ void aout_EnableFilter( vlc_object_t *p_this, const char *psz_name,
} }
free( psz_string ); free( psz_string );
} }
/**
* Change audio visualization
* -1 goes backwards, +1 goes forward
*/
char *aout_VisualChange( vlc_object_t *p_this, int i_skip )
{
return strdup("foobar");
}
/***************************************************************************** /*****************************************************************************
* libvlc-common.c: libvlc instances creation and deletion * libvlc-common.c: libvlc instances creation and deletion, interfaces handling
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2006 the VideoLAN team * Copyright (C) 1998-2006 the VideoLAN team
* $Id$ * $Id$
...@@ -162,6 +162,8 @@ libvlc_int_t * libvlc_InternalCreate( void ) ...@@ -162,6 +162,8 @@ libvlc_int_t * libvlc_InternalCreate( void )
var_Get( p_libvlc_global, "libvlc", &lockval ); var_Get( p_libvlc_global, "libvlc", &lockval );
vlc_mutex_lock( lockval.p_address ); vlc_mutex_lock( lockval.p_address );
i_instances++; i_instances++;
if( !libvlc_global.b_ready ) if( !libvlc_global.b_ready )
......
/***************************************************************************** /*****************************************************************************
* libvlc.c: main libvlc source * libvlc.c: Implementation of the old libvlc API
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2006 the VideoLAN team * Copyright (C) 1998-2006 the VideoLAN team
* $Id$ * $Id$
......
/***************************************************************************** /*****************************************************************************
* libvlc.h: main libvlc header * libvlc.h: Options for the main module
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2006 the VideoLAN team * Copyright (C) 1998-2006 the VideoLAN team
* $Id$ * $Id$
......
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