36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 #include <visp3/core/vpConfig.h>
40 #if (defined(VISP_HAVE_DIRECTSHOW))
42 #include <visp3/sensor/vpDirectShowDevice.h>
50 bool vpDirectShowDevice::init(
const CComPtr<IMoniker> &pMoniker)
55 CComPtr<IPropertyBag> pPropBag;
56 pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (
void **)(&pPropBag));
62 VariantInit(&varName);
63 VariantInit(&varDesc);
64 VariantInit(&varDevPath);
65 char tmp[FILENAME_MAX];
67 hr = pPropBag->Read(L
"FriendlyName", &varName, 0);
71 snprintf(tmp, FILENAME_MAX,
"%S", varName.bstrVal);
75 VariantClear(&varName);
77 hr = pPropBag->Read(L
"Description", &varDesc, 0);
81 snprintf(tmp, FILENAME_MAX,
"%S", varDesc.bstrVal);
85 VariantClear(&varDesc);
87 hr = pPropBag->Read(L
"DevicePath", &varDevPath, 0);
91 snprintf(tmp, FILENAME_MAX,
"%S", varDevPath.bstrVal);
95 VariantClear(&varDevPath);
106 bool vpDirectShowDevice::operator==(vpDirectShowDevice &dev)
108 return name == dev.name && desc == dev.desc && devPath == dev.devPath;
111 VISP_EXPORT std::ostream &
operator<<(std::ostream &os, vpDirectShowDevice &dev)
113 return os << dev.name << std::endl << dev.desc << std::endl << dev.devPath;
116 #elif !defined(VISP_BUILD_SHARED_LIBS)
119 void dummy_vpDirectShowDevice() { };
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)