GNOME Bugzilla – Bug 766289
amc: cannot play some files on android
Last modified: 2016-05-12 14:26:36 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
File too big for bugzilla, uploaded there: https://people.collabora.com/~xclaesse/linked/100632_20160511_172707826.mkv
Note: If I remove androidmedia from my build, and add libav instead, it plays fine on android.
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?
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?
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.
Attachment 327663 [details] pushed as 00d961a - amcaudiodec: Set layout=interleaved in raw audio caps
(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?
I confirm the patch fix the problem for me. Thanks.