8000 can't runing .... · Issue #22 · openstf/minicap · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

can't runing .... #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
workzj opened this issue Mar 3, 2016 · 3 comments
Closed

can't runing .... #22

workzj opened this issue Mar 3, 2016 · 3 comments

Comments

@workzj
Copy link
workzj commented Mar 3, 2016

i build on windows7 use NDKR10D and AOSP is android 4.4

the code like this :

android::sp<android::SurfaceComposerClient> sc = new android::SurfaceComposerClient();
if ((err = sc->initCheck()) != android::NO_ERROR) {
  MCERROR("Unable to initialize SurfaceComposerClient");
  return err;
}

all ways return error , why ? i checked the android4.4 source , and class SurfaceComposerClient:

SurfaceComposerClient::SurfaceComposerClient()
: mStatus(NO_INIT), mComposer(Composer::getInstance())
{
}

status_t SurfaceComposerClient::initCheck() const {
return mStatus;
}

the code means , initCheck is allways return NO_INIT .

@sorccu
Copy link
Member
sorccu commented Mar 3, 2016

I don't know, maybe the Android.mk files behave a bit differently on Windows and something breaks. I only build on Linux, so I can't help you. If you get it working, please submit a patch.

Also, you said that you're always getting an error, but didn't actually post the error.

@workzj
Copy link
Author
workzj commented Mar 3, 2016

i means , view the code , when you new SurfaceComposerClient , mStatus is set NO_INIT ,
BUT immediately the code : sc->initCheck(); check mStatus is not NO_ERROR, so the code is always return err;

AOSP version is 4.4.

@sorccu
Copy link
Member
sorccu commented Mar 3, 2016
void SurfaceComposerClient::onFirstRef() {
    sp<ISurfaceComposer> sm(ComposerService::getComposerService());
    if (sm != 0) {
        sp<ISurfaceComposerClient> conn = sm->createConnection();
        if (conn != 0) {
            mClient = conn;
            mStatus = NO_ERROR;
        }
    }
}

This is magic that gets called before we call initCheck().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0