+#define APPEND_INPUT_INFO( a, format, type ) \
+ asprintf( &psz_tmp, format, \
+ var_Get ## type( p_instance->p_input, a ) ); \
+ vlm_MessageAdd( msg_instance, vlm_MessageNew( a, psz_tmp ) ); \
+ free( psz_tmp );
+ APPEND_INPUT_INFO( "position", "%f", Float );
+ APPEND_INPUT_INFO( "time", "%d", Integer );
+ APPEND_INPUT_INFO( "length", "%d", Integer );
+ APPEND_INPUT_INFO( "rate", "%d", Integer );
+ APPEND_INPUT_INFO( "title", "%d", Integer );
+ APPEND_INPUT_INFO( "chapter", "%d", Integer );
+ APPEND_INPUT_INFO( "seekable", "%d", Bool );
+#undef APPEND_INPUT_INFO
+ asprintf( &psz_tmp, "%d", p_instance->i_index + 1 );
+ vlm_MessageAdd( msg_instance, vlm_MessageNew( "playlistindex", psz_tmp ) );
+ free( psz_tmp );
+ vlm_MessageAdd( msg_child, msg_instance );