Main Page | Class Hierarchy | Class List | File List | Class Members

capturethread.h

00001 /* 00002 * This file is part of libCP 00003 * FILE: capturethread.h 00004 * AUTHOR: Mathias Herzog <mathu@gmx.ch> 00005 * 00006 * 00007 * Copyright (c) 2004, The libCP project 00008 * 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your opinion) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 * General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; see the file LICENSE. If not, write to 00021 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00022 * Boston, MA 02111-1307, USA. 00023 */ 00024 #ifndef _CAPTURE_THREAD_H_ 00025 #define _CAPTURE_THREAD_H_ 00026 00027 #include <threads/thread.h> 00028 #include "image.h" 00029 #include "globals.h" 00030 00031 using namespace cpp_threads; 00032 00033 namespace LIBCP { 00034 00038 class CaptureThread : public Pthread 00039 { 00040 public: 00041 CaptureThread( int file_descriptor, VideoMMap* map, 00042 VideoMBuffer* buf, callback callme ); 00043 //virtual void run(); 00044 void stop(){ Pthread::stop(); while( !terminated() ) usleep(5); } 00045 int thread(void *); 00046 protected: 00047 Semaphore m_go; 00048 private: 00049 int m_fd; 00050 VideoMMap* m_map; 00051 VideoMBuffer* m_buf; 00052 callback m_callme; 00053 unsigned char* m_bigbuf; 00054 unsigned char* m_outbuf; 00055 Image* m_image; 00056 }; 00057 00058 } //end of namespace LIBCP 00059 00060 #endif //_CAPTURE_THREAD_H_

Generated on Wed May 26 16:43:52 2004 for libcp by doxygen 1.3.7