GNOME Bugzilla – Bug 762792
amcvideodec: Can't render to Surface if the color format is not supported
Last modified: 2016-02-28 09:13:03 UTC
Hi All, I am trying to play a video on android sdk version 1.7.2 since its release but failed. Same code is working on earlier release (tested on 1.6.3) with same device. Please find below the media and hardware details: Media file details: Video: (Video is SBS Left/Right. Although normal videos also shows same behaviour) Codec: H264 - MPEG-4 AVC Resolution: 640x482 Display Resolution: 640x480 Frame Rate: 23.9760 Audio: Codec: MPEG AAC Channels: Stereo Sample rate: 44100 Hz Hardware Details: Phone: Samsung Galaxy S4 Model: GT-I9500 Android Version: 5.0.1 Kernel Version: 3.4.5-6186146 sysCheck Hardware Details: Family: Arm Processor: Armv7l Cpu Count: 4 Neon: Second generation. Code snippet I used to play the video: Attaching Gst logs and sample media file I tried to play.
Created attachment 322551 [details] Gstreamer Log
It's one of the first two "goto format_error" here: https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/sys/androidmedia/gstamcvideodec.c?id=c65b0e3a574d59766b172950eec8ed5edd297a6a#n1249 Basically this means that something is really wrong with the codec here, not sure why it would've worked before :)
There must be some output missing here, the only ways how it could get into this situation would print another GST_ERROR or a g_critical(). Maybe "adb logcat" was overloaded and data was dropped because of that. Can you get another log with *:3,amc*:6 ?
Created attachment 322563 [details] GstLog "*:3,amc*:6" Hi, Attached log of "*:3,amc*:6". Thanks Barun Kr. Singh
Problem is that your decoder reports that it wants to use COLOR_OMX_SEC_FormatNV12Tiled = 0x7fc00002, which we don't support. Not sure how this would've worked in 1.6.3, should check what it decided to use there. There should be a bug about supporting this one already, which is the same as V4L2_PIX_FMT_NV12MT_16X16, but I can't find it right now.
Created attachment 322569 [details] [review] amcvideodec: When outputting on a surface, accept all color formats We don't have to understand them, we handle them as a GL texture.
This patch should fix it (might not compile, but if it doesn't there's just a missing semicolon or similar), can you try if it helps for you?
Review of attachment 322569 [details] [review]: Makes sense.
Let's get it in then :) commit 476d5b6940e275a1dbc536aa66ba102534a77d18 Author: Sebastian Dröge <sebastian@centricular.com> Date: Sun Feb 28 10:12:01 2016 +0200 amcvideodec: When outputting on a surface, accept all color formats We don't have to understand them, we handle them as a GL texture. https://bugzilla.gnome.org/show_bug.cgi?id=762792 Attachment 322569 [details] pushed as 476d5b6 - amcvideodec: When outputting on a surface, accept all color formats