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 V4L2_DEVICE_H_ 00026 #define V4L2_DEVICE_H_ 00027 00028 #include <string> 00029 #include <list> 00030 00031 #include "V4L2_DeviceDescriptor.h" 00032 #include "CaptureDevice.h" 00033 00034 namespace avcap 00035 { 00036 // forward declarations 00037 class V4L2_ConnectorManager; 00038 class V4L2_ControlManager; 00039 class V4L2_VidCapManager; 00040 class V4L2_DeviceDescriptor; 00041 class V4L2_FormatManager; 00042 00044 00045 class V4L2_Device : public CaptureDevice 00046 { 00047 public: 00048 00049 private: 00050 V4L2_VidCapManager *mVidCapMgr; 00051 V4L2_ConnectorManager *mConnectorMgr; 00052 V4L2_ControlManager *mControlMgr; 00053 V4L2_FormatManager *mFormatMgr; 00054 V4L2_DeviceDescriptor *mDeviceDescriptor; 00055 00056 public: 00057 V4L2_Device(V4L2_DeviceDescriptor* dd); 00058 00059 virtual ~V4L2_Device(); 00060 00061 inline const DeviceDescriptor* getDescriptor() 00062 { return mDeviceDescriptor; } 00063 00064 inline CaptureManager* getVidCapMgr() 00065 { return (CaptureManager*) mVidCapMgr; } 00066 00067 inline ConnectorManager* getConnectorMgr() 00068 { return (ConnectorManager*) mConnectorMgr; } 00069 00070 inline ControlManager* getControlMgr() 00071 { return (ControlManager*) mControlMgr; } 00072 00073 inline FormatManager* getFormatMgr() 00074 { return (FormatManager*) mFormatMgr; } 00075 00076 private: 00077 int open(); 00078 00079 int close(); 00080 }; 00081 } 00082 00083 #endif // V4L2_DEVICE_H_ 00084