Enable use of hardware H.264/AAC/MP3 decoders in Android libstagefright omx plugin for HC

RESOLVED FIXED in Firefox 20

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: mreavy, Assigned: cajbir)

Tracking

unspecified
mozilla20
ARM
Android
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox20 fixed)

Details

Attachments

(3 attachments, 2 obsolete attachments)

(Reporter)

Description

6 years ago
Bug 782508 added support for the hardware decoders accessible via libstagefright for Android ICS/JB.  Bug 787228 adds hardware decoding support for GB (Gingerbread).  This adds hardware decoding support for HC (Honeycomb).
(Reporter)

Comment 1

6 years ago
What would be a good HC device for Chris Double to use in his testing?
(Assignee)

Comment 2

6 years ago
Whatever device you provide for testing is probably the only one that will work. AFAIK there's no official HC source release so there's no telling what stagefright libraries are on them.
(Reporter)

Comment 3

6 years ago
(In reply to Chris Double (:doublec) from comment #2)
> Whatever device you provide for testing is probably the only one that will
> work. AFAIK there's no official HC source release so there's no telling what
> stagefright libraries are on them.

Google never officially released any of the 3.x software, but all the 3.x software was released as part of 4.0.  The kicker is that there aren't any tags that would allow one to pull out a specific Honeycomb release: http://arstechnica.com/gadgets/2011/11/google-makes-android-4-source-code-available/ 

Questions for the Android folks: Is there a specific list of HC devices that we care about?  How big is it?  Does Chris Double need to do a custom solution for every HC device we want to add to the whitelist, or is there another way?
(Assignee)

Comment 4

6 years ago
It's possible the work for one device will work on others of course. My comment was geared towards making sure whatever device you send to me is a device you need to work in the field vs some random device that just happens to run honeycomb that you don't otherwise care about. This will make sure that at least one important device is supported.
The Samsung Galaxy Tab and Asus Transformer were two popular honeycomb tablets. If you can find one that hasn't been updated.

I upgraded mine without making a backup, but e.g. the vidyo tablet in Wreck at the Vancouver office is running 3.2.
(Reporter)

Comment 6

6 years ago
(In reply to Ralph Giles (:rillian) from comment #5)
> The Samsung Galaxy Tab and Asus Transformer were two popular honeycomb
> tablets. If you can find one that hasn't been updated.

blassey, cpeterson-- Can we get one of those (with HC installed) shipped to doublec in NZ?
Can I just file a request with mozilla.service-now.com like I did for the GB device?  Would you be happy with either of those as our first supported HC device?  Thanks.
Both the Asus Transformer (Prime) and Galaxy Tab are available on Service Now. You should be able to just order them there:

https://mozilla.service-now.com/catalog_home.do?sysparm_view=tablets
I'm fairly sure the Prime shipped ICS.
(Reporter)

Comment 9

6 years ago
(In reply to Chris Peterson (:cpeterson) from comment #7)
> Both the Asus Transformer (Prime) and Galaxy Tab are available on Service
> Now. You should be able to just order them there:
> 
> https://mozilla.service-now.com/catalog_home.do?sysparm_view=tablets

I followed that link and 3 tablets are shown as available for shipment:
ASUS Transformer Prime
Google Nexus 7
Samsung Galaxy Tab2 

All of them ship with ICS or JB -- none with HC.  So, what HC device should we target as our first device to get working (it needs to be one that we can ship to Chris Double)?
It may require going to Ebay or similar to get a Honeycomb device.
We have a Galaxy Tab 10.1 (GT-P7510) in Toronto running 3.1 that will be shipped over to YVR for the work week, for Chris Double or Roc. Asset Tag # 05460
(Reporter)

Comment 12

6 years ago
roc, doublec -- The easiest way to get a HC device to you guys in NZ is to ship it to Vancouver for the Media work week and then have one of you hand carry it home.  Can one of you hand carry it to NZ?  Assuming of course you don't get it working in Vancouver. :-)
(In reply to Ralph Giles (:rillian) from comment #5)
> The Samsung Galaxy Tab and Asus Transformer were two popular honeycomb
> tablets. If you can find one that hasn't been updated.
> 
> I upgraded mine without making a backup, but e.g. the vidyo tablet in Wreck
> at the Vancouver office is running 3.2.

XDA will more than likely have a community thread with stock images for the exact model
(Reporter)

Comment 15

6 years ago
We found a second Galaxy Tab 10.1 running Honeycomb (version 3.2) and Rob (roc) now has it.  Rob is bringing it to the Media work week in Vancouver.  

So I think we now have 3 Galaxy Tab 10.1 (one running 3.1 and two running 3.2) for development and QA.
(Assignee)

Comment 16

6 years ago
I've done some preliminary investigation on the HC 3.2 tablet. Once again using our own derived DataSource causes crashes but using the DataSource provided by DataSource::CreateFromURI playback works.

I'm investigating what the differences are.
(Assignee)

Comment 17

6 years ago
Playback is working on Honeycomb 3.2 now with some minor changes to the Gingerbread support. The commit id from the Android source that I based the changes to DataSource from is c2dc4729e3c88d733c0aa6d9a9af6101b2f09e35:

commit c2dc4729e3c88d733c0aa6d9a9af6101b2f09e35
Author: Gloria Wang <gwang@google.com>
Date:   Mon Feb 7 11:41:11 2011 -0800

    - Do not use global DrmManagerClient
    - Release the DrmManagerClient and DecryptHandle in DataSource
    Fix for bug 3429811
    
    Change-Id: I549f72b75225751877eb0e630ce8098f8ec6316f

commit b1262a8b1dd23abad64465f9ffd25c44facdf4d2
Author: James Dong <jdong@google.com>
Date:   Tue Nov 16 14:04:54 2010 -0800

    64-bit file size/offset support for media framework
    
    Change-Id: I3452bc2c0f1d990cc67285df2fce1f9f86ff8e10


This was identified based on inspection of the DataSource changes in the commits and comparing against the unmangled C++ method names in libstagefright.so on the device.
doublec, so DataSource uses off64_t in Honeycomb and later, but 32-bit off_t in Gingerbread and earlier?
(Assignee)

Comment 19

6 years ago
cpeterson, off64_t in 2.3.6 and later. off_t in 2.3.4 and less. Not sure about 2.3.5 haven't checked or seen a device with it.
FYI, my Galaxy Note has 2.3.5 and it looks like its libstagefright.so uses a 32-bit off_t:

  android::FileSource::readAt(long offset, void *data, size_t size)
(Reporter)

Comment 21

6 years ago
So it sounds like we have decoding working on 2.3.6 and later?  Does decoding work yet on versions 2.3.5 and earlier?
(Assignee)

Comment 22

6 years ago
(In reply to Maire Reavy [:mreavy] from comment #21)
> So it sounds like we have decoding working on 2.3.6 and later?  Does
> decoding work yet on versions 2.3.5 and earlier?

I don't have decoding working consistently on GB yet (2.3.x).
(Assignee)

Comment 23

6 years ago
Created attachment 681253 [details] [diff] [review]
work in progress patch

This patch applied to mozilla-central gives support for libstagefright decoding on honeycomb devices. It includes current work in progress patches for gingerbread. I'll continue trying to get GB working and clean the code up for review over the next day or two.

To test you'll need to set the pref stagefright.force-enabled to true.
Assignee: nobody → chris.double
Status: NEW → ASSIGNED
(Assignee)

Comment 24

6 years ago
Created attachment 685478 [details] [diff] [review]
Part1: omx plugin changes for Honeycomb support

Requires bug 787228 patches to be applied first.
Attachment #681253 - Attachment is obsolete: true
Attachment #685478 - Flags: review?(cpeterson)
(Assignee)

Comment 25

6 years ago
Created attachment 685479 [details] [diff] [review]
Part2: Package honeycomb libomxplugin libraries on Android
Attachment #685479 - Flags: review?(mark.finkle)
(Assignee)

Comment 26

6 years ago
Created attachment 685480 [details] [diff] [review]
Part3: Build changes for honeycomb libomxplugin libraries on Android
Attachment #685480 - Flags: review?(khuey)
(Assignee)

Updated

6 years ago
Depends on: 787228
(Assignee)

Comment 27

6 years ago
Created attachment 685481 [details] [diff] [review]
Part1: omx plugin changes for Honeycomb support

Original patch was missing some changes.
Attachment #685478 - Attachment is obsolete: true
Attachment #685478 - Flags: review?(cpeterson)
Attachment #685481 - Flags: review?(cpeterson)
Attachment #685479 - Flags: review?(mark.finkle) → review+
Comment on attachment 685481 [details] [diff] [review]
Part1: omx plugin changes for Honeycomb support

Review of attachment 685481 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM
Attachment #685481 - Flags: review?(cpeterson) → review+
https://hg.mozilla.org/mozilla-central/rev/1ec8feec4ae1
https://hg.mozilla.org/mozilla-central/rev/d2dd27b5985c
https://hg.mozilla.org/mozilla-central/rev/06dfb6d9f0c0
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla20

Updated

6 years ago
status-firefox20: --- → fixed

Updated

6 years ago
Blocks: 823253
You need to log in before you can comment on or make changes to this bug.