Closed Bug 1050832 Opened 10 years ago Closed 9 years ago

OMX Plugin could not be initialized in Android L Preview (Loading OMX Plugin: nullptr)

Categories

(Core :: Audio/Video, defect)

34 Branch
ARM
Android
defect
Not set
major

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox31 --- affected
firefox32 --- affected
firefox33 --- affected
firefox34 --- affected
firefox35 --- affected
firefox36 --- affected
firefox37 --- affected
relnote-firefox --- 35+
fennec 34+ ---

People

(Reporter: aaronmt, Assigned: snorp)

References

Details

(Keywords: reproducible)

I/AndroidMediaPluginHost(22140): Android Version is: 20
I/AndroidMediaPluginHost(22140): Android Release Version is: L
I/AndroidMediaPluginHost(22140): Android Device is: Nexus 7
I/AndroidMediaPluginHost(22140): Android Manufacturer is: asus
I/AndroidMediaPluginHost(22140): Android Hardware is: flo
I/AndroidMediaPluginHost(22140): Loading OMX Plugin: nullptr
E/GeckoConsole(22140): [JavaScript Warning: "HTTP "Content-Type" of "video/mp4" is not supported. Load of media resource http://ak.c.ooyala.com/54a29obzq9JJJ992Za1glyyV47pj3Olz/DOcJ-FxaFrRg4gtDEwOnVhOjB1Owywhr failed." {file: "http://www.polygon.com/" line: 0}]

Tested on my Nexus 7 (L Preview LPV81C)

--
Nightly (08/08)
All media fails to load on my test-page http://people.mozilla.org/~atrain/mobile/tests/media.html

e.g, 

E/GeckoConsole(22140): [JavaScript Warning: "HTTP "Content-Type" of "video/mp4" is not supported. Load of media resource http://people.mozilla.org/~atrain/mobile/tests/big-buck-high.mp4 failed." {file: "http://people.mozilla.org/~atrain/mobile/tests/media.html" line: 0}]

E/GeckoConsole(22140): [JavaScript Warning: "All candidate resources failed to load. Media load paused." {file: "http://people.mozilla.org/~atrain/mobile/tests/media.html" line: 0}]
stagefright.force-enabled; true

I/AndroidMediaPluginHost( 2231): Loading OMX Plugin: libomxpluginkk.so
W/GeckoLinker( 2231): /data/app/org.mozilla.fennec-1.apk!/assets/libomxpluginkk.so: unhandled flags #8 not handled
Anthony can you have someone take a look at this?
tracking-fennec: ? → 32+
Flags: needinfo?(ajones)
Assignee: nobody → snorp
I'm able to reproduce this on a Nexus 4 with community-provided L image. Trying to track down the issue a little more.
Looks like libomxpluginkk.so does not load on L. Not sure why yet, but I assume we're going to want some kind of L flavor of this.
Here is the logcat out put with MOZ_DEBUG_LINKER enabled:

