38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
41 #include <visp3/core/vpConfig.h>
42 #if ( defined(VISP_HAVE_DIRECTSHOW) )
44 #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);
74 sprintf(tmp,
"%S", varName.bstrVal);
78 VariantClear(&varName);
80 hr = pPropBag->Read(L
"Description", &varDesc, 0);
85 sprintf(tmp,
"%S", varDesc.bstrVal);
89 VariantClear(&varDesc);
91 hr = pPropBag->Read(L
"DevicePath", &varDevPath, 0);
96 sprintf(tmp,
"%S",varDevPath.bstrVal);
100 VariantClear(&varDevPath);
111 bool vpDirectShowDevice::operator==(vpDirectShowDevice& dev)
113 return name==dev.name
115 && devPath==dev.devPath;
118 VISP_EXPORT std::ostream&
operator<<(std::ostream& os, vpDirectShowDevice& dev)
120 return os<<dev.name<<std::endl<<dev.desc<<std::endl<<dev.devPath;
123 #elif !defined(VISP_BUILD_SHARED_LIBS)
125 void dummy_vpDirectShowDevice() {};
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)