Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e103e1d authored by Robert Carr's avatar Robert Carr
Browse files

screenrecord: Disambiguate ALooper

Disambiguate ::ALooper (NDK) from android::ALooper (AV framework).
Fixes compile errors when a header causes ::ALooper to be included.

Test: Builds
Change-Id: I63c4dd8483f9bc91c4b22e05b9a86637c5f9e549
parent 88217d0a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -191,7 +191,7 @@ static status_t prepareEncoder(float displayFps, sp<MediaCodec>* pCodec,
    format->setFloat("frame-rate", displayFps);
    format->setFloat("frame-rate", displayFps);
    format->setInt32("i-frame-interval", 10);
    format->setInt32("i-frame-interval", 10);


    sp<ALooper> looper = new ALooper;
    sp<android::ALooper> looper = new android::ALooper;
    looper->setName("screenrecord_looper");
    looper->setName("screenrecord_looper");
    looper->start();
    looper->start();
    ALOGV("Creating codec");
    ALOGV("Creating codec");
+3 −3
Original line number Original line Diff line number Diff line
@@ -138,7 +138,7 @@ static int decode(


    CHECK(!stateByTrack.isEmpty());
    CHECK(!stateByTrack.isEmpty());


    int64_t startTimeUs = ALooper::GetNowUs();
    int64_t startTimeUs = android::ALooper::GetNowUs();
    int64_t startTimeRender = -1;
    int64_t startTimeRender = -1;


    for (size_t i = 0; i < stateByTrack.size(); ++i) {
    for (size_t i = 0; i < stateByTrack.size(); ++i) {
@@ -307,7 +307,7 @@ static int decode(
        }
        }
    }
    }


    int64_t elapsedTimeUs = ALooper::GetNowUs() - startTimeUs;
    int64_t elapsedTimeUs = android::ALooper::GetNowUs() - startTimeUs;


    for (size_t i = 0; i < stateByTrack.size(); ++i) {
    for (size_t i = 0; i < stateByTrack.size(); ++i) {
        CodecState *state = &stateByTrack.editValueAt(i);
        CodecState *state = &stateByTrack.editValueAt(i);
@@ -400,7 +400,7 @@ int main(int argc, char **argv) {


    ProcessState::self()->startThreadPool();
    ProcessState::self()->startThreadPool();


    sp<ALooper> looper = new ALooper;
    sp<android::ALooper> looper = new android::ALooper;
    looper->start();
    looper->start();


    sp<SurfaceComposerClient> composerClient;
    sp<SurfaceComposerClient> composerClient;
+4 −4
Original line number Original line Diff line number Diff line
@@ -310,7 +310,7 @@ void tryDrainOutputBuffer(
}
}


static int decode(
static int decode(
        const sp<ALooper> &looper,
        const sp<android::ALooper> &looper,
        const char *path,
        const char *path,
        const sp<Surface> &surface,
        const sp<Surface> &surface,
        bool renderSurface,
        bool renderSurface,
@@ -465,7 +465,7 @@ static int decode(
    filterState->mSignalledInputEOS = false;
    filterState->mSignalledInputEOS = false;
    filterState->mSawOutputEOS = false;
    filterState->mSawOutputEOS = false;


    int64_t startTimeUs = ALooper::GetNowUs();
    int64_t startTimeUs = android::ALooper::GetNowUs();
    int64_t startTimeRender = -1;
    int64_t startTimeRender = -1;


    for (size_t i = 0; i < stateByTrack.size(); ++i) {
    for (size_t i = 0; i < stateByTrack.size(); ++i) {
@@ -643,7 +643,7 @@ static int decode(
                useTimestamp, &startTimeRender);
                useTimestamp, &startTimeRender);
    }
    }


    int64_t elapsedTimeUs = ALooper::GetNowUs() - startTimeUs;
    int64_t elapsedTimeUs = android::ALooper::GetNowUs() - startTimeUs;


    for (size_t i = 0; i < stateByTrack.size(); ++i) {
    for (size_t i = 0; i < stateByTrack.size(); ++i) {
        CodecState *state = &stateByTrack.editValueAt(i);
        CodecState *state = &stateByTrack.editValueAt(i);
@@ -737,7 +737,7 @@ int main(int argc, char **argv) {


    ProcessState::self()->startThreadPool();
    ProcessState::self()->startThreadPool();


    android::sp<ALooper> looper = new ALooper;
    android::sp<android::ALooper> looper = new android::ALooper;
    looper->start();
    looper->start();


    android::sp<SurfaceComposerClient> composerClient;
    android::sp<SurfaceComposerClient> composerClient;
+1 −1
Original line number Original line Diff line number Diff line
@@ -716,7 +716,7 @@ int main(int argc, char **argv) {
    gWriteMP4 = false;
    gWriteMP4 = false;
    gDisplayHistogram = false;
    gDisplayHistogram = false;


    sp<ALooper> looper;
    sp<android::ALooper> looper;


    int res;
    int res;
    while ((res = getopt(argc, argv, "vhaqn:lm:b:ptsrow:kN:xSTd:D:")) >= 0) {
    while ((res = getopt(argc, argv, "vhaqn:lm:b:ptsrow:kN:xSTd:D:")) >= 0) {