I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk - GetFile assets/libomxpluginkk.so
I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk - Scan directory entries in search for assets/libomxpluginkk.so
I/GeckoLinker(22402): Decompression buffer of size 0x7d80 in ashmem "libomxpluginkk.so", mapped @0x4e801000
I/GeckoLinker(22402): CustomElf::Load("/data/app/org.mozilla.fennec_snorp-1.apk!/assets/libomxpluginkk.so", 0x0) = ...
I/GeckoLinker(22402): ensure @0x9ab6c000
I/GeckoLinker(22402): DecompressChunk #0 @0x4e801000 (4096/ 16384)
I/GeckoLinker(22402): mprotect @0x9ab6c000, 0x1000, 0x1
I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk!/assets/libomxpluginkk.so: Program header type #6 not handled
I/GeckoLinker(22402): PT_LOAD @0x00000000 (filesz: 0x00004b0f, memsz: 0x00004b0f, offset: 0x00000000, flags: r-x)
I/GeckoLinker(22402): PT_LOAD @0x00005d50 (filesz: 0x000002bc, memsz: 0x000002c4, offset: 0x00004d50, flags: rw-)
I/GeckoLinker(22402): PT_DYNAMIC @0x00005df8 (filesz: 0x00000118, memsz: 0x00000118, offset: 0x00004df8, flags: rw-)
I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk!/assets/libomxpluginkk.so: Program header type #4 not handled
I/GeckoLinker(22402): PT_GNU_STACK @0x00000000 (filesz: 0x00000000, memsz: 0x00000000, offset: 0x00000000, flags: rw-)
I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk!/assets/libomxpluginkk.so: Program header type #1685382482 not handled
I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk!/assets/libomxpluginkk.so: Loading segment @0x987b3000 r-x
I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk!/assets/libomxpluginkk.so: Loading segment @0x987b8000 rw-
I/GeckoLinker(22402): ensure @0x987b900c
I/GeckoLinker(22402): DecompressChunk #1 @0x4e805000 (8192/ 15744)
I/GeckoLinker(22402): mprotect @0x987b8000, 0x100c, 0x3
I/GeckoLinker(22402): DT_PLTGOT 0x00005f28
I/GeckoLinker(22402): DT_PLTRELSZ 0x00000198
I/GeckoLinker(22402): DT_JMPREL 0x00002274
I/GeckoLinker(22402): DT_REL 0x0000213c
I/GeckoLinker(22402): DT_RELSZ 0x00000138
I/GeckoLinker(22402): DT_RELENT 0x00000008
I/GeckoLinker(22402): DT_SYMTAB 0x00000158
I/GeckoLinker(22402): DT_SYMENT 0x00000010
I/GeckoLinker(22402): DT_STRTAB 0x000008d8
I/GeckoLinker(22402): DT_STRSZ 0x000014f8
I/GeckoLinker(22402): DT_HASH 0x00001dd0
I/GeckoLinker(22402): Caught segmentation fault @0x987b4dd0
I/GeckoLinker(22402): Within the address space of a CustomElf
I/GeckoLinker(22402): ensure @0x987b4dd0
I/GeckoLinker(22402): DecompressChunk #0 @0x4e801000 (16384/ 16384)
I/GeckoLinker(22402): cacheflush(0x4e801000, 0x4e805000)
I/GeckoLinker(22402): mprotect @0x987b3000, 0x4000, 0x5
I/GeckoLinker(22402): DT_NEEDED 0x0000147f
I/GeckoLinker(22402): DT_NEEDED 0x00001489
I/GeckoLinker(22402): DT_NEEDED 0x00001497
I/GeckoLinker(22402): DT_NEEDED 0x000014a9
I/GeckoLinker(22402): DT_NEEDED 0x000014b5
I/GeckoLinker(22402): DT_NEEDED 0x000014cd
I/GeckoLinker(22402): DT_NEEDED 0x000014d5
I/GeckoLinker(22402): DT_NEEDED 0x000014dd
I/GeckoLinker(22402): DT_FINI_ARRAY 0x00005d6c
I/GeckoLinker(22402): DT_FINI_ARRAYSZ 0x00000008
I/GeckoLinker(22402): DT_INIT_ARRAY 0x00005d74
I/GeckoLinker(22402): DT_INIT_ARRAYSZ 0x00000008
W/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk!/assets/libomxpluginkk.so: unhandled flags #8 not handled
I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk - GetFile assets/libstagefright.so
I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk - Scan directory entries in search for assets/libstagefright.so
I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk - Couldn't find assets/libstagefright.so
I/GeckoLinker(22402): dlopen("/data/app/org.mozilla.fennec_snorp-1.apk!/assets/libstagefright.so", 0x3) = 0x0
I/GeckoLinker(22402): dlopen("libstagefright.so", 0x3) = 0xb6c9ad6c
I/GeckoLinker(22402): ElfLoader::Load("libstagefright.so", 0x3, 0x4f3028b0 ["/data/app/org.mozilla.fennec_snorp-1.apk!/assets/libomxpluginkk.so"]) = 0x4a4ff980
I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk - GetFile assets/libutils.so
I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk - Scan directory entries in search for assets/libutils.so
I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk - Couldn't find assets/libutils.so
I/GeckoLinker(22402): dlopen("/data/app/org.mozilla.fennec_snorp-1.apk!/assets/libutils.so", 0x3) = 0x0
I/GeckoLinker(22402): dlopen("libutils.so", 0x3) = 0xb6f2ad6c
I/GeckoLinker(22402): ElfLoader::Load("libutils.so", 0x3, 0x4f3028b0 ["/data/app/org.mozilla.fennec_snorp-1.apk!/assets/libomxpluginkk.so"]) = 0x4a4ffa60
I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk - GetFile assets/libvideoeditorplayer.so
I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk - Scan directory entries in search for assets/libvideoeditorplayer.so
I/GeckoLinker(22402): /data/app/org.mozilla.fennec_snorp-1.apk - Couldn't find assets/libvideoeditorplayer.so
I/GeckoLinker(22402): dlopen("/data/app/org.mozilla.fennec_snorp-1.apk!/assets/libvideoeditorplayer.so", 0x3) = 0x0
I/GeckoLinker(22402): dlopen("libvideoeditorplayer.so", 0x3) = 0x0
I/GeckoLinker(22402): ElfLoader::Load("libvideoeditorplayer.so", 0x3, 0x4f3028b0 ["/data/app/org.mozilla.fennec_snorp-1.apk!/assets/libomxpluginkk.so"]) = 0x0
I/GeckoLinker(22402): CustomElf::~CustomElf(0x4f3028b0 ["/data/app/org.mozilla.fennec_snorp-1.apk!/assets/libomxpluginkk.so"])
I/GeckoLinker(22402): ElfLoader::Forget(0x4f3028b0 ["/data/app/org.mozilla.fennec_snorp-1.apk!/assets/libomxpluginkk.so"])
I/GeckoLinker(22402): dlclose(0xb6f2ad6c ["libutils.so"])
I/GeckoLinker(22402): ElfLoader::Forget(0x4a4ffa60 ["libutils.so"])
I/GeckoLinker(22402): dlclose(0xb6c9ad6c ["libstagefright.so"])
I/GeckoLinker(22402): ElfLoader::Forget(0x4a4ff980 ["libstagefright.so"])
I/GeckoLinker(22402): dlopen("/data/app/org.mozilla.fennec_snorp-1.apk!/assets/libomxpluginkk.so", 0x0) = 0x0
I/GeckoLinker(22402): ElfLoader::Load("/data/app/org.mozilla.fennec_snorp-1.apk!/assets/libomxpluginkk.so", 0x0, 0x0 [""]) = 0x0
I/GeckoLinker(22402): dlopen("libomxpluginkk.so", 0x0) = 0x0
I/GeckoLinker(22402): ElfLoader::Load("libomxpluginkk.so", 0x0, 0x0 [""]) = 0x0
One of the dependencies failed to load, libvideoeditorplayer.so, so that's at least part of it.
Got past the last issue, but now we have at least one missing symbol. The one the linker complains about missing is:

