include/avcap/linux/AVC_Reader.h

Go to the documentation of this file.
00001 /*
00002  * (c) 2005, 2008 Nico Pranke <Nico.Pranke@googlemail.com>, Robin Luedtke <RobinLu@gmx.de> 
00003  *
00004  * This file is part of avcap.
00005  *
00006  * avcap is free software: you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation, either version 3 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * avcap is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with avcap.  If not, see <http://www.gnu.org/licenses/>.
00018  */
00019 
00020 /* avcap is free for non-commercial use.
00021  * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke@googlemail.com>
00022  */
00023 
00024 #ifdef HAS_AVC_SUPPORT
00025 
00026 #ifndef AVC_READER_H_
00027 #define AVC_READER_H_
00028 
00029 #include <list>
00030 
00031 #include "ieee1394io.h"
00032 
00033 namespace avcap
00034 {
00035 class AVC_VidCapManager;
00036 class AVC_FormatManager;
00037 class IOBuffer;
00038 
00040         
00041         class AVC_Reader : public iec61883Reader
00042         {
00043                 typedef std::list<IOBuffer*>    BufferList_t;
00044                 
00045                 
00046                 AVC_VidCapManager* mVidCapMgr;
00047                 AVC_FormatManager*      mFormatMgr;
00048                 CaptureHandler*         mCaptureHandler;
00049         
00050                 BufferList_t    mBuffers;
00051                 long                    mSequence;
00052                 int                             mAvailableBuffers;
00053                 
00054         public:
00055                 AVC_Reader(AVC_VidCapManager* cap_mgr, AVC_FormatManager* fmt_mgr, int port, int channel, int num_bufs);
00056                 
00057                 virtual ~AVC_Reader();
00058         
00059                 void registerCaptureHandler(CaptureHandler *handler);
00060         
00061                 void removeCaptureHandler();
00062                 
00063                 virtual void TriggerAction();
00064                 
00065                 void enqueue(IOBuffer* io_buf);
00066                 
00067                 inline int getNumIOBuffers() 
00068                         { return mAvailableBuffers; }
00069         
00070         };      
00071 }
00072 
00073 #endif // AVC_READER_H_
00074 #endif

Generated on Mon Nov 30 11:10:30 2009 for avcap-0.1 by  doxygen 1.5.1