Have a way to notify Gecko what codes should be built for different platforms

RESOLVED WONTFIX

Status

()

Core
Audio/Video
RESOLVED WONTFIX
4 years ago
4 years ago

People

(Reporter: bwu, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
This bug is created due to the bug 1009410. 
In bug 1009410, we need to modify stagefright's codes (MediaCodec/Acodec) to add a new interface and some member variables. But since these codes are usually provided and maintained by partners, like in CAF. 
In order to not cause build break (due to using newly-added interfaces from Gecko's side), we may need a way to let Gecko know what codes are required to be built or what codes are not.
(Reporter)

Comment 1

4 years ago
More previously discussions are in bug 1009410 comment 63 ~ comment 71.
(Reporter)

Comment 2

4 years ago
Hi Michael, 
I was told you are be the best man whom I can consult.
Could you share us some ideas?
Thanks!
Flags: needinfo?(mwu)

Comment 3

4 years ago
Hi Blake,

I am not sure if weak symbol works for you.
You can check the following code, the way to call AudioSystem::setForceUse.
* http://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/AudioManager.cpp#628
* http://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/android_audio/AudioSystem.h#796

Comment 4

4 years ago
(In reply to Blake Wu [:bwu][:blakewu] from comment #0)
> In order to not cause build break (due to using newly-added interfaces from
> Gecko's side), we may need a way to let Gecko know what codes are required
> to be built or what codes are not.

Compile time checks for specific devices or SoCs are not permitted. The only compile time check allowed is for the Android base version.

Weak symbols are one way to check at runtime. However, if this patch is something you want on all ports, I recommend not checking and just crash if it's missing. We should fail hard rather than try to support something we don't actually support.
Flags: needinfo?(mwu)

Comment 5

4 years ago
Resolving WONTFIX - compile time checks beyond ANDROID_VERSION are not permitted.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WONTFIX
(Reporter)

Comment 6

4 years ago
Hi Michael, 
Thanks for your recommendation!
(Reporter)

Comment 7

4 years ago
Hi Michael, 
There would be a problem for those devices like nexus 4 or 5. They will hit build break when they are upgraded to the version with using the new interfaces since we cannot change their stagefright codes, right? 
So do you know how could we avoid that? Or should we use weak symbol?
Flags: needinfo?(mwu)

Comment 8

4 years ago
We can make any change we want to the stagefright on nexus devices. They use the code from https://github.com/mozilla-b2g/platform_frameworks_av/tree/b2g-4.4.2_r1 .
Flags: needinfo?(mwu)
You need to log in before you can comment on or make changes to this bug.