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

Commit 4d81d15f authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Add q(uiet) option to stagefright to suppress progress

Change-Id: I902b7a639b001b3263a2d21a19e3d97b40239867
parent 94d61e60
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ static bool gForceToUseHardwareCodec;
static bool gPlaybackAudio;
static bool gWriteMP4;
static bool gDisplayHistogram;
static bool showProgress = true;
static String8 gWriteMP4Filename;

static sp<ANativeWindow> gSurface;
@@ -338,7 +339,7 @@ static void playSource(OMXClient *client, sp<IMediaSource> &source) {
                    decodeTimesUs.push(delayDecodeUs);
                }

                if ((n++ % 16) == 0) {
                if (showProgress && (n++ % 16) == 0) {
                    printf(".");
                    fflush(stdout);
                }
@@ -364,8 +365,10 @@ static void playSource(OMXClient *client, sp<IMediaSource> &source) {
            }
        }

        if (showProgress) {
            printf("$");
            fflush(stdout);
        }

        options.setSeekTo(0);
    }
@@ -612,6 +615,7 @@ static void usage(const char *me) {
    fprintf(stderr, "       -k seek test\n");
    fprintf(stderr, "       -x display a histogram of decoding times/fps "
                    "(video only)\n");
    fprintf(stderr, "       -q don't show progress indicator\n");
    fprintf(stderr, "       -S allocate buffers from a surface\n");
    fprintf(stderr, "       -T allocate buffers from a surface texture\n");
    fprintf(stderr, "       -d(ump) output_filename (raw stream data to a file)\n");
@@ -687,7 +691,7 @@ int main(int argc, char **argv) {
    sp<ALooper> looper;

    int res;
    while ((res = getopt(argc, argv, "han:lm:b:ptsrow:kxSTd:D:")) >= 0) {
    while ((res = getopt(argc, argv, "haqn:lm:b:ptsrow:kxSTd:D:")) >= 0) {
        switch (res) {
            case 'a':
            {
@@ -695,6 +699,12 @@ int main(int argc, char **argv) {
                break;
            }

            case 'q':
            {
                showProgress = false;
                break;
            }

            case 'd':
            {
                dumpStream = true;