1 /* 2 * cl_multi_image_handler.h - CL multi-image handler 3 * 4 * Copyright (c) 2016 Intel Corporation 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 * 18 * Author: Wind Yuan <feng.yuan (at) intel.com> 19 */ 20 21 #ifndef XCAM_CL_MULTI_IMAGE_HANDLER_H 22 #define XCAM_CL_MULTI_IMAGE_HANDLER_H 23 24 #include <xcam_std.h> 25 #include <ocl/cl_image_handler.h> 26 27 namespace XCam { 28 29 class CLMultiImageHandler 30 : public CLImageHandler 31 { 32 public: 33 typedef std::list<SmartPtr<CLImageHandler> > HandlerList; 34 35 public: 36 explicit CLMultiImageHandler (const SmartPtr<CLContext> &context, const char *name); 37 virtual ~CLMultiImageHandler (); 38 bool add_image_handler (SmartPtr<CLImageHandler> &handler); 39 40 protected: 41 virtual XCamReturn prepare_parameters (SmartPtr<VideoBuffer> &input, SmartPtr<VideoBuffer> &output); 42 virtual XCamReturn execute_kernels (); 43 virtual XCamReturn execute_done (SmartPtr<VideoBuffer> &output); 44 45 virtual XCamReturn sub_handler_execute_done (SmartPtr<CLImageHandler> &handler); 46 47 XCamReturn ensure_handler_parameters ( 48 const SmartPtr<CLImageHandler> &handler, SmartPtr<VideoBuffer> &input, SmartPtr<VideoBuffer> &output); 49 50 private: 51 XCAM_DEAD_COPY (CLMultiImageHandler); 52 53 protected: 54 HandlerList _handler_list; 55 }; 56 57 }; 58 59 #endif // XCAM_CL_MULTI_IMAGE_HANDLER_H