Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

phCaptureInterface.h

Go to the documentation of this file.
00001 /* ---------------------------------------------------------------------------
00002     Phission : 
00003         Realtime Vision Processing System
00004     
00005     Copyright (C) 2003-2006 Philip D.S. Thoren (pthoren@cs.uml.edu)
00006     University of Massachusetts at Lowell,
00007     Laboratory for Artificial Intelligence and Robotics
00008     
00009     This file is part of Phission.
00010 
00011     Phission is free software; you can redistribute it and/or modify
00012     it under the terms of the GNU Lesser General Public License as published by
00013     the Free Software Foundation; either version 2 of the License, or
00014     (at your option) any later version.
00015 
00016     Phission is distributed in the hope that it will be useful,
00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019     GNU Lesser General Public License for more details.
00020 
00021     You should have received a copy of the GNU Lesser General Public License
00022     along with Phission; if not, write to the Free Software
00023     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 
00025  ---------------------------------------------------------------------------*/
00026 #ifndef _PHCAPTUREINTERFACE_H
00027 #define _PHCAPTUREINTERFACE_H
00028 
00029 #include <phStandard.h>
00030 #include <phStdint.h>
00031 #include <phThread.h>
00032 class phLiveObject;
00033 
00034 /* ------------------------------------------------------------------------ */
00046 PHAPI(class) phCaptureInterface : public phThread
00047 {
00048 private:
00049     uint32_t    m_path_size;
00060     char        *m_path;
00061 
00073     phLiveObject *m_liveSourceOutput;
00074 
00075 protected:
00082     phMutex     m_settings_lock;
00083 
00092     int setLiveSourceOutput ( phLiveObject *liveSourceOutput );
00093     int setSource           ( phLiveObject *source );
00094     int setOutput           ( phLiveObject *output );
00095 
00096     /* Below is just an idea, whether it will be used
00097      * is to be seen */
00098 #if 0
00099     /* This allows a thread to poll changes to the
00100      * settings while the capture thread is running.
00101      * It isn't implemented here. It should be implemented
00102      * by an inheriting class that should update any
00103      * thread settings necessary. This should only be
00104      * called from the thread. */
00105     virtual int pollSettings();
00106 #endif
00107     
00108 
00109     /* phThread overloaded functions */
00130     virtual int setup   (); /* calls the capture object's open */
00141     virtual int cleanup (); /* calls the capture object's close */
00142     
00143 public:
00148     phCaptureInterface();
00153     virtual ~phCaptureInterface ();
00154 
00161     virtual int         setPath( const char *path  ); 
00170     virtual const char *getPath( ); 
00171     
00183     virtual int open    ( char *path = NULL );
00199     virtual int close   ();
00209     virtual int isOpen  ();
00210 
00216     virtual int isCapturing();
00217   
00222     phLiveObject *getLiveSourceOutput   ();
00223     phLiveObject *getSource             ();
00224     phLiveObject *getOutput             ();
00225 };
00226 
00227 #endif /* _PHCAPTUREINTERFACE_H */




Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo

Generated on Sat Jun 16 02:44:01 2007 for phission by  doxygen 1.4.4