Home | History | Annotate | Download | only in camera
      1 /*
      2  * Copyright (C) 2011 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 /*
     18  * Contains code capturing video frames from a camera device on Mac.
     19  * This code uses capXxx API, available via capCreateCaptureWindow.
     20  */
     21 
     22 #include "android/camera/camera-capture.h"
     23 
     24 #define  E(...)    derror(__VA_ARGS__)
     25 #define  W(...)    dwarning(__VA_ARGS__)
     26 #define  D(...)    VERBOSE_PRINT(camera,__VA_ARGS__)
     27 #define  D_ACTIVE  VERBOSE_CHECK(camera)
     28 
     29 /* the T(...) macro is used to dump traffic */
     30 #define  T_ACTIVE   0
     31 
     32 #if T_ACTIVE
     33 #define  T(...)    VERBOSE_PRINT(camera,__VA_ARGS__)
     34 #else
     35 #define  T(...)    ((void)0)
     36 #endif
     37 
     38 /*******************************************************************************
     39  *                     CameraDevice API
     40  ******************************************************************************/
     41 
     42 CameraDevice*
     43 camera_device_open(const char* name, int inp_channel)
     44 {
     45     /* TODO: Implement */
     46     return NULL;
     47 }
     48 
     49 int
     50 camera_device_start_capturing(CameraDevice* cd,
     51                               uint32_t pixel_format,
     52                               int frame_width,
     53                               int frame_height)
     54 {
     55     /* TODO: Implement */
     56     return -1;
     57 }
     58 
     59 int
     60 camera_device_stop_capturing(CameraDevice* cd)
     61 {
     62     /* TODO: Implement */
     63     return -1;
     64 }
     65 
     66 int
     67 camera_device_read_frame(CameraDevice* cd,
     68                          ClientFrameBuffer* framebuffers,
     69                          int fbs_num)
     70 {
     71     /* TODO: Implement */
     72     return -1;
     73 }
     74 
     75 void
     76 camera_device_close(CameraDevice* cd)
     77 {
     78     /* TODO: Implement */
     79 }
     80 
     81 int
     82 enumerate_camera_devices(CameraInfo* cis, int max)
     83 {
     84     /* TODO: Implement */
     85     return 0;
     86 }
     87