Commit df7e8cf9 authored by Alex Converse's avatar Alex Converse Committed by Jean-Baptiste Kempf

Add support for MPEG-4 ALS to the MP4 demuxer and FFmpeg wrapper.

MPEG-4 ALS is a pure losses audio codec from MPEG. Like other MPEG-4
Audio variants it's muxed into the MP4 container with Object Type
Indication 0x40 followed by its Audio Object Type (36).

Sample:
http://streams.videolan.org/Mpeg_Conformance/ftp.iis.fhg.de/mpeg4audio-conformance/compressedMp4/als_00_2ch48k16b.mp4Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 9f72dd7f
...@@ -194,6 +194,7 @@ ...@@ -194,6 +194,7 @@
/* Audio codec */ /* Audio codec */
#define VLC_CODEC_MPGA VLC_FOURCC('m','p','g','a') #define VLC_CODEC_MPGA VLC_FOURCC('m','p','g','a')
#define VLC_CODEC_MP4A VLC_FOURCC('m','p','4','a') #define VLC_CODEC_MP4A VLC_FOURCC('m','p','4','a')
#define VLC_CODEC_ALS VLC_FOURCC('a','l','s',' ')
#define VLC_CODEC_A52 VLC_FOURCC('a','5','2',' ') #define VLC_CODEC_A52 VLC_FOURCC('a','5','2',' ')
#define VLC_CODEC_EAC3 VLC_FOURCC('e','a','c','3') #define VLC_CODEC_EAC3 VLC_FOURCC('e','a','c','3')
#define VLC_CODEC_DTS VLC_FOURCC('d','t','s',' ') #define VLC_CODEC_DTS VLC_FOURCC('d','t','s',' ')
......
...@@ -296,6 +296,7 @@ static const struct ...@@ -296,6 +296,7 @@ static const struct
{ VLC_CODEC_MPGA, CODEC_ID_MP3, AUDIO_ES }, { VLC_CODEC_MPGA, CODEC_ID_MP3, AUDIO_ES },
{ VLC_CODEC_MP4A, CODEC_ID_AAC, AUDIO_ES }, { VLC_CODEC_MP4A, CODEC_ID_AAC, AUDIO_ES },
{ VLC_CODEC_ALS, CODEC_ID_MP4ALS, AUDIO_ES },
{ VLC_CODEC_INTERPLAY_DPCM, CODEC_ID_INTERPLAY_DPCM, AUDIO_ES }, { VLC_CODEC_INTERPLAY_DPCM, CODEC_ID_INTERPLAY_DPCM, AUDIO_ES },
......
...@@ -1727,6 +1727,12 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track, ...@@ -1727,6 +1727,12 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
break; break;
case( 0x40): case( 0x40):
p_track->fmt.i_codec = VLC_FOURCC( 'm','p','4','a' ); p_track->fmt.i_codec = VLC_FOURCC( 'm','p','4','a' );
if( p_decconfig->i_decoder_specific_info_len >= 2 &&
p_decconfig->p_decoder_specific_info[0] == 0xF8 &&
(p_decconfig->p_decoder_specific_info[1]&0xE0) == 0x80 )
{
p_track->fmt.i_codec = VLC_CODEC_ALS;
}
break; break;
case( 0x60): case( 0x60):
case( 0x61): case( 0x61):
......
...@@ -875,6 +875,10 @@ static const entry_t p_list_audio[] = { ...@@ -875,6 +875,10 @@ static const entry_t p_list_audio[] = {
A("mp4a"), A("mp4a"),
A("aac "), A("aac "),
/* ALS audio */
B(VLC_CODEC_ALS, "MPEG-4 Audio Lossless (ALS)"),
A("als "),
/* 4X Technologies */ /* 4X Technologies */
B(VLC_CODEC_ADPCM_4XM, "4X Technologies Audio"), B(VLC_CODEC_ADPCM_4XM, "4X Technologies Audio"),
A("4xma"), A("4xma"),
......
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