diff options
author | Martin Storsjo <martin@martin.st> | 2012-08-29 13:41:01 +0300 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2012-08-29 15:36:55 +0300 |
commit | 1301a437ff9f5fa6c4ed78f88add3d9bfce97935 (patch) | |
tree | 8e0b2fdcba1c12b72df1d4dcb48606f5c97286cd /cmds | |
parent | 4b60ac04a878eaf8344b56189509ccd6925855c2 (diff) | |
download | frameworks_av-1301a437ff9f5fa6c4ed78f88add3d9bfce97935.zip frameworks_av-1301a437ff9f5fa6c4ed78f88add3d9bfce97935.tar.gz frameworks_av-1301a437ff9f5fa6c4ed78f88add3d9bfce97935.tar.bz2 |
recordvideo: Sleep while waiting for the encoding to finish
This avoids busy looping while e.g. waiting for the software encoder
to finish.
This is similar to what the 'record' and 'stagefright' test apps
do.
Change-Id: Idce55b15396ce78b621a521229603bec1e799f33
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/stagefright/recordvideo.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds/stagefright/recordvideo.cpp b/cmds/stagefright/recordvideo.cpp index 3bd1fe2..29ed775 100644 --- a/cmds/stagefright/recordvideo.cpp +++ b/cmds/stagefright/recordvideo.cpp @@ -285,6 +285,7 @@ int main(int argc, char **argv) { int64_t start = systemTime(); CHECK_EQ((status_t)OK, writer->start()); while (!writer->reachedEOS()) { + usleep(100000); } err = writer->stop(); int64_t end = systemTime(); |