+static int Other( vlc_object_t *p_this, char const *psz_cmd,
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
+{
+ intf_thread_t *p_intf = (intf_thread_t*)p_this;
+ vlc_object_t *p_playlist;
+ vlc_value_t val;
+ vlc_object_t *p_input;
+
+ p_playlist = vlc_object_find( p_this, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ if( !p_playlist )
+ {
+ return VLC_ENOOBJ;
+ }
+
+ p_input = vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_ANYWHERE );
+ if( !p_input )
+ {
+ vlc_object_release( p_playlist );
+ return VLC_ENOOBJ;
+ }
+
+ if( p_input )
+ {
+ var_Get( p_input, "state", &val );
+ if( ( val.i_int == PAUSE_S ) || ( val.i_int == PLAYLIST_PAUSED ) )
+ {
+ msg_rc( _("Type 'pause' to continue.") );
+ vlc_object_release( p_playlist );
+ vlc_object_release( p_input );
+ return VLC_EGENERIC;
+ }
+ }
+
+ /* Parse miscellaneous commands */
+ if( !strcmp( psz_cmd, "marq-marquee" ) )
+ {
+ if( strlen( newval.psz_string ) > 0 )
+ {
+ val.psz_string = newval.psz_string;
+ var_Set( p_input->p_libvlc_global, "marq-marquee", val );
+ }
+ else
+ {
+ val.psz_string = "";
+ var_Set( p_input->p_libvlc_global, "marq-marquee", val);
+ }
+ }
+ else if( !strcmp( psz_cmd, "marq-x" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "marq-x", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "marq-y" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "marq-y", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "marq-position" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "marq-position", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "marq-color" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = strtol( newval.psz_string, NULL, 0 );
+ var_Set( p_input->p_libvlc_global, "marq-color", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "marq-opacity" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = strtol( newval.psz_string, NULL, 0 );
+ var_Set( p_input->p_libvlc_global, "marq-opacity", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "marq-size" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "marq-size", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "marq-timeout" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input, "marq-timeout", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "mosaic-alpha" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "mosaic-alpha", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "mosaic-height" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "mosaic-height", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "mosaic-width" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "mosaic-width", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "mosaic-xoffset" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "mosaic-xoffset", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "mosaic-yoffset" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "mosaic-yoffset", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "mosaic-align" ) )
+ {
+ if( strlen( newval.psz_string ) > 0 )
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "mosaic-align", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "mosaic-vborder" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "mosaic-vborder", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "mosaic-hborder" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "mosaic-hborder", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "mosaic-position" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "mosaic-position", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "mosaic-rows" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "mosaic-rows", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "mosaic-cols" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "mosaic-cols", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "mosaic-order" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.psz_string = newval.psz_string;
+ var_Set( p_input->p_libvlc_global, "mosaic-order", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "mosaic-offsets" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.psz_string = newval.psz_string;
+ var_Set( p_input->p_libvlc_global, "mosaic-offsets", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "mosaic-keep-aspect-ratio" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "mosaic-keep-aspect-ratio", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "logo-file" ) )
+ {
+ if( strlen( newval.psz_string ) > 0 )
+ {
+ val.psz_string = newval.psz_string;
+ var_Set( p_input->p_libvlc_global, "logo-file", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "logo-x" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "logo-x", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "logo-y" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "logo-y", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "logo-position" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_input->p_libvlc_global, "logo-position", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "logo-transparency" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = strtol( newval.psz_string, NULL, 0 );
+ var_Set( p_input->p_libvlc_global, "logo-transparency", val );
+ }
+ }
+
+ /*
+ * sanity check
+ */
+ else
+ {
+ msg_rc( "Unknown command!" );
+ }
+
+ vlc_object_release( p_playlist );
+ vlc_object_release( p_input );
+ return VLC_SUCCESS;
+}
+