Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
7a58ef70
Commit
7a58ef70
authored
Sep 26, 2002
by
Christophe Massiot
Browse files
* Major API change of the audio output. New aout_Dec* functions.
* Fixed a compile issue in s16tofloat32swab. * Fixed a typo in demux/mpeg/ts.c.
parent
cc35b1d0
Changes
20
Hide whitespace changes
Inline
Side-by-side
Makefile.old
View file @
7a58ef70
...
...
@@ -22,7 +22,7 @@ INTERFACE := interface intf_eject
PLAYLIST
:=
playlist
INPUT
:=
input input_ext-plugins input_ext-dec input_ext-intf input_dec input_programs input_clock input_info
VIDEO_OUTPUT
:=
video_output video_text vout_pictures vout_subpictures
AUDIO_OUTPUT
:=
audio_output
filters input mixer output intf
AUDIO_OUTPUT
:=
common
filters input mixer output intf
dec
STREAM_OUTPUT
:=
stream_output
MISC
:=
mtime modules threads cpu configuration netutils iso_lang messages objects extras
...
...
include/aout_internal.h
View file @
7a58ef70
...
...
@@ -2,7 +2,7 @@
* aout_internal.h : internal defines for audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: aout_internal.h,v 1.2
0
2002/09/2
0
2
3:27:03
massiot Exp $
* $Id: aout_internal.h,v 1.2
1
2002/09/2
6
2
2:40:18
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -120,6 +120,8 @@ typedef struct aout_mixer_t
void
(
*
pf_do_work
)(
struct
aout_instance_t
*
,
struct
aout_buffer_t
*
);
/* If b_error == 1, there is no mixer nor audio output pipeline. */
vlc_bool_t
b_error
;
/* Multiplier used to raise or lower the volume of the sound in
* software. Beware, this creates sound distortion and should be avoided
* as much as possible. This isn't available for non-float32 mixer. */
...
...
@@ -147,8 +149,10 @@ struct aout_input_t
/* Mixer information */
byte_t
*
p_first_byte_to_mix
;
/* I
s the input dead ?
*/
/* I
f b_error == 1, there is no input pipeline.
*/
vlc_bool_t
b_error
;
/* Did we just change the output format ? (expect buffer inconsistencies) */
vlc_bool_t
b_changed
;
};
/*****************************************************************************
...
...
@@ -186,7 +190,7 @@ struct aout_instance_t
/* Locks : please note that if you need several of these locks, it is
* mandatory (to avoid deadlocks) to take them in the following order :
*
p_input->lock, mixer_
lock, output_fifo_lock, input_fifos_lock.
*
mixer_lock, p_input->
lock, output_fifo_lock, input_fifos_lock.
* --Meuuh */
/* When input_fifos_lock is taken, none of the p_input->fifo structures
* can be read or modified by a third-party thread. */
...
...
@@ -214,6 +218,8 @@ struct aout_instance_t
* Prototypes
*****************************************************************************/
/* From input.c : */
int
aout_InputNew
(
aout_instance_t
*
p_aout
,
aout_input_t
*
p_input
);
int
aout_InputDelete
(
aout_instance_t
*
p_aout
,
aout_input_t
*
p_input
);
int
aout_InputPlay
(
aout_instance_t
*
p_aout
,
aout_input_t
*
p_input
,
aout_buffer_t
*
p_buffer
);
...
...
@@ -235,7 +241,7 @@ void aout_FiltersPlay( aout_instance_t * p_aout,
/* From mixer.c : */
int
aout_MixerNew
(
aout_instance_t
*
p_aout
);
void
aout_MixerDelete
(
aout_instance_t
*
p_aout
);
int
aout_MixerDelete
(
aout_instance_t
*
p_aout
);
void
aout_MixerRun
(
aout_instance_t
*
p_aout
);
int
aout_MixerMultiplierSet
(
aout_instance_t
*
p_aout
,
float
f_multiplier
);
int
aout_MixerMultiplierGet
(
aout_instance_t
*
p_aout
,
float
*
pf_multiplier
);
...
...
@@ -247,7 +253,7 @@ void aout_OutputPlay( aout_instance_t * p_aout, aout_buffer_t * p_buffer );
void
aout_OutputDelete
(
aout_instance_t
*
p_aout
);
VLC_EXPORT
(
aout_buffer_t
*
,
aout_OutputNextBuffer
,
(
aout_instance_t
*
,
mtime_t
,
vlc_bool_t
)
);
/* From
audio_output
.c : */
/* From
common
.c : */
VLC_EXPORT
(
int
,
aout_FormatNbChannels
,
(
audio_sample_format_t
*
p_format
)
);
void
aout_FormatPrepare
(
audio_sample_format_t
*
p_format
);
void
aout_FifoInit
(
aout_instance_t
*
,
aout_fifo_t
*
,
u32
);
...
...
include/audio_output.h
View file @
7a58ef70
...
...
@@ -2,7 +2,7 @@
* audio_output.h : audio output interface
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: audio_output.h,v 1.6
6
2002/09/2
0
2
3:27:03
massiot Exp $
* $Id: audio_output.h,v 1.6
7
2002/09/2
6
2
2:40:18
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -168,23 +168,23 @@ struct audio_date_t
/*****************************************************************************
* Prototypes
*****************************************************************************/
/* From audio_output.c : */
#define aout_NewInstance(a) __aout_NewInstance(VLC_OBJECT(a))
VLC_EXPORT
(
aout_instance_t
*
,
__aout_NewInstance
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
void
,
aout_DeleteInstance
,
(
aout_instance_t
*
)
);
VLC_EXPORT
(
aout_buffer_t
*
,
aout_BufferNew
,
(
aout_instance_t
*
,
aout_input_t
*
,
size_t
)
);
VLC_EXPORT
(
void
,
aout_BufferDelete
,
(
aout_instance_t
*
,
aout_input_t
*
,
aout_buffer_t
*
)
);
VLC_EXPORT
(
int
,
aout_BufferPlay
,
(
aout_instance_t
*
,
aout_input_t
*
,
aout_buffer_t
*
)
);
/* From common.c : */
#define aout_New(a) __aout_New(VLC_OBJECT(a))
VLC_EXPORT
(
aout_instance_t
*
,
__aout_New
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
void
,
aout_Delete
,
(
aout_instance_t
*
)
);
VLC_EXPORT
(
void
,
aout_DateInit
,
(
audio_date_t
*
,
u32
)
);
VLC_EXPORT
(
void
,
aout_DateSet
,
(
audio_date_t
*
,
mtime_t
)
);
VLC_EXPORT
(
void
,
aout_DateMove
,
(
audio_date_t
*
,
mtime_t
)
);
VLC_EXPORT
(
mtime_t
,
aout_DateGet
,
(
const
audio_date_t
*
)
);
VLC_EXPORT
(
mtime_t
,
aout_DateIncrement
,
(
audio_date_t
*
,
u32
)
);
/* From input.c : */
#define aout_InputNew(a,b,c) __aout_InputNew(VLC_OBJECT(a),b,c)
VLC_EXPORT
(
aout_input_t
*
,
__aout_InputNew
,
(
vlc_object_t
*
,
aout_instance_t
**
,
audio_sample_format_t
*
)
);
VLC_EXPORT
(
void
,
aout_InputDelete
,
(
aout_instance_t
*
,
aout_input_t
*
)
);
/* From dec.c : */
#define aout_DecNew(a, b, c) __aout_DecNew(VLC_OBJECT(a), b, c)
VLC_EXPORT
(
aout_input_t
*
,
__aout_DecNew
,
(
vlc_object_t
*
,
aout_instance_t
**
,
audio_sample_format_t
*
)
);
VLC_EXPORT
(
int
,
aout_DecDelete
,
(
aout_instance_t
*
,
aout_input_t
*
)
);
VLC_EXPORT
(
aout_buffer_t
*
,
aout_DecNewBuffer
,
(
aout_instance_t
*
,
aout_input_t
*
,
size_t
)
);
VLC_EXPORT
(
void
,
aout_DecDeleteBuffer
,
(
aout_instance_t
*
,
aout_input_t
*
,
aout_buffer_t
*
)
);
VLC_EXPORT
(
int
,
aout_DecPlay
,
(
aout_instance_t
*
,
aout_input_t
*
,
aout_buffer_t
*
)
);
/* From intf.c : */
VLC_EXPORT
(
int
,
aout_VolumeGet
,
(
aout_instance_t
*
,
audio_volume_t
*
)
);
...
...
@@ -192,4 +192,5 @@ VLC_EXPORT( int, aout_VolumeSet, ( aout_instance_t *, audio_volume_t ) );
VLC_EXPORT
(
int
,
aout_VolumeInfos
,
(
aout_instance_t
*
,
audio_volume_t
*
)
);
VLC_EXPORT
(
int
,
aout_VolumeUp
,
(
aout_instance_t
*
,
int
,
audio_volume_t
*
)
);
VLC_EXPORT
(
int
,
aout_VolumeDown
,
(
aout_instance_t
*
,
int
,
audio_volume_t
*
)
);
VLC_EXPORT
(
int
,
aout_Restart
,
(
aout_instance_t
*
p_aout
)
);
include/vlc_symbols.h
View file @
7a58ef70
...
...
@@ -2,11 +2,11 @@
struct
module_symbols_t
{
aout_buffer_t
*
(
*
aout_Buffer
New
_inner
)
(
aout_instance_t
*
,
aout_input_t
*
,
size_t
)
;
aout_buffer_t
*
(
*
aout_
DecNew
Buffer_inner
)
(
aout_instance_t
*
,
aout_input_t
*
,
size_t
)
;
aout_buffer_t
*
(
*
aout_FifoPop_inner
)
(
aout_instance_t
*
p_aout
,
aout_fifo_t
*
p_fifo
)
;
aout_buffer_t
*
(
*
aout_OutputNextBuffer_inner
)
(
aout_instance_t
*
,
mtime_t
,
vlc_bool_t
)
;
aout_input_t
*
(
*
__aout_
Input
New_inner
)
(
vlc_object_t
*
,
aout_instance_t
**
,
audio_sample_format_t
*
)
;
aout_instance_t
*
(
*
__aout_New
Instance
_inner
)
(
vlc_object_t
*
)
;
aout_input_t
*
(
*
__aout_
Dec
New_inner
)
(
vlc_object_t
*
,
aout_instance_t
**
,
audio_sample_format_t
*
)
;
aout_instance_t
*
(
*
__aout_New_inner
)
(
vlc_object_t
*
)
;
char
*
(
*
__config_GetPsz_inner
)
(
vlc_object_t
*
,
const
char
*
)
;
char
*
(
*
config_GetHomeDir_inner
)
(
void
)
;
char
*
(
*
input_OffsetToTime_inner
)
(
input_thread_t
*
,
char
*
,
off_t
)
;
...
...
@@ -37,8 +37,10 @@ struct module_symbols_t
int
(
*
__vlc_thread_create_inner
)
(
vlc_object_t
*
,
char
*
,
int
,
char
*
,
void
*
(
*
)
(
void
*
),
int
,
vlc_bool_t
)
;
int
(
*
__vlc_threads_end_inner
)
(
vlc_object_t
*
)
;
int
(
*
__vlc_threads_init_inner
)
(
vlc_object_t
*
)
;
int
(
*
aout_BufferPlay_inner
)
(
aout_instance_t
*
,
aout_input_t
*
,
aout_buffer_t
*
)
;
int
(
*
aout_DecDelete_inner
)
(
aout_instance_t
*
,
aout_input_t
*
)
;
int
(
*
aout_DecPlay_inner
)
(
aout_instance_t
*
,
aout_input_t
*
,
aout_buffer_t
*
)
;
int
(
*
aout_FormatNbChannels_inner
)
(
audio_sample_format_t
*
p_format
)
;
int
(
*
aout_Restart_inner
)
(
aout_instance_t
*
p_aout
)
;
int
(
*
aout_VolumeDown_inner
)
(
aout_instance_t
*
,
int
,
audio_volume_t
*
)
;
int
(
*
aout_VolumeGet_inner
)
(
aout_instance_t
*
,
audio_volume_t
*
)
;
int
(
*
aout_VolumeInfos_inner
)
(
aout_instance_t
*
,
audio_volume_t
*
)
;
...
...
@@ -111,12 +113,11 @@ struct module_symbols_t
void
(
*
__vlc_object_yield_inner
)
(
vlc_object_t
*
)
;
void
(
*
__vlc_thread_join_inner
)
(
vlc_object_t
*
,
char
*
,
int
)
;
void
(
*
__vlc_thread_ready_inner
)
(
vlc_object_t
*
)
;
void
(
*
aout_BufferDelete_inner
)
(
aout_instance_t
*
,
aout_input_t
*
,
aout_buffer_t
*
)
;
void
(
*
aout_DateInit_inner
)
(
audio_date_t
*
,
u32
)
;
void
(
*
aout_DateMove_inner
)
(
audio_date_t
*
,
mtime_t
)
;
void
(
*
aout_DateSet_inner
)
(
audio_date_t
*
,
mtime_t
)
;
void
(
*
aout_Delete
Instance
_inner
)
(
aout_instance_t
*
)
;
void
(
*
aout_
Input
Delete_inner
)
(
aout_instance_t
*
,
aout_input_t
*
)
;
void
(
*
aout_
Dec
Delete
Buffer
_inner
)
(
aout_instance_t
*
,
aout_input_t
*
,
aout_buffer_t
*
)
;
void
(
*
aout_Delete_inner
)
(
aout_instance_t
*
)
;
void
(
*
aout_VolumeNoneInit_inner
)
(
aout_instance_t
*
)
;
void
(
*
aout_VolumeSoftInit_inner
)
(
aout_instance_t
*
)
;
void
(
*
config_Duplicate_inner
)
(
module_t
*
,
module_config_t
*
)
;
...
...
@@ -172,8 +173,8 @@ struct module_symbols_t
# define UnalignedGetBits p_symbols->UnalignedGetBits_inner
# define UnalignedRemoveBits p_symbols->UnalignedRemoveBits_inner
# define UnalignedShowBits p_symbols->UnalignedShowBits_inner
# define __aout_
Input
New p_symbols->__aout_
Input
New_inner
# define __aout_New
Instance
p_symbols->__aout_New
Instance
_inner
# define __aout_
Dec
New p_symbols->__aout_
Dec
New_inner
# define __aout_New p_symbols->__aout_New_inner
# define __config_GetFloat p_symbols->__config_GetFloat_inner
# define __config_GetInt p_symbols->__config_GetInt_inner
# define __config_GetPsz p_symbols->__config_GetPsz_inner
...
...
@@ -222,19 +223,20 @@ struct module_symbols_t
# define __vlc_threads_end p_symbols->__vlc_threads_end_inner
# define __vlc_threads_init p_symbols->__vlc_threads_init_inner
# define __vout_CreateThread p_symbols->__vout_CreateThread_inner
# define aout_BufferDelete p_symbols->aout_BufferDelete_inner
# define aout_BufferNew p_symbols->aout_BufferNew_inner
# define aout_BufferPlay p_symbols->aout_BufferPlay_inner
# define aout_DateGet p_symbols->aout_DateGet_inner
# define aout_DateIncrement p_symbols->aout_DateIncrement_inner
# define aout_DateInit p_symbols->aout_DateInit_inner
# define aout_DateMove p_symbols->aout_DateMove_inner
# define aout_DateSet p_symbols->aout_DateSet_inner
# define aout_DeleteInstance p_symbols->aout_DeleteInstance_inner
# define aout_DecDelete p_symbols->aout_DecDelete_inner
# define aout_DecDeleteBuffer p_symbols->aout_DecDeleteBuffer_inner
# define aout_DecNewBuffer p_symbols->aout_DecNewBuffer_inner
# define aout_DecPlay p_symbols->aout_DecPlay_inner
# define aout_Delete p_symbols->aout_Delete_inner
# define aout_FifoPop p_symbols->aout_FifoPop_inner
# define aout_FormatNbChannels p_symbols->aout_FormatNbChannels_inner
# define aout_InputDelete p_symbols->aout_InputDelete_inner
# define aout_OutputNextBuffer p_symbols->aout_OutputNextBuffer_inner
# define aout_Restart p_symbols->aout_Restart_inner
# define aout_VolumeDown p_symbols->aout_VolumeDown_inner
# define aout_VolumeGet p_symbols->aout_VolumeGet_inner
# define aout_VolumeInfos p_symbols->aout_VolumeInfos_inner
...
...
modules/audio_filter/converter/s16tofloat32swab.c
View file @
7a58ef70
...
...
@@ -3,7 +3,7 @@
* with endianness change
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: s16tofloat32swab.c,v 1.
3
2002/09/2
0
2
3:27:03
massiot Exp $
* $Id: s16tofloat32swab.c,v 1.
4
2002/09/2
6
2
2:40:19
massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Henri Fallon <henri@videolan.org>
...
...
@@ -115,7 +115,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
#ifndef HAVE_SWAB
p_tmp
[
0
]
=
((
byte_t
*
)
p_in
)[
1
];
p_tmp
[
1
]
=
((
byte_t
*
)
p_in
)[
0
];
*
p_out
=
(
float
)
*
(
*
(
s16
*
)
p_tmp
)
/
32768
.
0
;
*
p_out
=
(
float
)(
*
(
s16
*
)
p_tmp
)
/
32768
.
0
;
#else
*
p_out
=
(
float
)
*
p_in
/
32768
.
0
;
#endif
...
...
modules/codec/a52.c
View file @
7a58ef70
...
...
@@ -2,7 +2,7 @@
* a52.c: A/52 basic parser
*****************************************************************************
* Copyright (C) 2001-2002 VideoLAN
* $Id: a52.c,v 1.1
2
2002/09/2
0
2
3:27:03
massiot Exp $
* $Id: a52.c,v 1.1
3
2002/09/2
6
2
2:40:20
massiot Exp $
*
* Authors: Stphane Borel <stef@via.ecp.fr>
* Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -174,7 +174,7 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
||
(
p_dec
->
output_format
.
i_bytes_per_frame
!=
i_frame_size
)
)
)
{
/* Parameters changed - this should not happen. */
aout_
Input
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
);
aout_
Dec
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
);
p_dec
->
p_aout_input
=
NULL
;
}
...
...
@@ -186,9 +186,9 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
p_dec
->
output_format
.
i_bytes_per_frame
=
i_frame_size
;
p_dec
->
output_format
.
i_frame_length
=
A52_FRAME_NB
;
aout_DateInit
(
&
end_date
,
i_rate
);
p_dec
->
p_aout_input
=
aout_
Input
New
(
p_dec
->
p_fifo
,
&
p_dec
->
p_aout
,
&
p_dec
->
output_format
);
p_dec
->
p_aout_input
=
aout_
Dec
New
(
p_dec
->
p_fifo
,
&
p_dec
->
p_aout
,
&
p_dec
->
output_format
);
if
(
p_dec
->
p_aout_input
==
NULL
)
{
...
...
@@ -206,8 +206,8 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
continue
;
}
p_buffer
=
aout_Buffer
New
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
A52_FRAME_NB
);
p_buffer
=
aout_
DecNew
Buffer
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
A52_FRAME_NB
);
if
(
p_buffer
==
NULL
)
return
-
1
;
p_buffer
->
start_date
=
aout_DateGet
(
&
end_date
);
p_buffer
->
end_date
=
aout_DateIncrement
(
&
end_date
,
...
...
@@ -219,13 +219,13 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
i_frame_size
-
7
);
if
(
p_dec
->
p_fifo
->
b_die
)
{
aout_Buffer
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
p_buffer
);
aout_
DecDelete
Buffer
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
p_buffer
);
break
;
}
/* Send the buffer to the mixer. */
aout_
Buffer
Play
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
p_buffer
);
aout_
Dec
Play
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
p_buffer
);
}
/* If b_error is set, the spdif thread enters the error loop */
...
...
@@ -247,7 +247,7 @@ static void EndThread( dec_thread_t * p_dec )
{
if
(
p_dec
->
p_aout_input
!=
NULL
)
{
aout_
Input
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
);
aout_
Dec
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
);
}
free
(
p_dec
);
...
...
modules/codec/a52old/a52old.c
View file @
7a58ef70
...
...
@@ -2,7 +2,7 @@
* a52old.c: A52 decoder module main file
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: a52old.c,v 1.
6
2002/0
8/30
22:
22
:2
4
massiot Exp $
* $Id: a52old.c,v 1.
7
2002/0
9/26
22:
40
:2
0
massiot Exp $
*
* Authors: Michel Lespinasse <walken@zoy.org>
*
...
...
@@ -167,7 +167,7 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
{
/* Delete old output */
msg_Warn
(
p_a52dec
->
p_fifo
,
"opening a new aout"
);
aout_
Input
Delete
(
p_a52dec
->
p_aout
,
p_a52dec
->
p_aout_input
);
aout_
Dec
Delete
(
p_a52dec
->
p_aout
,
p_a52dec
->
p_aout_input
);
}
/* Set output configuration */
...
...
@@ -175,9 +175,9 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
output_format
.
i_channels
=
2
;
/* FIXME ! */
output_format
.
i_rate
=
sync_info
.
sample_rate
;
aout_DateInit
(
&
end_date
,
output_format
.
i_rate
);
p_a52dec
->
p_aout_input
=
aout_
Input
New
(
p_a52dec
->
p_fifo
,
&
p_a52dec
->
p_aout
,
&
output_format
);
p_a52dec
->
p_aout_input
=
aout_
Dec
New
(
p_a52dec
->
p_fifo
,
&
p_a52dec
->
p_aout
,
&
output_format
);
}
if
(
p_a52dec
->
p_aout_input
==
NULL
)
...
...
@@ -198,9 +198,9 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
continue
;
}
p_aout_buffer
=
aout_Buffer
New
(
p_a52dec
->
p_aout
,
p_a52dec
->
p_aout_input
,
A52DEC_FRAME_SIZE
);
p_aout_buffer
=
aout_
DecNew
Buffer
(
p_a52dec
->
p_aout
,
p_a52dec
->
p_aout_input
,
A52DEC_FRAME_SIZE
);
if
(
!
p_aout_buffer
)
{
msg_Err
(
p_a52dec
->
p_fifo
,
"cannot get aout buffer"
);
...
...
@@ -215,14 +215,14 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
if
(
decode_frame
(
p_a52dec
,
(
s16
*
)
p_aout_buffer
->
p_buffer
))
{
b_sync
=
0
;
aout_Buffer
Delete
(
p_a52dec
->
p_aout
,
p_a52dec
->
p_aout_input
,
p_aout_buffer
);
aout_
DecDelete
Buffer
(
p_a52dec
->
p_aout
,
p_a52dec
->
p_aout_input
,
p_aout_buffer
);
continue
;
}
else
{
aout_
Buffer
Play
(
p_a52dec
->
p_aout
,
p_a52dec
->
p_aout_input
,
p_aout_buffer
);
aout_
Dec
Play
(
p_a52dec
->
p_aout
,
p_a52dec
->
p_aout_input
,
p_aout_buffer
);
}
RealignBits
(
&
p_a52dec
->
bit_stream
);
...
...
@@ -344,7 +344,7 @@ static void EndThread (a52dec_t * p_a52dec)
/* If the audio output fifo was created, we destroy it */
if
(
p_a52dec
->
p_aout_input
)
{
aout_
Input
Delete
(
p_a52dec
->
p_aout
,
p_a52dec
->
p_aout_input
);
aout_
Dec
Delete
(
p_a52dec
->
p_aout
,
p_a52dec
->
p_aout_input
);
}
/* Free allocated structures */
...
...
modules/codec/faad/decoder.c
View file @
7a58ef70
...
...
@@ -2,7 +2,7 @@
* decoder.c: AAC decoder using libfaad2
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: decoder.c,v 1.
2
2002/0
8
/2
3 14:05:22 sam
Exp $
* $Id: decoder.c,v 1.
3
2002/0
9
/2
6 22:40:21 massiot
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -447,15 +447,15 @@ static void DecodeThread( adec_thread_t *p_adec )
if
(
p_adec
->
p_aout_input
)
{
/* **** Delete the old **** */
aout_
Input
Delete
(
p_adec
->
p_aout
,
p_adec
->
p_aout_input
);
aout_
Dec
Delete
(
p_adec
->
p_aout
,
p_adec
->
p_aout_input
);
}
/* **** Create a new audio output **** */
p_adec
->
output_format
.
i_channels
=
faad_frame
.
channels
;
aout_DateInit
(
&
p_adec
->
date
,
p_adec
->
output_format
.
i_rate
);
p_adec
->
p_aout_input
=
aout_
Input
New
(
p_adec
->
p_fifo
,
&
p_adec
->
p_aout
,
&
p_adec
->
output_format
);
p_adec
->
p_aout_input
=
aout_
Dec
New
(
p_adec
->
p_fifo
,
&
p_adec
->
p_aout
,
&
p_adec
->
output_format
);
}
if
(
!
p_adec
->
p_aout_input
)
...
...
@@ -473,9 +473,9 @@ static void DecodeThread( adec_thread_t *p_adec )
return
;
}
p_aout_buffer
=
aout_Buffer
New
(
p_adec
->
p_aout
,
p_adec
->
p_aout_input
,
faad_frame
.
samples
/
faad_frame
.
channels
);
p_aout_buffer
=
aout_
DecNew
Buffer
(
p_adec
->
p_aout
,
p_adec
->
p_aout_input
,
faad_frame
.
samples
/
faad_frame
.
channels
);
if
(
!
p_aout_buffer
)
{
msg_Err
(
p_adec
->
p_fifo
,
"cannot get aout buffer"
);
...
...
@@ -490,7 +490,7 @@ static void DecodeThread( adec_thread_t *p_adec )
p_faad_buffer
,
p_aout_buffer
->
i_nb_bytes
);
aout_
Buffer
Play
(
p_adec
->
p_aout
,
p_adec
->
p_aout_input
,
p_aout_buffer
);
aout_
Dec
Play
(
p_adec
->
p_aout
,
p_adec
->
p_aout_input
,
p_aout_buffer
);
}
...
...
@@ -501,7 +501,7 @@ static void EndThread (adec_thread_t *p_adec)
{
if
(
p_adec
->
p_aout_input
)
{
aout_
Input
Delete
(
p_adec
->
p_aout
,
p_adec
->
p_aout_input
);
aout_
Dec
Delete
(
p_adec
->
p_aout
,
p_adec
->
p_aout_input
);
}
if
(
p_adec
->
p_handle
)
...
...
modules/codec/lpcm.c
View file @
7a58ef70
...
...
@@ -2,7 +2,7 @@
* lpcm.c: lpcm decoder module
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: lpcm.c,v 1.
1
2002/09/2
0
2
3:27:03
massiot Exp $
* $Id: lpcm.c,v 1.
2
2002/09/2
6
2
2:40:20
massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Henri Fallon <henri@videolan.org>
...
...
@@ -131,9 +131,9 @@ static int RunDecoder( decoder_fifo_t * p_fifo )
p_dec
->
output_format
.
i_rate
=
48000
;
aout_DateInit
(
&
p_dec
->
end_date
,
48000
);
p_dec
->
p_aout_input
=
aout_
Input
New
(
p_dec
->
p_fifo
,
&
p_dec
->
p_aout
,
&
p_dec
->
output_format
);
p_dec
->
p_aout_input
=
aout_
Dec
New
(
p_dec
->
p_fifo
,
&
p_dec
->
p_aout
,
&
p_dec
->
output_format
);
if
(
p_dec
->
p_aout_input
==
NULL
)
{
...
...
@@ -175,9 +175,9 @@ void DecodeFrame( dec_thread_t * p_dec )
aout_DateSet
(
&
p_dec
->
end_date
,
i_pts
);
}
p_aout_buffer
=
aout_Buffer
New
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
LPCM_FRAME_NB
);
p_aout_buffer
=
aout_
DecNew
Buffer
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
LPCM_FRAME_NB
);
if
(
!
p_aout_buffer
)
{
...
...
@@ -200,13 +200,13 @@ void DecodeFrame( dec_thread_t * p_dec )
if
(
p_dec
->
p_fifo
->
b_die
)
{
aout_Buffer
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
p_aout_buffer
);
aout_
DecDelete
Buffer
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
p_aout_buffer
);
return
;
}
aout_
Buffer
Play
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
p_aout_buffer
);
aout_
Dec
Play
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
p_aout_buffer
);
}
/*****************************************************************************
...
...
@@ -216,7 +216,7 @@ static void EndThread( dec_thread_t * p_dec )
{
if
(
p_dec
->
p_aout_input
!=
NULL
)
{
aout_
Input
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
);
aout_
Dec
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
);
}
free
(
p_dec
);
...
...
modules/codec/mad/libmad.c
View file @
7a58ef70
...
...
@@ -155,7 +155,7 @@ enum mad_flow libmad_output( void *p_data, struct mad_header const *p_header,
||
p_dec
->
output_format
.
i_channels
!=
p_pcm
->
channels
)
)
{
/* Parameters changed - this should not happen. */
aout_
Input
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
);
aout_
Dec
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
);
p_dec
->
p_aout_input
=
NULL
;
}
...
...
@@ -165,9 +165,9 @@ enum mad_flow libmad_output( void *p_data, struct mad_header const *p_header,
p_dec
->
output_format
.
i_rate
=
p_pcm
->
samplerate
;
p_dec
->
output_format
.
i_channels
=
p_pcm
->
channels
;
aout_DateInit
(
&
p_dec
->
end_date
,
p_pcm
->
samplerate
);
p_dec
->
p_aout_input
=
aout_
Input
New
(
p_dec
->
p_fifo
,
&
p_dec
->
p_aout
,
&
p_dec
->
output_format
);
p_dec
->
p_aout_input
=
aout_
Dec
New
(
p_dec
->
p_fifo
,
&
p_dec
->
p_aout
,
&
p_dec
->
output_format
);
if
(
p_dec
->
p_aout_input
==
NULL
)
{
...
...
@@ -199,7 +199,7 @@ enum mad_flow libmad_output( void *p_data, struct mad_header const *p_header,
return
MAD_FLOW_CONTINUE
;
}
p_buffer
=
aout_Buffer
New
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
i_samples
);
p_buffer
=
aout_
DecNew
Buffer
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
i_samples
);
if
(
p_buffer
==
NULL
)
{
...
...
@@ -233,7 +233,7 @@ enum mad_flow libmad_output( void *p_data, struct mad_header const *p_header,
p_pcm
->
channels
);
}
aout_
Buffer
Play
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
p_buffer
);
aout_
Dec
Play
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
p_buffer
);
return
MAD_FLOW_CONTINUE
;
}
...
...
modules/codec/mpeg_audio/decoder.c
View file @
7a58ef70
...
...
@@ -2,7 +2,7 @@
* decoder.c: MPEG audio decoder thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: decoder.c,v 1.
3
2002/0
8
/26 2
3:0
0:2
2
massiot Exp $
* $Id: decoder.c,v 1.
4
2002/0
9
/26 2
2:4
0:2
3
massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
...
...
@@ -174,7 +174,7 @@ static void DecodeThread( adec_thread_t * p_dec )
{
/* Delete old output */
msg_Warn
(
p_dec
->
p_fifo
,
"opening a new aout"
);
aout_
Input
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
);
aout_
Dec
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
);
}
/* Set output configuration */
...
...
@@ -182,9 +182,9 @@ static void DecodeThread( adec_thread_t * p_dec )
p_dec
->
output_format
.
i_channels
=
(
sync_info
.
b_stereo
?
2
:
1
);
p_dec
->
output_format
.
i_rate
=
sync_info
.
sample_rate
;
aout_DateInit
(
&
p_dec
->
end_date
,
sync_info
.
sample_rate
);
p_dec
->
p_aout_input
=
aout_
Input
New
(
p_dec
->
p_fifo
,
&
p_dec
->
p_aout
,
&
p_dec
->
output_format
);
p_dec
->
p_aout_input
=
aout_
Dec
New
(
p_dec
->
p_fifo
,
&
p_dec
->
p_aout
,
&
p_dec
->
output_format
);
}
if
(
p_dec
->
p_aout_input
==
NULL
)
...
...
@@ -200,9 +200,9 @@ static void DecodeThread( adec_thread_t * p_dec )
return
;
}
p_aout_buffer
=
aout_Buffer
New
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
ADEC_FRAME_NB
);
p_aout_buffer
=
aout_
DecNew
Buffer
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
ADEC_FRAME_NB
);
if
(
!
p_aout_buffer
)
{
msg_Err
(
p_dec
->
p_fifo
,
"cannot get aout buffer"
);
...
...
@@ -216,11 +216,11 @@ static void DecodeThread( adec_thread_t * p_dec )
if
(
adec_DecodeFrame
(
p_dec
,
(
float
*
)
p_aout_buffer
->
p_buffer
)
)
{
/* Ouch, failed decoding... We'll have to resync */
aout_Buffer
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
p_aout_buffer
);
aout_
DecDelete
Buffer
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
p_aout_buffer
);
}
else
{
aout_
Buffer
Play
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
p_aout_buffer
);
aout_
Dec
Play
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
p_aout_buffer
);
}
}
}
...
...
@@ -236,7 +236,7 @@ static void EndThread ( adec_thread_t *p_dec )
/* If the audio output fifo was created, we destroy it */
if
(
p_dec
->
p_aout_input
)
{
aout_
Input
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
);
aout_
Dec
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
);
}
...
...
modules/demux/mpeg/ts.c
View file @
7a58ef70
...
...
@@ -2,7 +2,7 @@
* mpeg_ts.c : Transport Stream input module for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: ts.c,v 1.
5
2002/09/2
3
2
3:05:58
massiot Exp $
* $Id: ts.c,v 1.
6
2002/09/2
6
2
2:40:24
massiot Exp $
*
* Authors: Henri Fallon <henri@via.ecp.fr>
* Johan Bilien <jobi@via.ecp.fr>
...
...
@@ -907,7 +907,6 @@ void TS_DVBPSI_HandlePMT( input_thread_t * p_input, dvbpsi_pmt_t * p_new_pmt )
p_new_es
->
i_stream_id
=
0xBD
;
break
;
case
DVD_SPU_ES
:
case
A52_AUDIO_ES
:
if
(
!
b_vls_compat
)
p_new_es
->
i_fourcc
=
VLC_FOURCC
(
's'
,
'p'
,
'u'
,
' '
);
else
...
...
src/audio_output/
audio_output
.c
→
src/audio_output/
common
.c
View file @
7a58ef70
/*****************************************************************************
*
audio_output
.c : audio output
instance miscellaneous function
s
*
common
.c : audio output
management of common data structure
s
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id:
audio_output
.c,v 1.1
03
2002/09/2
0
2
3:27:04
massiot Exp $
* $Id:
common
.c,v 1.1 2002/09/2
6
2
2:40:25
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -29,21 +29,18 @@
#include
<vlc/vlc.h>