1 /* 2 * fake_poll_thread.h - poll thread for raw image 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: Jia Meng <jia.meng@intel.com> 19 */ 20 21 #ifndef XCAM_FAKE_POLL_THREAD_H 22 #define XCAM_FAKE_POLL_THREAD_H 23 24 #include <xcam_std.h> 25 #include <poll_thread.h> 26 27 namespace XCam { 28 29 class FakePollThread 30 : public PollThread 31 { 32 public: 33 explicit FakePollThread (const char *raw_path); 34 ~FakePollThread (); 35 36 virtual XCamReturn start(); 37 virtual XCamReturn stop (); 38 39 protected: 40 virtual XCamReturn poll_buffer_loop (); 41 42 private: 43 XCAM_DEAD_COPY (FakePollThread); 44 init_3a_stats_pool()45 virtual XCamReturn init_3a_stats_pool () { 46 return XCAM_RETURN_ERROR_UNKNOWN; 47 } 48 XCamReturn init_buffer_pool (); 49 XCamReturn read_buf (SmartPtr<VideoBuffer> &buf); 50 51 private: 52 char *_raw_path; 53 FILE *_raw; 54 SmartPtr<BufferPool> _buf_pool; 55 }; 56 57 }; 58 59 #endif //XCAM_FAKE_POLL_THREAD_H 60