1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2006 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 *****************************************************************************/
27 #include <QActionGroup>
28 #include <QSignalMapper>
30 #include "main_interface.hpp"
33 #include "dialogs_provider.hpp"
34 #include "input_manager.hpp"
43 static QActionGroup *currentGroup;
45 // Add static entries to menus
46 #define DP_SADD( text, help, icon, slot ) { if( strlen(icon) > 0 ) { QAction *action = menu->addAction( text, THEDP, SLOT( slot ) ); action->setIcon(QIcon(icon));} else { menu->addAction( text, THEDP, SLOT( slot ) ); } }
47 #define MIM_SADD( text, help, icon, slot ) { if( strlen(icon) > 0 ) { QAction *action = menu->addAction( text, THEMIM, SLOT( slot ) ); action->setIcon(QIcon(icon));} else { menu->addAction( text, THEMIM, SLOT( slot ) ); } }
50 /*****************************************************************************
51 * Definitions of variables for the dynamic menus
52 *****************************************************************************/
53 #define PUSH_VAR( var ) varnames.push_back( var ); \
54 objects.push_back( p_object->i_object_id )
56 #define PUSH_SEPARATOR if( objects.size() != i_last_separator ) { \
57 objects.push_back( 0 ); varnames.push_back( "" ); \
58 i_last_separator = objects.size(); }
60 static int InputAutoMenuBuilder( vlc_object_t *p_object,
62 vector<const char *> &varnames )
64 PUSH_VAR( "bookmark");
66 PUSH_VAR ("chapter" );
67 PUSH_VAR( "program" );
68 PUSH_VAR( "navigation" );
69 PUSH_VAR( "dvd_menus" );
73 static int VideoAutoMenuBuilder( vlc_object_t *p_object,
75 vector<const char *> &varnames )
77 PUSH_VAR( "fullscreen" );
79 PUSH_VAR( "deinterlace" );
80 PUSH_VAR( "aspect-ratio" );
82 PUSH_VAR( "video-on-top" );
83 PUSH_VAR( "directx-wallpaper" );
84 PUSH_VAR( "video-snapshot" );
86 vlc_object_t *p_dec_obj = (vlc_object_t *)vlc_object_find( p_object,
89 if( p_dec_obj != NULL )
91 vlc_object_t *p_object = p_dec_obj;
92 PUSH_VAR( "ffmpeg-pp-q" );
93 vlc_object_release( p_dec_obj );
98 static int AudioAutoMenuBuilder( vlc_object_t *p_object,
100 vector<const char *> &varnames )
102 PUSH_VAR( "audio-device" );
103 PUSH_VAR( "audio-channels" );
104 PUSH_VAR( "visual" );
105 PUSH_VAR( "equalizer" );
109 /*****************************************************************************
111 *****************************************************************************/
113 #define BAR_ADD( func, title ) { \
114 QMenu *menu = func; menu->setTitle( title ); bar->addMenu( menu ); }
116 #define BAR_DADD( func, title, id ) { \
117 QMenu *menu = func; menu->setTitle( title ); bar->addMenu( menu ); \
118 MenuFunc *f = new MenuFunc( menu, id ); \
119 CONNECT( menu, aboutToShow(), THEDP->menusUpdateMapper, map() ); \
120 THEDP->menusUpdateMapper->setMapping( menu, f ); }
122 void QVLCMenu::createMenuBar( MainInterface *mi, intf_thread_t *p_intf,
123 bool playlist, bool adv_controls_enabled )
125 QMenuBar *bar = mi->menuBar();
126 BAR_ADD( FileMenu(), qtr("Media") );
129 BAR_ADD( PlaylistMenu( mi,p_intf ), qtr("Playlist" ) );
131 BAR_ADD( ToolsMenu( p_intf, mi, adv_controls_enabled ), qtr("Tools") );
132 BAR_DADD( VideoMenu( p_intf, NULL ), qtr("Video"), 1 );
133 BAR_DADD( AudioMenu( p_intf, NULL ), qtr("Audio"), 2 );
134 BAR_DADD( NavigMenu( p_intf, NULL ), qtr("Navigation"), 3 );
136 // BAR_ADD( HelpMenu(), qtr("Help" ) );
138 QMenu *QVLCMenu::FileMenu()
140 QMenu *menu = new QMenu();
141 DP_SADD( qtr("Quick &Open File...") , "", "", simpleOpenDialog() );
142 DP_SADD( qtr("&Advanced Open..." ), "", "", openDialog() );
143 menu->addSeparator();
144 DP_SADD( qtr("Streaming..."), "", "", streamingDialog() );
145 menu->addSeparator();
146 DP_SADD( qtr("&Quit") , "", "", quit() );
150 QMenu *QVLCMenu::PlaylistMenu( MainInterface *mi, intf_thread_t *p_intf )
152 QMenu *menu = new QMenu();
153 menu->addMenu( SDMenu( p_intf ) );
154 menu->addSeparator();
156 DP_SADD( qtr( "Open playlist file"), "", "", openPlaylist() );
157 // DP_SADD( qtr( "Save playlist to file" ), "", "", savePlaylist() );
158 menu->addSeparator();
159 menu->addAction( qtr("Undock from interface"), mi,
160 SLOT( undockPlaylist() ) );
164 QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf, MainInterface *mi,
165 bool adv_controls_enabled, bool with_intf )
167 QMenu *menu = new QMenu();
170 QMenu *intfmenu = InterfacesMenu( p_intf, NULL );
171 intfmenu->setTitle( qtr("Interfaces" ) );
172 menu->addMenu( intfmenu );
173 menu->addSeparator();
175 DP_SADD( qtr("Messages" ), "", "", messagesDialog() );
176 DP_SADD( qtr("Information") , "", "", streaminfoDialog() );
177 DP_SADD( qtr("Bookmarks"), "", "", bookmarksDialog() );
178 DP_SADD( qtr("Extended settings"), "","",extendedDialog() );
181 menu->addSeparator();
182 QAction *adv = menu->addAction( qtr("Advanced controls" ),
183 mi, SLOT( advanced() ) );
184 adv->setCheckable( true );
185 if( adv_controls_enabled ) adv->setChecked( true );
187 menu->addSeparator();
188 DP_SADD( qtr("Preferences"), "", "", prefsDialog() );
192 QMenu *QVLCMenu::InterfacesMenu( intf_thread_t *p_intf, QMenu *current )
195 vector<const char *> varnames;
196 /** \todo add "switch to XXX" */
197 varnames.push_back( "intf-add" );
198 objects.push_back( p_intf->i_object_id );
200 QMenu *menu = Populate( p_intf, current, varnames, objects );
201 CONNECT( menu, aboutToShow(), THEDP->menusUpdateMapper, map() );
202 THEDP->menusUpdateMapper->setMapping( menu, 4 );
207 QMenu *QVLCMenu::AudioMenu( intf_thread_t *p_intf, QMenu * current )
210 vector<const char *> varnames;
212 vlc_object_t *p_object = (vlc_object_t *)vlc_object_find( p_intf,
213 VLC_OBJECT_INPUT, FIND_ANYWHERE );
214 if( p_object != NULL )
216 PUSH_VAR( "audio-es" );
217 vlc_object_release( p_object );
220 p_object = (vlc_object_t *)vlc_object_find( p_intf, VLC_OBJECT_AOUT,
224 AudioAutoMenuBuilder( p_object, objects, varnames );
225 vlc_object_release( p_object );
227 return Populate( p_intf, current, varnames, objects );
231 QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
233 vlc_object_t *p_object;
235 vector<const char *> varnames;
237 p_object = (vlc_object_t *)vlc_object_find( p_intf, VLC_OBJECT_INPUT,
239 if( p_object != NULL )
241 PUSH_VAR( "video-es" );
242 PUSH_VAR( "spu-es" );
243 vlc_object_release( p_object );
246 p_object = (vlc_object_t *)vlc_object_find( p_intf, VLC_OBJECT_VOUT,
248 if( p_object != NULL )
250 VideoAutoMenuBuilder( p_object, objects, varnames );
251 vlc_object_release( p_object );
253 return Populate( p_intf, current, varnames, objects );
256 QMenu *QVLCMenu::NavigMenu( intf_thread_t *p_intf, QMenu *current )
258 vlc_object_t *p_object;
260 vector<const char *> varnames;
263 p_object = (vlc_object_t *)vlc_object_find( p_intf, VLC_OBJECT_INPUT,
265 if( p_object != NULL )
267 InputAutoMenuBuilder( p_object, objects, varnames );
268 PUSH_VAR( "prev-title"); PUSH_VAR ( "next-title" );
269 PUSH_VAR( "prev-chapter"); PUSH_VAR( "next-chapter" );
270 vlc_object_release( p_object );
272 return Populate( p_intf, current, varnames, objects );
275 QMenu *QVLCMenu::SDMenu( intf_thread_t *p_intf )
277 QMenu *menu = new QMenu();
278 menu->setTitle( qtr( "Additional sources" ) );
279 vlc_list_t *p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE,
282 for( int i_index = 0 ; i_index < p_list->i_count; i_index++ )
284 module_t * p_parser = (module_t *)p_list->p_values[i_index].p_object ;
285 if( !strcmp( p_parser->psz_capability, "services_discovery" ) )
288 for( int i_index = 0 ; i_index < p_list->i_count; i_index++ )
290 module_t * p_parser = (module_t *)p_list->p_values[i_index].p_object;
291 if( !strcmp( p_parser->psz_capability, "services_discovery" ) )
293 QAction *a = new QAction( qfu( p_parser->psz_longname ), menu );
294 a->setCheckable( true );
295 /* hack to handle submodules properly */
297 while( p_parser->pp_shortcuts[++i] != NULL );
299 if( playlist_IsServicesDiscoveryLoaded( THEPL,
300 i>=0?p_parser->pp_shortcuts[i] : p_parser->psz_object_name ) )
302 a->setChecked( true );
304 CONNECT( a , triggered(), THEDP->SDMapper, map() );
305 THEDP->SDMapper->setMapping( a, i>=0? p_parser->pp_shortcuts[i] :
306 p_parser->psz_object_name );
307 menu->addAction( a );
310 vlc_list_release( p_list );
314 /*****************************************************************************
316 *****************************************************************************/
317 #define POPUP_BOILERPLATE \
318 unsigned int i_last_separator = 0; \
319 vector<int> objects; \
320 vector<const char *> varnames; \
321 input_thread_t *p_input = THEMIM->getInput();
323 #define CREATE_POPUP \
324 QMenu *menu = new QMenu(); \
325 Populate( p_intf, menu, varnames, objects ); \
326 p_intf->p_sys->p_popup_menu = menu; \
327 menu->popup( QCursor::pos() ); \
328 p_intf->p_sys->p_popup_menu = NULL; \
329 i_last_separator = 0;
331 #define POPUP_STATIC_ENTRIES \
333 MIM_SADD( qtr("Stop"), "", "", stop() ); \
334 MIM_SADD( qtr("Previous"), "", "", prev() ); \
335 MIM_SADD( qtr("Next"), "", "", next() ); \
338 var_Get( p_input, "state", &val ); \
339 if( val.i_int == PAUSE_S ) \
340 MIM_SADD( qtr("Play"), "", "", togglePlayPause() ) \
342 MIM_SADD( qtr("Pause"), "", "", togglePlayPause() ) \
344 else if( THEPL->i_size && THEPL->i_enabled ) \
345 MIM_SADD( qtr("Play"), "", "", togglePlayPause() ) \
347 QMenu *intfmenu = InterfacesMenu( p_intf, NULL ); \
348 intfmenu->setTitle( qtr("Interfaces" ) ); \
349 menu->addMenu( intfmenu ); \
351 QMenu *toolsmenu = ToolsMenu( p_intf, NULL, false, false ); \
352 toolsmenu->setTitle( qtr("Tools" ) ); \
353 menu->addMenu( toolsmenu ); \
355 void QVLCMenu::VideoPopupMenu( intf_thread_t *p_intf )
360 vlc_object_yield( p_input );
361 varnames.push_back( "video-es" );
362 objects.push_back( p_input->i_object_id );
363 varnames.push_back( "spu-es" );
364 objects.push_back( p_input->i_object_id );
365 vlc_object_t *p_vout = (vlc_object_t *)vlc_object_find( p_input,
366 VLC_OBJECT_VOUT, FIND_CHILD );
369 VideoAutoMenuBuilder( p_vout, objects, varnames );
370 vlc_object_release( p_vout );
372 vlc_object_release( p_input );
377 void QVLCMenu::AudioPopupMenu( intf_thread_t *p_intf )
382 vlc_object_yield( p_input );
383 varnames.push_back( "audio-es" );
384 objects.push_back( p_input->i_object_id );
385 vlc_object_t *p_aout = (vlc_object_t *)vlc_object_find( p_input,
386 VLC_OBJECT_AOUT, FIND_ANYWHERE );
389 AudioAutoMenuBuilder( p_aout, objects, varnames );
390 vlc_object_release( p_aout );
392 vlc_object_release( p_input );
397 /* Navigation stuff, and general */
398 void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf )
403 vlc_object_yield( p_input );
404 varnames.push_back( "audio-es" );
405 InputAutoMenuBuilder( VLC_OBJECT(p_input), objects, varnames );
409 QMenu *menu = new QMenu();
410 Populate( p_intf, menu, varnames, objects );
411 menu->addSeparator();
412 POPUP_STATIC_ENTRIES;
414 p_intf->p_sys->p_popup_menu = menu;
415 menu->popup( QCursor::pos() );
416 p_intf->p_sys->p_popup_menu = NULL;
419 void QVLCMenu::PopupMenu( intf_thread_t *p_intf )
424 vlc_object_yield( p_input );
425 InputAutoMenuBuilder( VLC_OBJECT(p_input), objects, varnames );
429 varnames.push_back( "video-es" );
430 objects.push_back( p_input->i_object_id );
431 varnames.push_back( "spu-es" );
432 objects.push_back( p_input->i_object_id );
433 vlc_object_t *p_vout = (vlc_object_t *)vlc_object_find( p_input,
434 VLC_OBJECT_VOUT, FIND_CHILD );
437 VideoAutoMenuBuilder( p_vout, objects, varnames );
438 vlc_object_release( p_vout );
442 varnames.push_back( "audio-es" );
443 objects.push_back( p_input->i_object_id );
444 vlc_object_t *p_aout = (vlc_object_t *)vlc_object_find( p_input,
445 VLC_OBJECT_AOUT, FIND_ANYWHERE );
448 AudioAutoMenuBuilder( p_aout, objects, varnames );
449 vlc_object_release( p_aout );
453 QMenu *menu = new QMenu();
454 Populate( p_intf, menu, varnames, objects );
455 menu->addSeparator();
456 POPUP_STATIC_ENTRIES;
458 p_intf->p_sys->p_popup_menu = menu;
459 menu->popup( QCursor::pos() );
460 p_intf->p_sys->p_popup_menu = NULL;
464 #undef PUSH_SEPARATOR
466 /*************************************************************************
467 * Builders for automenus
468 *************************************************************************/
469 QMenu * QVLCMenu::Populate( intf_thread_t *p_intf, QMenu *current,
470 vector< const char *> & varnames,
471 vector<int> & objects, bool append )
473 QMenu *menu = current;
481 vlc_object_t *p_object;
482 vlc_bool_t b_section_empty = VLC_FALSE;
485 #define APPEND_EMPTY { QAction *action = menu->addAction( qtr("Empty" ) ); \
486 action->setEnabled( false ); }
488 for( i = 0; i < (int)objects.size() ; i++ )
490 if( !varnames[i] || !*varnames[i] )
492 if( b_section_empty )
494 menu->addSeparator();
495 b_section_empty = VLC_TRUE;
499 if( objects[i] == 0 )
501 /// \bug What is this ?
502 // Append( menu, varnames[i], NULL );
503 b_section_empty = VLC_FALSE;
507 p_object = (vlc_object_t *)vlc_object_get( p_intf,
509 if( p_object == NULL ) continue;
511 b_section_empty = VLC_FALSE;
512 /* Ugly specific stuff */
513 if( strstr(varnames[i], "intf-add" ) )
514 CreateItem( menu, varnames[i], p_object, false );
516 CreateItem( menu, varnames[i], p_object, true );
517 vlc_object_release( p_object );
520 /* Special case for empty menus */
521 if( menu->actions().size() == 0 || b_section_empty )
527 /*****************************************************************************
529 *****************************************************************************/
531 static bool IsMenuEmpty( const char *psz_var, vlc_object_t *p_object,
534 vlc_value_t val, val_list;
535 int i_type, i_result, i;
537 /* Check the type of the object variable */
538 i_type = var_Type( p_object, psz_var );
540 /* Check if we want to display the variable */
541 if( !(i_type & VLC_VAR_HASCHOICE) ) return FALSE;
543 var_Change( p_object, psz_var, VLC_VAR_CHOICESCOUNT, &val, NULL );
544 if( val.i_int == 0 ) return TRUE;
546 if( (i_type & VLC_VAR_TYPE) != VLC_VAR_VARIABLE )
548 /* Very evil hack ! intf-switch can have only one value */
549 if( !strcmp( psz_var, "intf-switch" ) ) return FALSE;
550 if( val.i_int == 1 && b_root ) return TRUE;
554 /* Check children variables in case of VLC_VAR_VARIABLE */
555 if( var_Change( p_object, psz_var, VLC_VAR_GETLIST, &val_list, NULL ) < 0 )
560 for( i = 0, i_result = TRUE; i < val_list.p_list->i_count; i++ )
562 if( !IsMenuEmpty( val_list.p_list->p_values[i].psz_string,
570 /* clean up everything */
571 var_Change( p_object, psz_var, VLC_VAR_FREELIST, &val_list, NULL );
576 void QVLCMenu::CreateItem( QMenu *menu, const char *psz_var,
577 vlc_object_t *p_object, bool b_submenu )
579 vlc_value_t val, text;
582 /* Check the type of the object variable */
583 i_type = var_Type( p_object, psz_var );
585 switch( i_type & VLC_VAR_TYPE )
589 case VLC_VAR_VARIABLE:
591 case VLC_VAR_INTEGER:
595 /* Variable doesn't exist or isn't handled */
599 /* Make sure we want to display the variable */
600 if( IsMenuEmpty( psz_var, p_object ) ) return;
602 /* Get the descriptive name of the variable */
603 var_Change( p_object, psz_var, VLC_VAR_GETTEXT, &text, NULL );
605 if( i_type & VLC_VAR_HASCHOICE )
607 /* Append choices menu */
610 QMenu *submenu = new QMenu();
611 submenu->setTitle( qfu( text.psz_string ?
612 text.psz_string : psz_var ) );
613 if( CreateChoicesMenu( submenu, psz_var, p_object, true ) == 0)
614 menu->addMenu( submenu );
617 CreateChoicesMenu( menu, psz_var, p_object, true );
618 FREENULL( text.psz_string );
622 #define TEXT_OR_VAR qfu ( text.psz_string ? text.psz_string : psz_var )
624 switch( i_type & VLC_VAR_TYPE )
627 var_Get( p_object, psz_var, &val );
628 CreateAndConnect( menu, psz_var, TEXT_OR_VAR, "", ITEM_NORMAL,
629 p_object->i_object_id, val, i_type );
633 var_Get( p_object, psz_var, &val );
634 CreateAndConnect( menu, psz_var, TEXT_OR_VAR, "", ITEM_CHECK,
635 p_object->i_object_id, val, i_type, val.b_bool );
638 FREENULL( text.psz_string );
642 int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
643 vlc_object_t *p_object, bool b_root )
645 vlc_value_t val, val_list, text_list;
648 /* Check the type of the object variable */
649 i_type = var_Type( p_object, psz_var );
651 /* Make sure we want to display the variable */
652 if( IsMenuEmpty( psz_var, p_object, b_root ) ) return VLC_EGENERIC;
654 switch( i_type & VLC_VAR_TYPE )
658 case VLC_VAR_VARIABLE:
660 case VLC_VAR_INTEGER:
664 /* Variable doesn't exist or isn't handled */
668 if( var_Change( p_object, psz_var, VLC_VAR_GETLIST,
669 &val_list, &text_list ) < 0 )
673 #define NORMAL_OR_RADIO i_type & VLC_VAR_ISCOMMAND ? ITEM_NORMAL: ITEM_RADIO
674 #define NOTCOMMAND !(i_type & VLC_VAR_ISCOMMAND)
675 #define CURVAL val_list.p_list->p_values[i]
676 #define CURTEXT text_list.p_list->p_values[i].psz_string
678 for( i = 0; i < val_list.p_list->i_count; i++ )
680 vlc_value_t another_val;
682 QMenu *subsubmenu = new QMenu();
684 switch( i_type & VLC_VAR_TYPE )
686 case VLC_VAR_VARIABLE:
687 CreateChoicesMenu( subsubmenu, CURVAL.psz_string, p_object, false );
688 subsubmenu->setTitle( qfu( CURTEXT ? CURTEXT :CURVAL.psz_string ) );
689 submenu->addMenu( subsubmenu );
693 var_Get( p_object, psz_var, &val );
694 another_val.psz_string = strdup( CURVAL.psz_string );
695 menutext = qfu( CURTEXT ? CURTEXT : another_val.psz_string );
696 CreateAndConnect( submenu, psz_var, menutext, "", NORMAL_OR_RADIO,
697 p_object->i_object_id, another_val, i_type,
698 NOTCOMMAND && val.psz_string &&
699 !strcmp( val.psz_string, CURVAL.psz_string ) );
701 if( val.psz_string ) free( val.psz_string );
704 case VLC_VAR_INTEGER:
705 var_Get( p_object, psz_var, &val );
706 if( CURTEXT ) menutext = qfu( CURTEXT );
707 else menutext.sprintf( "%d", CURVAL.i_int);
708 CreateAndConnect( submenu, psz_var, menutext, "", NORMAL_OR_RADIO,
709 p_object->i_object_id, CURVAL, i_type,
710 NOTCOMMAND && CURVAL.i_int == val.i_int );
714 var_Get( p_object, psz_var, &val );
715 if( CURTEXT ) menutext = qfu( CURTEXT );
716 else menutext.sprintf( "%.2f", CURVAL.f_float );
717 CreateAndConnect( submenu, psz_var, menutext, "", NORMAL_OR_RADIO,
718 p_object->i_object_id, CURVAL, i_type,
719 NOTCOMMAND && CURVAL.f_float == val.f_float );
728 /* clean up everything */
729 var_Change( p_object, psz_var, VLC_VAR_FREELIST, &val_list, &text_list );
731 #undef NORMAL_OR_RADIO
738 void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var,
739 QString text, QString help,
740 int i_item_type, int i_object_id,
741 vlc_value_t val, int i_val_type,
744 QAction *action = new QAction( text, menu );
745 action->setText( text );
746 action->setToolTip( help );
748 if( i_item_type == ITEM_CHECK )
750 action->setCheckable( true );
752 else if( i_item_type == ITEM_RADIO )
754 action->setCheckable( true );
756 currentGroup = new QActionGroup(menu);
757 currentGroup->addAction( action );
762 action->setChecked( true );
764 MenuItemData *itemData = new MenuItemData( i_object_id, i_val_type,
766 CONNECT( action, triggered(), THEDP->menusMapper, map() );
767 THEDP->menusMapper->setMapping( action, itemData );
768 menu->addAction( action );
771 void QVLCMenu::DoAction( intf_thread_t *p_intf, QObject *data )
773 MenuItemData *itemData = qobject_cast<MenuItemData *>(data);
774 vlc_object_t *p_object = (vlc_object_t *)vlc_object_get( p_intf,
775 itemData->i_object_id );
776 if( p_object == NULL ) return;
778 var_Set( p_object, itemData->psz_var, itemData->val );
779 vlc_object_release( p_object );