]> git.sesse.net Git - vlc/blobdiff - src/input/var.c
decoder: remove BLOCK_FLAG_CORE_EOS
[vlc] / src / input / var.c
index f1fbc3cb58b9bff2ac36d99c94d86a1c3bfb02a4..258b5f4584433a78de0ad708f4f2ee0cc75efc90 100644 (file)
@@ -1,24 +1,24 @@
 /*****************************************************************************
  * var.c: object variables for input thread
  *****************************************************************************
- * Copyright (C) 2004-2007 the VideoLAN team
+ * Copyright (C) 2004-2007 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
@@ -207,9 +207,13 @@ void input_ControlVarInit ( input_thread_t *p_input )
 
     /* Spu ES */
     var_Create( p_input, "spu-es", VLC_VAR_INTEGER | VLC_VAR_HASCHOICE );
-    text.psz_string = _("Subtitles Track");
+    text.psz_string = _("Subtitle Track");
     var_Change( p_input, "spu-es", VLC_VAR_SETTEXT, &text, NULL );
 
+    var_Create( p_input, "spu-choice", VLC_VAR_INTEGER );
+    val.i_int = -1;
+    var_Change( p_input, "spu-choice", VLC_VAR_SETVALUE, &val, NULL );
+
     /* Special read only objects variables for intf */
     var_Create( p_input, "bookmarks", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
 
@@ -285,6 +289,8 @@ void input_ControlVarNavigation( input_thread_t *p_input )
     if( !val.psz_string )
         return;
 
+    var_Change( p_input, "title", VLC_VAR_CLEARCHOICES, NULL, NULL );
+
     for( i = 0; i < p_input->p->i_title; i++ )
     {
         vlc_value_t val2, text2;
@@ -429,6 +435,8 @@ void input_ConfigVarInit ( input_thread_t *p_input )
                     VLC_VAR_STRING|VLC_VAR_DOINHERIT );
         var_Create( p_input, "sub-language",
                     VLC_VAR_STRING|VLC_VAR_DOINHERIT );
+        var_Create( p_input, "menu-language",
+                    VLC_VAR_STRING|VLC_VAR_DOINHERIT );
 
         var_Create( p_input, "audio-track-id",
                     VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
@@ -584,17 +592,17 @@ static int PositionCallback( vlc_object_t *p_this, char const *psz_cmd,
     if( !strcmp( psz_cmd, "position-offset" ) )
     {
         float f_position = var_GetFloat( p_input, "position" ) + newval.f_float;
-        if( f_position < 0.0 )
-            f_position = 0.0;
-        else if( f_position > 1.0 )
-            f_position = 1.0;
+        if( f_position < 0.f )
+            f_position = 0.f;
+        else if( f_position > 1.f )
+            f_position = 1.f;
         var_SetFloat( p_this, "position", f_position );
     }
     else
     {
         /* Update "length" for better intf behavour */
         const mtime_t i_length = var_GetTime( p_input, "length" );
-        if( i_length > 0 && newval.f_float >= 0.0 && newval.f_float <= 1.0 )
+        if( i_length > 0 && newval.f_float >= 0.f && newval.f_float <= 1.f )
         {
             vlc_value_t val;