Closed Bug 1049332 Opened 10 years ago Closed 10 years ago

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

Categories

(Core :: Audio/Video, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: bwu, Unassigned)

Details

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.
More previously discussions are in bug 1009410 comment 63 ~ comment 71.
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)
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
(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)
Resolving WONTFIX - compile time checks beyond ANDROID_VERSION are not permitted.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Hi Michael, 
Thanks for your recommendation!
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)
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.