From 1301a437ff9f5fa6c4ed78f88add3d9bfce97935 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Wed, 29 Aug 2012 13:41:01 +0300 Subject: 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 --- cmds/stagefright/recordvideo.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'cmds') 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(); -- cgit v1.1