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>
47 #include <vlc_interface.h>
49 #include <vlc_input.h>
50 #include <vlc_playlist.h>
52 /*****************************************************************************
54 *****************************************************************************/
56 static int Open ( vlc_object_t * );
57 static void Close ( vlc_object_t * );
58 static void Run ( intf_thread_t * );
60 static int TrackChange( vlc_object_t *p_this, const char *psz_var,
61 vlc_value_t oldval, vlc_value_t newval, void *p_data );
63 static int GetInputMeta ( input_item_t *p_input,
64 DBusMessageIter *args);
68 DBusConnection *p_conn;
71 /*****************************************************************************
73 *****************************************************************************/
76 set_shortname( _("dbus"));
77 set_category( CAT_INTERFACE );
78 set_subcategory( SUBCAT_INTERFACE_CONTROL );
79 set_description( _("D-Bus control interface") );
80 set_capability( "interface", 0 );
81 set_callbacks( Open, Close );
84 /*****************************************************************************
86 *****************************************************************************/
88 DBUS_METHOD( PlaylistExport_XSPF )
89 { /*export playlist to an xspf file */
91 /* reads the filename to export to */
92 /* returns the status as int32:
101 dbus_error_init( &error );
106 dbus_message_get_args( p_from, &error,
107 DBUS_TYPE_STRING, &psz_file,
110 if( dbus_error_is_set( &error ) )
112 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
114 dbus_error_free( &error );
115 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
118 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
120 if( ( !playlist_IsEmpty( p_playlist ) ) &&
121 ( p_playlist->p_root_category->i_children > 0 ) )
123 if( playlist_Export( p_playlist, psz_file,
124 p_playlist->p_root_category->pp_children[0],
125 "export-xspf" ) == VLC_SUCCESS )
133 pl_Release( ((vlc_object_t*) p_this ) );
145 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
146 playlist_Stop( p_playlist );
147 pl_Release( ((vlc_object_t*) p_this) );
148 vlc_object_kill(((vlc_object_t*)p_this)->p_libvlc);
152 DBUS_METHOD( PositionGet )
153 { /* returns position as an int in the range [0;1000] */
156 vlc_value_t position;
159 playlist_t *p_playlist = pl_Yield( ((vlc_object_t*) p_this) );
160 input_thread_t *p_input = p_playlist->p_input;
166 var_Get( p_input, "position", &position );
167 i_pos = position.f_float * 1000 ;
169 pl_Release( ((vlc_object_t*) p_this) );
174 DBUS_METHOD( PositionSet )
175 { /* set position from an int in the range [0;1000] */
178 vlc_value_t position;
179 playlist_t* p_playlist = NULL;
183 dbus_error_init( &error );
185 dbus_message_get_args( p_from, &error,
186 DBUS_TYPE_INT32, &i_pos,
189 if( dbus_error_is_set( &error ) )
191 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
193 dbus_error_free( &error );
194 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
196 p_playlist = pl_Yield( ((vlc_object_t*) p_this) );
197 input_thread_t *p_input = p_playlist->p_input;
201 position.f_float = ((float)i_pos) / 1000;
202 var_Set( p_input, "position", position );
204 pl_Release( ((vlc_object_t*) p_this) );
208 DBUS_METHOD( VolumeGet )
209 { /* returns volume in percentage */
212 dbus_int32_t i_dbus_vol;
213 audio_volume_t i_vol;
214 /* 2nd argument of aout_VolumeGet is int32 */
215 aout_VolumeGet( (vlc_object_t*) p_this, &i_vol );
216 i_dbus_vol = ( 100 * i_vol ) / AOUT_VOLUME_MAX;
217 ADD_INT32( &i_dbus_vol );
221 DBUS_METHOD( VolumeSet )
222 { /* set volume in percentage */
226 dbus_error_init( &error );
228 dbus_int32_t i_dbus_vol;
229 audio_volume_t i_vol;
231 dbus_message_get_args( p_from, &error,
232 DBUS_TYPE_INT32, &i_dbus_vol,
235 if( dbus_error_is_set( &error ) )
237 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
239 dbus_error_free( &error );
240 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
243 i_vol = ( AOUT_VOLUME_MAX / 100 ) *i_dbus_vol;
244 aout_VolumeSet( (vlc_object_t*) p_this, i_vol );
250 { /* next playlist item */
252 playlist_t *p_playlist = pl_Yield( ((vlc_object_t*) p_this) );
253 playlist_Next( p_playlist );
254 pl_Release( ((vlc_object_t*) p_this) );
259 { /* previous playlist item */
261 playlist_t *p_playlist = pl_Yield( ((vlc_object_t*) p_this) );
262 playlist_Prev( p_playlist );
263 pl_Release( ((vlc_object_t*) p_this) );
270 playlist_t *p_playlist = pl_Yield( ((vlc_object_t*) p_this) );
271 playlist_Stop( p_playlist );
272 pl_Release( ((vlc_object_t*) p_this) );
276 DBUS_METHOD( GetStatus )
277 { /* returns an int: 0=playing 1=paused 2=stopped */
281 dbus_int32_t i_status;
284 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
285 input_thread_t *p_input = p_playlist->p_input;
290 var_Get( p_input, "state", &val );
291 if( val.i_int == PAUSE_S )
293 else if( val.i_int == PLAYING_S )
297 pl_Release( p_playlist );
299 ADD_INT32( &i_status );
306 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
307 playlist_Pause( p_playlist );
308 pl_Release( p_playlist );
315 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
316 playlist_Play( p_playlist );
317 pl_Release( p_playlist );
321 DBUS_METHOD( Disconnect )
326 dbus_error_init( &error );
327 i = dbus_bus_release_name( p_conn, "org.mpris.vlc", &error );
328 if( ( i == -1 ) && ( dbus_error_is_set( &error ) ) )
330 msg_Err( (vlc_object_t*) p_this, "D-Bus disconnection failed : %s\n",
332 dbus_error_free( &error );
337 DBUS_METHOD( GetCurrentMetadata )
341 playlist_t* p_playlist = pl_Yield( (vlc_object_t*) p_this );
343 GetInputMeta( p_playlist->status.p_item->p_input, &args );
345 pl_Release( p_playlist );
349 /* Media Player information */
351 DBUS_METHOD( Identity )
355 char *psz_identity = malloc( strlen( PACKAGE ) + strlen( VERSION ) + 1 );
356 sprintf( psz_identity, "%s %s", PACKAGE, VERSION );
357 ADD_STRING( &psz_identity );
358 free( psz_identity );
364 DBUS_METHOD( AddTrack )
365 { /* add the string to the playlist, and play it if the boolean is true */
369 dbus_error_init( &error );
370 playlist_t* p_playlist = NULL;
375 dbus_message_get_args( p_from, &error,
376 DBUS_TYPE_STRING, &psz_mrl,
377 DBUS_TYPE_BOOLEAN, &b_play,
380 if( dbus_error_is_set( &error ) )
382 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
384 dbus_error_free( &error );
385 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
388 p_playlist = pl_Yield( (vlc_object_t*) p_this );
389 playlist_Add( p_playlist, psz_mrl, NULL, PLAYLIST_APPEND |
390 ( ( b_play == TRUE ) ? PLAYLIST_GO : 0 ) ,
391 PLAYLIST_END, VLC_TRUE, VLC_FALSE );
392 pl_Release( p_playlist );
397 DBUS_METHOD( GetCurrentTrack )
401 dbus_int32_t i_position = 0;
402 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
403 playlist_item_t* p_tested_item = p_playlist->p_root_onelevel;
405 while ( p_tested_item->p_input->i_id !=
406 p_playlist->status.p_item->p_input->i_id )
412 pl_Release( p_playlist );
414 ADD_INT32( &i_position );
418 DBUS_METHOD( GetMetadata )
423 dbus_error_init( &error );
425 dbus_int32_t i_position, i_count = 0;
427 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
428 playlist_item_t* p_tested_item = p_playlist->p_root_onelevel;
430 dbus_message_get_args( p_from, &error,
431 DBUS_TYPE_INT32, &i_position,
434 if( dbus_error_is_set( &error ) )
436 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
438 dbus_error_free( &error );
439 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
442 while ( i_count < i_position )
448 GetInputMeta ( p_tested_item->p_input, &args );
450 pl_Release( p_playlist );
454 DBUS_METHOD( GetLength )
459 dbus_int32_t i_elements = 0;
460 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
461 playlist_item_t* p_tested_item = p_playlist->p_root_onelevel;
462 playlist_item_t* p_last_item = playlist_GetLastLeaf( p_playlist,
463 p_playlist->p_root_onelevel );
465 while ( p_tested_item->p_input->i_id != p_last_item->p_input->i_id )
471 pl_Release( p_playlist );
473 ADD_INT32( &i_elements );
477 DBUS_METHOD( DelTrack )
482 dbus_error_init( &error );
484 dbus_int32_t i_position, i_count = 0;
485 playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
486 playlist_item_t* p_tested_item = p_playlist->p_root_onelevel;
488 dbus_message_get_args( p_from, &error,
489 DBUS_TYPE_INT32, &i_position,
492 if( dbus_error_is_set( &error ) )
494 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
496 dbus_error_free( &error );
497 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
500 while ( i_count < i_position )
507 playlist_DeleteFromInput( p_playlist,
508 p_tested_item->p_input->i_id,
512 pl_Release( p_playlist );
525 playlist_t* p_playlist = NULL;
527 dbus_error_init( &error );
528 dbus_message_get_args( p_from, &error,
529 DBUS_TYPE_BOOLEAN, &b_loop,
532 if( dbus_error_is_set( &error ) )
534 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
536 dbus_error_free( &error );
537 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
540 val.b_bool = ( b_loop == TRUE ) ? VLC_TRUE : VLC_FALSE ;
541 p_playlist = pl_Yield( (vlc_object_t*) p_this );
542 var_Set ( p_playlist, "loop", val );
543 pl_Release( ((vlc_object_t*) p_this) );
548 DBUS_METHOD( Repeat )
554 dbus_bool_t b_repeat;
556 playlist_t* p_playlist = NULL;
558 dbus_error_init( &error );
559 dbus_message_get_args( p_from, &error,
560 DBUS_TYPE_BOOLEAN, &b_repeat,
563 if( dbus_error_is_set( &error ) )
565 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
567 dbus_error_free( &error );
568 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
571 val.b_bool = ( b_repeat == TRUE ) ? VLC_TRUE : VLC_FALSE ;
573 p_playlist = pl_Yield( (vlc_object_t*) p_this );
574 var_Set ( p_playlist, "repeat", val );
575 pl_Release( ((vlc_object_t*) p_this) );
580 DBUS_METHOD( Random )
586 dbus_bool_t b_random;
588 playlist_t* p_playlist = NULL;
590 dbus_error_init( &error );
591 dbus_message_get_args( p_from, &error,
592 DBUS_TYPE_BOOLEAN, &b_random,
595 if( dbus_error_is_set( &error ) )
597 msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
599 dbus_error_free( &error );
600 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
603 val.b_bool = ( b_random == TRUE ) ? VLC_TRUE : VLC_FALSE ;
605 p_playlist = pl_Yield( (vlc_object_t*) p_this );
606 var_Set ( p_playlist, "random", val );
607 pl_Release( ((vlc_object_t*) p_this) );
611 /*****************************************************************************
612 * Introspection method
613 *****************************************************************************/
615 DBUS_METHOD( handle_introspect_root )
616 { /* handles introspection of root object */
619 ADD_STRING( &psz_introspection_xml_data_root );
623 DBUS_METHOD( handle_introspect_player )
627 ADD_STRING( &psz_introspection_xml_data_player );
631 DBUS_METHOD( handle_introspect_tracklist )
635 ADD_STRING( &psz_introspection_xml_data_tracklist );
639 /*****************************************************************************
640 * handle_*: answer to incoming messages
641 *****************************************************************************/
643 #define METHOD_FUNC( method, function ) \
644 else if( dbus_message_is_method_call( p_from, VLC_DBUS_INTERFACE, method ) )\
645 return function( p_conn, p_from, p_this )
647 DBUS_METHOD( handle_root )
650 if( dbus_message_is_method_call( p_from,
651 DBUS_INTERFACE_INTROSPECTABLE, "Introspect" ) )
652 return handle_introspect_root( p_conn, p_from, p_this );
654 /* here D-Bus method's names are associated to an handler */
656 METHOD_FUNC( "Identity", Identity );
658 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
662 DBUS_METHOD( handle_player )
664 if( dbus_message_is_method_call( p_from,
665 DBUS_INTERFACE_INTROSPECTABLE, "Introspect" ) )
666 return handle_introspect_player( p_conn, p_from, p_this );
668 /* here D-Bus method's names are associated to an handler */
670 METHOD_FUNC( "Prev", Prev );
671 METHOD_FUNC( "Next", Next );
672 METHOD_FUNC( "Quit", Quit );
673 METHOD_FUNC( "Stop", Stop );
674 METHOD_FUNC( "Play", Play );
675 METHOD_FUNC( "Pause", Pause );
676 METHOD_FUNC( "Repeat", Repeat );
677 METHOD_FUNC( "Disconnect", Disconnect );
678 METHOD_FUNC( "VolumeSet", VolumeSet );
679 METHOD_FUNC( "VolumeGet", VolumeGet );
680 METHOD_FUNC( "PositionSet", PositionSet );
681 METHOD_FUNC( "PositionGet", PositionGet );
682 METHOD_FUNC( "GetStatus", GetStatus );
683 METHOD_FUNC( "GetMetadata", GetCurrentMetadata );
685 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
688 DBUS_METHOD( handle_tracklist )
690 if( dbus_message_is_method_call( p_from,
691 DBUS_INTERFACE_INTROSPECTABLE, "Introspect" ) )
692 return handle_introspect_tracklist( p_conn, p_from, p_this );
694 /* here D-Bus method's names are associated to an handler */
696 METHOD_FUNC( "GetMetadata", GetMetadata );
697 METHOD_FUNC( "GetCurrentTrack", GetCurrentTrack );
698 METHOD_FUNC( "GetLength", GetLength );
699 METHOD_FUNC( "AddTrack", AddTrack );
700 METHOD_FUNC( "DelTrack", DelTrack );
701 METHOD_FUNC( "Loop", Loop );
702 METHOD_FUNC( "Random", Random );
704 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
707 /*****************************************************************************
708 * Open: initialize interface
709 *****************************************************************************/
711 static int Open( vlc_object_t *p_this )
712 { /* initialisation of the connection */
713 intf_thread_t *p_intf = (intf_thread_t*)p_this;
714 intf_sys_t *p_sys = malloc( sizeof( intf_sys_t ) );
715 playlist_t *p_playlist;
716 DBusConnection *p_conn;
722 dbus_threads_init_default();
724 dbus_error_init( &error );
726 /* connect to the session bus */
727 p_conn = dbus_bus_get( DBUS_BUS_SESSION, &error );
730 msg_Err( p_this, "Failed to connect to the D-Bus session daemon: %s",
732 dbus_error_free( &error );
737 /* register a well-known name on the bus */
738 dbus_bus_request_name( p_conn, "org.mpris.vlc", 0, &error );
739 if( dbus_error_is_set( &error ) )
741 msg_Err( p_this, "Error requesting org.mpris.vlc service:" " %s\n", error.message );
742 dbus_error_free( &error );
747 /* we register the objects */
748 dbus_connection_register_object_path( p_conn, VLC_DBUS_ROOT_PATH,
749 &vlc_dbus_root_vtable, p_this );
750 dbus_connection_register_object_path( p_conn, VLC_DBUS_PLAYER_PATH,
751 &vlc_dbus_player_vtable, p_this );
752 dbus_connection_register_object_path( p_conn, VLC_DBUS_TRACKLIST_PATH,
753 &vlc_dbus_tracklist_vtable, p_this );
755 dbus_connection_flush( p_conn );
757 p_playlist = pl_Yield( p_intf );
759 var_AddCallback( p_playlist, "playlist-current", TrackChange, p_intf );
761 pl_Release( p_playlist );
763 p_intf->pf_run = Run;
764 p_intf->p_sys = p_sys;
765 p_sys->p_conn = p_conn;
770 /*****************************************************************************
771 * Close: destroy interface
772 *****************************************************************************/
774 static void Close ( vlc_object_t *p_this )
776 intf_thread_t *p_intf = (intf_thread_t*) p_this;
777 playlist_t *p_playlist = pl_Yield( p_intf );;
780 var_DelCallback( p_playlist, "playlist-current", TrackChange, p_intf );
782 pl_Release( p_playlist );
784 dbus_connection_unref( p_intf->p_sys->p_conn );
786 free( p_intf->p_sys );
789 /*****************************************************************************
791 *****************************************************************************/
793 static void Run ( intf_thread_t *p_intf )
795 while( !p_intf->b_die )
797 msleep( INTF_IDLE_SLEEP );
798 dbus_connection_read_write_dispatch( p_intf->p_sys->p_conn, 0 );
802 /*****************************************************************************
803 * TrackChange: Playlist item change callback
804 *****************************************************************************/
806 DBUS_SIGNAL( TrackChangeSignal )
807 { /* emit the metadata of the new item */
808 SIGNAL_INIT( "TrackChange" );
811 input_thread_t *p_input = (input_thread_t*) p_data;
812 GetInputMeta ( input_GetItem(p_input), &args );
817 static int TrackChange( vlc_object_t *p_this, const char *psz_var,
818 vlc_value_t oldval, vlc_value_t newval, void *p_data )
820 intf_thread_t *p_intf = ( intf_thread_t* ) p_data;
821 intf_sys_t *p_sys = p_intf->p_sys;
822 playlist_t *p_playlist;
823 input_thread_t *p_input = NULL;
824 (void)p_this; (void)psz_var; (void)oldval; (void)newval;
826 p_playlist = pl_Yield( p_intf );
828 p_input = p_playlist->p_input;
833 pl_Release( p_playlist );
837 vlc_object_yield( p_input );
839 pl_Release( p_playlist );
841 TrackChangeSignal( p_sys->p_conn, p_input );
843 vlc_object_release( p_input );
847 /*****************************************************************************
848 * GetInputMeta: Fill a DBusMessage with the given input item metadata
849 *****************************************************************************/
851 #define ADD_META( entry, type, data ) \
853 dbus_message_iter_open_container( &dict, DBUS_TYPE_DICT_ENTRY, \
854 NULL, &dict_entry ); \
855 dbus_message_iter_append_basic( &dict_entry, DBUS_TYPE_STRING, \
856 &ppsz_meta_items[entry] ); \
857 dbus_message_iter_open_container( &dict_entry, DBUS_TYPE_VARIANT, \
858 type##_AS_STRING, &variant ); \
859 dbus_message_iter_append_basic( &variant, \
862 dbus_message_iter_close_container( &dict_entry, &variant ); \
863 dbus_message_iter_close_container( &dict, &dict_entry ); }
865 #define ADD_VLC_META_STRING( entry, item ) \
867 char * psz = input_item_Get##item( p_input );\
868 ADD_META( entry, DBUS_TYPE_STRING, \
873 static int GetInputMeta( input_item_t* p_input,
874 DBusMessageIter *args )
875 { /*FIXME: Works only for already read metadata. */
877 DBusMessageIter dict, dict_entry, variant;
878 /* We need the track length to be expressed in seconds
879 * instead of milliseconds */
880 dbus_int64_t i_length = (p_input->i_duration / 1000);
883 const char* ppsz_meta_items[] =
885 "title", "artist", "genre", "copyright", "album", "tracknum",
886 "description", "rating", "date", "setting", "url", "language",
887 "nowplaying", "publisher", "encodedby", "arturl", "trackid",
888 "status", "URI", "length", "video-codec", "audio-codec",
889 "video-bitrate", "audio-bitrate", "audio-samplerate"
892 dbus_message_iter_open_container( args, DBUS_TYPE_ARRAY, "{sv}", &dict );
894 ADD_VLC_META_STRING( 0, Title );
895 ADD_VLC_META_STRING( 1, Artist );
896 ADD_VLC_META_STRING( 2, Genre );
897 ADD_VLC_META_STRING( 3, Copyright );
898 ADD_VLC_META_STRING( 4, Album );
899 ADD_VLC_META_STRING( 5, TrackNum );
900 ADD_VLC_META_STRING( 6, Description );
901 ADD_VLC_META_STRING( 7, Rating );
902 ADD_VLC_META_STRING( 8, Date );
903 ADD_VLC_META_STRING( 9, Setting );
904 ADD_VLC_META_STRING( 10, URL );
905 ADD_VLC_META_STRING( 11, Language );
906 ADD_VLC_META_STRING( 12, NowPlaying );
907 ADD_VLC_META_STRING( 13, Publisher );
908 ADD_VLC_META_STRING( 14, EncodedBy );
909 ADD_VLC_META_STRING( 15, ArtURL );
910 ADD_VLC_META_STRING( 16, TrackID );
912 ADD_META( 17, DBUS_TYPE_INT32, p_input->p_meta->i_status );
913 ADD_META( 18, DBUS_TYPE_STRING, p_input->psz_uri );
914 ADD_META( 19, DBUS_TYPE_INT64, i_length );
916 dbus_message_iter_close_container( args, &dict );
921 #undef ADD_VLC_META_STRING