From 7b82efe7a376c882f8f938e1c41b8311a8cdda4a Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Thu, 25 Jul 2013 17:12:35 -0700 Subject: Camera: Rename new API to camera2, rearrange camera service - Support API rename from photography to camera2 - Reorganize camera service files - API support files to api1/, api2/, api_pro/ - HAL device support files into device{1,2,3}/ - Common files into common/ - Camera service remains at top-level Change-Id: Ie474c12536f543832fba0a2dc936ac4fd39fe6a9 --- include/camera/camera2/CaptureRequest.h | 42 +++++++++++ include/camera/camera2/ICameraDeviceCallbacks.h | 61 ++++++++++++++++ include/camera/camera2/ICameraDeviceUser.h | 81 ++++++++++++++++++++++ include/camera/photography/CaptureRequest.h | 42 ----------- .../camera/photography/ICameraDeviceCallbacks.h | 61 ---------------- include/camera/photography/ICameraDeviceUser.h | 81 ---------------------- 6 files changed, 184 insertions(+), 184 deletions(-) create mode 100644 include/camera/camera2/CaptureRequest.h create mode 100644 include/camera/camera2/ICameraDeviceCallbacks.h create mode 100644 include/camera/camera2/ICameraDeviceUser.h delete mode 100644 include/camera/photography/CaptureRequest.h delete mode 100644 include/camera/photography/ICameraDeviceCallbacks.h delete mode 100644 include/camera/photography/ICameraDeviceUser.h (limited to 'include/camera') diff --git a/include/camera/camera2/CaptureRequest.h b/include/camera/camera2/CaptureRequest.h new file mode 100644 index 0000000..e56d61f --- /dev/null +++ b/include/camera/camera2/CaptureRequest.h @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2013 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. + */ + +#ifndef ANDROID_HARDWARE_PHOTOGRAPHY_CAPTUREREQUEST_H +#define ANDROID_HARDWARE_PHOTOGRAPHY_CAPTUREREQUEST_H + +#include +#include +#include + +namespace android { + +class Surface; + +struct CaptureRequest : public virtual RefBase { +public: + + CameraMetadata mMetadata; + Vector > mSurfaceList; + + /** + * Keep impl up-to-date with CaptureRequest.java in frameworks/base + */ + status_t readFromParcel(Parcel* parcel); + status_t writeToParcel(Parcel* parcel) const; +}; +}; // namespace android + +#endif diff --git a/include/camera/camera2/ICameraDeviceCallbacks.h b/include/camera/camera2/ICameraDeviceCallbacks.h new file mode 100644 index 0000000..041fa65 --- /dev/null +++ b/include/camera/camera2/ICameraDeviceCallbacks.h @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2013 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. + */ + +#ifndef ANDROID_HARDWARE_PHOTOGRAPHY_CALLBACKS_H +#define ANDROID_HARDWARE_PHOTOGRAPHY_CALLBACKS_H + +#include +#include +#include +#include +#include +#include + +namespace android { +class CameraMetadata; + +class ICameraDeviceCallbacks : public IInterface +{ + /** + * Keep up-to-date with ICameraDeviceCallbacks.aidl in frameworks/base + */ +public: + DECLARE_META_INTERFACE(CameraDeviceCallbacks); + + // One way + virtual void notifyCallback(int32_t msgType, + int32_t ext1, + int32_t ext2) = 0; + + // One way + virtual void onResultReceived(int32_t frameId, + const CameraMetadata& result) = 0; +}; + +// ---------------------------------------------------------------------------- + +class BnCameraDeviceCallbacks : public BnInterface +{ +public: + virtual status_t onTransact( uint32_t code, + const Parcel& data, + Parcel* reply, + uint32_t flags = 0); +}; + +}; // namespace android + +#endif diff --git a/include/camera/camera2/ICameraDeviceUser.h b/include/camera/camera2/ICameraDeviceUser.h new file mode 100644 index 0000000..45988d0 --- /dev/null +++ b/include/camera/camera2/ICameraDeviceUser.h @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2013 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. + */ + +#ifndef ANDROID_HARDWARE_PHOTOGRAPHY_ICAMERADEVICEUSER_H +#define ANDROID_HARDWARE_PHOTOGRAPHY_ICAMERADEVICEUSER_H + +#include +#include + +struct camera_metadata; + +namespace android { + +class ICameraDeviceUserClient; +class IGraphicBufferProducer; +class Surface; +class CaptureRequest; +class CameraMetadata; + +class ICameraDeviceUser : public IInterface +{ + /** + * Keep up-to-date with ICameraDeviceUser.aidl in frameworks/base + */ +public: + DECLARE_META_INTERFACE(CameraDeviceUser); + + virtual void disconnect() = 0; + + /** + * Request Handling + **/ + + virtual int submitRequest(sp request, + bool streaming = false) = 0; + virtual status_t cancelRequest(int requestId) = 0; + + virtual status_t deleteStream(int streamId) = 0; + virtual status_t createStream( + int width, int height, int format, + const sp& bufferProducer) = 0; + + // Create a request object from a template. + virtual status_t createDefaultRequest(int templateId, + /*out*/ + CameraMetadata* request) = 0; + // Get static camera metadata + virtual status_t getCameraInfo(/*out*/ + CameraMetadata* info) = 0; + + // Wait until all the submitted requests have finished processing + virtual status_t waitUntilIdle() = 0; +}; + +// ---------------------------------------------------------------------------- + +class BnCameraDeviceUser: public BnInterface +{ +public: + virtual status_t onTransact( uint32_t code, + const Parcel& data, + Parcel* reply, + uint32_t flags = 0); +}; + +}; // namespace android + +#endif diff --git a/include/camera/photography/CaptureRequest.h b/include/camera/photography/CaptureRequest.h deleted file mode 100644 index e56d61f..0000000 --- a/include/camera/photography/CaptureRequest.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2013 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. - */ - -#ifndef ANDROID_HARDWARE_PHOTOGRAPHY_CAPTUREREQUEST_H -#define ANDROID_HARDWARE_PHOTOGRAPHY_CAPTUREREQUEST_H - -#include -#include -#include - -namespace android { - -class Surface; - -struct CaptureRequest : public virtual RefBase { -public: - - CameraMetadata mMetadata; - Vector > mSurfaceList; - - /** - * Keep impl up-to-date with CaptureRequest.java in frameworks/base - */ - status_t readFromParcel(Parcel* parcel); - status_t writeToParcel(Parcel* parcel) const; -}; -}; // namespace android - -#endif diff --git a/include/camera/photography/ICameraDeviceCallbacks.h b/include/camera/photography/ICameraDeviceCallbacks.h deleted file mode 100644 index 041fa65..0000000 --- a/include/camera/photography/ICameraDeviceCallbacks.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2013 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. - */ - -#ifndef ANDROID_HARDWARE_PHOTOGRAPHY_CALLBACKS_H -#define ANDROID_HARDWARE_PHOTOGRAPHY_CALLBACKS_H - -#include -#include -#include -#include -#include -#include - -namespace android { -class CameraMetadata; - -class ICameraDeviceCallbacks : public IInterface -{ - /** - * Keep up-to-date with ICameraDeviceCallbacks.aidl in frameworks/base - */ -public: - DECLARE_META_INTERFACE(CameraDeviceCallbacks); - - // One way - virtual void notifyCallback(int32_t msgType, - int32_t ext1, - int32_t ext2) = 0; - - // One way - virtual void onResultReceived(int32_t frameId, - const CameraMetadata& result) = 0; -}; - -// ---------------------------------------------------------------------------- - -class BnCameraDeviceCallbacks : public BnInterface -{ -public: - virtual status_t onTransact( uint32_t code, - const Parcel& data, - Parcel* reply, - uint32_t flags = 0); -}; - -}; // namespace android - -#endif diff --git a/include/camera/photography/ICameraDeviceUser.h b/include/camera/photography/ICameraDeviceUser.h deleted file mode 100644 index 45988d0..0000000 --- a/include/camera/photography/ICameraDeviceUser.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2013 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. - */ - -#ifndef ANDROID_HARDWARE_PHOTOGRAPHY_ICAMERADEVICEUSER_H -#define ANDROID_HARDWARE_PHOTOGRAPHY_ICAMERADEVICEUSER_H - -#include -#include - -struct camera_metadata; - -namespace android { - -class ICameraDeviceUserClient; -class IGraphicBufferProducer; -class Surface; -class CaptureRequest; -class CameraMetadata; - -class ICameraDeviceUser : public IInterface -{ - /** - * Keep up-to-date with ICameraDeviceUser.aidl in frameworks/base - */ -public: - DECLARE_META_INTERFACE(CameraDeviceUser); - - virtual void disconnect() = 0; - - /** - * Request Handling - **/ - - virtual int submitRequest(sp request, - bool streaming = false) = 0; - virtual status_t cancelRequest(int requestId) = 0; - - virtual status_t deleteStream(int streamId) = 0; - virtual status_t createStream( - int width, int height, int format, - const sp& bufferProducer) = 0; - - // Create a request object from a template. - virtual status_t createDefaultRequest(int templateId, - /*out*/ - CameraMetadata* request) = 0; - // Get static camera metadata - virtual status_t getCameraInfo(/*out*/ - CameraMetadata* info) = 0; - - // Wait until all the submitted requests have finished processing - virtual status_t waitUntilIdle() = 0; -}; - -// ---------------------------------------------------------------------------- - -class BnCameraDeviceUser: public BnInterface -{ -public: - virtual status_t onTransact( uint32_t code, - const Parcel& data, - Parcel* reply, - uint32_t flags = 0); -}; - -}; // namespace android - -#endif -- cgit v1.1