Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

frameworks-base: Commit

frameworks/base


Commit MetaInfo

Revision05753be9945cea27d3ceb754dd6486fabdf0e9a1 (tree)
Time2010-03-17 16:16:23
AuthorWallace Wang <wallage@qq.c...>
CommiterChih-Wei Huang

Log Message

Fix the Camera bug on using USB disk

Change /sdcard/tmp.jpg to /data/tmp.jpg

Change Summary

Incremental Difference

--- a/camera/libcameraservice/V4L2Camera.cpp
+++ b/camera/libcameraservice/V4L2Camera.cpp
@@ -31,6 +31,8 @@
3131
3232 #include <linux/videodev.h>
3333
34+#define CAMERA_FILE "/data/tmp.jpg"
35+
3436 extern "C" {
3537 #include <jpeglib.h>
3638 }
@@ -351,7 +353,7 @@ sp<IMemory> V4L2Camera::GrabJpegFrame ()
351353 }
352354 nDequeued++;
353355
354- fileSize = savePicture((unsigned char *)videoIn->mem[videoIn->buf.index], "/sdcard/tmp.jpg");
356+ fileSize = savePicture((unsigned char *)videoIn->mem[videoIn->buf.index], CAMERA_FILE);
355357
356358 /* Enqueue buffer */
357359 ret = ioctl(fd, VIDIOC_QBUF, &videoIn->buf);
@@ -361,7 +363,7 @@ sp<IMemory> V4L2Camera::GrabJpegFrame ()
361363 }
362364 nQueued++;
363365
364- input = fopen("/sdcard/tmp.jpg", "rb");
366+ input = fopen(CAMERA_FILE, "rb");
365367
366368 if (input == NULL)
367369 LOGE("GrabJpegFrame: Input file == NULL");
Show on old repository browser