After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 706957 - avdtpsrc: Support for AAC
avdtpsrc: Support for AAC
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: 1.1.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-08-28 06:58 UTC by Bernhard Miller
Modified: 2013-09-18 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for AAC in bluez avdtp source (12.33 KB, patch)
2013-08-28 06:58 UTC, Bernhard Miller
needs-work Details | Review
Reworked patch (10.68 KB, patch)
2013-08-28 12:32 UTC, Bernhard Miller
committed Details | Review

Description Bernhard Miller 2013-08-28 06:58:36 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.
Comment 1 Sebastian Dröge (slomo) 2013-08-28 09:10:16 UTC
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
Comment 2 Bernhard Miller 2013-08-28 12:32:04 UTC
Created attachment 253371 [details] [review]
Reworked patch
Comment 3 Bernhard Miller 2013-08-28 12:33:03 UTC
Yes, only 2 channels are supported. See A2DP spec, section 4.5.2.3

I implemented the requested changes, reworked patch is attached.
Comment 4 Sebastian Dröge (slomo) 2013-08-29 08:21:57 UTC
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>