39 #ifndef DOXYGEN_SHOULD_SKIP_THIS 42 #include <visp3/core/vpConfig.h> 43 #if (defined(VISP_HAVE_DIRECTSHOW)) 45 #include <visp3/sensor/vpDirectShowDevice.h> 52 bool vpDirectShowDevice::init(
const CComPtr<IMoniker> &pMoniker)
57 CComPtr<IPropertyBag> pPropBag;
58 pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (
void **)(&pPropBag));
64 VariantInit(&varName);
65 VariantInit(&varDesc);
66 VariantInit(&varDevPath);
67 char tmp[FILENAME_MAX];
69 hr = pPropBag->Read(L
"FriendlyName", &varName, 0);
73 sprintf(tmp,
"%S", varName.bstrVal);
77 VariantClear(&varName);
79 hr = pPropBag->Read(L
"Description", &varDesc, 0);
83 sprintf(tmp,
"%S", varDesc.bstrVal);
87 VariantClear(&varDesc);
89 hr = pPropBag->Read(L
"DevicePath", &varDevPath, 0);
93 sprintf(tmp,
"%S", varDevPath.bstrVal);
97 VariantClear(&varDevPath);
108 bool vpDirectShowDevice::operator==(vpDirectShowDevice &dev)
110 return name == dev.name && desc == dev.desc && devPath == dev.devPath;
113 VISP_EXPORT std::ostream &
operator<<(std::ostream &os, vpDirectShowDevice &dev)
115 return os << dev.name << std::endl << dev.desc << std::endl << dev.devPath;
118 #elif !defined(VISP_BUILD_SHARED_LIBS) 121 void dummy_vpDirectShowDevice(){};
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)