summaryrefslogtreecommitdiffstats
path: root/cmds/stagefright
diff options
context:
space:
mode:
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;