]> git.sesse.net Git - vlc/commitdiff
* src/input/input_ext-intf.c: no more unused.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 7 Jun 2004 22:21:33 +0000 (22:21 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 7 Jun 2004 22:21:33 +0000 (22:21 +0000)
Makefile.am
src/input/input.c
src/input/input_ext-intf.c [deleted file]
src/input/input_programs.c

index 8208754344e8ba9e108fac8b9bea1ab12463eebf..850d4009ae2acdd8ab8455ab04e64861eef664ff 100644 (file)
@@ -331,7 +331,6 @@ SOURCES_libvlc_common = \
        src/input/demux.c \
        src/input/subtitles.c \
        src/input/input_ext-plugins.c \
-       src/input/input_ext-intf.c \
        src/input/input_dec.c \
        src/input/input_programs.c \
        src/input/input_clock.c \
index 0f7b3d9f14e9dbecc6757acc2edea39ae4b9844a..5e0b231d427f442f9c215b3971f06328a8380c2a 100644 (file)
@@ -1441,6 +1441,17 @@ static void ParseOption( input_thread_t *p_input, const char *psz_option )
 /*****************************************************************************
  * input_SetStatus: change the reading status
  *****************************************************************************/
+
+/* Status changing methods */
+enum
+{
+    INPUT_STATUS_END    = 0,
+    INPUT_STATUS_PLAY   = 1,
+    INPUT_STATUS_PAUSE  = 2,
+    INPUT_STATUS_FASTER = 3,
+    INPUT_STATUS_SLOWER = 4
+};
+
 static void input_SetStatus( input_thread_t *p_input, int i_mode )
 {
     vlc_mutex_lock( &p_input->stream.stream_lock );
diff --git a/src/input/input_ext-intf.c b/src/input/input_ext-intf.c
deleted file mode 100644 (file)
index 9c47158..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*****************************************************************************
- * input_ext-intf.c: services to the interface
- *****************************************************************************
- * Copyright (C) 1998-2004 VideoLAN
- * $Id$
- *
- * Author: Christophe Massiot <massiot@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
- * (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.
- *
- * 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., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include <string.h>                                    /* memcpy(), memset() */
-
-#include <vlc/vlc.h>
-
-#include "stream_control.h"
-#include "input_ext-dec.h"
-#include "input_ext-intf.h"
-#include "input_ext-plugins.h"
-
-/*****************************************************************************
- * input_OffsetToTime : converts an off_t value to a time indicator, using
- *                      mux_rate
- *****************************************************************************
- * BEWARE : this function assumes that you already own the lock on
- * p_input->stream.stream_lock
- *****************************************************************************/
-char * input_OffsetToTime( input_thread_t * p_input, char * psz_buffer,
-                           off_t i_offset )
-{
-    mtime_t         i_seconds;
-
-    if( p_input->stream.i_mux_rate )
-    {
-        i_seconds = i_offset / 50 / p_input->stream.i_mux_rate;
-        return secstotimestr( psz_buffer, i_seconds );
-    }
-    else
-    {
-        /* Divide by zero is not my friend. */
-        sprintf( psz_buffer, "-:--:--" );
-        return( psz_buffer );
-    }
-}
-
-/*****************************************************************************
- * input_ToggleES: answers to a user request with calls to (Un)SelectES
- *****************************************************************************
- * Useful since the interface plugins know p_es.
- * It only works for audio & spu ( to be sure nothing nasty is being done ).
- * b_select is a boolean to know if we have to select or unselect ES
- *****************************************************************************/
-int input_ToggleES( input_thread_t * p_input, es_descriptor_t * p_es,
-                    vlc_bool_t b_select )
-{
-    vlc_mutex_lock( &p_input->stream.stream_lock );
-
-    if( p_es != NULL )
-    {
-        if( b_select )
-        {
-            p_input->stream.p_newly_selected_es = p_es;
-        }
-        else
-        {
-            p_input->stream.p_removed_es = p_es;
-        }
-    }
-
-    vlc_mutex_unlock( &p_input->stream.stream_lock );
-
-    return 0;
-}
-
-/****************************************************************************
- * input_ChangeArea: interface request an area change
- ****************************************************************************/
-int input_ChangeArea( input_thread_t * p_input, input_area_t * p_area )
-{
-    vlc_mutex_lock( &p_input->stream.stream_lock );
-
-    p_input->stream.p_new_area = p_area;
-
-    vlc_mutex_unlock( &p_input->stream.stream_lock );
-
-    return 0;
-}
-
-/****************************************************************************
- * input_ChangeProgram: interface request a program change
- ****************************************************************************/
-int input_ChangeProgram( input_thread_t * p_input, uint16_t i_program_number )
-{
-    pgrm_descriptor_t *       p_program;
-    vlc_value_t val;
-
-    vlc_mutex_lock( &p_input->stream.stream_lock );
-
-    p_program = input_FindProgram( p_input, i_program_number );
-
-    if ( p_program == NULL )
-    {
-        msg_Err( p_input, "could not find selected program" );
-        return -1;
-    }
-
-    p_input->stream.p_new_program = p_program;
-
-    vlc_mutex_unlock( &p_input->stream.stream_lock );
-
-    /* Update the navigation variables without triggering a callback */
-    val.i_int = i_program_number;
-    var_Change( p_input, "program", VLC_VAR_SETVALUE, &val, NULL );
-
-    return 0;
-}
index c3d9612b379b5a8754c8939ccf429430f67ad467..fd7ad40f3e5b671116511584785d8aab7a8fab77 100644 (file)
@@ -307,6 +307,35 @@ void input_DelProgram( input_thread_t * p_input, pgrm_descriptor_t * p_pgrm )
     free( p_pgrm );
 }
 
+/****************************************************************************
+ * input_ChangeProgram: interface request a program change (internal)
+ ****************************************************************************/
+static int input_ChangeProgram( input_thread_t * p_input, uint16_t i_program_number )
+{
+    pgrm_descriptor_t *       p_program;
+    vlc_value_t val;
+
+    vlc_mutex_lock( &p_input->stream.stream_lock );
+
+    p_program = input_FindProgram( p_input, i_program_number );
+
+    if ( p_program == NULL )
+    {
+        msg_Err( p_input, "could not find selected program" );
+        return -1;
+    }
+
+    p_input->stream.p_new_program = p_program;
+
+    vlc_mutex_unlock( &p_input->stream.stream_lock );
+
+    /* Update the navigation variables without triggering a callback */
+    val.i_int = i_program_number;
+    var_Change( p_input, "program", VLC_VAR_SETVALUE, &val, NULL );
+
+    return 0;
+}
+
 /*****************************************************************************
  * input_AddArea: add and init an area descriptor
  *****************************************************************************
@@ -574,6 +603,19 @@ void input_DelArea( input_thread_t * p_input, input_area_t * p_area )
     }
 }
 
+/****************************************************************************
+ * input_ChangeArea: interface request an area change (internal)
+ ****************************************************************************/
+static int input_ChangeArea( input_thread_t * p_input, input_area_t * p_area )
+{
+    vlc_mutex_lock( &p_input->stream.stream_lock );
+
+    p_input->stream.p_new_area = p_area;
+
+    vlc_mutex_unlock( &p_input->stream.stream_lock );
+
+    return 0;
+}
 
 /*****************************************************************************
  * input_FindES: returns a pointer to an ES described by its ID