summaryrefslogtreecommitdiffstats
path: root/cmds/stagefright
diff options
context:
space:
mode:
authorDima Zavin <dima@android.com>2012-12-11 14:42:55 -0800
committerDima Zavin <dima@android.com>2012-12-11 14:43:31 -0800
commitefc0cfb61e34c3bc688a7cbcc1ccef23922251c1 (patch)
tree505d099db60114695ad7bf6bbd671d09da4cf873 /cmds/stagefright
parentae162976dda428671af09a8fbc3f03173a7e6f3e (diff)
downloadframeworks_av-efc0cfb61e34c3bc688a7cbcc1ccef23922251c1.zip
frameworks_av-efc0cfb61e34c3bc688a7cbcc1ccef23922251c1.tar.gz
frameworks_av-efc0cfb61e34c3bc688a7cbcc1ccef23922251c1.tar.bz2
stagefright: recordvideo: add -o flag to specify output filename
Change-Id: I6b464a7b3f7dd918565c6abbd432d779eb286fd5 Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'cmds/stagefright')
-rw-r--r--cmds/stagefright/recordvideo.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/cmds/stagefright/recordvideo.cpp b/cmds/stagefright/recordvideo.cpp
index e02f111..c30c122 100644
--- a/cmds/stagefright/recordvideo.cpp
+++ b/cmds/stagefright/recordvideo.cpp
@@ -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;