Commit b20696d8 authored by Gildas Bazin's avatar Gildas Bazin

* modules/demux/mp4, modules/codec/ffmpeg: support for Apple Lossless Audio Codec.

parent e08602a8
...@@ -873,6 +873,12 @@ static struct ...@@ -873,6 +873,12 @@ static struct
AUDIO_ES, "AMR wide band" }, AUDIO_ES, "AMR wide band" },
#endif #endif
#if LIBAVCODEC_BUILD >= 4745
/* ALAC */
{ VLC_FOURCC('a','l','a','c'), CODEC_ID_ALAC,
AUDIO_ES, "Apple Lossless Audio Codec" },
#endif
/* PCM */ /* PCM */
{ VLC_FOURCC('s','8',' ',' '), CODEC_ID_PCM_S8, { VLC_FOURCC('s','8',' ',' '), CODEC_ID_PCM_S8,
AUDIO_ES, "PCM S8" }, AUDIO_ES, "PCM S8" },
......
...@@ -1138,7 +1138,19 @@ static int MP4_ReadBox_sample_soun( stream_t *p_stream, MP4_Box_t *p_box ) ...@@ -1138,7 +1138,19 @@ static int MP4_ReadBox_sample_soun( stream_t *p_stream, MP4_Box_t *p_box )
p_box->data.p_sample_soun->i_channelcount = 1; p_box->data.p_sample_soun->i_channelcount = 1;
} }
if( p_box->i_type == FOURCC_alac )
{
if( p_box->data.p_sample_soun->p_qt_description )
free( p_box->data.p_sample_soun->p_qt_description );
p_box->data.p_sample_soun->p_qt_description = malloc( i_read );
p_box->data.p_sample_soun->i_qt_description = i_read;
memcpy( p_box->data.p_sample_soun->p_qt_description, p_peek, i_read );
}
else
{
MP4_ReadBoxContainerRaw( p_stream, p_box ); /* esds */ MP4_ReadBoxContainerRaw( p_stream, p_box ); /* esds */
}
#ifdef MP4_VERBOSE #ifdef MP4_VERBOSE
msg_Dbg( p_stream, "read box: \"soun\" in stsd channel %d " msg_Dbg( p_stream, "read box: \"soun\" in stsd channel %d "
...@@ -2137,6 +2149,7 @@ static struct ...@@ -2137,6 +2149,7 @@ static struct
{ FOURCC_samr, MP4_ReadBox_sample_soun, MP4_FreeBox_sample_soun }, { FOURCC_samr, MP4_ReadBox_sample_soun, MP4_FreeBox_sample_soun },
{ FOURCC_sawb, MP4_ReadBox_sample_soun, MP4_FreeBox_sample_soun }, { FOURCC_sawb, MP4_ReadBox_sample_soun, MP4_FreeBox_sample_soun },
{ FOURCC_OggS, MP4_ReadBox_sample_soun, MP4_FreeBox_sample_soun }, { FOURCC_OggS, MP4_ReadBox_sample_soun, MP4_FreeBox_sample_soun },
{ FOURCC_alac, MP4_ReadBox_sample_soun, MP4_FreeBox_sample_soun },
{ FOURCC_vide, MP4_ReadBox_sample_vide, MP4_FreeBox_sample_vide }, { FOURCC_vide, MP4_ReadBox_sample_vide, MP4_FreeBox_sample_vide },
{ FOURCC_mp4v, MP4_ReadBox_sample_vide, MP4_FreeBox_sample_vide }, { FOURCC_mp4v, MP4_ReadBox_sample_vide, MP4_FreeBox_sample_vide },
......
...@@ -112,6 +112,7 @@ ...@@ -112,6 +112,7 @@
#define FOURCC_samr VLC_FOURCC( 's', 'a', 'm', 'r' ) #define FOURCC_samr VLC_FOURCC( 's', 'a', 'm', 'r' )
#define FOURCC_sawb VLC_FOURCC( 's', 'a', 'w', 'b' ) #define FOURCC_sawb VLC_FOURCC( 's', 'a', 'w', 'b' )
#define FOURCC_OggS VLC_FOURCC( 'O', 'g', 'g', 'S' ) #define FOURCC_OggS VLC_FOURCC( 'O', 'g', 'g', 'S' )
#define FOURCC_alac VLC_FOURCC( 'a', 'l', 'a', 'c' )
#define FOURCC_zlib VLC_FOURCC( 'z', 'l', 'i', 'b' ) #define FOURCC_zlib VLC_FOURCC( 'z', 'l', 'i', 'b' )
#define FOURCC_SVQ1 VLC_FOURCC( 'S', 'V', 'Q', '1' ) #define FOURCC_SVQ1 VLC_FOURCC( 'S', 'V', 'Q', '1' )
......
...@@ -1381,6 +1381,7 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track, ...@@ -1381,6 +1381,7 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
case VLC_FOURCC( 'Q', 'D', 'M', '2' ): case VLC_FOURCC( 'Q', 'D', 'M', '2' ):
case VLC_FOURCC( 'Q', 'c', 'l', 'p' ): case VLC_FOURCC( 'Q', 'c', 'l', 'p' ):
case VLC_FOURCC( 's', 'a', 'm', 'r' ): case VLC_FOURCC( 's', 'a', 'm', 'r' ):
case VLC_FOURCC( 'a', 'l', 'a', 'c' ):
p_track->fmt.i_extra = p_track->fmt.i_extra =
p_sample->data.p_sample_soun->i_qt_description; p_sample->data.p_sample_soun->i_qt_description;
if( p_track->fmt.i_extra > 0 ) if( p_track->fmt.i_extra > 0 )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment