Closed Bug 1038564 Opened 5 years ago Closed 5 years ago

[Flatfish] m/c build fails on gecko/content/media/omx/MediaCodecProxy.cpp

Categories

(Firefox OS Graveyard :: General, defect)

ARM
All
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
2.1 S1 (1aug)

People

(Reporter: iean.lin, Assigned: brsun)

References

Details

(Whiteboard: [Flatfish][TCP])

Attachments

(1 file)

project: gaia
commit 075f32fc0b411eadbd91bbc65e06dc5983a09ac9
Merge: deb82c9 f0b172a
Author: Zac <zcampbell@mozilla.com>
Date:   Mon Jul 14 17:01:57 2014 +0100

    Merge pull request #21698 from bebef1987/fix_time

    Bug 1032468 - Intermittent test_clock_create_new_alarm.py

project: gecko
commit d29716084b018ff6d0c2c38b8ea7c41bcc8bb820
Merge: 90fb1d9 58528fe
Author: Carsten "Tomcat" Book <cbook@mozilla.com>
Date:   Mon Jul 14 15:14:40 2014 +0200

    merge fx-team to mozilla-central a=merge


build log:

...                                                       
In file included from ../../../../../B2G/gecko/content/media/omx/MediaCodecProxy.cpp:7:0:
../../../../../B2G/gecko/content/media/omx/MediaCodecProxy.h:50:31: error: 'Surface' was not declared in this scope
../../../../../B2G/gecko/content/media/omx/MediaCodecProxy.h:50:38: error: template argument 1 is invalid
../../../../../B2G/gecko/content/media/omx/MediaCodecProxy.cpp:143:37: error: 'Surface' was not declared in this scope
../../../../../B2G/gecko/content/media/omx/MediaCodecProxy.cpp:143:44: error: template argument 1 is invalid
../../../../../B2G/gecko/content/media/omx/MediaCodecProxy.cpp: In member function 'android::status_t android::MediaCodecProxy::configure(const android::sp<android::AMessage>&, int const&, const android::sp<android::ICrypto>&, uint32_t)':
../../../../../B2G/gecko/content/media/omx/MediaCodecProxy.cpp:153:67: error: invalid conversion from 'int' to 'android::SurfaceTextureClient*' [-fpermissive]
../../../../../B2G/frameworks/native/include/utils/StrongPointer.h:120:1: error:   initializing argument 1 of 'android::sp<T>::sp(T*) [with T = android::SurfaceTextureClient]' [-fpermissive]
../../../../../B2G/gecko/content/media/omx/MediaCodecProxy.cpp: In member function 'android::status_t android::MediaCodecProxy::signalEndOfInputStream()':
../../../../../B2G/gecko/content/media/omx/MediaCodecProxy.cpp:309:18: error: 'struct android::MediaCodec' has no member named 'signalEndOfInputStream'
In file included from ../../../../../B2G/frameworks/native/include/utils/RefBase.h:27:0,
                 from ../../../dist/system_wrappers/utils/RefBase.h:3,
                 from ../../../../../B2G/frameworks/native/include/gui/ISurfaceTexture.h:24,
                 from ../../../dist/system_wrappers/gui/ISurfaceTexture.h:3,
                 from ../../../../../B2G/frameworks/av/include/media/stagefright/MediaCodec.h:21,
                 from ../../../dist/system_wrappers/stagefright/MediaCodec.h:3,
                 from ../../../../../B2G/gecko/content/media/omx/MediaCodecProxy.h:12,
                 from ../../../../../B2G/gecko/content/media/omx/MediaCodecProxy.cpp:7:
../../../../../B2G/frameworks/native/include/utils/StrongPointer.h: In constructor 'android::sp<T>::sp(T*) [with T = android::SurfaceTextureClient]':
../../../../../B2G/gecko/content/media/omx/MediaCodecProxy.cpp:153:67:   instantiated from here
../../../../../B2G/frameworks/native/include/utils/StrongPointer.h:123:16: error: invalid use of incomplete type 'struct android::SurfaceTextureClient'
../../../../../B2G/frameworks/native/include/ui/GraphicBuffer.h:127:18: error: forward declaration of 'struct android::SurfaceTextureClient'
../../../../../B2G/frameworks/native/include/utils/StrongPointer.h: In destructor 'android::sp<T>::~sp() [with T = android::SurfaceTextureClient]':
../../../../../B2G/gecko/content/media/omx/MediaCodecProxy.cpp:153:67:   instantiated from here
../../../../../B2G/frameworks/native/include/utils/StrongPointer.h:149:16: error: invalid use of incomplete type 'struct android::SurfaceTextureClient'
../../../../../B2G/frameworks/native/include/ui/GraphicBuffer.h:127:18: error: forward declaration of 'struct android::SurfaceTextureClient'
...
Blocks: flatfish
Whiteboard: [Flatfish][TCP]
This prevents me from updating Gecko on my tablet. Is there any workaround ?
I hitted the very same problem.
Status: UNCONFIRMED → NEW
Ever confirmed: true
This bug was introduced by the resolution of bug 1037282
It looks like the MediaCodec stuff introduced here are only compatible with KitKat 4.4.x, but we are pointing JellyBean 4.2, so this is the problem.

I'm going to request some more info from the creator of these changes, maybe he could help us to fix it.
Flags: needinfo?(brsun)
Duplicate of this bug: 1041391
Just to be more accurate, we need to keep OMX stuff compatible with API level 17 (JB 4.2), cause API level 18 (JB 4.3) works perfectly.
Although android::MediaCodec has been added into AOSP in level 16, some APIs (ex. signalEndOfInputStream) we used in MediaCodecReader were added into AOSP in level 18:
 - https://android.googlesource.com/platform/frameworks/av/+blame/master/include/media/stagefright/MediaCodec.h

Modify the minimum supported ANDROID_VERSION of MediaCodec related features from 16 to 18.
Attachment #8460078 - Flags: review?(cpearce)
Flags: needinfo?(brsun)
Attachment #8460078 - Flags: feedback?(rudloff)
Attachment #8460078 - Flags: feedback?(atilag)
Assignee: nobody → brsun
Attachment #8460078 - Flags: review?(cpearce) → review+
It compiles with the patch provided by Bruce. Thanks!
Comment on attachment 8460078 [details] [diff] [review]
bug1038564_media_codec_proxy_flatfish_build_fail.patch

Thanks Bruce!, it worked.
Attachment #8460078 - Flags: feedback?(atilag) → feedback+
Comment on attachment 8460078 [details] [diff] [review]
bug1038564_media_codec_proxy_flatfish_build_fail.patch

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

It works. Thanks !
Attachment #8460078 - Flags: feedback?(rudloff) → feedback+
https://hg.mozilla.org/mozilla-central/rev/d21cf00d4b29
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S1 (1aug)
Thank you everybody for helping me to commit the patch.
You need to log in before you can comment on or make changes to this bug.