[vlc-devel] [PATCH 2/5] mediacodec: add hevc mimetype

John Stebbins stebbins at jetheaddev.com
Tue Oct 7 23:34:35 CEST 2014


Yes, there are implementations of mediacodec on some rk3288 platforms that work.  I've seen screen grabs of xbmc with
mediacodec working.  Just not my box.

You want that logcat with or without iomx enabled?  With it enabled, you should be able to see pretty much everything
you want since it will try (and fail) mediacodec first.  As I said earlier, I'm getting a SetParameter failure currently
with iomx.  I'm going to add more debug messages to see if I can narrow down the cause of that.

On 10/07/2014 02:27 PM, Thomas Guillem wrote:
> I sent the last VLC apk to someone with a rk32 tablet. He reported me
> that MediaCodec was working fine and was able to decode hevc.
>
> It's weird it doesn't work for you but I guess it depend on the fw that
> is still in development, no ?
>
> You can try with iomx, it can work too.
>
> Can you send me the full logcat when you try hevc ? (there are some
> omx/stagefright debug that can be useful)
>
>
> On Tue, Oct 7, 2014, at 23:13, John Stebbins wrote:
>> So, mediacodec fails silently because msg_Warn will not output anything
>> until the current exception is cleared.  Moving
>> the msg after clearing the exception allows me to see the error.  It is
>> failing during mediacodec::configure.  I
>> mentioned this in my first email.  I get the same mediacodec configure
>> failure on xbmc. Using libstagefright on xbmc works.
>>
>> This is why I wanted to try the lower level omx implementation.  Because
>> mediacodec on my platform appears to be borked
>> for hevc.
>>
>> From my first message:
>>
>> I tested such a patch on my Measy B4S and mediacodec fails during
>> configure.  I did some further research, downloaded android SDK sources
>> for another similar (rk3288) box and looked for
>> problems.  Turns out mediacodec is missing support in other places for
>> hevc.  Specifically, there is a hard coded list
>> of "roles" in one of the functions that doesn't include an hevc decoder
>> role. I see that you have fixed a similar issue
>> in VLCs OMX implementation.
>>
>> On 10/07/2014 01:50 PM, John Stebbins wrote:
>>> Here's a log of hevc playback with no local modifications to vlc.  So just your omx updates.  Mediacodec seems to decide
>>> on a decoder and then silently gives up and falls back to using avcodec.
>>>
>>> On 10/07/2014 10:16 AM, Thomas Guillem wrote:
>>>> Missing iomx is only a warning. It's normal after Android 4.3 since we
>>>> prefer to use MediaCodec.
>>>> You should give me the logs of MediaCodec failing, not iomx.
>>>>
>>>> On Tue, Oct 7, 2014 at 6:55 PM, John Stebbins <stebbins at jetheaddev.com> wrote:
>>>>> Ok, I discovered that libiomx-kk was disabled in the Makefile.  So enabling this gets me past the issue of missing
>>>>> libiomx.  It now finds the omx decoder, but fails during setup.  Log leading to error:
>>>>>
>>>>> 10-07 16:43:59.048 D/VLC     ( 5315): iomx decoder: component standard role set to video_decoder.hevc
>>>>> 10-07 16:43:59.048 D/VLC     ( 5315): iomx decoder: HwBuffer_Init
>>>>> 10-07 16:43:59.048 D/VLC     ( 5315): iomx decoder: direct output port enabled
>>>>> 10-07 16:43:59.048 D/VLC     ( 5315): iomx decoder: OMX_SetParameter failed (80001001 : OMX_ErrorUndefined)
>>>>> 10-07 16:43:59.048 D/VLC     ( 5315): iomx decoder: HwBuffer_Stop
>>>>> 10-07 16:43:59.048 D/VLC     ( 5315): iomx decoder: HwBuffer_Stop
>>>>> 10-07 16:43:59.048 D/VLC     ( 5315): iomx decoder: HwBuffer_FreeBuffers
>>>>> 10-07 16:43:59.058 D/VLC     ( 5315): iomx decoder: no component could be initialised
>>>>>
>>>>> After the error, it falls back to avcodec. I'll add some more logging to narrow down exactly where this is happening later.
>>>>>
>>>>> On 10/06/2014 05:56 PM, John Stebbins wrote:
>>>>>> So, it doesn't work on rk3288 out of the box.  And even after some ugly hacks, I'm getting video with green lines
>>>>>> through it and the image repeated 5 times and squished horizontally.  Not sure what that's all about.
>>>>>>
>>>>>> Attaching diff to show ugly hacks and logs just in case you have some ideas what the distorted video might be.
>>>>>>
>>>>>> To summarize the hacks, I had to remove the USE_IOMX define because my box does not have libiomx.so.  Then, my box does
>>>>>> have libOMX_Core.so. but all the symbols are prefixed with "RK".  So I had to modify the dlsym calls.  The rest is just
>>>>>> debug messages so I can see what's happening.
>>>>>>
>>>>>> On 10/03/2014 10:39 AM, Thomas Guillem wrote:
>>>>>>> Ah yes, I'm curious to know if my patches work on rk32.
>>>>>>>
>>>>>>> On Fri, Oct 3, 2014 at 7:29 PM, John Stebbins <stebbins at jetheaddev.com> wrote:
>>>>>>>> Ok.  I'll test to see if your OMX changes work on my box.  I think they should since I was able to make stagefright
>>>>>>>> playback in xbmc work.  The Measy is built on the rk3288 SoC.  There are a lot of very cheap (< $100) android players
>>>>>>>> based on this SoC becoming available now.
>>>>>>>>
>>>>>>>> On 10/03/2014 10:05 AM, Thomas Guillem wrote:
>>>>>>>>> I tested it only on a Nvidia Shield tablet (Tegra K1). It run fine
>>>>>>>>> (with the others patches).
>>>>>>>>>
>>>>>>>>> VLC use the MediaCodec API from JAVA, it's the public API from
>>>>>>>>> android-sdk that don't change for one manufacturer.
>>>>>>>>> But all manufacturers can modify the private native API
>>>>>>>>> (MediaCodec.cpp and co), so that where they add support for extra
>>>>>>>>> codecs..
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Fri, Oct 3, 2014 at 6:47 PM, John Stebbins <stebbins at jetheaddev.com> wrote:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> Do you have an android box that this works on?  I tested such a patch on my Measy B4S and mediacodec fails during
>>>>>>>>>> configure.  I did some further research, downloaded android SDK sources for another similar box and looked for
>>>>>>>>>> problems.  Turns out mediacodec is missing support in other places for hevc.  Specifically, there is a hard coded list
>>>>>>>>>> of "roles" in one of the functions that doesn't include an hevc decoder role. I see that you have fixed a similar issue
>>>>>>>>>> in VLCs OMX implementation.
>>>>>>>>>>
>>>>>>>>>> I've seen reports that some manufacturers have made hevc mediacodec decode working, so I think some are distributing
>>>>>>>>>> with modified SDK. Do you have one of these, if so which?
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> John      GnuPG fingerprint: D0EC B3DB C372 D1F1 0B01  83F0 49F1 D7B2 60D4 D0F7
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> vlc-devel mailing list
>>>>>>>>>> To unsubscribe or modify your subscription options:
>>>>>>>>>> https://mailman.videolan.org/listinfo/vlc-devel
>>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> vlc-devel mailing list
>>>>>>>>> To unsubscribe or modify your subscription options:
>>>>>>>>> https://mailman.videolan.org/listinfo/vlc-devel
>>>>>>>> --
>>>>>>>> John      GnuPG fingerprint: D0EC B3DB C372 D1F1 0B01  83F0 49F1 D7B2 60D4 D0F7
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> vlc-devel mailing list
>>>>>>>> To unsubscribe or modify your subscription options:
>>>>>>>> https://mailman.videolan.org/listinfo/vlc-devel
>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> vlc-devel mailing list
>>>>>>> To unsubscribe or modify your subscription options:
>>>>>>> https://mailman.videolan.org/listinfo/vlc-devel
>>>>> --
>>>>> John      GnuPG fingerprint: D0EC B3DB C372 D1F1 0B01  83F0 49F1 D7B2 60D4 D0F7
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> vlc-devel mailing list
>>>>> To unsubscribe or modify your subscription options:
>>>>> https://mailman.videolan.org/listinfo/vlc-devel
>>>>>
>>>> _______________________________________________
>>>> vlc-devel mailing list
>>>> To unsubscribe or modify your subscription options:
>>>> https://mailman.videolan.org/listinfo/vlc-devel
>> -- 
>> John      GnuPG fingerprint: D0EC B3DB C372 D1F1 0B01  83F0 49F1 D7B2
>> 60D4 D0F7
>>
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>> Email had 1 attachment:
>> + signature.asc
>>   1k (application/pgp-signature)
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

-- 
John      GnuPG fingerprint: D0EC B3DB C372 D1F1 0B01  83F0 49F1 D7B2 60D4 D0F7


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20141007/d339b8f7/attachment.sig>


More information about the vlc-devel mailing list