]> git.sesse.net Git - vlc/blobdiff - src/interface/intf_ctrl.c
* Header cleaning: filled all empty authors fields, added CVS $Id stuff.
[vlc] / src / interface / intf_ctrl.c
index 797f770f30754818af6b17224ca9de60f18386ed..f6dd0042a3389ae2fa8d22ad555176fa171351f5 100644 (file)
  * More informations about parameters stand in `list of commands' section.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
+ * $Id: intf_ctrl.c,v 1.34 2001/03/21 13:42:34 sam Exp $
  *
- * Authors:
+ * Authors: Vincent Seguin <seguin@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.
+ * 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-1307, USA.
+ * 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 <sys/types.h>                        /* on BSD, uio.h needs types.h */
+#include "defs.h"
+
 #include <sys/stat.h>                        /* on BSD, fstat() needs stat.h */
-#include <sys/uio.h>                                            /* "input.h" */
 #include <stdio.h>                                              /* fprintf() */
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <unistd.h>                                       /* close(), read() */
 #include <fcntl.h>                                                 /* open() */
 
 /* Common headers */
-#include "threads.h"
 #include "config.h"
 #include "common.h"
+#include "threads.h"
 #include "mtime.h"
 #include "debug.h"
-#include "plugins.h"
 #include "intf_msg.h"
 
-#include "input.h"
+#include "stream_control.h"
+#include "input_ext-intf.h"
 #include "audio_output.h"
 #include "intf_cmd.h"
 #include "interface.h"
@@ -312,8 +312,8 @@ static int PlayAudio( int i_argc, intf_arg_t *p_argv )
     }
 
     /* Set default configuration */
-    fifo.i_channels = 1 + ( fifo.b_stereo = AOUT_DEFAULT_STEREO );
-    fifo.l_rate = AOUT_DEFAULT_RATE;
+    fifo.i_channels = 1 + ( fifo.b_stereo = AOUT_STEREO_DEFAULT );
+    fifo.l_rate = AOUT_RATE_DEFAULT;
 
     /* The channels and rate parameters are essential ! */
     /* Parse parameters - see command list above */
@@ -442,7 +442,7 @@ static int SelectPID( int i_argc, intf_arg_t *p_argv )
 
 
     /* Find to which input this command is destinated */
-    intf_IntfMsg( "Adding PID %d to input %d\n", i_pid, i_input );
+    intf_IntfMsg( "Adding PID %d to input %d", i_pid, i_input );
     //XXX?? input_AddPgrmElem( p_main->p_intf->p_x11->p_input,
     //XXX??                    i_pid );
     return( INTF_NO_ERROR );
@@ -456,11 +456,14 @@ static int SelectPID( int i_argc, intf_arg_t *p_argv )
  *****************************************************************************/
 static int SpawnInput( int i_argc, intf_arg_t *p_argv )
 {
+    /* FIXME */
+#if 0
+
     int                 i_arg;
     int                 i_method = 0;                    /* method parameter */
-    char *              psz_source = NULL;               /* source parameter */
+    char *              p_source = NULL;                 /* source parameter */
     int                 i_port = 0;                        /* port parameter */
-    int                 i_vlan = 0;                        /* vlan parameter */
+    int                 i_vlan_id = 0;                  /* vlan id parameter */
 
     /* Parse parameters - see command list above */
     for ( i_arg = 1; i_arg < i_argc; i_arg++ )
@@ -473,13 +476,13 @@ static int SpawnInput( int i_argc, intf_arg_t *p_argv )
         case 1:                                    /* filename, hostname, ip */
         case 2:
         case 3:
-            psz_source = p_argv[i_arg].psz_str;
+            p_source = p_argv[i_arg].psz_str;
             break;
         case 4:                                                      /* port */
             i_port = p_argv[i_arg].i_num;
             break;
-        case 5:                                                      /* VLAN */
-            i_vlan = p_argv[i_arg].i_num;
+        case 5:                                                   /* VLAN id */
+            i_vlan_id = p_argv[i_arg].i_num;
             break;
         }
     }
@@ -490,9 +493,10 @@ static int SpawnInput( int i_argc, intf_arg_t *p_argv )
         input_DestroyThread( p_main->p_intf->p_input, NULL );
     }
 
-    p_main->p_intf->p_input = input_CreateThread( i_method, psz_source, i_port, i_vlan,
+    p_main->p_intf->p_input = input_CreateThread( i_method, p_source, i_port, i_vlan_id,
                                                   p_main->p_intf->p_vout, p_main->p_aout,
                                                   NULL );
+#endif
     return( INTF_NO_ERROR );
 }
 
@@ -532,10 +536,10 @@ static int Vlan( int i_argc, intf_arg_t *p_argv  )
 {
     int i_command;                                /* command argument number */
 
-    /* Do not try anything if vlans are desactivated */
+    /* Do not try anything if vlans are deactivated */
     if( !p_main->b_vlans )
     {
-        intf_IntfMsg("vlans are desactivated");
+        intf_IntfMsg("vlans are deactivated");
         return( INTF_OTHER_ERROR );
     }
 
@@ -576,7 +580,7 @@ static int Psi( int i_argc, intf_arg_t *p_argv )
 {
     int i_index = p_argv[1].i_num;
 
-    intf_IntfMsg("Reading PSI table for input %d\n", i_index);
+    intf_IntfMsg("Reading PSI table for input %d", i_index);
     //XXX?? input_PsiRead(p_main->p_intf->p_x11->p_input );
     return( INTF_NO_ERROR );
 }