FrameGrabberFactory.C
Go to the documentation of this file.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
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef DEVICES_FRAMEGRABBERFACTORY_C_DEFINED
00039 #define DEVICES_FRAMEGRABBERFACTORY_C_DEFINED
00040
00041 #include "Devices/XCgrabber.H"
00042 #include "Devices/XCgrabberFlex.H"
00043 #include "Devices/FrameGrabberFactory.H"
00044 #include "Devices/V4Lgrabber.H"
00045 #include "Devices/V4L2grabber.H"
00046 #include "Devices/IEEE1394grabber.H"
00047 #include "Devices/KinectGrabber.H"
00048 #include "Devices/OpenNIGrabber.H"
00049 #include "Util/log.H"
00050
00051
00052 nub::ref<FrameIstream>
00053 makeV4Lgrabber(OptionManager& mgr,
00054 const std::string& descrName,
00055 const std::string& tagName,
00056 const ParamFlag flags)
00057 {
00058 #ifndef HAVE_LINUX_VIDEODEV_H
00059 LFATAL("<linux/videodev.h> must be installed to build a V4Lgrabber");
00060 return nub::ref<FrameIstream>((FrameIstream*)0);
00061 #else
00062 return nub::ref<FrameIstream>
00063 (new V4Lgrabber(mgr, descrName, tagName, flags));
00064 #endif
00065 }
00066
00067
00068 nub::ref<FrameIstream>
00069 makeV4L2grabber(OptionManager& mgr,
00070 const std::string& descrName,
00071 const std::string& tagName,
00072 const ParamFlag flags)
00073 {
00074 #ifndef HAVE_LINUX_VIDEODEV2_H
00075 LFATAL("<linux/videodev2.h> must be installed to build a V4L2grabber");
00076 return nub::ref<FrameIstream>((FrameIstream*)0);
00077 #else
00078 return nub::ref<FrameIstream>
00079 (new V4L2grabber(mgr, descrName, tagName, flags));
00080 #endif
00081 }
00082
00083
00084 nub::ref<FrameIstream>
00085 makeIEEE1394grabber(OptionManager& mgr,
00086 const std::string& descrName,
00087 const std::string& tagName,
00088 const ParamFlag flags)
00089 {
00090 return nub::ref<FrameIstream>
00091 (new IEEE1394grabber(mgr, descrName, tagName, flags));
00092 }
00093
00094
00095 nub::ref<FrameIstream>
00096 makeXCgrabber(OptionManager& mgr,
00097 const std::string& descrName,
00098 const std::string& tagName,
00099 const ParamFlag flags)
00100 {
00101 return nub::ref<FrameIstream>
00102 (new XCgrabber(mgr, descrName, tagName, flags));
00103 }
00104
00105 nub::ref<FrameIstream>
00106 makeXCgrabberFlex(OptionManager& mgr,
00107 const std::string& descrName,
00108 const std::string& tagName,
00109 const ParamFlag flags)
00110 {
00111 return nub::ref<FrameIstream>
00112 (new XCgrabberFlex(mgr, descrName, tagName, flags));
00113 }
00114
00115
00116 nub::ref<FrameIstream>
00117 makeKinectgrabber(OptionManager& mgr,
00118 const std::string& descrName,
00119 const std::string& tagName,
00120 const ParamFlag flags)
00121 {
00122 #ifndef INVT_HAVE_LIBFREENECT
00123 LFATAL("<libfreenect/libfreenect.h> must be installed to build a KinectGrabber");
00124 return nub::ref<FrameIstream>((FrameIstream*)0);
00125 #else
00126 return nub::ref<FrameIstream>(new KinectGrabber(mgr, descrName, tagName, flags));
00127 #endif
00128 }
00129
00130 nub::ref<FrameIstream>
00131 makeOpenNIgrabber(OptionManager& mgr,
00132 const std::string& descrName,
00133 const std::string& tagName,
00134 const ParamFlag flags)
00135 {
00136 #ifndef INVT_HAVE_OPENNI
00137 LFATAL("OpenNI must be installed to build a OpenNIGrabber");
00138 return nub::ref<FrameIstream>((FrameIstream*)0);
00139 #else
00140
00141 return nub::ref<FrameIstream>(new OpenNIGrabber(mgr, descrName, tagName, flags));
00142 #endif
00143 }
00144
00145
00146
00147
00148
00149
00150
00151
00152 #endif // DEVICES_FRAMEGRABBERFACTORY_C_DEFINED