8000 can't runing .... · Issue #22 · openstf/minicap · GitHub
[go: up one dir, main page]

Skip to content
< 8000 div data-target="react-partial.reactRoot">

can't runing .... #22

Closed
Closed

Description

@workzj

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 .

Activity

  1. sorccu commented on Mar 3, 2016

    @sorccu
    Member

    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.

  2. workzj commented on Mar 3, 2016

    @workzj
    Author

    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.

  3. sorccu commented on Mar 3, 2016

    @sorccu
    Member
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0