1 /*****************************************************************************
2 * main_interface.cpp : Main interface
3 ****************************************************************************
4 * Copyright (C) 2006-2007 the VideoLAN team
7 * Authors: Clément Stenac <zorglub@videolan.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
25 #include "main_interface.hpp"
26 #include "input_manager.hpp"
27 #include "util/input_slider.hpp"
28 #include "util/qvlcframe.hpp"
29 #include "util/customwidgets.hpp"
30 #include "dialogs_provider.hpp"
31 #include "components/interface_widgets.hpp"
32 #include "dialogs/playlist.hpp"
36 #include <QCloseEvent>
37 #include <QPushButton>
41 #include <QSystemTrayIcon>
55 #define VISIBLE(i) (i && i->isVisible())
57 #define SET_WIDTH(i,j) i->widgetSize.setWidth(j)
58 #define SET_HEIGHT(i,j) i->widgetSize.setHeight(j)
59 #define SET_WH( i,j,k) i->widgetSize.setWidth(j); i->widgetSize.setHeight(k);
61 #define DS(i) i.width(),i.height()
63 /* Callback prototypes */
64 static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
65 vlc_value_t old_val, vlc_value_t new_val, void *param );
66 static int IntfShowCB( vlc_object_t *p_this, const char *psz_variable,
67 vlc_value_t old_val, vlc_value_t new_val, void *param );
68 static int InteractCallback( vlc_object_t *, const char *, vlc_value_t,
71 static void *DoRequest( intf_thread_t *p_intf, vout_thread_t *p_vout,
72 int *pi1, int *pi2, unsigned int*pi3,unsigned int*pi4)
74 return p_intf->p_sys->p_mi->requestVideo( p_vout, pi1, pi2, pi3, pi4 );
76 static void DoRelease( intf_thread_t *p_intf, void *p_win )
78 return p_intf->p_sys->p_mi->releaseVideo( p_win );
80 static int DoControl( intf_thread_t *p_intf, void *p_win, int i_q, va_list a )
82 return p_intf->p_sys->p_mi->controlVideo( p_win, i_q, a );
85 MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
88 settings = new QSettings( "VideoLAN", "VLC" );
89 settings->beginGroup( "MainWindow" );
91 setWindowIcon( QApplication::windowIcon() );
93 need_components_update = false;
94 bgWidget = NULL; videoWidget = NULL; playlistWidget = NULL;
95 embeddedPlaylistWasActive = videoIsActive = false;
97 videoEmbeddedFlag = false;
98 if( config_GetInt( p_intf, "embedded-video" ) ) videoEmbeddedFlag = true;
100 alwaysVideoFlag = false;
101 if( videoEmbeddedFlag && config_GetInt( p_intf, "qt-always-video" ))
102 alwaysVideoFlag = true;
104 playlistEmbeddedFlag = settings->value("playlist-embedded", true).toBool();
105 advControlsEnabled= settings->value( "adv-controls", false ).toBool();
106 visualSelectorEnabled= settings->value( "visual-selector", false ).toBool();
109 setVLCWindowsTitle();
110 handleMainUi( settings );
111 QVLCMenu::createMenuBar( this, p_intf, playlistEmbeddedFlag,
112 advControlsEnabled, visualSelectorEnabled );
113 timeLabel = new QLabel( 0 );
114 nameLabel = new QLabel( 0 );
115 statusBar()->addWidget( nameLabel, 4 );
116 statusBar()->addPermanentWidget( timeLabel, 1 );
118 setFocusPolicy( Qt::StrongFocus );
119 setAcceptDrops(true);
121 /* Init input manager */
122 MainInputManager::getInstance( p_intf );
123 ON_TIMEOUT( updateOnTimer() );
126 CONNECT( ui.volumeSlider, valueChanged(int), this, updateVolume(int) );
127 /* Connect the input manager to the GUI elements it manages */
128 CONNECT( THEMIM->getIM(), positionUpdated( float, int, int ),
129 slider, setPosition( float,int, int ) );
130 CONNECT( THEMIM->getIM(), positionUpdated( float, int, int ),
131 this, setDisplay( float, int, int ) );
132 CONNECT( THEMIM->getIM(), nameChanged( QString ), this,setName( QString ) );
133 CONNECT( THEMIM->getIM(), statusChanged( int ), this, setStatus( int ) );
134 CONNECT( THEMIM->getIM(), statusChanged( int ), this,
135 updateSystrayMenu( int ) );
136 CONNECT( THEMIM->getIM(), navigationChanged( int ),
137 this, setNavigation(int) );
138 CONNECT( slider, sliderDragged( float ),
139 THEMIM->getIM(), sliderUpdate( float ) );
141 CONNECT( ui.prevSectionButton, clicked(), THEMIM->getIM(),
143 CONNECT( ui.nextSectionButton, clicked(), THEMIM->getIM(),
145 CONNECT( ui.menuButton, clicked(), THEMIM->getIM(),
148 var_Create( p_intf, "interaction", VLC_VAR_ADDRESS );
149 var_AddCallback( p_intf, "interaction", InteractCallback, this );
150 p_intf->b_interaction = VLC_TRUE;
152 /* Register callback for the intf-popupmenu variable */
153 playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
154 VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
155 if( p_playlist != NULL )
157 var_AddCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf );
158 var_AddCallback( p_playlist, "intf-show", IntfShowCB, p_intf );
159 vlc_object_release( p_playlist );
161 if( QSystemTrayIcon::isSystemTrayAvailable() &&
162 ( config_GetInt( p_intf, "qt-system-tray") == 1))
166 MainInterface::~MainInterface()
168 /* Unregister callback for the intf-popupmenu variable */
169 playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
170 VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
171 if( p_playlist != NULL )
173 var_DelCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf );
174 var_DelCallback( p_playlist, "intf-show", IntfShowCB, p_intf );
175 vlc_object_release( p_playlist );
178 settings->setValue( "playlist-embedded", playlistEmbeddedFlag );
179 settings->setValue( "adv-controls", advControlsEnabled );
180 settings->setValue( "pos", pos() );
181 settings->endGroup();
183 p_intf->b_interaction = VLC_FALSE;
184 var_DelCallback( p_intf, "interaction", InteractCallback, this );
186 p_intf->pf_request_window = NULL;
187 p_intf->pf_release_window = NULL;
188 p_intf->pf_control_window = NULL;
191 void MainInterface::setVLCWindowsTitle( QString aTitle )
193 if( aTitle.isEmpty() )
195 this->setWindowTitle( qtr( "VLC media player" ) );
199 this->setWindowTitle( aTitle + " - " + qtr( "VLC media player" ) );
203 void MainInterface::handleMainUi( QSettings *settings )
205 QWidget *main = new QWidget( this );
206 setCentralWidget( main );
207 ui.setupUi( centralWidget() );
209 slider = new InputSlider( Qt::Horizontal, NULL );
210 ui.vboxLayout->insertWidget( 0, slider );
211 ui.discFrame->hide();
212 BUTTON_SET_IMG( ui.prevSectionButton, "", previous.png, "" );
213 BUTTON_SET_IMG( ui.nextSectionButton, "", next.png, "" );
214 BUTTON_SET_IMG( ui.menuButton, "", previous.png, "" );
216 BUTTON_SET_ACT_I( ui.prevButton, "" , previous.png,
217 qtr("Previous"), prev() );
218 BUTTON_SET_ACT_I( ui.nextButton, "", next.png, qtr("Next"), next() );
219 BUTTON_SET_ACT_I( ui.playButton, "", play.png, qtr("Play"), play() );
220 BUTTON_SET_ACT_I( ui.stopButton, "", stop.png, qtr("Stop"), stop() );
223 ui.volMuteLabel->setPixmap( QPixmap( ":/pixmaps/volume-low.png" ) );
224 ui.volumeSlider->setMaximum( 100 );
225 ui.volMuteLabel->setToolTip( qtr( "Mute" ) );
226 VolumeClickHandler *h = new VolumeClickHandler( p_intf, this );
227 ui.volMuteLabel->installEventFilter(h);
228 ui.volumeSlider->setFocusPolicy( Qt::NoFocus );
230 BUTTON_SET_IMG( ui.playlistButton, "" , playlist_icon.png,
231 playlistEmbeddedFlag ? qtr( "Show playlist" ) :
232 qtr( "Open playlist" ) );
233 BUTTONACT( ui.playlistButton, playlist() );
235 /* Set initial size */
236 resize ( PREF_W, PREF_H );
238 addSize = QSize( ui.vboxLayout->margin() * 2, PREF_H );
240 advControls = new ControlsWidget( p_intf );
241 ui.vboxLayout->insertWidget( 0, advControls );
242 advControls->updateGeometry();
243 if( !advControlsEnabled ) advControls->hide();
244 need_components_update = true;
246 visualSelector = new VisualSelector( p_intf );
247 ui.vboxLayout->insertWidget( 0, visualSelector );
248 visualSelector->hide();
250 if( alwaysVideoFlag )
252 bgWidget = new BackgroundWidget( p_intf );
253 bgWidget->widgetSize = settings->value( "backgroundSize",
254 QSize( 200, 200 ) ).toSize();
255 bgWidget->resize( bgWidget->widgetSize );
256 bgWidget->updateGeometry();
257 ui.vboxLayout->insertWidget( 0, bgWidget );
260 if( videoEmbeddedFlag )
262 videoWidget = new VideoWidget( p_intf );
263 videoWidget->widgetSize = QSize( 1, 1 );
264 videoWidget->resize( videoWidget->widgetSize );
265 ui.vboxLayout->insertWidget( 0, videoWidget );
267 p_intf->pf_request_window = ::DoRequest;
268 p_intf->pf_release_window = ::DoRelease;
269 p_intf->pf_control_window = ::DoControl;
271 setMinimumSize( PREF_W, addSize.height() );
274 void MainInterface::createSystrayMenu()
276 sysTray = new QSystemTrayIcon( QIcon( QPixmap( ":/vlc128.png" ) ) );
277 systrayMenu = new QMenu( qtr( "VLC media player" ), this );
278 QVLCMenu::updateSystrayMenu( this, p_intf );
282 void MainInterface::updateSystrayMenu( int status )
284 QVLCMenu::updateSystrayMenu( this, p_intf ) ;
287 /**********************************************************************
288 * Handling of the components
289 **********************************************************************/
290 void MainInterface::calculateInterfaceSize()
292 int width = 0, height = 0;
293 if( VISIBLE( bgWidget ) )
295 width = bgWidget->widgetSize.width();
296 height = bgWidget->widgetSize.height();
297 assert( !(playlistWidget && playlistWidget->isVisible() ) );
299 else if( VISIBLE( playlistWidget ) )
301 width = playlistWidget->widgetSize.width();
302 height = playlistWidget->widgetSize.height();
304 else if( videoIsActive )
306 width = videoWidget->widgetSize.width() ;
307 height = videoWidget->widgetSize.height();
311 width = PREF_W - addSize.width();
312 height = PREF_H - addSize.height();
314 if( VISIBLE( visualSelector ) )
315 height += visualSelector->height();
316 if( VISIBLE( advControls) )
318 height += advControls->sizeHint().height();
320 mainSize = QSize( width + addSize.width(), height + addSize.height() );
323 void MainInterface::resizeEvent( QResizeEvent *e )
325 videoWidget->widgetSize.setWidth( e->size().width() - addSize.width() );
326 if( videoWidget && videoIsActive && videoWidget->widgetSize.height() > 1 )
328 SET_WH( videoWidget, e->size().width() - addSize.width(),
329 e->size().height() - addSize.height() );
330 videoWidget->updateGeometry();
332 if( VISIBLE( playlistWidget ) )
334 SET_WH( playlistWidget , e->size().width() - addSize.width(),
335 e->size().height() - addSize.height() );
336 playlistWidget->updateGeometry();
340 void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
341 int *pi_y, unsigned int *pi_width,
342 unsigned int *pi_height )
344 void *ret = videoWidget->request( p_nvout,pi_x, pi_y, pi_width, pi_height );
347 videoIsActive = true;
348 if( VISIBLE( playlistWidget ) )
350 embeddedPlaylistWasActive = true;
351 // playlistWidget->hide();
353 bool bgWasVisible = false;
354 if( VISIBLE( bgWidget) )
359 if( THEMIM->getIM()->hasVideo() || !bgWasVisible )
361 videoWidget->widgetSize = QSize( *pi_width, *pi_height );
363 else /* Background widget available, use its size */
365 /* Ok, our visualizations are bad, so don't do this for the moment
366 * use the requested size anyway */
367 // videoWidget->widgetSize = bgWidget->widgeTSize;
368 videoWidget->widgetSize = QSize( *pi_width, *pi_height );
370 // videoWidget->updateGeometry(); /// FIXME: Needed ?
371 need_components_update = true;
376 void MainInterface::releaseVideo( void *p_win )
378 videoWidget->release( p_win );
379 videoWidget->widgetSize = QSize( 0, 0 );
380 videoWidget->resize( videoWidget->widgetSize );
382 if( embeddedPlaylistWasActive )
383 ;//playlistWidget->show();
387 videoIsActive = false;
388 need_components_update = true;
391 class SetVideoOnTopQtEvent : public QEvent
394 SetVideoOnTopQtEvent( bool _onTop ) :
395 QEvent( (QEvent::Type)SetVideoOnTopEvent_Type ), onTop( _onTop)
408 int MainInterface::controlVideo( void *p_window, int i_query, va_list args )
410 int i_ret = VLC_EGENERIC;
415 unsigned int *pi_width = va_arg( args, unsigned int * );
416 unsigned int *pi_height = va_arg( args, unsigned int * );
417 *pi_width = videoWidget->widgetSize.width();
418 *pi_height = videoWidget->widgetSize.height();
424 unsigned int i_width = va_arg( args, unsigned int );
425 unsigned int i_height = va_arg( args, unsigned int );
426 videoWidget->widgetSize = QSize( i_width, i_height );
427 // videoWidget->updateGeometry();
428 need_components_update = true;
432 case VOUT_SET_STAY_ON_TOP:
434 int i_arg = va_arg( args, int );
435 QApplication::postEvent( this, new SetVideoOnTopQtEvent( i_arg ) );
440 msg_Warn( p_intf, "unsupported control query" );
446 void MainInterface::advanced()
448 if( !VISIBLE( advControls ) )
451 advControlsEnabled = true;
456 advControlsEnabled = false;
458 doComponentsUpdate();
461 void MainInterface::visual()
463 if( !VISIBLE( visualSelector) )
465 visualSelector->show();
466 if( !THEMIM->getIM()->hasVideo() )
468 /* Show the background widget */
470 visualSelectorEnabled = true;
474 /* Stop any currently running visualization */
475 visualSelector->hide();
476 visualSelectorEnabled = false;
478 doComponentsUpdate();
481 void MainInterface::playlist()
483 // Toggle the playlist dialog
484 if( !playlistEmbeddedFlag )
490 THEDP->playlistDialog();
494 if( !playlistWidget )
496 PlaylistDialog::killInstance();
497 playlistWidget = new PlaylistWidget( p_intf );
498 ui.vboxLayout->insertWidget( 0, playlistWidget );
499 playlistWidget->widgetSize = settings->value( "playlistSize",
500 QSize( 650, 310 ) ).toSize();
501 playlistWidget->hide();
503 if( VISIBLE( playlistWidget ) )
505 playlistWidget->hide();
508 videoWidget->widgetSize = savedVideoSize;
509 videoWidget->resize( videoWidget->widgetSize );
510 videoWidget->updateGeometry();
515 playlistWidget->show();
518 savedVideoSize = videoWidget->widgetSize;
519 videoWidget->widgetSize.setHeight( 0 );
520 videoWidget->resize( videoWidget->widgetSize );
521 videoWidget->updateGeometry();
523 if( VISIBLE( bgWidget ) ) bgWidget->hide();
525 doComponentsUpdate();
528 /* Video widget cannot do this synchronously as it runs in another thread */
529 /* Well, could it, actually ? Probably dangerous ... */
530 void MainInterface::doComponentsUpdate()
532 calculateInterfaceSize();
536 void MainInterface::undockPlaylist()
540 playlistWidget->hide();
541 playlistWidget->deleteLater();
542 ui.vboxLayout->removeWidget( playlistWidget );
543 playlistWidget = NULL;
544 playlistEmbeddedFlag = false;
547 QVLCMenu::createMenuBar( this, p_intf, false, advControlsEnabled,
548 visualSelectorEnabled);
552 videoWidget->widgetSize = savedVideoSize;
553 videoWidget->resize( videoWidget->widgetSize );
554 videoWidget->updateGeometry();
557 doComponentsUpdate();
558 THEDP->playlistDialog();
562 void MainInterface::customEvent( QEvent *event )
564 if( event->type() == PLDockEvent_Type )
566 PlaylistDialog::killInstance();
567 playlistEmbeddedFlag = true;
569 QVLCMenu::createMenuBar(this, p_intf, true, advControlsEnabled,
570 visualSelectorEnabled);
573 else if ( event->type() == SetVideoOnTopEvent_Type )
575 SetVideoOnTopQtEvent* p_event = (SetVideoOnTopQtEvent*)event;
576 if( p_event->OnTop() )
577 setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
579 setWindowFlags(windowFlags() & ~Qt::WindowStaysOnTopHint);
580 show(); /* necessary to apply window flags?? */
585 /************************************************************************
587 ************************************************************************/
588 void MainInterface::dropEvent(QDropEvent *event)
590 const QMimeData *mimeData = event->mimeData();
592 /* D&D of a subtitles file, add it on the fly */
593 if( mimeData->urls().size() == 1 )
595 if( THEMIM->getIM()->hasInput() )
597 if( input_AddSubtitles( THEMIM->getInput(),
598 qtu( mimeData->urls()[0].toString() ),
601 event->acceptProposedAction();
607 foreach( QUrl url, mimeData->urls() ) {
608 QString s = url.toString();
609 if( s.length() > 0 ) {
610 playlist_Add( THEPL, qtu(s), NULL,
611 PLAYLIST_APPEND | (first ? PLAYLIST_GO:0),
612 PLAYLIST_END, VLC_TRUE, VLC_FALSE );
616 event->acceptProposedAction();
618 void MainInterface::dragEnterEvent(QDragEnterEvent *event)
620 event->acceptProposedAction();
622 void MainInterface::dragMoveEvent(QDragMoveEvent *event)
624 event->acceptProposedAction();
626 void MainInterface::dragLeaveEvent(QDragLeaveEvent *event)
631 /************************************************************************
633 ************************************************************************/
634 void MainInterface::keyPressEvent( QKeyEvent *e )
636 int i_vlck = qtEventToVLCKey( e );
639 var_SetInteger( p_intf->p_libvlc, "key-pressed", i_vlck );
646 void MainInterface::wheelEvent( QWheelEvent *e )
648 int i_vlckey = qtWheelEventToVLCKey( e );
649 var_SetInteger( p_intf->p_libvlc, "key-pressed", i_vlckey );
653 void MainInterface::stop()
658 void MainInterface::play()
660 if( playlist_IsEmpty(THEPL) )
662 /* The playlist is empty, open a file requester */
663 THEDP->openFileDialog();
667 THEMIM->togglePlayPause();
670 void MainInterface::prev()
675 void MainInterface::next()
680 void MainInterface::setDisplay( float pos, int time, int length )
682 char psz_length[MSTRTIME_MAX_SIZE], psz_time[MSTRTIME_MAX_SIZE];
683 secstotimestr( psz_length, length );
684 secstotimestr( psz_time, time );
686 title.sprintf( "%s/%s", psz_time, psz_length );
687 timeLabel->setText( " "+title+" " );
690 void MainInterface::setName( QString name )
692 nameLabel->setText( " " + name+" " );
693 setVLCWindowsTitle( name );
696 void MainInterface::setStatus( int status )
698 if( status == 1 ) // Playing
699 ui.playButton->setIcon( QIcon( ":/pixmaps/pause.png" ) );
701 ui.playButton->setIcon( QIcon( ":/pixmaps/play.png" ) );
704 #define HELP_MENU N_("Menu")
705 #define HELP_PCH N_("Previous chapter")
706 #define HELP_NCH N_("Next chapter")
707 #define HELP_PTR N_("Previous track")
708 #define HELP_NTR N_("Next track")
710 void MainInterface::setNavigation( int navigation )
712 // 1 = chapter, 2 = title, 0 = no
713 if( navigation == 0 )
715 ui.discFrame->hide();
716 } else if( navigation == 1 ) {
717 ui.prevSectionButton->show();
718 ui.prevSectionButton->setToolTip( qfu(HELP_PCH) );
719 ui.nextSectionButton->show();
720 ui.nextSectionButton->setToolTip( qfu(HELP_NCH) );
721 ui.menuButton->show();
722 ui.discFrame->show();
724 ui.prevSectionButton->show();
725 ui.prevSectionButton->setToolTip( qfu(HELP_PCH) );
726 ui.nextSectionButton->show();
727 ui.nextSectionButton->setToolTip( qfu(HELP_NCH) );
728 ui.menuButton->hide();
729 ui.discFrame->show();
733 static bool b_my_volume;
735 void MainInterface::updateOnTimer()
737 /* \todo Make this event-driven */
738 advControls->enableInput( THEMIM->getIM()->hasInput() );
739 advControls->enableVideo( THEMIM->getIM()->hasVideo() );
741 if( intf_ShouldDie( p_intf ) )
743 QApplication::closeAllWindows();
744 QApplication::quit();
746 if( need_components_update )
748 doComponentsUpdate();
749 need_components_update = false;
752 audio_volume_t i_volume;
753 aout_VolumeGet( p_intf, &i_volume );
754 i_volume = (i_volume * 200 )/ AOUT_VOLUME_MAX ;
755 int i_gauge = ui.volumeSlider->value();
757 if( i_volume - i_gauge > 1 || i_gauge - i_volume > 1 )
760 ui.volumeSlider->setValue( i_volume );
765 void MainInterface::closeEvent( QCloseEvent *e )
768 p_intf->b_die = VLC_TRUE;
771 void MainInterface::updateVolume( int sliderVolume )
775 int i_res = sliderVolume * AOUT_VOLUME_MAX /
776 (2*ui.volumeSlider->maximum() );
777 aout_VolumeSet( p_intf, i_res );
781 static int InteractCallback( vlc_object_t *p_this,
782 const char *psz_var, vlc_value_t old_val,
783 vlc_value_t new_val, void *param )
785 intf_dialog_args_t *p_arg = new intf_dialog_args_t;
786 p_arg->p_dialog = (interaction_dialog_t *)(new_val.p_address);
787 DialogEvent *event = new DialogEvent( INTF_DIALOG_INTERACTION, 0, p_arg );
788 QApplication::postEvent( THEDP, static_cast<QEvent*>(event) );
792 /*****************************************************************************
793 * PopupMenuCB: callback triggered by the intf-popupmenu playlist variable.
794 * We don't show the menu directly here because we don't want the
795 * caller to block for a too long time.
796 *****************************************************************************/
797 static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
798 vlc_value_t old_val, vlc_value_t new_val, void *param )
800 intf_thread_t *p_intf = (intf_thread_t *)param;
802 if( p_intf->pf_show_dialog )
804 p_intf->pf_show_dialog( p_intf, INTF_DIALOG_POPUPMENU,
811 /*****************************************************************************
812 * IntfShowCB: callback triggered by the intf-show playlist variable.
813 *****************************************************************************/
814 static int IntfShowCB( vlc_object_t *p_this, const char *psz_variable,
815 vlc_value_t old_val, vlc_value_t new_val, void *param )
817 intf_thread_t *p_intf = (intf_thread_t *)param;
818 //p_intf->p_sys->b_intf_show = VLC_TRUE;