include/avcap/DeviceDescriptor.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 
00025 #ifndef DEVICEDESCRIPTOR_H_
00026 #define DEVICEDESCRIPTOR_H_
00027 
00028 #include <iostream>
00029 #include <string>
00030 
00031 #if !defined(_MSC_VER) && !defined(USE_PREBUILD_LIBS)
00032 # include "avcap-config.h"
00033 #endif
00034 
00035 #include "avcap-export.h"
00036 
00037 // IVTV driver name
00038 #define DRIVER_IVTV     "ivtv"
00039 
00040 namespace avcap
00041 {
00042 class CaptureDevice;
00043 
00045 
00057         class AVCAP_Export DeviceDescriptor
00058         {
00059         public:
00060 #ifdef AVCAP_LINUX
00061                 typedef int DEV_HANDLE_T;
00062 #endif
00063 
00064 #ifdef AVCAP_OSX
00065                 typedef int DEV_HANDLE_T;
00066 #endif
00067 
00068 #ifdef _WIN32
00070                 /* To get the complete created filter graph call GetFilterGraphFromFilter()
00071                  declared in the "HelpFunc.h" header file. */
00072                 typedef void* DEV_HANDLE_T;
00073 #endif
00074 
00075         private:
00076                 const static std::string mEmptyString;
00077 
00078         public:
00080                 DeviceDescriptor();
00081 
00083                 virtual ~DeviceDescriptor() = 0;
00084 
00086 
00090                 virtual int open() = 0;
00091 
00093 
00097                 virtual int close() = 0;
00098 
00100 
00101                 virtual const std::string& getName() const = 0;
00102 
00104 
00106                 virtual inline const std::string& getDriver() const
00107                         { return mEmptyString; }
00108 
00110 
00112                 virtual inline const std::string& getCard() const
00113                         { return mEmptyString; }
00114 
00116 
00118                 virtual inline const std::string& getInfo() const
00119                         { return mEmptyString; }
00120 
00122 
00124                 virtual inline int getVersion() const
00125                         { return 0; }
00126 
00128 
00130                 virtual inline const std::string& getVersionString() const
00131                         { return mEmptyString; }
00132 
00134 
00135                 virtual const DEV_HANDLE_T getHandle() const = 0;
00136 
00138                 virtual inline bool isAVDev() const
00139                         { return false; }
00140 
00142                 virtual inline bool isVideoCaptureDev() const
00143                         { return false; }
00144 
00146                 virtual inline bool isVBIDev() const
00147                         { return false; }
00148 
00150                 virtual inline bool isTuner() const
00151                         { return false; }
00152 
00154                 virtual inline bool isAudioDev() const
00155                         { return false; }
00156 
00158                 virtual inline bool isRadioDev() const
00159                         { return false; }
00160 
00162                 virtual inline bool isOverlayDev() const
00163                         { return false; }
00164 
00166 
00167                 virtual inline bool isRWDev () const
00168                         { return false; }
00169 
00171 
00172                 virtual inline bool isAsyncIODev() const
00173                         { return false; }
00174 
00176 
00177                 virtual inline bool isStreamingDev() const
00178                         { return false; }
00179 
00181 
00191                 virtual CaptureDevice* getDevice() = 0;
00192         };
00193 }
00194 
00195 
00196 #endif //DEVICEDESCRIPTOR_H_

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