Commit cd74cb2c authored by Christophe Massiot's avatar Christophe Massiot
Browse files

Removed unused files.

parent 5d45070c
......@@ -36,11 +36,8 @@ PLUGINS_TARGETS := alsa/alsa beos/beos darwin/darwin dsp/dsp dummy/dummy \
INTERFACE = src/interface/main.o \
src/interface/interface.o \
src/interface/intf_msg.o \
src/interface/intf_cmd.o \
src/interface/intf_ctrl.o \
src/interface/intf_playlist.o \
src/interface/intf_channels.o \
src/interface/intf_console.o \
src/interface/intf_urldecode.o \
INPUT = src/input/input_ext-dec.o \
......@@ -102,7 +99,6 @@ VIDEO_DECODER = src/video_decoder/video_decoder.o
MISC = src/misc/mtime.o \
src/misc/tests.o \
src/misc/rsc_files.o \
src/misc/modules.o \
src/misc/netutils.o
......
-------------------------------------------------------------------------------
* marque les points prioritaires
+ les points à ne pas oublier avant la fin de l'année
- les trucs qu'il faudra faire, mais qui ne sont pas urgents
? les idées à discuter
-------------------------------------------------------------------------------
Input
=====
? utilisation de la NAT pour convoyer des infos sur les vlans
* gestion du décodeur générique/par défaut
- passage en b_run
+ trouver des flux de test bien tordus pour tester l'update des
PSI, les discontinuites, la gestion des PCR, etc...
Input: vlan method
==================
+ faire une libvlan rapide (benny est dessus)
- reconcevoir l'API et les dialogues du vlan serveur, faire une
libvlan avancée, l'encapsuler proprement dans input_vlan, refaire
le vlan server
Main
====
- lire un fichier de config en plus de la ligne de commande
Audio output
============
- détection automatique du materiel ;
- 8/16 Bits, Signed/Unsigned, Mono/Stereo (sauf 16 Bits Signed Stereo) ;
Audio decoder
=============
+ implémenter une synkronisation absolue et non relative ;
- MPEG2 Layer I, II, III (sauf Layer II Stereo) ;
AC3 decoder
===========
* éviter le SIGSEGV lorsque le décodeur mange du garbage en entrée ;
+ implémenter une synkronisation absolue et non relative ;
Video output
============
+ nettoyer la boucle principale
+ tenir compte du fait que lorsque b_die est mis, normalement tous
les flux et images doivent déjà être detruits -> afficher une
erreur plutôt que de les supprimer
+ gestion de b_active
+ arbre de décisions avec goto pour les passes
* convertion et affichage des images
* gestion des couleurs X11
? interpolation pour des display ratios < 1
? utiliser XDGA pour accelerer
Video graphics
==============
+ tout reste à implementer
+ rajouter les convertions rgb->pixel
Video decoder
=============
* tout tout tout
+ sur p_vout->b_active == 0, trasher tout sauf I
* parser/trasher de PES
Generic decoder
===============
* identification des paquets
* sauvegarde d'un flux multiplexé
* sauvegarde de flux demultiplexés
Interface
=========
- incrustation d'infos sur les buffers
+ réagir aux signaux
Interface: commandes
====================
- Plein de commandes à implémenter
Interface: console
==================
- Utiliser un widget quelconque (portable de préférence) et renommer
en intf_console si la portabilité est atteinte (sinon, x11console).
- Utilisation des pixmaps pour egayer un peu en début de ligne
- Gestion des fontes et couleurs
- Choix d'une couleur de bg en l'absende de pixmap
- Ascenceur pour la zone de texte
- Unicité des enregistrements de l'history - sauvegarde de l'history
- Gestion de la souris (copier/coller)
General: sources
================
+ déclarer en extern inline les fonctions de mtime et netlist...
- Eliminer les headers superflus des sources, bien indiquer les dépendances
- conserver la cohérence des sources: input_psi plutot que psi par exemple.
+ vérifier que des messages sont bien émis partout (faire une recherche sur
les 'returns'... En particulier dans video_output).
General: processus
==================
* définir l'ordre de fermeture et les accès
- identifier les threads (pour ps)
? penser au mode mono-thread
+ utiliser les messages b_die, b_error, b_active et b_run
General: X11
============
- detection de fermeture des fenêtres
- déclaration des icones pour les window managers
- implémentation de X{En|Dis}ableScreenSaver dans xutils
Documentation
=============
- documentation des interfaces de programmation dès qu'elles sont
au point. En LaTeX ? (pour latex2html).
......@@ -4,7 +4,7 @@
* interface, such as message output. See config.h for output configuration.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_msg.h,v 1.12 2001/04/27 19:29:11 massiot Exp $
* $Id: intf_msg.h,v 1.13 2001/04/30 15:00:59 massiot Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -81,7 +81,6 @@ void intf_MsgDestroy ( void );
void intf_Msg ( char *psz_format, ... );
void intf_ErrMsg ( char *psz_format, ... );
void intf_WarnMsg ( int i_level, char *psz_format, ... );
void intf_IntfMsg ( char *psz_format, ... );
void intf_MsgImm ( char *psz_format, ... );
void intf_ErrMsgImm ( char *psz_format, ... );
......
/*****************************************************************************
* rsc_files.h: resources files manipulation functions
* This library describes a general format used to store 'resources'. Resources
* can be anything, including pictures, audio streams, and so on.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: rsc_files.h,v 1.7 2001/03/21 13:42:33 sam Exp $
*
* 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.
*
* 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.
*****************************************************************************/
/*****************************************************************************
* Requires:
* config.h
* common.h
*****************************************************************************/
/*****************************************************************************
* Constants
*****************************************************************************/
/* Maximum length of a resource name (not including the final '\0') - this
* constant should not be changed without extreme care */
#define RESOURCE_MAX_NAME 32
/*****************************************************************************
* resource_descriptor_t: resource descriptor
*****************************************************************************
* This type describe an entry in the resource table.
*****************************************************************************/
typedef struct
{
char psz_name[RESOURCE_MAX_NAME + 1]; /* name */
u16 i_type; /* type */
u64 i_offset; /* data offset */
u64 i_size; /* data size */
} resource_descriptor_t;
/* Resources types */
#define EMPTY_RESOURCE 0 /* empty place in table */
#define PICTURE_RESOURCE 10 /* native video picture */
/*****************************************************************************
* resource_file_t: resource file descriptor
*****************************************************************************
* This type describes a resource file and store it's resources table. It can
* be used through the *Resource functions, or directly with the i_file field.
*****************************************************************************/
typedef struct
{
/* File informations */
int i_file; /* file descriptor */
int i_type; /* file type */
boolean_t b_up_to_date; /* is file up to date ? */
boolean_t b_read_only; /* read-only mode */
/* Resources table */
int i_size; /* table size */
resource_descriptor_t * p_resource; /* resources table */
} resource_file_t;
/* Resources files types */
#define VLC_RESOURCE_FILE 0 /* VideoLAN Client resource file */
/*****************************************************************************
* Prototypes
*****************************************************************************/
resource_file_t * CreateResourceFile ( char *psz_filename, int i_type, int i_size, int i_mode );
resource_file_t * OpenResourceFile ( char *psz_filename, int i_type, int i_flags );
int UpdateResourceFile ( resource_file_t *p_file );
int CloseResourceFile ( resource_file_t *p_file );
int SeekResource ( resource_file_t *p_file, char *psz_name, int i_type );
int ReadResource ( resource_file_t *p_file, char *psz_name, int i_type,
size_t max_size, byte_t *p_data );
int vlc_WriteResource ( resource_file_t *p_file, char *psz_name, int i_type,
size_t size, byte_t *p_data );
......@@ -4,7 +4,7 @@
* interface, such as command line.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: interface.c,v 1.73 2001/04/28 03:36:25 sam Exp $
* $Id: interface.c,v 1.74 2001/04/30 15:00:59 massiot Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -47,7 +47,6 @@
#include "intf_msg.h"
#include "interface.h"
#include "intf_cmd.h"
#include "intf_playlist.h"
#include "intf_channels.h"
#include "keystrokes.h"
......
/*****************************************************************************
* intf_cmd.c: interface commands parsing and executions functions
* This file implements the interface commands execution functions. It is used
* by command-line oriented interfaces and scripts. The commands themselves are
* implemented in intf_ctrl.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: intf_cmd.c,v 1.18 2001/03/21 13:42:34 sam Exp $
*
* 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.
*
* 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 "defs.h"
#include <errno.h> /* errno */
#include <stdio.h> /* FILE */
#include <stdlib.h> /* strtod(), strtol() */
#include <string.h> /* strerror() */
#include "config.h"
#include "common.h"
#include "threads.h"
#include "mtime.h"
#include "interface.h"
#include "intf_msg.h"
#include "intf_cmd.h"
#include "intf_ctrl.h"
#include "main.h"
/*
* Local prototypes
*/
static int ParseCommandArguments ( char *psz_argv[INTF_MAX_ARGS],
char *psz_cmd );
static int CheckCommandArguments ( intf_arg_t argv[INTF_MAX_ARGS],
int i_argc,
char *psz_argv[INTF_MAX_ARGS],
char *psz_format );
static void ParseFormatString ( intf_arg_t format[INTF_MAX_ARGS],
char *psz_format );
static int ConvertArgument ( intf_arg_t *p_arg, int i_flags,
char *psz_str );
/*****************************************************************************
* intf_ExecCommand: parse and execute a command
*****************************************************************************
* This function is called when a command needs to be executed. It parse the
* command line, build an argument array, find the command in control commands
* array and run the command. It returns the return value of the command, or
* EINVAL if no command could be executed. Command line is modified by this
* function.
* Note that this function may terminate abruptly the program or signify it's
* end to the interface thread.
*****************************************************************************/
int intf_ExecCommand( char *psz_cmd )
{
char * psz_argv[INTF_MAX_ARGS]; /* arguments pointers */
intf_arg_t argv[INTF_MAX_ARGS]; /* converted arguments */
int i_argc; /* number of arguments */
int i_index; /* multi-purposes index */
int i_return; /* command return value */
intf_DbgMsg("command `%s'", psz_cmd);
/* Parse command line (separate arguments). If nothing has been found,
* the function returns without error */
i_argc = ParseCommandArguments( psz_argv, psz_cmd );
if( !i_argc )
{
return( 0 );
}
/* Find command. Command is always the first token on the line */
for( i_index = 0;
control_command[i_index].psz_name && strcmp( psz_argv[0], control_command[i_index].psz_name );
i_index++ )
{
;
}
if( !control_command[i_index].psz_name ) /* unknown command */
{
/* Print error message */
intf_IntfMsg( "error: unknown command `%s'. Try `help'", psz_argv[0] );
return( INTF_USAGE_ERROR );
}
/* Check arguments validity */
if( CheckCommandArguments( argv, i_argc, psz_argv,
control_command[i_index].psz_format ) )
{
/* The given arguments does not match the format string. An error
* message has already been displayed, so only the usage string
* is printed */
intf_IntfMsg( "usage: %s", control_command[i_index].psz_usage );
return( INTF_USAGE_ERROR );
}
/* Execute command */
i_return = control_command[i_index].function( i_argc, argv );
/* Manage special error codes */
switch( i_return )
{
case INTF_FATAL_ERROR: /* fatal error */
/* Print message and terminates the interface thread */
intf_ErrMsg( "intf error: fatal error in command `%s'", psz_argv[0] );
p_main->p_intf->b_die = 1;
break;
case INTF_CRITICAL_ERROR: /* critical error */
/* Print message, flush messages queue and exit. Note that this
* error should be very rare since it does not even try to cancel
* other threads... */
intf_ErrMsgImm( "intf error: critical error in command `%s', "
"please report this error !", psz_argv[0] );
exit( INTF_CRITICAL_ERROR );
break;
case INTF_USAGE_ERROR: /* usage error */
/* Print error message and usage */
intf_IntfMsg( "usage: %s", control_command[i_index].psz_usage );
break;
}
/* Return error code */
return( i_return );
}
/*****************************************************************************
* intf_ExecScript: parse and execute a command script
*****************************************************************************
* This function, based on ExecCommand read a file and tries to execute each
* of its line as a command. It returns 0 if everything succeeded, a negative
* number if the script could not be executed and a positive one if an error
* occured during execution.
*****************************************************************************/
int intf_ExecScript( char *psz_filename )
{
FILE * p_file; /* file */
char psz_line[INTF_MAX_CMD_SIZE]; /* line */
char * psz_index; /* index in string */
char * psz_vlcrc; /* full path to vlcrc */
int i_err; /* error indicator */
/* Open file */
i_err = 0;
if( !( psz_index = getenv("HOME") ) )
{
psz_index = "/";
}
psz_vlcrc = malloc( strlen( psz_index ) + 1 + strlen( psz_filename ) + 1 );
sprintf( psz_vlcrc, "%s/%s", psz_index, psz_filename );
p_file = fopen( psz_vlcrc, "r" );
if( p_file == NULL )
{
intf_DbgMsg("intf warning: %s: %s", psz_vlcrc, strerror(errno));
return( -1 );
}
/* For each line: read and execute */
while( fgets( psz_line, INTF_MAX_CMD_SIZE, p_file ) != NULL )
{
/* If line begins with a '#', it is a comment and shoule be ignored,
* else, execute it */
if( psz_line[0] != '#' )
{
/* The final '\n' needs to be removed before execution */
for( psz_index = psz_line;
*psz_index && (*psz_index != '\n');
psz_index++ )
{
;
}
if( *psz_index == '\n' )
{
*psz_index = '\0';
}
/* Execute command */
i_err |= intf_ExecCommand( psz_line );
}
}
if( !feof( p_file ) )
{
intf_ErrMsg( "intf error: %s: %s", psz_vlcrc, strerror(errno));
return( -1 );
}
/* Close file */
fclose( p_file );
return( i_err != 0 );
}
/* following functions are local */
/*****************************************************************************
* ParseCommandArguments: isolate arguments in a command line
*****************************************************************************
* This function modify the original command line, adding '\0' and completes
* an array of pointers to beginning of arguments. It return the number of
* arguments.
*****************************************************************************/
static int ParseCommandArguments( char *psz_argv[INTF_MAX_ARGS], char *psz_cmd )
{
int i_argc; /* number of arguments */
char * psz_index; /* index */
boolean_t b_block; /* block (argument) indicator */
/* Initialize parser state */
b_block = 0; /* we start outside a block to remove spaces at beginning */
i_argc = 0;
/* Go through command until end has been reached or maximal number of
* arguments has been reached */
for( psz_index = psz_cmd;
*psz_index && (i_argc < INTF_MAX_ARGS);
psz_index++ )
{
/* Inside a block, end of blocks are marked by spaces */
if( b_block )
{
if( *psz_index == ' ' )
{
*psz_index = '\0'; /* mark the end of argument */
b_block = 0; /* exit the block */
}
}
/* Outside a block, beginning of blocks are marked by any character
* different from space */
else
{
if( *psz_index != ' ' )
{
psz_argv[i_argc++] = psz_index; /* store argument */
b_block = 1; /* enter the block */
}
}
}
/* Return number of arguments found */
return( i_argc );
}
/*****************************************************************************
* CheckCommandArguments: check arguments agains format
*****************************************************************************
* This function parse each argument and tries to find a match in the format
* string. It fills the argv array.
* If all arguments have been sucessfuly identified and converted, it returns
* 0, else, an error message is issued and non 0 is returned.
* Note that no memory is allocated by this function, but that the arguments
* can be modified.
*****************************************************************************/
static int CheckCommandArguments( intf_arg_t argv[INTF_MAX_ARGS], int i_argc,
char *psz_argv[INTF_MAX_ARGS],
char *psz_format )
{
intf_arg_t format[INTF_MAX_ARGS]; /* parsed format indicators */
int i_arg; /* argument index */
int i_format; /* format index */
char * psz_index; /* string index */
char * psz_cmp_index; /* string comparaison index */
int i_index; /* generic index */
boolean_t b_found; /* `argument found' flag */
/* Build format array */
ParseFormatString( format, psz_format );
/* Initialize parser: i_format must be the first non named formatter */
for( i_format = 0; ( i_format < INTF_MAX_ARGS )
&& (format[i_format].i_flags & INTF_NAMED_ARG);
i_format++ )
{
;
}
/* Scan all arguments */
for( i_arg = 1; i_arg < i_argc; i_arg++ )
{
b_found = 0;
/* Test if argument can be taken as a named argument: try to find a
* '=' in the string */
for( psz_index = psz_argv[i_arg];
*psz_index && ( *psz_index != '=' );
psz_index++ )
{
;
}
if( *psz_index == '=' ) /* '=' found */
{
/* Browse all named arguments to check if there is one matching */
for( i_index = 0; (i_index < INTF_MAX_ARGS)
&& ( format[i_index].i_flags & INTF_NAMED_ARG )
&& !b_found;
i_index++ )
{
/* Current format string is named... compare start of two
* names. A local inline ntation of a strcmp is used since
* string isn't ended by '\0' but by '=' */
for( psz_index = psz_argv[i_arg],
psz_cmp_index = format[i_index].ps_name;
(*psz_index == *psz_cmp_index) && (*psz_index != '=')
&& (*psz_cmp_index != '=');
psz_index++, psz_cmp_index++ )
{
;
}
if( *psz_index == *psz_cmp_index ) /* the names match */
{
/* The argument is a named argument which name match the
* named argument i_index. To be valid, the argument
* should not have been already encountered and the type
* must match. Before going further, the '=' is replaced
* by a '\0'. */
*psz_index = '\0';
/* Check unicity. If the argument has already been
* encountered, print an error message and return. */
if( format[i_index].i_flags & INTF_PRESENT_ARG )
{
intf_IntfMsg( "error: `%s' has already been "
"encountered", psz_argv[i_arg] );
return( 1 );
}
/* Register argument and prepare exit */
b_found = 1;
format[i_index].i_flags |= INTF_PRESENT_ARG;
argv[i_arg].i_flags = INTF_NAMED_ARG;
argv[i_arg].i_index = i_index;
argv[i_arg].ps_name = psz_argv[i_arg];
/* Check type and store value */
psz_index++;
if( ConvertArgument( &argv[i_arg],
format[i_index].i_flags, psz_index ) )
{
/* An error occured during conversion */
<