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