[PATCH] Add AAC LATM support from FFmpeg 0.7+

View: New views
1 Messages — Rating Filter:   Alert me  

[PATCH] Add AAC LATM support from FFmpeg 0.7+

by Chris Rankin :: Rate this Message:

| View Threaded | Show Only this Message

Hi,

I've now tested this patch on Fedora 15 (FFmpeg 0.7) and Fedora 14 (FFmpeg 0.6),
and am happy to report that it works fine on F15 and doesn't break xine-lib on
F14. On F14, it also has the happy side effect of no longer trying to decode an
LATM AAC stream with the xineplug_decode_faad.so plugin. (Which was something
which never ended well anyway.)

The patch is against 1.1.19, of course, seeing as that is the latest version of
xine actually released into the wild.

Cheers,
Chris


[LATM.diff]

diff -r e3901e27ffdf src/combined/ffmpeg/xine_audio.list
--- a/src/combined/ffmpeg/xine_audio.list Mon Aug 22 11:51:20 2011 +0200
+++ b/src/combined/ffmpeg/xine_audio.list Sun Aug 28 23:43:41 2011 +0100
@@ -42,6 +42,7 @@
 AMR_NB AMR_NB AMR narrow band
 AMR_WB AMR_WB AMR wide band
 EAC3 EAC3 E-AC-3
+AAC_LATM AAC_LATM AAC LATM
 
 # disabled codecs (ref. configure.ac)
 ! AAC
diff -r e3901e27ffdf src/demuxers/demux_ts.c
--- a/src/demuxers/demux_ts.c Mon Aug 22 11:51:20 2011 +0200
+++ b/src/demuxers/demux_ts.c Sun Aug 28 23:47:18 2011 +0100
@@ -921,10 +920,13 @@
       m->type      |= BUF_AUDIO_MPEG;
       break;
     case  ISO_13818_PART7_AUDIO:
-    case  ISO_14496_PART3_AUDIO:
       lprintf ("demux_ts: found AAC audio track.\n");
       m->type      |= BUF_AUDIO_AAC;
       break;
+    case  ISO_14496_PART3_AUDIO:
+      lprintf ("demux_ts: found AAC LATM audio track.\n");
+      m->type      |= BUF_AUDIO_AAC_LATM;
+      break;
     default:
       lprintf ("demux_ts: unknown audio type: %d, defaulting to MPEG.\n", m->descriptor_tag);
       m->type      |= BUF_AUDIO_MPEG;
diff -r e3901e27ffdf configure.ac
--- a/configure.ac Mon Aug 22 11:51:20 2011 +0200
+++ b/configure.ac Sun Aug 28 23:52:36 2011 +0100
@@ -412,7 +412,7 @@
 done
 
 dnl popular ffmpeg codecs
-ffmpeg_popular_codecs="CINEPAK FLASHSV H261 H263 H263I H264 INDEO2 INDEO3 MJPEG MJPEGB MPEG1VIDEO MPEG2VIDEO MPEG4 MPEGVIDEO MSMPEG4V1 MSMPEG4V2 MSMPEG4V3 MSRLE MSVIDEO1 QTRLE RV10 RV20 SVQ1 SVQ3 VC1 VP3 VP5 VP6 VP6F WMV1 WMV2 WMV3 COOK DTS EAC3 FLAC MP2 MP3 QDM2 RA_144 RA_288 WAVPACK WMAV1 WMAV2 WMAPRO ADPCM_SWF"
+ffmpeg_popular_codecs="CINEPAK FLASHSV H261 H263 H263I H264 INDEO2 INDEO3 MJPEG MJPEGB MPEG1VIDEO MPEG2VIDEO MPEG4 MPEGVIDEO MSMPEG4V1 MSMPEG4V2 MSMPEG4V3 MSRLE MSVIDEO1 QTRLE RV10 RV20 SVQ1 SVQ3 VC1 VP3 VP5 VP6 VP6F WMV1 WMV2 WMV3 COOK DTS EAC3 AAC_LATM FLAC MP2 MP3 QDM2 RA_144 RA_288 WAVPACK WMAV1 WMAV2 WMAPRO ADPCM_SWF"
 
 for ucname in $ffmpeg_popular_codecs; do
   config_name="CONFIG_${ucname}_DECODER"
diff -r e3901e27ffdf src/xine-engine/buffer.h
--- a/src/xine-engine/buffer.h Mon Aug 22 11:51:20 2011 +0200
+++ b/src/xine-engine/buffer.h Mon Aug 29 09:01:52 2011 +0100
@@ -262,6 +262,7 @@
 #define BUF_AUDIO_AMR_NB 0x033F0000
 #define BUF_AUDIO_AMR_WB 0x03400000
 #define BUF_AUDIO_EAC3 0x03410000
+#define BUF_AUDIO_AAC_LATM 0x03420000
 
 /* spu buffer types:    */
 
diff -r e3901e27ffdf src/xine-engine/buffer_types.c
--- a/src/xine-engine/buffer_types.c Mon Aug 22 11:51:20 2011 +0200
+++ b/src/xine-engine/buffer_types.c Mon Aug 29 09:01:58 2011 +0100
@@ -1192,6 +1192,14 @@
   BUF_AUDIO_EAC3,
   "E-AC-3"
 },
+{
+  {
+    ME_FOURCC('M', 'P', '4', 'L'),
+    0
+  },
+  BUF_AUDIO_AAC_LATM,
+  "AAC LATM"
+},
 { { 0 }, 0, "last entry" }
 };
 


------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
xine-devel mailing list
xine-devel@...
https://lists.sourceforge.net/lists/listinfo/xine-devel