1 /* 2 * x3a_image_process_center.h - 3a process center 3 * 4 * Copyright (c) 2014-2015 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_3A_IMAGE_PROCESS_CENTER_H 22 #define XCAM_3A_IMAGE_PROCESS_CENTER_H 23 24 #include <xcam_std.h> 25 #include <image_processor.h> 26 27 namespace XCam { 28 29 class X3aImageProcessCenter 30 : public ImageProcessCallback 31 { 32 typedef std::list<SmartPtr<ImageProcessor> > ImageProcessorList; 33 typedef std::list<SmartPtr<ImageProcessor> >::iterator ImageProcessorIter; 34 public: 35 explicit X3aImageProcessCenter(); 36 ~X3aImageProcessCenter(); 37 38 bool insert_processor (SmartPtr<ImageProcessor> &processor); 39 bool has_processors (); 40 bool set_image_callback (ImageProcessCallback *callback); 41 42 XCamReturn start (); 43 XCamReturn stop (); 44 45 bool put_buffer (SmartPtr<VideoBuffer> &buf); 46 47 XCamReturn put_3a_results (X3aResultList &results); 48 XCamReturn put_3a_result (SmartPtr<X3aResult> &result); 49 50 //derived from ImageProcessCallback 51 virtual void process_buffer_done (ImageProcessor *processor, const SmartPtr<VideoBuffer> &buf); 52 virtual void process_buffer_failed (ImageProcessor *processor, const SmartPtr<VideoBuffer> &buf); 53 virtual void process_image_result_done (ImageProcessor *processor, const SmartPtr<X3aResult> &result); 54 55 private: 56 XCAM_DEAD_COPY (X3aImageProcessCenter); 57 58 private: 59 ImageProcessorList _image_processors; 60 ImageProcessCallback *_callback; 61 }; 62 63 }; 64 #endif //XCAM_3A_IMAGE_PROCESS_CENTER_H 65