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 #ifdef HAS_AVC_SUPPORT 00026 00027 #ifndef AVC_DEVICE_H_ 00028 #define AVC_DEVICE_H_ 00029 00030 #include <string> 00031 #include <list> 00032 00033 #include "DeviceDescriptor.h" 00034 #include "CaptureDevice.h" 00035 #include "AVC_FormatManager.h" 00036 00037 namespace avcap 00038 { 00039 // forward declarations 00040 class AVC_DeviceDescriptor; 00041 class AVC_VidCapManager; 00042 class AVC_ConnectorManager; 00043 class AVC_ControlManager; 00044 00046 00061 class AVC_Device : public CaptureDevice 00062 { 00063 public: 00064 00065 private: 00066 AVC_DeviceDescriptor* mDeviceDescriptor; 00067 AVC_FormatManager* mFormatMgr; 00068 AVC_VidCapManager* mVidCapMgr; 00069 AVC_ConnectorManager* mConnectorMgr; 00070 AVC_ControlManager* mControlMgr; 00071 00072 public: 00074 AVC_Device(AVC_DeviceDescriptor* dd); 00075 00077 virtual ~AVC_Device(); 00078 00079 inline const DeviceDescriptor* getDescriptor() 00080 { return mDeviceDescriptor; } 00081 00082 inline CaptureManager* getVidCapMgr() 00083 { return (CaptureManager*) mVidCapMgr; } 00084 00085 inline ConnectorManager* getConnectorMgr() 00086 { return (ConnectorManager*) mConnectorMgr; } 00087 00088 inline ControlManager* getControlMgr() 00089 { return (ControlManager*) mControlMgr; } 00090 00091 inline FormatManager* getFormatMgr() 00092 { return (FormatManager*) mFormatMgr; } 00093 00094 private: 00095 int open(); 00096 00097 int close(); 00098 }; 00099 } 00100 00101 #endif // AVC_DEVICE_H_ 00102 #endif // HAS_AVC_SUPPORT 00103