_ZN7android10DataSource13CreateFromURIEPKcPKNS_11KeyedVectorINS_7String8ES4_EE

Which translates to:

android::DataSource::CreateFromURI(char const*, android::KeyedVector<android::String8, android::String8> const*)

What we appear to have on the device is:

_ZN7android10DataSource13CreateFromURIERKNS_2spINS_17IMediaHTTPServiceEEEPKcPKNS_11KeyedVectorINS_7String8ES9_EE

Which translates to:

android::DataSource::CreateFromURI(android::sp<android::IMediaHTTPService> const&, char const*, android::KeyedVector<android::String8, android::String8> const*)

So that's annoying. The source in the Android master branch does not yet reflect this change (https://android.googlesource.com/platform/frameworks/av/+/master/include/media/stagefright/DataSource.h).

It looks like we'll need to create some instance to pass for the android::IMediaHTTPService.
It looks like android::IMediaHTTPService is also not in AOSP yet, so I think we are hosed until the source for this is released. Might be kinda hosed even after that if we aren't able to subclass that thing (or instantiate some other impl).
We need to make a relnote that video is going to be busted in Android L
Keywords: relnote
Release Note Request (optional, but appreciated)
[Why is this notable]: Videos won't play on Android L
[Suggested wording]: Videos will not play on Android L
[Links (documentation, blog post, etc)]: This bug, but maybe there should be a blog post somewhere?
relnote-firefox: --- → ?
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #10)
> We need to make a relnote that video is going to be busted in Android L

MP4 video.
Flags: needinfo?(ajones)
(In reply to Anthony Jones (:kentuckyfriedtakahe, :k17e) from comment #12)
> (In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #10)
> > We need to make a relnote that video is going to be busted in Android L
> 
> MP4 video.

Indeed, that's an important clarification, thanks.
Added in the 32.0, 33beta and 34a2 releases notes with "MP4 videos will not play on Android L" as wording.
Keywords: relnote
tracking-fennec: 32+ → 35+
Status: NEW → ASSIGNED
Severity: normal → major
broken with new preview builds?
tracking-fennec: 35+ → 34+
AOSP for Lollipop should be release don Nov. 3. We may be able to fix this at that point.
Nightly w/MediaCodec (H.264/MP4/AAC) works fine for me on my Nexus 7 on L Preview; MP3 however does not
AOSP source is available, so I'm trying to fix this now.
This is turning out to be a big ball of pain. The interface we need to implement is here: https://android.googlesource.com/platform/frameworks/av/+/lollipop-release/include/media/IMediaHTTPService.h

This just has the one makeHTTPConnection() method, which returns an instance of this: https://android.googlesource.com/platform/frameworks/av/+/lollipop-release/include/media/IMediaHTTPConnection.h

The problem is that IInterface and DECLARE_META_INTERFACE() seems to bring a ton of new symbols. Not sure it's going to be very reliable even if I get it working.

We can use a file:// URI without needing an instance of IMediaHTTPService. Maybe we can get something going there? What a disaster.
Nevermind, that's apparently for data: URIs. Geez.
Release Note Request (optional, but appreciated)
[Why is this notable]: Major missing feature on Android L
[Suggested wording]: "MP4 videos, as well as MP3 audio will not play on Android L"
[Links (documentation, blog post, etc)]: This bug
We can't fix this. The plan is to write a new MP3 reader that will avoid OmxPlugin. Bug 1093815.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.