From: Laurent Aimar Date: Thu, 14 May 2009 19:23:01 +0000 (+0200) Subject: Replaced AOUT_FMT_*_NE/IE by by VLC_CODEC equivalents. X-Git-Tag: 1.1.0-ff~5949 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=cee16ae6950abf905ac800018108e0dc610619ef;p=vlc Replaced AOUT_FMT_*_NE/IE by by VLC_CODEC equivalents. --- diff --git a/include/vlc_aout.h b/include/vlc_aout.h index e64390de0e..21b67fbdb6 100644 --- a/include/vlc_aout.h +++ b/include/vlc_aout.h @@ -47,18 +47,8 @@ extern "C" { && ((p_first)->i_physical_channels == (p_second)->i_physical_channels)\ && ((p_first)->i_original_channels == (p_second)->i_original_channels) ) -#define AOUT_FMT_S16_NE VLC_CODEC_S16N -#define AOUT_FMT_U16_NE VLC_CODEC_U16N -#define AOUT_FMT_S24_NE VLC_CODEC_S24N -#define AOUT_FMT_S32_NE VLC_CODEC_S32N - #define VLC_CODEC_SPDIFL VLC_FOURCC('s','p','d','i') #define VLC_CODEC_SPDIFB VLC_FOURCC('s','p','d','b') -#ifdef WORDS_BIGENDIAN -# define AOUT_FMT_SPDIF_NE VLC_CODEC_SPDIFB -#else -# define AOUT_FMT_SPDIF_NE VLC_CODEC_SPDIFL -#endif #define AOUT_FMT_NON_LINEAR( p_format ) \ ( ((p_format)->i_format == VLC_CODEC_SPDIFL) \ diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h index 6794e5df6d..c212f279f3 100644 --- a/include/vlc_fourcc.h +++ b/include/vlc_fourcc.h @@ -279,17 +279,29 @@ #define VLC_CODEC_CVD VLC_FOURCC('c','v','d',' ') -/* Special endian dependant values */ +/* Special endian dependant values + * The suffic N means Native + * The suffix I means Inverted (ie non native) */ #ifdef WORDS_BIGENDIAN # define VLC_CODEC_S16N VLC_CODEC_S16B # define VLC_CODEC_U16N VLC_CODEC_U16B # define VLC_CODEC_S24N VLC_CODEC_S24B # define VLC_CODEC_S32N VLC_CODEC_S32B + +# define VLC_CODEC_S16I VLC_CODEC_S16L +# define VLC_CODEC_U16I VLC_CODEC_U16L +# define VLC_CODEC_S24I VLC_CODEC_S24L +# define VLC_CODEC_S32I VLC_CODEC_S32L #else # define VLC_CODEC_S16N VLC_CODEC_S16L # define VLC_CODEC_U16N VLC_CODEC_U16L # define VLC_CODEC_S24N VLC_CODEC_S24L # define VLC_CODEC_S32N VLC_CODEC_S32L + +# define VLC_CODEC_S16I VLC_CODEC_S16B +# define VLC_CODEC_U16I VLC_CODEC_U16B +# define VLC_CODEC_S24I VLC_CODEC_S24B +# define VLC_CODEC_S32I VLC_CODEC_S32B #endif /* Non official codecs, used to force a profile in an encoder */ diff --git a/modules/audio_filter/channel_mixer/mono.c b/modules/audio_filter/channel_mixer/mono.c index 77bc29f2b1..7e4af3d792 100644 --- a/modules/audio_filter/channel_mixer/mono.c +++ b/modules/audio_filter/channel_mixer/mono.c @@ -358,8 +358,8 @@ static int OpenFilter( vlc_object_t *p_this ) return VLC_EGENERIC; } - if( (p_filter->fmt_in.i_codec != AOUT_FMT_S16_NE) || - (p_filter->fmt_out.i_codec != AOUT_FMT_S16_NE) ) + if( (p_filter->fmt_in.i_codec != VLC_CODEC_S16N) || + (p_filter->fmt_out.i_codec != VLC_CODEC_S16N) ) { /*msg_Err( p_this, "filter discarded (invalid format)" );*/ return VLC_EGENERIC; @@ -367,8 +367,8 @@ static int OpenFilter( vlc_object_t *p_this ) if( (p_filter->fmt_in.audio.i_format != p_filter->fmt_out.audio.i_format) && (p_filter->fmt_in.audio.i_rate != p_filter->fmt_out.audio.i_rate) && - (p_filter->fmt_in.audio.i_format != AOUT_FMT_S16_NE) && - (p_filter->fmt_out.audio.i_format != AOUT_FMT_S16_NE) && + (p_filter->fmt_in.audio.i_format != VLC_CODEC_S16N) && + (p_filter->fmt_out.audio.i_format != VLC_CODEC_S16N) && (p_filter->fmt_in.audio.i_bitspersample != p_filter->fmt_out.audio.i_bitspersample)) { diff --git a/modules/audio_filter/converter/fixed.c b/modules/audio_filter/converter/fixed.c index c4634b6051..c77027903a 100644 --- a/modules/audio_filter/converter/fixed.c +++ b/modules/audio_filter/converter/fixed.c @@ -74,7 +74,7 @@ static int Create_F32ToS16( vlc_object_t *p_this ) aout_filter_t * p_filter = (aout_filter_t *)p_this; if ( p_filter->input.i_format != VLC_CODEC_FI32 - || p_filter->output.i_format != AOUT_FMT_S16_NE ) + || p_filter->output.i_format != VLC_CODEC_S16N ) { return -1; } @@ -158,7 +158,7 @@ static int Create_S16ToF32( vlc_object_t *p_this ) aout_filter_t * p_filter = (aout_filter_t *)p_this; if ( p_filter->output.i_format != VLC_CODEC_FI32 - || p_filter->input.i_format != AOUT_FMT_S16_NE ) + || p_filter->input.i_format != VLC_CODEC_S16N ) { return -1; } diff --git a/modules/audio_filter/converter/float.c b/modules/audio_filter/converter/float.c index 1664a7a420..b92717511d 100644 --- a/modules/audio_filter/converter/float.c +++ b/modules/audio_filter/converter/float.c @@ -203,7 +203,7 @@ static int Create_FL32ToS16( vlc_object_t *p_this ) aout_filter_t * p_filter = (aout_filter_t *)p_this; if ( p_filter->input.i_format != VLC_CODEC_FL32 - || p_filter->output.i_format != AOUT_FMT_S16_NE ) + || p_filter->output.i_format != VLC_CODEC_S16N ) { return -1; } @@ -303,7 +303,7 @@ static int Create_FL32ToU16( vlc_object_t *p_this ) aout_filter_t * p_filter = (aout_filter_t *)p_this; if ( p_filter->input.i_format != VLC_CODEC_FL32 - || p_filter->output.i_format != AOUT_FMT_U16_NE ) + || p_filter->output.i_format != VLC_CODEC_U16N ) { return -1; } @@ -392,9 +392,9 @@ static int Create_S16ToFL32( vlc_object_t *p_this ) { aout_filter_t * p_filter = (aout_filter_t *)p_this; - if ( ( p_filter->input.i_format != AOUT_FMT_S16_NE && - p_filter->input.i_format != AOUT_FMT_S24_NE && - p_filter->input.i_format != AOUT_FMT_S32_NE ) + if ( ( p_filter->input.i_format != VLC_CODEC_S16N && + p_filter->input.i_format != VLC_CODEC_S24N && + p_filter->input.i_format != VLC_CODEC_S32N ) || p_filter->output.i_format != VLC_CODEC_FL32 ) { return -1; @@ -405,9 +405,9 @@ static int Create_S16ToFL32( vlc_object_t *p_this ) return -1; } - if( p_filter->input.i_format == AOUT_FMT_S32_NE ) + if( p_filter->input.i_format == VLC_CODEC_S32N ) p_filter->pf_do_work = Do_S32ToFL32; - else if( p_filter->input.i_format == AOUT_FMT_S24_NE ) + else if( p_filter->input.i_format == VLC_CODEC_S24N ) p_filter->pf_do_work = Do_S24ToFL32; else p_filter->pf_do_work = Do_S16ToFL32; @@ -508,7 +508,7 @@ static int Create_S16ToFL32_SW( vlc_object_t *p_this ) if ( (p_filter->input.i_format == VLC_CODEC_S16L || p_filter->input.i_format == VLC_CODEC_S16B) && p_filter->output.i_format == VLC_CODEC_FL32 - && p_filter->input.i_format != AOUT_FMT_S16_NE ) + && p_filter->input.i_format != VLC_CODEC_S16N ) { p_filter->pf_do_work = Do_S16ToFL32_SW; p_filter->b_in_place = true; @@ -519,7 +519,7 @@ static int Create_S16ToFL32_SW( vlc_object_t *p_this ) if ( (p_filter->input.i_format == VLC_CODEC_S24L || p_filter->input.i_format == VLC_CODEC_S24B) && p_filter->output.i_format == VLC_CODEC_FL32 - && p_filter->input.i_format != AOUT_FMT_S24_NE ) + && p_filter->input.i_format != VLC_CODEC_S24N ) { p_filter->pf_do_work = Do_S24ToFL32_SW; p_filter->b_in_place = true; @@ -530,7 +530,7 @@ static int Create_S16ToFL32_SW( vlc_object_t *p_this ) if ( (p_filter->input.i_format == VLC_CODEC_S32L || p_filter->input.i_format == VLC_CODEC_S32B) && p_filter->output.i_format == VLC_CODEC_FL32 - && p_filter->input.i_format != AOUT_FMT_S32_NE ) + && p_filter->input.i_format != VLC_CODEC_S32N ) { p_filter->pf_do_work = Do_S32ToFL32_SW; p_filter->b_in_place = true; diff --git a/modules/audio_filter/format.c b/modules/audio_filter/format.c index 242900b0e8..6f8a604655 100644 --- a/modules/audio_filter/format.c +++ b/modules/audio_filter/format.c @@ -36,17 +36,6 @@ #include #include "vlc_filter.h" -#ifdef WORDS_BIGENDIAN -# define AOUT_FMT_S24_IE VLC_CODEC_S24L -# define AOUT_FMT_S16_IE VLC_CODEC_S16L -# define AOUT_FMT_U16_IE VLC_CODEC_U16L -#else -# define AOUT_FMT_S24_IE VLC_CODEC_S24B -# define AOUT_FMT_S16_IE VLC_CODEC_S16B -# define AOUT_FMT_U16_IE VLC_CODEC_U16B -#endif - - /***************************************************************************** * Local prototypes *****************************************************************************/ @@ -125,74 +114,74 @@ static const struct } ConvertTable[] = { /* From fl32 */ - { VLC_CODEC_FL32, AOUT_FMT_S24_NE, Float32toS24 }, - { VLC_CODEC_FL32, AOUT_FMT_S16_NE, Float32toS16 }, - { VLC_CODEC_FL32, AOUT_FMT_U16_NE, Float32toU16 }, - { VLC_CODEC_FL32, AOUT_FMT_S24_IE, Float32toS24Invert }, - { VLC_CODEC_FL32, AOUT_FMT_S16_IE, Float32toS16Invert }, - { VLC_CODEC_FL32, AOUT_FMT_U16_IE, Float32toU16Invert }, + { VLC_CODEC_FL32, VLC_CODEC_S24N, Float32toS24 }, + { VLC_CODEC_FL32, VLC_CODEC_S16N, Float32toS16 }, + { VLC_CODEC_FL32, VLC_CODEC_U16N, Float32toU16 }, + { VLC_CODEC_FL32, VLC_CODEC_S24I, Float32toS24Invert }, + { VLC_CODEC_FL32, VLC_CODEC_S16I, Float32toS16Invert }, + { VLC_CODEC_FL32, VLC_CODEC_U16I, Float32toU16Invert }, { VLC_CODEC_FL32, VLC_CODEC_S8, Float32toS8 }, { VLC_CODEC_FL32, VLC_CODEC_U8, Float32toU8 }, /* From s24 invert */ - { AOUT_FMT_S24_NE, VLC_CODEC_FL32, S24toFloat32 }, - { AOUT_FMT_S24_NE, AOUT_FMT_S24_IE, Swap24 }, - { AOUT_FMT_S24_NE, AOUT_FMT_S16_NE, S24toS16 }, - { AOUT_FMT_S24_NE, AOUT_FMT_S16_IE, S24toS16Invert }, + { VLC_CODEC_S24N, VLC_CODEC_FL32, S24toFloat32 }, + { VLC_CODEC_S24N, VLC_CODEC_S24I, Swap24 }, + { VLC_CODEC_S24N, VLC_CODEC_S16N, S24toS16 }, + { VLC_CODEC_S24N, VLC_CODEC_S16I, S24toS16Invert }, /* From s16 */ - { AOUT_FMT_S16_NE, VLC_CODEC_FL32, S16toFloat32 }, - { AOUT_FMT_S16_NE, AOUT_FMT_S24_NE, S16toS24 }, - { AOUT_FMT_S16_NE, AOUT_FMT_S24_IE, S16toS24Invert }, - { AOUT_FMT_S16_NE, AOUT_FMT_S16_IE, Swap16 }, - { AOUT_FMT_S16_NE, AOUT_FMT_U16_IE, S16toU16 }, - { AOUT_FMT_S16_NE, VLC_CODEC_S8, S16toS8 }, - { AOUT_FMT_S16_NE, VLC_CODEC_U8, S16toU8 }, + { VLC_CODEC_S16N, VLC_CODEC_FL32, S16toFloat32 }, + { VLC_CODEC_S16N, VLC_CODEC_S24N, S16toS24 }, + { VLC_CODEC_S16N, VLC_CODEC_S24I, S16toS24Invert }, + { VLC_CODEC_S16N, VLC_CODEC_S16I, Swap16 }, + { VLC_CODEC_S16N, VLC_CODEC_U16I, S16toU16 }, + { VLC_CODEC_S16N, VLC_CODEC_S8, S16toS8 }, + { VLC_CODEC_S16N, VLC_CODEC_U8, S16toU8 }, /* From u16 */ - { AOUT_FMT_U16_NE, VLC_CODEC_FL32, U16toFloat32 }, - { AOUT_FMT_U16_NE, AOUT_FMT_U16_IE, Swap16 }, - { AOUT_FMT_U16_NE, AOUT_FMT_S16_IE, U16toS16 }, - { AOUT_FMT_U16_NE, VLC_CODEC_S8, U16toS8 }, - { AOUT_FMT_U16_NE, VLC_CODEC_U8, U16toU8 }, + { VLC_CODEC_U16N, VLC_CODEC_FL32, U16toFloat32 }, + { VLC_CODEC_U16N, VLC_CODEC_U16I, Swap16 }, + { VLC_CODEC_U16N, VLC_CODEC_S16I, U16toS16 }, + { VLC_CODEC_U16N, VLC_CODEC_S8, U16toS8 }, + { VLC_CODEC_U16N, VLC_CODEC_U8, U16toU8 }, /* From s8 */ { VLC_CODEC_S8, VLC_CODEC_FL32, S8toFloat32 }, - { VLC_CODEC_S8, AOUT_FMT_S16_NE, S8toS16 }, - { VLC_CODEC_S8, AOUT_FMT_S16_IE, S8toS16Invert }, - { VLC_CODEC_S8, AOUT_FMT_U16_NE, S8toU16 }, - { VLC_CODEC_S8, AOUT_FMT_U16_IE, S8toU16Invert }, + { VLC_CODEC_S8, VLC_CODEC_S16N, S8toS16 }, + { VLC_CODEC_S8, VLC_CODEC_S16I, S8toS16Invert }, + { VLC_CODEC_S8, VLC_CODEC_U16N, S8toU16 }, + { VLC_CODEC_S8, VLC_CODEC_U16I, S8toU16Invert }, { VLC_CODEC_S8, VLC_CODEC_U8, S8toU8 }, /* From u8 */ { VLC_CODEC_U8, VLC_CODEC_FL32, U8toFloat32 }, - { VLC_CODEC_U8, AOUT_FMT_S16_NE, U8toS16 }, - { VLC_CODEC_U8, AOUT_FMT_S16_IE, U8toS16Invert }, - { VLC_CODEC_U8, AOUT_FMT_U16_NE, U8toU16 }, - { VLC_CODEC_U8, AOUT_FMT_U16_IE, U8toU16Invert }, + { VLC_CODEC_U8, VLC_CODEC_S16N, U8toS16 }, + { VLC_CODEC_U8, VLC_CODEC_S16I, U8toS16Invert }, + { VLC_CODEC_U8, VLC_CODEC_U16N, U8toU16 }, + { VLC_CODEC_U8, VLC_CODEC_U16I, U8toU16Invert }, { VLC_CODEC_U8, VLC_CODEC_S8, U8toS8 }, /* From s24 invert */ - { AOUT_FMT_S24_IE, VLC_CODEC_FL32, S24InverttoFloat32 }, - { AOUT_FMT_S24_IE, AOUT_FMT_S24_NE, Swap24 }, - { AOUT_FMT_S24_IE, AOUT_FMT_S16_NE, S24InverttoS16 }, - { AOUT_FMT_S24_IE, AOUT_FMT_S16_IE, S24InverttoS16Invert }, + { VLC_CODEC_S24I, VLC_CODEC_FL32, S24InverttoFloat32 }, + { VLC_CODEC_S24I, VLC_CODEC_S24N, Swap24 }, + { VLC_CODEC_S24I, VLC_CODEC_S16N, S24InverttoS16 }, + { VLC_CODEC_S24I, VLC_CODEC_S16I, S24InverttoS16Invert }, /* From s16 invert */ - { AOUT_FMT_S16_IE, VLC_CODEC_FL32, S16InverttoFloat32 }, - { AOUT_FMT_S16_IE, AOUT_FMT_S24_NE, S16InverttoS24 }, - { AOUT_FMT_S16_IE, AOUT_FMT_S24_IE, S16InverttoS24Invert }, - { AOUT_FMT_S16_IE, AOUT_FMT_S16_NE, Swap16 }, - { AOUT_FMT_S16_IE, AOUT_FMT_U16_NE, S16InverttoU16 }, - { AOUT_FMT_S16_IE, VLC_CODEC_S8, S16InverttoS8 }, - { AOUT_FMT_S16_IE, VLC_CODEC_U8, S16InverttoU8 }, + { VLC_CODEC_S16I, VLC_CODEC_FL32, S16InverttoFloat32 }, + { VLC_CODEC_S16I, VLC_CODEC_S24N, S16InverttoS24 }, + { VLC_CODEC_S16I, VLC_CODEC_S24I, S16InverttoS24Invert }, + { VLC_CODEC_S16I, VLC_CODEC_S16N, Swap16 }, + { VLC_CODEC_S16I, VLC_CODEC_U16N, S16InverttoU16 }, + { VLC_CODEC_S16I, VLC_CODEC_S8, S16InverttoS8 }, + { VLC_CODEC_S16I, VLC_CODEC_U8, S16InverttoU8 }, /* From u16 invert */ - { AOUT_FMT_U16_IE, VLC_CODEC_FL32, U16InverttoFloat32 }, - { AOUT_FMT_U16_IE, AOUT_FMT_U16_NE, Swap16 }, - { AOUT_FMT_U16_IE, AOUT_FMT_S16_NE, U16InverttoS16 }, - { AOUT_FMT_U16_IE, VLC_CODEC_S8, U16InverttoS8 }, - { AOUT_FMT_U16_IE, VLC_CODEC_U8, U16InverttoU8 }, + { VLC_CODEC_U16I, VLC_CODEC_FL32, U16InverttoFloat32 }, + { VLC_CODEC_U16I, VLC_CODEC_U16N, Swap16 }, + { VLC_CODEC_U16I, VLC_CODEC_S16N, U16InverttoS16 }, + { VLC_CODEC_U16I, VLC_CODEC_S8, U16InverttoS8 }, + { VLC_CODEC_U16I, VLC_CODEC_U8, U16InverttoU8 }, { 0, 0, NULL }, }; diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c index 03fd35bdbd..fb2f45c1aa 100644 --- a/modules/audio_output/alsa.c +++ b/modules/audio_output/alsa.c @@ -365,7 +365,7 @@ static int Open( vlc_object_t *p_this ) } else { - i_vlc_pcm_format = AOUT_FMT_S16_NE; + i_vlc_pcm_format = VLC_CODEC_S16N; i_snd_pcm_format = SND_PCM_FORMAT_S16; } @@ -547,7 +547,7 @@ static int Open( vlc_object_t *p_this ) i_vlc_pcm_format = VLC_CODEC_FL32; break; case SND_PCM_FORMAT_S16: - i_vlc_pcm_format = AOUT_FMT_S16_NE; + i_vlc_pcm_format = VLC_CODEC_S16N; break; } p_aout->output.output.i_format = i_vlc_pcm_format; @@ -624,7 +624,7 @@ static int Open( vlc_object_t *p_this ) { b_retry = true; i_snd_pcm_format = SND_PCM_FORMAT_S16; - p_aout->output.output.i_format = AOUT_FMT_S16_NE; + p_aout->output.output.i_format = VLC_CODEC_S16N; msg_Warn( p_aout, "unable to commit hardware configuration " "with fl32 samples. Retrying with s16l (%s)", snd_strerror( i_snd_rc ) ); } diff --git a/modules/audio_output/file.c b/modules/audio_output/file.c index 366fe825fa..cb9bc0c889 100644 --- a/modules/audio_output/file.c +++ b/modules/audio_output/file.c @@ -97,7 +97,7 @@ static const char *const format_list[] = { "u8", "s8", "u16", "s16", "u16_le", "float32", "spdif" }; static const int format_int[] = { VLC_CODEC_U8, VLC_CODEC_S8, - AOUT_FMT_U16_NE, AOUT_FMT_S16_NE, + VLC_CODEC_U16N, VLC_CODEC_S16N, VLC_CODEC_U16L, VLC_CODEC_S16L, VLC_CODEC_U16B, diff --git a/modules/audio_output/hd1000a.cpp b/modules/audio_output/hd1000a.cpp index 78a77d1cba..1b736dabc2 100644 --- a/modules/audio_output/hd1000a.cpp +++ b/modules/audio_output/hd1000a.cpp @@ -156,7 +156,7 @@ static int Open( vlc_object_t * p_this ) } } - p_aout->output.output.i_format = AOUT_FMT_S16_NE; + p_aout->output.output.i_format = VLC_CODEC_S16N; p_aout->output.i_nb_samples = FRAME_SIZE; p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT; diff --git a/modules/audio_output/oss.c b/modules/audio_output/oss.c index 3688e6ff39..6ee0688655 100644 --- a/modules/audio_output/oss.c +++ b/modules/audio_output/oss.c @@ -330,7 +330,7 @@ static int Open( vlc_object_t *p_this ) } else if ( val.i_int == AOUT_VAR_5_1 ) { - p_aout->output.output.i_format = AOUT_FMT_S16_NE; + p_aout->output.output.i_format = VLC_CODEC_S16N; p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT @@ -338,20 +338,20 @@ static int Open( vlc_object_t *p_this ) } else if ( val.i_int == AOUT_VAR_2F2R ) { - p_aout->output.output.i_format = AOUT_FMT_S16_NE; + p_aout->output.output.i_format = VLC_CODEC_S16N; p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT; } else if ( val.i_int == AOUT_VAR_STEREO ) { - p_aout->output.output.i_format = AOUT_FMT_S16_NE; + p_aout->output.output.i_format = VLC_CODEC_S16N; p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT; } else if ( val.i_int == AOUT_VAR_MONO ) { - p_aout->output.output.i_format = AOUT_FMT_S16_NE; + p_aout->output.output.i_format = VLC_CODEC_S16N; p_aout->output.output.i_physical_channels = AOUT_CHAN_CENTER; } else diff --git a/modules/codec/adpcm.c b/modules/codec/adpcm.c index d62cdaa5bf..61f749fd10 100644 --- a/modules/codec/adpcm.c +++ b/modules/codec/adpcm.c @@ -247,7 +247,7 @@ static int OpenDecoder( vlc_object_t *p_this ) p_sys->i_samplesperblock ); p_dec->fmt_out.i_cat = AUDIO_ES; - p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE; + p_dec->fmt_out.i_codec = VLC_CODEC_S16N; p_dec->fmt_out.audio.i_rate = p_dec->fmt_in.audio.i_rate; p_dec->fmt_out.audio.i_channels = p_dec->fmt_in.audio.i_channels; p_dec->fmt_out.audio.i_physical_channels = diff --git a/modules/codec/araw.c b/modules/codec/araw.c index d049be451b..d59b417805 100644 --- a/modules/codec/araw.c +++ b/modules/codec/araw.c @@ -347,13 +347,13 @@ static int DecoderOpen( vlc_object_t *p_this ) } else if( p_dec->fmt_in.i_codec == VLC_CODEC_ALAW ) { - p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE; + p_dec->fmt_out.i_codec = VLC_CODEC_S16N; p_sys->p_logtos16 = alawtos16; p_dec->fmt_in.audio.i_bitspersample = 8; } else if( p_dec->fmt_in.i_codec == VLC_CODEC_MULAW ) { - p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE; + p_dec->fmt_out.i_codec = VLC_CODEC_S16N; p_sys->p_logtos16 = ulawtos16; p_dec->fmt_in.audio.i_bitspersample = 8; } @@ -1406,13 +1406,13 @@ static int EncoderOpen( vlc_object_t *p_this ) if( p_enc->fmt_out.i_codec == VLC_CODEC_ALAW) { p_enc->fmt_in.audio.i_bitspersample = 16; - p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE; + p_enc->fmt_in.i_codec = VLC_CODEC_S16N; p_sys->i_s16tolog = ALAW; } else if( p_enc->fmt_out.i_codec == VLC_CODEC_MULAW ) { p_enc->fmt_in.audio.i_bitspersample = 16; - p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE; + p_enc->fmt_in.i_codec = VLC_CODEC_S16N; p_sys->i_s16tolog = ULAW; } diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c index bb680e3842..8a6f8024ca 100644 --- a/modules/codec/avcodec/audio.c +++ b/modules/codec/avcodec/audio.c @@ -458,7 +458,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) p_dec->fmt_out.audio.i_bitspersample = 8; break; case SAMPLE_FMT_S32: - p_dec->fmt_out.i_codec = AOUT_FMT_S32_NE; + p_dec->fmt_out.i_codec = VLC_CODEC_S32N; p_dec->fmt_out.audio.i_bitspersample = 32; break; case SAMPLE_FMT_FLT: @@ -472,12 +472,12 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) case SAMPLE_FMT_S16: default: - p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE; + p_dec->fmt_out.i_codec = VLC_CODEC_S16N; p_dec->fmt_out.audio.i_bitspersample = 16; break; } #else - p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE; + p_dec->fmt_out.i_codec = VLC_CODEC_S16N; p_dec->fmt_out.audio.i_bitspersample = 16; #endif p_dec->fmt_out.audio.i_rate = p_sys->p_context->sample_rate; diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c index a77e1df946..44e2f6c9e9 100644 --- a/modules/codec/avcodec/encoder.c +++ b/modules/codec/avcodec/encoder.c @@ -584,7 +584,7 @@ int OpenEncoder( vlc_object_t *p_this ) if( i_codec_id == CODEC_ID_MP3 && p_enc->fmt_in.audio.i_channels > 2 ) p_enc->fmt_in.audio.i_channels = 2; - p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE; + p_enc->fmt_in.i_codec = VLC_CODEC_S16N; p_context->sample_rate = p_enc->fmt_out.audio.i_rate; p_context->channels = p_enc->fmt_out.audio.i_channels; diff --git a/modules/codec/dmo/dmo.c b/modules/codec/dmo/dmo.c index 159d5f12c5..f958c3f1c4 100644 --- a/modules/codec/dmo/dmo.c +++ b/modules/codec/dmo/dmo.c @@ -452,7 +452,7 @@ static int DecOpen( decoder_t *p_dec ) if( p_dec->fmt_in.i_cat == AUDIO_ES ) { /* Setup the format */ - p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE; + p_dec->fmt_out.i_codec = VLC_CODEC_S16N; p_dec->fmt_out.audio.i_rate = p_dec->fmt_in.audio.i_rate; p_dec->fmt_out.audio.i_channels = p_dec->fmt_in.audio.i_channels; p_dec->fmt_out.audio.i_bitspersample = 16;//p_dec->fmt_in.audio.i_bitspersample; We request 16 @@ -1246,7 +1246,7 @@ static int EncoderSetAudioType( encoder_t *p_enc, IMediaObject *p_dmo ) fourcc_to_wf_tag( p_enc->fmt_out.i_codec, &i_tag ); if( i_tag == 0 ) return VLC_EGENERIC; - p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE; + p_enc->fmt_in.i_codec = VLC_CODEC_S16N; p_enc->fmt_in.audio.i_bitspersample = 16; /* We first need to choose an output type from the predefined diff --git a/modules/codec/faad.c b/modules/codec/faad.c index 1f4f079d7c..3633bc893d 100644 --- a/modules/codec/faad.c +++ b/modules/codec/faad.c @@ -140,7 +140,7 @@ static int Open( vlc_object_t *p_this ) if (vlc_CPU() & CPU_CAPABILITY_FPU) p_dec->fmt_out.i_codec = VLC_CODEC_FL32; else - p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE; + p_dec->fmt_out.i_codec = VLC_CODEC_S16N; p_dec->pf_decode_audio = DecodeBlock; p_dec->fmt_out.audio.i_physical_channels = diff --git a/modules/codec/flac.c b/modules/codec/flac.c index b250cc3c3b..856019b004 100644 --- a/modules/codec/flac.c +++ b/modules/codec/flac.c @@ -688,10 +688,10 @@ static void DecoderMetadataCallback( const FLAC__StreamDecoder *decoder, p_dec->fmt_out.i_codec = VLC_CODEC_S8; break; case 16: - p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE; + p_dec->fmt_out.i_codec = VLC_CODEC_S16N; break; case 24: - p_dec->fmt_out.i_codec = AOUT_FMT_S24_NE; + p_dec->fmt_out.i_codec = VLC_CODEC_S24N; break; default: msg_Dbg( p_dec, "strange bit/sample value: %d", @@ -1316,7 +1316,7 @@ static int OpenEncoder( vlc_object_t *p_this ) FLAC__stream_encoder_set_sample_rate( p_sys->p_flac, p_enc->fmt_in.audio.i_rate ); FLAC__stream_encoder_set_bits_per_sample( p_sys->p_flac, 16 ); - p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE; + p_enc->fmt_in.i_codec = VLC_CODEC_S16N; /* Get and store the STREAMINFO metadata block as a p_extra */ p_sys->p_chain = 0; diff --git a/modules/codec/quicktime.c b/modules/codec/quicktime.c index 0b9959bd9f..976c8c7202 100644 --- a/modules/codec/quicktime.c +++ b/modules/codec/quicktime.c @@ -486,7 +486,7 @@ static int OpenAudio( decoder_t *p_dec ) } - es_format_Init( &p_dec->fmt_out, AUDIO_ES, AOUT_FMT_S16_NE ); + es_format_Init( &p_dec->fmt_out, AUDIO_ES, VLC_CODEC_S16N ); p_dec->fmt_out.audio.i_rate = p_sys->OutputFormatInfo.sampleRate; p_dec->fmt_out.audio.i_channels = p_sys->OutputFormatInfo.numChannels; p_dec->fmt_out.audio.i_physical_channels = diff --git a/modules/codec/realaudio.c b/modules/codec/realaudio.c index af169aacab..b668b609fc 100644 --- a/modules/codec/realaudio.c +++ b/modules/codec/realaudio.c @@ -222,7 +222,7 @@ static int Open( vlc_object_t *p_this ) if( p_sys->win32_dll ) Close( p_this ); #endif - es_format_Init( &p_dec->fmt_out, AUDIO_ES, AOUT_FMT_S16_NE ); + es_format_Init( &p_dec->fmt_out, AUDIO_ES, VLC_CODEC_S16N ); p_dec->fmt_out.audio.i_rate = p_dec->fmt_in.audio.i_rate; p_dec->fmt_out.audio.i_channels = p_dec->fmt_in.audio.i_channels; p_dec->fmt_out.audio.i_bitspersample = diff --git a/modules/codec/speex.c b/modules/codec/speex.c index 1069f2d189..564a87c841 100644 --- a/modules/codec/speex.c +++ b/modules/codec/speex.c @@ -220,7 +220,7 @@ static int OpenDecoder( vlc_object_t *p_this ) /* Set output properties */ p_dec->fmt_out.i_cat = AUDIO_ES; - p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE; + p_dec->fmt_out.i_codec = VLC_CODEC_S16N; /* Set callbacks @@ -940,7 +940,7 @@ static int OpenEncoder( vlc_object_t *p_this ) return VLC_ENOMEM; p_enc->p_sys = p_sys; p_enc->pf_encode_audio = Encode; - p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE; + p_enc->fmt_in.i_codec = VLC_CODEC_S16N; p_enc->fmt_out.i_codec = VLC_CODEC_SPEEX; speex_init_header( &p_sys->header, p_enc->fmt_in.audio.i_rate, diff --git a/modules/codec/twolame.c b/modules/codec/twolame.c index 6f2caf4251..6a3f33e890 100644 --- a/modules/codec/twolame.c +++ b/modules/codec/twolame.c @@ -164,7 +164,7 @@ static int OpenEncoder( vlc_object_t *p_this ) p_enc->p_sys = p_sys; p_enc->pf_encode_audio = Encode; - p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE; + p_enc->fmt_in.i_codec = VLC_CODEC_S16N; p_enc->fmt_out.i_cat = AUDIO_ES; p_enc->fmt_out.i_codec = VLC_CODEC_MPGA; diff --git a/modules/gui/qnx/aout.c b/modules/gui/qnx/aout.c index 12fa0cc555..6c9a6d8c4d 100644 --- a/modules/gui/qnx/aout.c +++ b/modules/gui/qnx/aout.c @@ -141,7 +141,7 @@ int OpenAudio( vlc_object_t *p_this ) } pp.format.voices = i_nb_channels; - p_aout->output.output.i_format = AOUT_FMT_S16_NE; + p_aout->output.output.i_format = VLC_CODEC_S16N; p_aout->output.i_nb_samples = DEFAULT_FRAME_SIZE; pp.format.format = SND_PCM_SFMT_S16; i_bytes_per_sample = 2;