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 766289 - amc: cannot play some files on android
amc: cannot play some files on android
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.8.1
Other Linux
: Normal normal
: 1.8.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-11 19:54 UTC by Xavier Claessens
Modified: 2016-05-12 14:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
amcaudiodec: Set layout=interleaved in raw audio caps (1.14 KB, patch)
2016-05-11 20:49 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Xavier Claessens 2016-05-11 19:54:18 UTC
The attached video plays fine with GStreamer on linux and windows, but not on android.

Here are logs from android:
V/GStreamer+audiodecoder(26572): 0:00:01.307309628 0xb9166660 gstaudiodecoder.c:1972:gst_audio_decoder_negotiate_default_caps:<amcaudiodec-omxgoogleaacdecoder0> peer caps  audio/x-raw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], format=(string)S16LE
D/GStreamer+audio-info(26572): 0:00:01.307614832 0xb9166660 audio-info.c:208:gst_audio_info_from_caps parsing caps audio/x-raw, rate=(int)16000, channels=(int)1, format=(string)S16LE
E/GStreamer+audio-info(26572): 0:00:01.307706393 0xb9166660 audio-info.c:284:gst_audio_info_from_caps no layout given
W/GStreamer+audiodecoder(26572): 0:00:01.307828474 0xb9166660 gstaudiodecoder.c:2057:gst_audio_decoder_handle_gap:<amcaudiodec-omxgoogleaacdecoder0> error: Decoder output not negotiated before GAP event.


On linux, caps are different:
0:00:00.220433436 22840 0x7ff758034450 DEBUG           audiodecoder gstaudiodecoder.c:643:gst_audio_decoder_negotiate_default:<avdec_aac0> setting src caps audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)16000, channels=(int)1
Comment 1 Xavier Claessens 2016-05-11 19:55:55 UTC
File too big for bugzilla, uploaded there: https://people.collabora.com/~xclaesse/linked/100632_20160511_172707826.mkv
Comment 2 Xavier Claessens 2016-05-11 19:56:33 UTC
Note: If I remove androidmedia from my build, and add libav instead, it plays fine on android.
Comment 3 Xavier Claessens 2016-05-11 20:06:09 UTC
From the little I understand, since there is only 1 channel, it doesn't make sense to add layout=interleaved in caps, and gst_audio_info_from_caps() really wants the layout. Maybe the fix is to just assume interleaved if it has no layout?
Comment 4 Olivier Crête 2016-05-11 20:32:47 UTC
AMC software elements should probably be demoted to be lower than libav/etc if it is part of the applicaion bundle, maybe change their rank to SECONDARY-1 or something? Maybe even to MARGINAL?
Comment 5 Sebastian Dröge (slomo) 2016-05-11 20:49:01 UTC
Created attachment 327663 [details] [review]
amcaudiodec: Set layout=interleaved in raw audio caps

Otherwise the GAP event fallback negotiation will fail to produce complete
srcpad caps, and thus fail.
Comment 6 Sebastian Dröge (slomo) 2016-05-11 20:49:52 UTC
Attachment 327663 [details] pushed as 00d961a - amcaudiodec: Set layout=interleaved in raw audio caps
Comment 7 Sebastian Dröge (slomo) 2016-05-11 20:50:34 UTC
(In reply to Olivier Crête from comment #4)
> AMC software elements should probably be demoted to be lower than libav/etc
> if it is part of the applicaion bundle, maybe change their rank to
> SECONDARY-1 or something? Maybe even to MARGINAL?

I guess so, yes. Can you file a new bug about that?
Comment 8 Xavier Claessens 2016-05-12 14:26:36 UTC
I confirm the patch fix the problem for me. Thanks.