summaryrefslogtreecommitdiff
authorbrian.zhu <brian.zhu@amlogic.com>2013-07-16 09:58:52 (GMT)
committer brian.zhu <brian.zhu@amlogic.com>2013-07-16 09:58:52 (GMT)
commit77c43e6150ad1b68ae1dd2f648d7c0189db2be0e (patch)
tree008a2a623c39e14389a419f798fe929bf8cf2ad4
parent6e211821847d539fbe2c6e8c9b9f6570f7ac4206 (diff)
downloadcamera-77c43e6150ad1b68ae1dd2f648d7c0189db2be0e.zip
camera-77c43e6150ad1b68ae1dd2f648d7c0189db2be0e.tar.gz
camera-77c43e6150ad1b68ae1dd2f648d7c0189db2be0e.tar.bz2
rm unused code for usb camera
Diffstat
-rwxr-xr-xV4LCameraAdapter/V4LCameraAdapter.cpp88
-rwxr-xr-xinc/V4LCameraAdapter/V4LCameraAdapter.h9
2 files changed, 0 insertions, 97 deletions
diff --git a/V4LCameraAdapter/V4LCameraAdapter.cpp b/V4LCameraAdapter/V4LCameraAdapter.cpp
index 0f45002..3ca7a05 100755
--- a/V4LCameraAdapter/V4LCameraAdapter.cpp
+++ b/V4LCameraAdapter/V4LCameraAdapter.cpp
@@ -165,10 +165,6 @@ status_t V4LCameraAdapter::initialize(CameraProperties::Properties* caps)
}
#ifdef AMLOGIC_USB_CAMERA_SUPPORT
- mUsbCameraStatus = USBCAMERA_NO_INIT;
-#endif
-
-#ifdef AMLOGIC_USB_CAMERA_SUPPORT
#ifdef AMLOGIC_TWO_CH_UVC
mCamEncodeIndex = -1;
mCamEncodeHandle = -1;
@@ -261,7 +257,6 @@ status_t V4LCameraAdapter::initialize(CameraProperties::Properties* caps)
#ifdef AMLOGIC_USB_CAMERA_SUPPORT
mIsDequeuedEIOError = false;
- mUsbCameraStatus = USBCAMERA_INITED;
#endif
IoctlStateProbe();
@@ -759,44 +754,6 @@ status_t V4LCameraAdapter::UseBuffersPreview(void* bufArr, int num)
return BAD_VALUE;
}
-#ifdef AMLOGIC_USB_CAMERA_SUPPORT
- if((mUsbCameraStatus == USBCAMERA_ACTIVED)||(mUsbCameraStatus == USBCAMERA_NO_INIT)){
- #if 0
- if(mCameraHandle>=0){
- close(mCameraHandle);
-
- mUsbCameraStatus = USBCAMERA_NO_INIT;
-
- if ((mCameraHandle = open(DEVICE_PATH(mSensorIndex), O_RDWR)) == -1)
- {
- CAMHAL_LOGEB("Error while opening handle to V4L2 Camera: %s", strerror(errno));
- return -EINVAL;
- }
-
- ret = ioctl (mCameraHandle, VIDIOC_QUERYCAP, &mVideoInfo->cap);
- if (ret < 0)
- {
- CAMHAL_LOGEA("Error when querying the capabilities of the V4L Camera");
- return -EINVAL;
- }
-
- if ((mVideoInfo->cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) == 0)
- {
- CAMHAL_LOGEA("Error while adapter initialization: video capture not supported.");
- return -EINVAL;
- }
-
- if (!(mVideoInfo->cap.capabilities & V4L2_CAP_STREAMING))
- {
- CAMHAL_LOGEA("Error while adapter initialization: Capture device does not support streaming i/o");
- return -EINVAL;
- }
- #endif
- mUsbCameraStatus = USBCAMERA_INITED;
- mVideoInfo->isStreaming = false;
- }
-#endif
-
int width, height;
mParams.getPreviewSize(&width, &height);
@@ -905,44 +862,6 @@ status_t V4LCameraAdapter::UseBuffersCapture(void* bufArr, int num)
*/
this->stopPreview();
-#ifdef AMLOGIC_USB_CAMERA_SUPPORT
- if((mUsbCameraStatus == USBCAMERA_ACTIVED)||(mUsbCameraStatus == USBCAMERA_NO_INIT)){
- #if 0
- if(mCameraHandle>=0)
- close(mCameraHandle);
-
- mUsbCameraStatus = USBCAMERA_NO_INIT;
-
- if ((mCameraHandle = open(DEVICE_PATH(mSensorIndex), O_RDWR)) == -1)
- {
- CAMHAL_LOGEB("Error while opening handle to V4L2 Camera: %s", strerror(errno));
- return -EINVAL;
- }
-
- ret = ioctl (mCameraHandle, VIDIOC_QUERYCAP, &mVideoInfo->cap);
- if (ret < 0)
- {
- CAMHAL_LOGEA("Error when querying the capabilities of the V4L Camera");
- return -EINVAL;
- }
-
- if ((mVideoInfo->cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) == 0)
- {
- CAMHAL_LOGEA("Error while adapter initialization: video capture not supported.");
- return -EINVAL;
- }
-
- if (!(mVideoInfo->cap.capabilities & V4L2_CAP_STREAMING))
- {
- CAMHAL_LOGEA("Error while adapter initialization: Capture device does not support streaming i/o");
- return -EINVAL;
- }
- #endif
- mUsbCameraStatus = USBCAMERA_INITED;
- mVideoInfo->isStreaming = false;
- }
-#endif
-
int width, height;
mParams.getPictureSize(&width, &height);
mCaptureWidth = width;
@@ -1008,9 +927,6 @@ status_t V4LCameraAdapter::UseBuffersCapture(void* bufArr, int num)
CAMHAL_LOGDB("UseBuffersCapture %#x", ptr[0]);
}
-#ifdef AMLOGIC_USB_CAMERA_SUPPORT
- mUsbCameraStatus = USBCAMERA_ACTIVED;
-#endif
LOG_FUNCTION_NAME_EXIT
return ret;
}
@@ -1460,10 +1376,6 @@ V4LCameraAdapter::~V4LCameraAdapter()
mVideoInfo = NULL;
}
-#ifdef AMLOGIC_USB_CAMERA_SUPPORT
- mUsbCameraStatus = USBCAMERA_NO_INIT;
-#endif
-
LOG_FUNCTION_NAME_EXIT;
}
diff --git a/inc/V4LCameraAdapter/V4LCameraAdapter.h b/inc/V4LCameraAdapter/V4LCameraAdapter.h
index 310b117..f69470f 100755
--- a/inc/V4LCameraAdapter/V4LCameraAdapter.h
+++ b/inc/V4LCameraAdapter/V4LCameraAdapter.h
@@ -378,16 +378,7 @@ private:
unsigned int mPixelFormat;
#ifdef AMLOGIC_USB_CAMERA_SUPPORT
- int mUsbCameraStatus;
-
bool mIsDequeuedEIOError;
-
- enum UsbCameraStatus
- {
- USBCAMERA_NO_INIT,
- USBCAMERA_INITED,
- USBCAMERA_ACTIVED
- };
#endif
//int maxQueueable;//the max queued buffers in v4l