diff options
author | Vladislav Hristov <vhristov@mm-sol.com> | 2011-09-14 14:50:44 -0700 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-09-14 16:00:43 -0700 |
commit | 01948ee975b283f0a988bebbbfdcae4669b1893d (patch) | |
tree | 43c8e33a968c0712af0b473400257291391f43e5 /test | |
parent | 8e8c12c10ac42bb8c0a6bda5cb8bd8bc88d2c3d5 (diff) | |
download | hardware_ti_omap4-01948ee975b283f0a988bebbbfdcae4669b1893d.zip hardware_ti_omap4-01948ee975b283f0a988bebbbfdcae4669b1893d.tar.gz hardware_ti_omap4-01948ee975b283f0a988bebbbfdcae4669b1893d.tar.bz2 |
Camera_test: remove O_SYNC on image files
When O_SYNC is set it takes very long time, to save
the file. This is unnecessary, so we can remove this
flag and have fast capture test.
Change-Id: I0edca1445cf5c1a1aa68fed2e127d10dce50535e
Signed-off-by: Vladislav Hristov <vhristov@mm-sol.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/CameraHal/camera_test_menu.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/CameraHal/camera_test_menu.cpp b/test/CameraHal/camera_test_menu.cpp index e365444..f8ef2b1 100644 --- a/test/CameraHal/camera_test_menu.cpp +++ b/test/CameraHal/camera_test_menu.cpp @@ -467,7 +467,7 @@ void my_raw_callback(const sp<IMemory>& mem) { fn[0] = 0; sprintf(fn, "/sdcard/img%03d.raw", counter); - fd = open(fn, O_CREAT | O_WRONLY | O_SYNC | O_TRUNC, 0777); + fd = open(fn, O_CREAT | O_WRONLY | O_TRUNC, 0777); if (fd < 0) goto out; @@ -511,7 +511,7 @@ void saveFile(const sp<IMemory>& mem) { fn[0] = 0; sprintf(fn, "/sdcard/preview%03d.yuv", counter); - fd = open(fn, O_CREAT | O_WRONLY | O_SYNC | O_TRUNC, 0777); + fd = open(fn, O_CREAT | O_WRONLY | O_TRUNC, 0777); if(fd < 0) { LOGE("Unable to open file %s: %s", fn, strerror(fd)); goto out; @@ -600,7 +600,7 @@ void my_jpeg_callback(const sp<IMemory>& mem) { fn[0] = 0; sprintf(fn, "%s/img%03d.jpg", dir_path,counter); - fd = open(fn, O_CREAT | O_WRONLY | O_SYNC | O_TRUNC, 0777); + fd = open(fn, O_CREAT | O_WRONLY | O_TRUNC, 0777); if(fd < 0) { LOGE("Unable to open file %s: %s", fn, strerror(fd)); |