00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef CONNECTOR_H_
00026 #define CONNECTOR_H_
00027
00028 #if !defined(_MSC_VER) && !defined(USE_PREBUILD_LIBS)
00029 # include "avcap-config.h"
00030 #endif
00031
00032 #ifdef AVCAP_LINUX
00033 # include <linux/types.h>
00034 # include <linux/videodev.h>
00035 #endif
00036
00037 #include <string>
00038 #include <list>
00039
00040 #include "avcap-export.h"
00041
00042 namespace avcap
00043 {
00044
00045 class DeviceDescriptor;
00046 class Tuner;
00047
00049
00056 class AVCAP_Export Connector
00057 {
00058 public:
00059 #ifdef AVCAP_LINUX
00060 enum
00061 {
00062 INPUT_TYPE_TUNER = V4L2_INPUT_TYPE_TUNER
00063 };
00064 #endif
00065
00066 protected:
00067 DeviceDescriptor* mDeviceDescriptor;
00068 int mIndex;
00069 int mAudioset;
00070 int mType;
00071 std::string mName;
00072
00073 public:
00075 inline Connector(DeviceDescriptor *dd, int index, const std::string& name, int type=0, int audioset=0):
00076 mDeviceDescriptor(dd), mIndex(index), mName(name), mType(type), mAudioset(audioset)
00077 {}
00078
00080 virtual inline ~Connector()
00081 {}
00082
00084
00085 inline int getIndex() const
00086 { return mIndex; }
00087
00089
00095 inline int getAudioset() const
00096 { return mAudioset; }
00097
00099
00102 virtual inline Tuner* getTuner()
00103 { return 0; }
00104
00106
00107 inline const std::string& getName() const
00108 { return mName; }
00109
00111
00112 virtual inline bool hasTuner() const
00113 { return false; }
00114 };
00115 };
00116
00117 #endif // CONNECTOR_H_