include/avcap/linux/AVC_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 AVC_DEVICEDESCRIPTOR_H_
00026 #define AVC_DEVICEDESCRIPTOR_H_
00027 
00028 #ifdef HAS_AVC_SUPPORT
00029 
00030 #include <iostream>
00031 #include <libavc1394/rom1394.h>
00032 
00033 #include "DeviceDescriptor.h"
00034 
00035 namespace avcap
00036 {
00037 class CaptureDevice;
00038 class AVC_Device;
00039 
00041 
00042         class AVC_DeviceDescriptor : public DeviceDescriptor
00043         {
00044         private:
00045                 std::string mName;
00046                 std::string mGUIDString;
00047                 std::string mInfo;
00048                 std::string     mDriver;
00049 
00050                 octlet_t        mGUID;
00051                 static int      mDevCount;
00052                 AVC_Device*     mDevice;
00053 
00054         public:
00056 
00057                 AVC_DeviceDescriptor(const octlet_t guid);
00058 
00060                 virtual ~AVC_DeviceDescriptor();
00061 
00062                 int open();
00063 
00064                 int close();
00065 
00067 
00070                 inline const std::string& getName() const
00071                         { return mName; }
00072 
00073                 virtual inline const std::string& getInfo() const
00074                         { return mInfo; }
00075 
00076                 virtual inline const std::string& getDriver() const
00077                         { return mDriver; }
00078 
00079                 virtual inline const std::string& getCard() const
00080                         { return mGUIDString; }
00081 
00083                 inline const DEV_HANDLE_T getHandle() const
00084                         { return -1; }
00085 
00087                 inline bool isAVDev() const
00088                         { return true; }
00089 
00091                 inline bool isVideoCaptureDev() const
00092                         { return true; }
00093 
00094                 inline octlet_t& getGUID()
00095                         { return mGUID; }
00096 
00097                 virtual CaptureDevice* getDevice();
00098         };
00099 }
00100 
00101 #endif // AVC_DEVICEDESCRIPTOR_H_
00102 #endif // HAS_DVLIBS
00103 

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