aboutsummaryrefslogtreecommitdiffstats
path: root/android/camera
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2011-09-12 15:29:32 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2011-09-12 15:29:32 -0700
commitb92b303b5f52b8d71687eef6eeee78dbae9d1d17 (patch)
tree3faa6a4d90c59c7127a2d2bb72a0ce83978eccba /android/camera
parentcf1c2c70dd99e7d78816ba9a558f9ed8c016862b (diff)
downloadexternal_qemu-b92b303b5f52b8d71687eef6eeee78dbae9d1d17.zip
external_qemu-b92b303b5f52b8d71687eef6eeee78dbae9d1d17.tar.gz
external_qemu-b92b303b5f52b8d71687eef6eeee78dbae9d1d17.tar.bz2
Fix Mac build
Add dummy rutines implementing public camera API on Mac Change-Id: Id3c9d99d863785b0e00d1bdf6deb0a1af49ce91c
Diffstat (limited to 'android/camera')
-rw-r--r--android/camera/camera-capture-mac.c87
1 files changed, 87 insertions, 0 deletions
diff --git a/android/camera/camera-capture-mac.c b/android/camera/camera-capture-mac.c
new file mode 100644
index 0000000..1dd8310
--- /dev/null
+++ b/android/camera/camera-capture-mac.c
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * Contains code capturing video frames from a camera device on Mac.
+ * This code uses capXxx API, available via capCreateCaptureWindow.
+ */
+
+#include <vfw.h>
+#include "android/camera/camera-capture.h"
+
+#define D(...) VERBOSE_PRINT(camera,__VA_ARGS__)
+#define W(...) VERBOSE_PRINT(camera,__VA_ARGS__)
+#define E(...) VERBOSE_PRINT(camera,__VA_ARGS__)
+#define D_ACTIVE VERBOSE_CHECK(camera)
+
+/* the T(...) macro is used to dump traffic */
+#define T_ACTIVE 0
+
+#if T_ACTIVE
+#define T(...) VERBOSE_PRINT(camera,__VA_ARGS__)
+#else
+#define T(...) ((void)0)
+#endif
+
+/*******************************************************************************
+ * CameraDevice API
+ ******************************************************************************/
+
+CameraDevice*
+camera_device_open(const char* name, int inp_channel)
+{
+ /* TODO: Implement */
+ return NULL;
+}
+
+int
+camera_device_start_capturing(CameraDevice* cd,
+ uint32_t pixel_format,
+ int frame_width,
+ int frame_height)
+{
+ /* TODO: Implement */
+ return -1;
+}
+
+int
+camera_device_stop_capturing(CameraDevice* cd)
+{
+ /* TODO: Implement */
+ return -1;
+}
+
+int
+camera_device_read_frame(CameraDevice* cd,
+ ClientFrameBuffer* framebuffers,
+ int fbs_num)
+{
+ /* TODO: Implement */
+ return -1;
+}
+
+void
+camera_device_close(CameraDevice* cd)
+{
+ /* TODO: Implement */
+}
+
+int
+enumerate_camera_devices(CameraInfo* cis, int max)
+{
+ /* TODO: Implement */
+ return 0;
+}