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

Commit efc0cfb6 authored by Dima Zavin's avatar Dima Zavin
Browse files

stagefright: recordvideo: add -o flag to specify output filename



Change-Id: I6b464a7b3f7dd918565c6abbd432d779eb286fd5
Signed-off-by: default avatarDima Zavin <dima@android.com>
parent ae162976
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ static void usage(const char *me) {
    fprintf(stderr, "       -p encoder profile. see omx il header (default: encoder specific)\n");
    fprintf(stderr, "       -v video codec: [0] AVC [1] M4V [2] H263 (default: 0)\n");
    fprintf(stderr, "       -s(oftware) prefer software codec\n");
    fprintf(stderr, "The output file is /sdcard/output.mp4\n");
    fprintf(stderr, "       -o filename: output file (default: /sdcard/output.mp4)\n");
    exit(1);
}

@@ -162,12 +162,12 @@ int main(int argc, char **argv) {
    int level = -1;        // Encoder specific default
    int profile = -1;      // Encoder specific default
    int codec = 0;
    const char *fileName = "/sdcard/output.mp4";
    char *fileName = "/sdcard/output.mp4";
    bool preferSoftwareCodec = false;

    android::ProcessState::self()->startThreadPool();
    int res;
    while ((res = getopt(argc, argv, "b:c:f:i:n:w:t:l:p:v:hs")) >= 0) {
    while ((res = getopt(argc, argv, "b:c:f:i:n:w:t:l:p:v:o:hs")) >= 0) {
        switch (res) {
            case 'b':
            {
@@ -235,6 +235,12 @@ int main(int argc, char **argv) {
                break;
            }

            case 'o':
            {
                fileName = optarg;
                break;
            }

            case 's':
            {
                preferSoftwareCodec = true;