Loading services/camera/libcameraservice/api2/CameraDeviceClient.cpp +11 −3 Original line number Diff line number Diff line Loading @@ -254,9 +254,17 @@ status_t CameraDeviceClient::beginConfigure() { } status_t CameraDeviceClient::endConfigure() { // TODO: Implement this. ALOGE("%s: Not implemented yet.", __FUNCTION__); return OK; ALOGV("%s: ending configure (%zu streams)", __FUNCTION__, mStreamMap.size()); status_t res; if ( (res = checkPid(__FUNCTION__) ) != OK) return res; Mutex::Autolock icl(mBinderSerializationLock); if (!mDevice.get()) return DEAD_OBJECT; return mDevice->configureStreams(); } status_t CameraDeviceClient::deleteStream(int streamId) { Loading services/camera/libcameraservice/common/CameraDeviceBase.h +12 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,18 @@ class CameraDeviceBase : public virtual RefBase { */ virtual status_t deleteReprocessStream(int id) = 0; /** * Take the currently-defined set of streams and configure the HAL to use * them. This is a long-running operation (may be several hundered ms). * * The device must be idle (see waitUntilDrained) before calling this. * * Returns OK on success; otherwise on error: * - BAD_VALUE if the set of streams was invalid (e.g. fmts or sizes) * - INVALID_OPERATION if the device was in the wrong state */ virtual status_t configureStreams() = 0; /** * Create a metadata buffer with fields that the HAL device believes are * best for the given use case Loading services/camera/libcameraservice/device2/Camera2Device.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -415,6 +415,19 @@ status_t Camera2Device::deleteReprocessStream(int id) { return OK; } status_t Camera2Device::configureStreams() { ATRACE_CALL(); ALOGV("%s: E", __FUNCTION__); /** * HAL2 devices do not need to configure streams; * streams are created on the fly. */ ALOGW("%s: No-op for HAL2 devices", __FUNCTION__); return OK; } status_t Camera2Device::createDefaultRequest(int templateId, CameraMetadata *request) { Loading services/camera/libcameraservice/device2/Camera2Device.h +2 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,8 @@ class Camera2Device: public CameraDeviceBase { virtual status_t setStreamTransform(int id, int transform); virtual status_t deleteStream(int id); virtual status_t deleteReprocessStream(int id); // No-op on HAL2 devices virtual status_t configureStreams(); virtual status_t createDefaultRequest(int templateId, CameraMetadata *request); virtual status_t waitUntilDrained(); virtual status_t setNotifyCallback(NotificationListener *listener); Loading services/camera/libcameraservice/device3/Camera3Device.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -1000,6 +1000,15 @@ status_t Camera3Device::deleteReprocessStream(int id) { return INVALID_OPERATION; } status_t Camera3Device::configureStreams() { ATRACE_CALL(); ALOGV("%s: E", __FUNCTION__); Mutex::Autolock il(mInterfaceLock); Mutex::Autolock l(mLock); return configureStreamsLocked(); } status_t Camera3Device::createDefaultRequest(int templateId, CameraMetadata *request) { Loading Loading
services/camera/libcameraservice/api2/CameraDeviceClient.cpp +11 −3 Original line number Diff line number Diff line Loading @@ -254,9 +254,17 @@ status_t CameraDeviceClient::beginConfigure() { } status_t CameraDeviceClient::endConfigure() { // TODO: Implement this. ALOGE("%s: Not implemented yet.", __FUNCTION__); return OK; ALOGV("%s: ending configure (%zu streams)", __FUNCTION__, mStreamMap.size()); status_t res; if ( (res = checkPid(__FUNCTION__) ) != OK) return res; Mutex::Autolock icl(mBinderSerializationLock); if (!mDevice.get()) return DEAD_OBJECT; return mDevice->configureStreams(); } status_t CameraDeviceClient::deleteStream(int streamId) { Loading
services/camera/libcameraservice/common/CameraDeviceBase.h +12 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,18 @@ class CameraDeviceBase : public virtual RefBase { */ virtual status_t deleteReprocessStream(int id) = 0; /** * Take the currently-defined set of streams and configure the HAL to use * them. This is a long-running operation (may be several hundered ms). * * The device must be idle (see waitUntilDrained) before calling this. * * Returns OK on success; otherwise on error: * - BAD_VALUE if the set of streams was invalid (e.g. fmts or sizes) * - INVALID_OPERATION if the device was in the wrong state */ virtual status_t configureStreams() = 0; /** * Create a metadata buffer with fields that the HAL device believes are * best for the given use case Loading
services/camera/libcameraservice/device2/Camera2Device.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -415,6 +415,19 @@ status_t Camera2Device::deleteReprocessStream(int id) { return OK; } status_t Camera2Device::configureStreams() { ATRACE_CALL(); ALOGV("%s: E", __FUNCTION__); /** * HAL2 devices do not need to configure streams; * streams are created on the fly. */ ALOGW("%s: No-op for HAL2 devices", __FUNCTION__); return OK; } status_t Camera2Device::createDefaultRequest(int templateId, CameraMetadata *request) { Loading
services/camera/libcameraservice/device2/Camera2Device.h +2 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,8 @@ class Camera2Device: public CameraDeviceBase { virtual status_t setStreamTransform(int id, int transform); virtual status_t deleteStream(int id); virtual status_t deleteReprocessStream(int id); // No-op on HAL2 devices virtual status_t configureStreams(); virtual status_t createDefaultRequest(int templateId, CameraMetadata *request); virtual status_t waitUntilDrained(); virtual status_t setNotifyCallback(NotificationListener *listener); Loading
services/camera/libcameraservice/device3/Camera3Device.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -1000,6 +1000,15 @@ status_t Camera3Device::deleteReprocessStream(int id) { return INVALID_OPERATION; } status_t Camera3Device::configureStreams() { ATRACE_CALL(); ALOGV("%s: E", __FUNCTION__); Mutex::Autolock il(mInterfaceLock); Mutex::Autolock l(mLock); return configureStreamsLocked(); } status_t Camera3Device::createDefaultRequest(int templateId, CameraMetadata *request) { Loading