1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-28 23:09:59 +02:00

- input.c : doesn't even try to use the headphone filter for

unsupported format (S/PDIF, ...)
- m3u.c : support for MRLs
          better detection of absolute path under Windows
- configure.ac.in : off_t was defined twice for mingw32
- fr.po : translation of headphone filter strings
This commit is contained in:
Boris Dorès 2003-01-16 21:14:23 +00:00
parent 0acdca901e
commit 0f1869c5e8
4 changed files with 70 additions and 17 deletions

View File

@ -117,7 +117,7 @@ case "x${target_os}" in
if test "x$SYS" = "xmingw32"; then
# add ws2_32 for closesocket, select, recv
CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"
CPPFLAGS_save="${CPPFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -mwindows"
LDFLAGS_ipv4="${LDFLAGS_ipv4} -lws2_32"

View File

@ -2,7 +2,7 @@
* m3u.c: a meta demux to parse m3u and asx playlists
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: m3u.c,v 1.10 2002/12/14 01:05:53 babal Exp $
* $Id: m3u.c,v 1.11 2003/01/16 21:14:23 babal Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* Gildas Bazin <gbazin@netcourrier.com>
@ -255,27 +255,54 @@ static void ProcessLine ( input_thread_t *p_input , demux_sys_t *p_m3u
}
/* empty line */
if ( !*psz_bol ) return;
/*
* From now on, we know we've got a meaningful line
*/
/* Check if the line has an absolute or relative path */
/* check for a protocol name */
/* for URL, we should look for "://"
* for MRL (Media Resource Locator) ([[<access>][/<demux>]:][<source>]),
* we should look for ":"
* so we end up looking simply for ":"*/
/* PB: on some file systems, ':' are valid characters though*/
psz_name = psz_bol;
while( *psz_name && strncmp( psz_name, "://", sizeof("://") - 1 ) )
while( *psz_name && *psz_name!=':' )
{
psz_name++;
}
#ifdef WIN32
if ( *psz_name && ( psz_name == psz_bol + 1 ) )
{
/* if it is not an URL,
* as it is unlikely to be an MRL (PB: if it is ?)
* it should be an absolute file name with the drive letter */
if ( *(psz_name+1) == '/' )/* "*:/" */
{
if ( *(psz_name+2) != '/' )/* not "*://" */
while ( *psz_name ) *psz_name++;/* so now (*psz_name==0) */
}
else while ( *psz_name ) *psz_name++;/* "*:*"*/
}
#endif
/* if the line doesn't specify a protocol name,
* check if the line has an absolute or relative path */
#ifndef WIN32
if( !*psz_name && *psz_bol != '/' )
/* If this line doesn't begin with a '/' */
#else
if( !*psz_name && (strlen(psz_bol) < 2 ||
( *(psz_bol+1) != ':' &&
strncmp( psz_bol, "\\\\", 2 ) ) ) )
if( !*psz_name
&& *psz_bol!='/'
&& *psz_bol!='\\'
&& *(psz_bol+1)!=':' )
/* if this line doesn't begin with
* "/" or "\" or "*:" or "*:\" or "*:/" or "\\" */
#endif
{
/* the line doesn't specify a protocol name.
* If this line doesn't begin with a '/' then assume the path
* is relative to the path of the m3u file. */
/* assume the path is relative to the path of the m3u file. */
char *psz_path = strdup( p_input->psz_name );
#ifndef WIN32

View File

@ -216,7 +216,7 @@ msgstr ""
#: src/libvlc.h:93
msgid "headphone virtual spatialization effect"
msgstr ""
msgstr "effet de spatialisation virtuelle pour casque stéréo"
#: src/libvlc.h:95
msgid ""
@ -226,16 +226,24 @@ msgid ""
"tiring when listening to music for long periods of time.\n"
"It works with any source format from mono to 5.1."
msgstr ""
"Cet effet donne l'impression d'être dans une pièce réelle avec un "
"ensemble de haut-parleurs en 5.1 en utilisant simplement un casque "
"stéréo, et procure ainsi une ambiance sonore plus réaliste. Ecouter de "
"la musique de façon prolongée devrait également être plus confortable "
"et moins fatiguant.\nCela marche avec n'importe quelle format audio, "
"depuis une source mono jusqu'à une source 5.1."
#: src/libvlc.h:102
msgid "characteristic dimension"
msgstr ""
msgstr "dimension caractéristique"
#: src/libvlc.h:104
msgid ""
"Headphone virtual spatialization effect parameter: distance between front "
"left speaker and listener in meters."
msgstr ""
"Parmètre pour l'effet de spatialisation virtuelle pour casque stéréo: "
"distance entre le haut parleur avant gauche et l'auditeur en mètres."
#: src/libvlc.h:107
msgid "video output module"

View File

@ -2,7 +2,7 @@
* input.c : internal management of input streams for the audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: input.c,v 1.29 2002/12/25 02:23:37 massiot Exp $
* $Id: input.c,v 1.30 2003/01/16 21:14:23 babal Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
@ -43,6 +43,7 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
{
audio_sample_format_t intermediate_format, headphone_intermediate_format;
aout_filter_t * p_headphone_filter;
vlc_bool_t b_use_headphone_filter = VLC_FALSE;
aout_FormatPrint( p_aout, "input", &p_input->input );
@ -50,13 +51,30 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
aout_FifoInit( p_aout, &p_input->fifo, p_aout->mixer.mixer.i_rate );
p_input->p_first_byte_to_mix = NULL;
/* Create filters. */
/* Prepare format structure */
memcpy( &intermediate_format, &p_aout->mixer.mixer,
sizeof(audio_sample_format_t) );
intermediate_format.i_rate = p_input->input.i_rate;
/* Headphone filter add-ons. */
memcpy( &headphone_intermediate_format, &p_aout->mixer.mixer,
sizeof(audio_sample_format_t) );
headphone_intermediate_format.i_rate = p_input->input.i_rate;
if ( config_GetInt( p_aout , "headphone" ) )
{
/* Do we use heaphone filter ? */
if ( intermediate_format.i_physical_channels
== ( AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT )
&& ( intermediate_format.i_format != VLC_FOURCC('f','l','3','2')
|| intermediate_format.i_format != VLC_FOURCC('f','i','3','2')
) )
{
b_use_headphone_filter = VLC_TRUE;
}
}
if ( b_use_headphone_filter == VLC_TRUE )
{
/* Split the filter pipeline. */
headphone_intermediate_format.i_physical_channels = p_input->input.i_physical_channels;
headphone_intermediate_format.i_original_channels = p_input->input.i_original_channels;
headphone_intermediate_format.i_bytes_per_frame =
@ -65,8 +83,7 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
/ aout_FormatNbChannels( &intermediate_format );
}
intermediate_format.i_rate = p_input->input.i_rate;
headphone_intermediate_format.i_rate = p_input->input.i_rate;
/* Create filters. */
if ( aout_FiltersCreatePipeline( p_aout, p_input->pp_filters,
&p_input->i_nb_filters, &p_input->input,
&headphone_intermediate_format ) < 0 )
@ -79,7 +96,8 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
return -1;
}
if ( config_GetInt( p_aout , "headphone" ) )
/* Headphone filter add-ons. */
if ( b_use_headphone_filter == VLC_TRUE )
{
/* create a vlc object */
p_headphone_filter = vlc_object_create( p_aout