GNOME Bugzilla – Bug 706957
avdtpsrc: Support for AAC
Last modified: 2013-09-18 16:49:01 UTC
Created attachment 253346 [details] [review] Patch for AAC in bluez avdtp source The attached patch enables AAC in bluez avdtpsrc. For testing, I used an Apple iPad. To play the stream, one needs to decode the LATM header and pass the raw stream to avdec_aac. There is no additional header like ADTS in the data encapsulated in LATM.
Review of attachment 253346 [details] [review]: ::: sys/bluez/a2dp-codecs.h @@ +110,3 @@ + +#define AAC_CHANNELS_1 0x02 +#define AAC_CHANNELS_2 0x01 Seriously? Not more than 2 channels are supported? @@ +126,1 @@ } __attribute__ ((packed)) a2dp_sbc_t; Please don't run gst-indent on headers ::: sys/bluez/gstavdtputil.c @@ +634,3 @@ + + structure = gst_structure_new_empty ("audio/mpeg"); + value = g_new0 (GValue, 1); Allocate that on the stack: GValue value = G_VALUE_INIT; g_value_init (&value, G_TYPE_INT); @@ +661,3 @@ + + /* base-profile */ + list = g_value_init (g_new0 (GValue, 1), GST_TYPE_LIST); Also allocate on the stack @@ +685,3 @@ + + /* rate */ + list = g_value_init (g_new0 (GValue, 1), GST_TYPE_LIST); And this
Created attachment 253371 [details] [review] Reworked patch
Yes, only 2 channels are supported. See A2DP spec, section 4.5.2.3 I implemented the requested changes, reworked patch is attached.
commit 5a82dc90283b4d60fabbb80509137fabbec0dcaa Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Thu Aug 29 10:20:56 2013 +0200 avdtputil: Some minor cleanup and leak fixes commit 597e3cc98d13ebc8ec195a9745bd2c4b36e1bd29 Author: Bernhard Miller <bernhard.miller@streamunlimited.com> Date: Wed Aug 28 14:26:04 2013 +0200 bluez: support aac in avdtpsrc Signed-off-by: Bernhard Miller <bernhard.miller@streamunlimited.com>