1 /*****************************************************************************
2 * dbus.c : D-Bus control interface
3 *****************************************************************************
4 * Copyright (C) 2006 Rafaël Carré
7 * Authors: Rafaël Carré <funman at videolanorg>
8 * Mirsal Ennaime <mirsal dot ennaime at gmail dot com>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
26 * D-Bus Specification:
27 * http://dbus.freedesktop.org/doc/dbus-specification.html
28 * D-Bus low-level C API (libdbus)
29 * http://dbus.freedesktop.org/doc/dbus/api/html/index.html
31 "If you use this low-level API directly, you're signing up for some pain."
32 * MPRIS Specification (still drafting on June, 25 of 2007):
33 * http://wiki.xmms2.xmms.se/index.php/Media_Player_Interfaces
36 /*****************************************************************************
38 *****************************************************************************/
40 #include <dbus/dbus.h>
48 #include <vlc_interface.h>
50 #include <vlc_input.h>
51 #include <vlc_playlist.h>
53 /*****************************************************************************
55 *****************************************************************************/
57 static int Open ( vlc_object_t * );
58 static void Close ( vlc_object_t * );
59 static void Run ( intf_thread_t * );
61 static int TrackChange( vlc_object_t *p_this, const char *psz_var,
62 vlc_value_t oldval, vlc_value_t newval, void *p_data );
64 static int GetInputMeta ( input_item_t *p_input,
65 DBusMessageIter *args);
69 DBusConnection *p_conn;
72 /*****************************************************************************
74 *****************************************************************************/
77 set_shortname( _("dbus"));
78 set_category( CAT_INTERFACE );
79 set_subcategory( SUBCAT_INTERFACE_CONTROL );
80 set_description( _("D-Bus control interface") );
81 set_capability( "interface", 0 );
82 set_callbacks( Open, Close );
85 /*****************************************************************************
87 *****************************************************************************/
89 DBUS_METHOD( PlaylistExport_XSPF )
90 { /*export playlist to an xspf file */
92 /* reads the filename to export to */
93 /* returns the status as int32:
102 dbus_error_init( &error );
107 dbus_message_get_args( p_from, &error,
108 DBUS_TYPE_STRING, &psz_file,
111 if( dbus_error_is_set( &error ) )
113 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
115 dbus_error_free( &error );
116 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
119 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
121 if( ( !playlist_IsEmpty( p_playlist ) ) &&
122 ( p_playlist->p_root_category->i_children > 0 ) )
124 if( playlist_Export( p_playlist, psz_file,
125 p_playlist->p_root_category->pp_children[0],
126 "export-xspf" ) == VLC_SUCCESS )
134 pl_Release( ((vlc_object_t*) p_this ) );
146 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
147 playlist_Stop( p_playlist );
148 pl_Release( ((vlc_object_t*) p_this) );
149 vlc_object_kill(((vlc_object_t*)p_this)->p_libvlc);
153 DBUS_METHOD( PositionGet )
154 { /* returns position as an int in the range [0;1000] */
157 vlc_value_t position;
160 playlist_t *p_playlist = pl_Yield( ((vlc_object_t*) p_this) );
161 input_thread_t *p_input = p_playlist->p_input;
167 var_Get( p_input, "position", &position );
168 i_pos = position.f_float * 1000 ;
170 pl_Release( ((vlc_object_t*) p_this) );
175 DBUS_METHOD( PositionSet )
176 { /* set position from an int in the range [0;1000] */
179 vlc_value_t position;
180 playlist_t* p_playlist = NULL;
184 dbus_error_init( &error );
186 dbus_message_get_args( p_from, &error,
187 DBUS_TYPE_INT32, &i_pos,
190 if( dbus_error_is_set( &error ) )
192 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
194 dbus_error_free( &error );
195 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
197 p_playlist = pl_Yield( ((vlc_object_t*) p_this) );
198 input_thread_t *p_input = p_playlist->p_input;
202 position.f_float = ((float)i_pos) / 1000;
203 var_Set( p_input, "position", position );
205 pl_Release( ((vlc_object_t*) p_this) );
209 DBUS_METHOD( VolumeGet )
210 { /* returns volume in percentage */
213 dbus_int32_t i_dbus_vol;
214 audio_volume_t i_vol;
215 /* 2nd argument of aout_VolumeGet is int32 */
216 aout_VolumeGet( (vlc_object_t*) p_this, &i_vol );
217 i_dbus_vol = ( 100 * i_vol ) / AOUT_VOLUME_MAX;
218 ADD_INT32( &i_dbus_vol );
222 DBUS_METHOD( VolumeSet )
223 { /* set volume in percentage */
227 dbus_error_init( &error );
229 dbus_int32_t i_dbus_vol;
230 audio_volume_t i_vol;
232 dbus_message_get_args( p_from, &error,
233 DBUS_TYPE_INT32, &i_dbus_vol,
236 if( dbus_error_is_set( &error ) )
238 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
240 dbus_error_free( &error );
241 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
244 i_vol = ( AOUT_VOLUME_MAX / 100 ) *i_dbus_vol;
245 aout_VolumeSet( (vlc_object_t*) p_this, i_vol );
251 { /* next playlist item */
253 playlist_t *p_playlist = pl_Yield( ((vlc_object_t*) p_this) );
254 playlist_Next( p_playlist );
255 pl_Release( ((vlc_object_t*) p_this) );
260 { /* previous playlist item */
262 playlist_t *p_playlist = pl_Yield( ((vlc_object_t*) p_this) );
263 playlist_Prev( p_playlist );
264 pl_Release( ((vlc_object_t*) p_this) );
271 playlist_t *p_playlist = pl_Yield( ((vlc_object_t*) p_this) );
272 playlist_Stop( p_playlist );
273 pl_Release( ((vlc_object_t*) p_this) );
277 DBUS_METHOD( GetStatus )
278 { /* returns an int: 0=playing 1=paused 2=stopped */
282 dbus_int32_t i_status;
285 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
286 input_thread_t *p_input = p_playlist->p_input;
291 var_Get( p_input, "state", &val );
292 if( val.i_int == PAUSE_S )
294 else if( val.i_int == PLAYING_S )
298 pl_Release( p_playlist );
300 ADD_INT32( &i_status );
307 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
308 playlist_Pause( p_playlist );
309 pl_Release( p_playlist );
316 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
317 playlist_Play( p_playlist );
318 pl_Release( p_playlist );
322 DBUS_METHOD( Disconnect )
327 dbus_error_init( &error );
328 i = dbus_bus_release_name( p_conn, "org.mpris.vlc", &error );
329 if( ( i == -1 ) && ( dbus_error_is_set( &error ) ) )
331 msg_Err( (vlc_object_t*) p_this, "D-Bus disconnection failed : %s\n",
333 dbus_error_free( &error );
338 DBUS_METHOD( GetCurrentMetadata )
342 playlist_t* p_playlist = pl_Yield( (vlc_object_t*) p_this );
344 GetInputMeta( p_playlist->status.p_item->p_input, &args );
346 pl_Release( p_playlist );
350 /* Media Player information */
352 DBUS_METHOD( Identity )
356 char *psz_identity = malloc( strlen( PACKAGE ) + strlen( VERSION ) + 1 );
357 sprintf( psz_identity, "%s %s", PACKAGE, VERSION );
358 ADD_STRING( &psz_identity );
359 free( psz_identity );
365 DBUS_METHOD( AddTrack )
366 { /* add the string to the playlist, and play it if the boolean is true */
370 dbus_error_init( &error );
371 playlist_t* p_playlist = NULL;
376 dbus_message_get_args( p_from, &error,
377 DBUS_TYPE_STRING, &psz_mrl,
378 DBUS_TYPE_BOOLEAN, &b_play,
381 if( dbus_error_is_set( &error ) )
383 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
385 dbus_error_free( &error );
386 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
389 p_playlist = pl_Yield( (vlc_object_t*) p_this );
390 playlist_Add( p_playlist, psz_mrl, NULL, PLAYLIST_APPEND |
391 ( ( b_play == TRUE ) ? PLAYLIST_GO : 0 ) ,
392 PLAYLIST_END, VLC_TRUE, VLC_FALSE );
393 pl_Release( p_playlist );
398 DBUS_METHOD( GetCurrentTrack )
402 dbus_int32_t i_position = 0;
403 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
404 playlist_item_t* p_tested_item = p_playlist->p_root_onelevel;
406 while ( p_tested_item->p_input->i_id !=
407 p_playlist->status.p_item->p_input->i_id )
413 pl_Release( p_playlist );
415 ADD_INT32( &i_position );
419 DBUS_METHOD( GetMetadata )
424 dbus_error_init( &error );
426 dbus_int32_t i_position, i_count = 0;
428 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
429 playlist_item_t* p_tested_item = p_playlist->p_root_onelevel;
431 dbus_message_get_args( p_from, &error,
432 DBUS_TYPE_INT32, &i_position,
435 if( dbus_error_is_set( &error ) )
437 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
439 dbus_error_free( &error );
440 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
443 while ( i_count < i_position )
449 GetInputMeta ( p_tested_item->p_input, &args );
451 pl_Release( p_playlist );
455 DBUS_METHOD( GetLength )
460 dbus_int32_t i_elements = 0;
461 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
462 playlist_item_t* p_tested_item = p_playlist->p_root_onelevel;
463 playlist_item_t* p_last_item = playlist_GetLastLeaf( p_playlist,
464 p_playlist->p_root_onelevel );
466 while ( p_tested_item->p_input->i_id != p_last_item->p_input->i_id )
472 pl_Release( p_playlist );
474 ADD_INT32( &i_elements );
478 DBUS_METHOD( DelTrack )
483 dbus_error_init( &error );
485 dbus_int32_t i_position, i_count = 0;
486 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
487 playlist_item_t* p_tested_item = p_playlist->p_root_onelevel;
489 dbus_message_get_args( p_from, &error,
490 DBUS_TYPE_INT32, &i_position,
493 if( dbus_error_is_set( &error ) )
495 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
497 dbus_error_free( &error );
498 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
501 while ( i_count < i_position )
508 playlist_DeleteFromInput( p_playlist,
509 p_tested_item->p_input->i_id,
513 pl_Release( p_playlist );
526 playlist_t* p_playlist = NULL;
528 dbus_error_init( &error );
529 dbus_message_get_args( p_from, &error,
530 DBUS_TYPE_BOOLEAN, &b_loop,
533 if( dbus_error_is_set( &error ) )
535 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
537 dbus_error_free( &error );
538 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
541 val.b_bool = ( b_loop == TRUE ) ? VLC_TRUE : VLC_FALSE ;
542 p_playlist = pl_Yield( (vlc_object_t*) p_this );
543 var_Set ( p_playlist, "loop", val );
544 pl_Release( ((vlc_object_t*) p_this) );
549 DBUS_METHOD( Repeat )
555 dbus_bool_t b_repeat;
557 playlist_t* p_playlist = NULL;
559 dbus_error_init( &error );
560 dbus_message_get_args( p_from, &error,
561 DBUS_TYPE_BOOLEAN, &b_repeat,
564 if( dbus_error_is_set( &error ) )
566 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
568 dbus_error_free( &error );
569 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
572 val.b_bool = ( b_repeat == TRUE ) ? VLC_TRUE : VLC_FALSE ;
574 p_playlist = pl_Yield( (vlc_object_t*) p_this );
575 var_Set ( p_playlist, "repeat", val );
576 pl_Release( ((vlc_object_t*) p_this) );
581 DBUS_METHOD( Random )
587 dbus_bool_t b_random;
589 playlist_t* p_playlist = NULL;
591 dbus_error_init( &error );
592 dbus_message_get_args( p_from, &error,
593 DBUS_TYPE_BOOLEAN, &b_random,
596 if( dbus_error_is_set( &error ) )
598 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
600 dbus_error_free( &error );
601 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
604 val.b_bool = ( b_random == TRUE ) ? VLC_TRUE : VLC_FALSE ;
606 p_playlist = pl_Yield( (vlc_object_t*) p_this );
607 var_Set ( p_playlist, "random", val );
608 pl_Release( ((vlc_object_t*) p_this) );
612 /*****************************************************************************
613 * Introspection method
614 *****************************************************************************/
616 DBUS_METHOD( handle_introspect_root )
617 { /* handles introspection of root object */
620 ADD_STRING( &psz_introspection_xml_data_root );
624 DBUS_METHOD( handle_introspect_player )
628 ADD_STRING( &psz_introspection_xml_data_player );
632 DBUS_METHOD( handle_introspect_tracklist )
636 ADD_STRING( &psz_introspection_xml_data_tracklist );
640 /*****************************************************************************
641 * handle_*: answer to incoming messages
642 *****************************************************************************/
644 #define METHOD_FUNC( method, function ) \
645 else if( dbus_message_is_method_call( p_from, VLC_DBUS_INTERFACE, method ) )\
646 return function( p_conn, p_from, p_this )
648 DBUS_METHOD( handle_root )
651 if( dbus_message_is_method_call( p_from,
652 DBUS_INTERFACE_INTROSPECTABLE, "Introspect" ) )
653 return handle_introspect_root( p_conn, p_from, p_this );
655 /* here D-Bus method's names are associated to an handler */
657 METHOD_FUNC( "Identity", Identity );
659 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
663 DBUS_METHOD( handle_player )
665 if( dbus_message_is_method_call( p_from,
666 DBUS_INTERFACE_INTROSPECTABLE, "Introspect" ) )
667 return handle_introspect_player( p_conn, p_from, p_this );
669 /* here D-Bus method's names are associated to an handler */
671 METHOD_FUNC( "Prev", Prev );
672 METHOD_FUNC( "Next", Next );
673 METHOD_FUNC( "Quit", Quit );
674 METHOD_FUNC( "Stop", Stop );
675 METHOD_FUNC( "Play", Play );
676 METHOD_FUNC( "Pause", Pause );
677 METHOD_FUNC( "Repeat", Repeat );
678 METHOD_FUNC( "Disconnect", Disconnect );
679 METHOD_FUNC( "VolumeSet", VolumeSet );
680 METHOD_FUNC( "VolumeGet", VolumeGet );
681 METHOD_FUNC( "PositionSet", PositionSet );
682 METHOD_FUNC( "PositionGet", PositionGet );
683 METHOD_FUNC( "GetStatus", GetStatus );
684 METHOD_FUNC( "GetMetadata", GetCurrentMetadata );
686 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
689 DBUS_METHOD( handle_tracklist )
691 if( dbus_message_is_method_call( p_from,
692 DBUS_INTERFACE_INTROSPECTABLE, "Introspect" ) )
693 return handle_introspect_tracklist( p_conn, p_from, p_this );
695 /* here D-Bus method's names are associated to an handler */
697 METHOD_FUNC( "GetMetadata", GetMetadata );
698 METHOD_FUNC( "GetCurrentTrack", GetCurrentTrack );
699 METHOD_FUNC( "GetLength", GetLength );
700 METHOD_FUNC( "AddTrack", AddTrack );
701 METHOD_FUNC( "DelTrack", DelTrack );
702 METHOD_FUNC( "Loop", Loop );
703 METHOD_FUNC( "Random", Random );
705 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
708 /*****************************************************************************
709 * Open: initialize interface
710 *****************************************************************************/
712 static int Open( vlc_object_t *p_this )
713 { /* initialisation of the connection */
714 intf_thread_t *p_intf = (intf_thread_t*)p_this;
715 intf_sys_t *p_sys = malloc( sizeof( intf_sys_t ) );
716 playlist_t *p_playlist;
717 DBusConnection *p_conn;
723 dbus_threads_init_default();
725 dbus_error_init( &error );
727 /* connect to the session bus */
728 p_conn = dbus_bus_get( DBUS_BUS_SESSION, &error );
731 msg_Err( p_this, "Failed to connect to the D-Bus session daemon: %s",
733 dbus_error_free( &error );
738 /* register a well-known name on the bus */
739 dbus_bus_request_name( p_conn, "org.mpris.vlc", 0, &error );
740 if( dbus_error_is_set( &error ) )
742 msg_Err( p_this, "Error requesting org.mpris.vlc service:" " %s\n", error.message );
743 dbus_error_free( &error );
748 /* we register the objects */
749 dbus_connection_register_object_path( p_conn, VLC_DBUS_ROOT_PATH,
750 &vlc_dbus_root_vtable, p_this );
751 dbus_connection_register_object_path( p_conn, VLC_DBUS_PLAYER_PATH,
752 &vlc_dbus_player_vtable, p_this );
753 dbus_connection_register_object_path( p_conn, VLC_DBUS_TRACKLIST_PATH,
754 &vlc_dbus_tracklist_vtable, p_this );
756 dbus_connection_flush( p_conn );
758 p_playlist = pl_Yield( p_intf );
760 var_AddCallback( p_playlist, "playlist-current", TrackChange, p_intf );
762 pl_Release( p_playlist );
764 p_intf->pf_run = Run;
765 p_intf->p_sys = p_sys;
766 p_sys->p_conn = p_conn;
771 /*****************************************************************************
772 * Close: destroy interface
773 *****************************************************************************/
775 static void Close ( vlc_object_t *p_this )
777 intf_thread_t *p_intf = (intf_thread_t*) p_this;
778 playlist_t *p_playlist = pl_Yield( p_intf );;
781 var_DelCallback( p_playlist, "playlist-current", TrackChange, p_intf );
783 pl_Release( p_playlist );
785 dbus_connection_unref( p_intf->p_sys->p_conn );
787 free( p_intf->p_sys );
790 /*****************************************************************************
792 *****************************************************************************/
794 static void Run ( intf_thread_t *p_intf )
796 while( !p_intf->b_die )
798 msleep( INTF_IDLE_SLEEP );
799 dbus_connection_read_write_dispatch( p_intf->p_sys->p_conn, 0 );
803 /*****************************************************************************
804 * TrackChange: Playlist item change callback
805 *****************************************************************************/
807 DBUS_SIGNAL( TrackChangeSignal )
808 { /* emit the metadata of the new item */
809 SIGNAL_INIT( "TrackChange" );
812 input_thread_t *p_input = (input_thread_t*) p_data;
813 GetInputMeta ( input_GetItem(p_input), &args );
818 static int TrackChange( vlc_object_t *p_this, const char *psz_var,
819 vlc_value_t oldval, vlc_value_t newval, void *p_data )
821 intf_thread_t *p_intf = ( intf_thread_t* ) p_data;
822 intf_sys_t *p_sys = p_intf->p_sys;
823 playlist_t *p_playlist;
824 input_thread_t *p_input = NULL;
825 (void)p_this; (void)psz_var; (void)oldval; (void)newval;
827 p_playlist = pl_Yield( p_intf );
829 p_input = p_playlist->p_input;
834 pl_Release( p_playlist );
838 vlc_object_yield( p_input );
840 pl_Release( p_playlist );
842 TrackChangeSignal( p_sys->p_conn, p_input );
844 vlc_object_release( p_input );
848 /*****************************************************************************
849 * GetInputMeta: Fill a DBusMessage with the given input item metadata
850 *****************************************************************************/
852 #define ADD_META( entry, type, data ) \
854 dbus_message_iter_open_container( &dict, DBUS_TYPE_DICT_ENTRY, \
855 NULL, &dict_entry ); \
856 dbus_message_iter_append_basic( &dict_entry, DBUS_TYPE_STRING, \
857 &ppsz_meta_items[entry] ); \
858 dbus_message_iter_open_container( &dict_entry, DBUS_TYPE_VARIANT, \
859 type##_AS_STRING, &variant ); \
860 dbus_message_iter_append_basic( &variant, \
863 dbus_message_iter_close_container( &dict_entry, &variant ); \
864 dbus_message_iter_close_container( &dict, &dict_entry ); }
866 #define ADD_VLC_META_STRING( entry, item ) \
868 char * psz = input_item_Get##item( p_input );\
869 ADD_META( entry, DBUS_TYPE_STRING, \
874 static int GetInputMeta( input_item_t* p_input,
875 DBusMessageIter *args )
876 { /*FIXME: Works only for already read metadata. */
878 DBusMessageIter dict, dict_entry, variant;
879 /* We need the track length to be expressed in seconds
880 * instead of milliseconds */
881 dbus_int64_t i_length = (p_input->i_duration / 1000);
884 const char* ppsz_meta_items[] =
886 "title", "artist", "genre", "copyright", "album", "tracknum",
887 "description", "rating", "date", "setting", "url", "language",
888 "nowplaying", "publisher", "encodedby", "arturl", "trackid",
889 "status", "URI", "length", "video-codec", "audio-codec",
890 "video-bitrate", "audio-bitrate", "audio-samplerate"
893 dbus_message_iter_open_container( args, DBUS_TYPE_ARRAY, "{sv}", &dict );
895 ADD_VLC_META_STRING( 0, Title );
896 ADD_VLC_META_STRING( 1, Artist );
897 ADD_VLC_META_STRING( 2, Genre );
898 ADD_VLC_META_STRING( 3, Copyright );
899 ADD_VLC_META_STRING( 4, Album );
900 ADD_VLC_META_STRING( 5, TrackNum );
901 ADD_VLC_META_STRING( 6, Description );
902 ADD_VLC_META_STRING( 7, Rating );
903 ADD_VLC_META_STRING( 8, Date );
904 ADD_VLC_META_STRING( 9, Setting );
905 ADD_VLC_META_STRING( 10, URL );
906 ADD_VLC_META_STRING( 11, Language );
907 ADD_VLC_META_STRING( 12, NowPlaying );
908 ADD_VLC_META_STRING( 13, Publisher );
909 ADD_VLC_META_STRING( 14, EncodedBy );
910 ADD_VLC_META_STRING( 15, ArtURL );
911 ADD_VLC_META_STRING( 16, TrackID );
913 ADD_META( 17, DBUS_TYPE_INT32, p_input->p_meta->i_status );
914 ADD_META( 18, DBUS_TYPE_STRING, p_input->psz_uri );
915 ADD_META( 19, DBUS_TYPE_INT64, i_length );
917 dbus_message_iter_close_container( args, &dict );
922 #undef ADD_VLC_META_STRING