1 /* 2 * Copyright (C) 2013 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 #ifndef ANDROID_SERVERS_CAMERA_CAMERA2_ZSLPROCESSORINTERFACE_H 18 #define ANDROID_SERVERS_CAMERA_CAMERA2_ZSLPROCESSORINTERFACE_H 19 20 #include <utils/Errors.h> 21 #include <utils/RefBase.h> 22 #include <utils/String16.h> 23 #include <utils/Vector.h> 24 25 namespace android { 26 namespace camera2 { 27 28 class Parameters; 29 30 class ZslProcessorInterface : virtual public RefBase { 31 public: 32 33 // Get ID for use with android.request.outputStreams / inputStreams 34 virtual int getStreamId() const = 0; 35 36 // Update the streams by recreating them if the size/format has changed 37 virtual status_t updateStream(const Parameters& params) = 0; 38 39 // Delete the underlying CameraDevice streams 40 virtual status_t deleteStream() = 0; 41 42 // Clear any additional state necessary before the CameraDevice is disconnected 43 virtual status_t disconnect(); 44 45 /** 46 * Submits a ZSL capture request (id = requestId) 47 * 48 * An appropriate ZSL buffer is selected by the closest timestamp, 49 * then we push that buffer to be reprocessed by the HAL. 50 * A capture request is created and submitted on behalf of the client. 51 */ 52 virtual status_t pushToReprocess(int32_t requestId) = 0; 53 54 // Flush the ZSL buffer queue, freeing up all the buffers 55 virtual status_t clearZslQueue() = 0; 56 57 // (Debugging only) Dump the current state to the specified file descriptor 58 virtual void dump(int fd, const Vector<String16>& args) const = 0; 59 }; 60 61 }; //namespace camera2 62 }; //namespace android 63 64 #endif 65