bool imageBase :: enumProperties(gem::Properties&readable, gem::Properties&writeable) { readable.clear(); writeable.clear(); return false; }
bool videoUNICAP :: enumProperties(gem::Properties&readable, gem::Properties&writeable) { readable.clear(); writeable.clear(); if(m_handle) { int count=0; unicap_status_t status= unicap_reenumerate_properties(m_handle, &count ); if(!SUCCESS(status)) return false; int id=0; for(id=0; id<count; id++) { unicap_property_t prop; gem::any typ; status = unicap_enumerate_properties(m_handle, NULL, &prop, id); if(!SUCCESS(status)) continue; debugPost("id='%s'\tcat='%s'\tunit='%s'\tflags=%d", prop.identifier, prop.category, prop.unit, prop.flags); switch(prop.type) { case UNICAP_PROPERTY_TYPE_RANGE: debugPost("range %f-%f", prop.range.min, prop.range.min); typ=prop.range.max; break; case UNICAP_PROPERTY_TYPE_VALUE_LIST: debugPost("value_list %d", prop.value_list.value_count); typ=prop.value_list.value_count; break; case UNICAP_PROPERTY_TYPE_MENU: debugPost("menu '%s' of %d", prop.menu_item, prop.menu.menu_item_count); typ=std::string(prop.menu_item);//prop.menu.menu_item_count; break; case UNICAP_PROPERTY_TYPE_FLAGS: debugPost("flags"); break; default: debugPost("unknown"); // ? break; } readable.set(prop.identifier, typ); if(!(prop.flags & UNICAP_FLAGS_READ_ONLY)) writeable.set(prop.identifier, typ); #warning check UNICAP_FLAGS_ON_OFF & UNICAP_FLAGS_ONE_PUSH } } return true; }
bool videoVFW :: enumProperties(gem::Properties&readable, gem::Properties&writeable) { readable.clear(); writeable.clear(); gem::any type=0; writeable.set("width", type); writeable.set("height", type); return true; }
bool videoVLC::enumProperties(gem::Properties&readable, gem::Properties&writeable) { readable.clear(); writeable.clear(); writeable.set("width", m_pixBlock.image.xsize); readable.set("width", m_pixBlock.image.xsize); writeable.set("height", m_pixBlock.image.ysize); readable.set("height", m_pixBlock.image.ysize); return false; }
bool videoTEST::enumProperties(gem::Properties&readable, gem::Properties&writeable) { readable.clear(); writeable.clear(); writeable.set("width", 64); readable.set("width", 64); writeable.set("height", 64); readable.set("height", 64); writeable.set("type", std::string("noise")); return true; }
bool filmTEST::enumProperties(gem::Properties&readprops, gem::Properties&writeprops) { readprops.clear(); writeprops.clear(); double d=0; readprops.set("width", d); readprops.set("height", d); readprops.set("fps", d); readprops.set("frames", d); return true; }
/////////////////////////////// // Properties bool filmAVIPLAY::enumProperties(gem::Properties&readable, gem::Properties&writeable) { readable.clear(); writeable.clear(); gem::any value; value=0.; readable.set("fps", value); readable.set("frames", value); readable.set("width", value); readable.set("height", value); return false; }
virtual bool enumProperties(gem::Properties&readable, gem::Properties&writeable) { // LATER: shouldn't we merge properties of all handles? #ifdef __GNUC__ # warning enumProperties stub #endif readable.clear(); writeable.clear(); if(m_handle) return m_handle->enumProperties(readable, writeable); return false; }
bool initParameters_(void) { m_parameterNames.clear(); m_parameter.clear(); unsigned int count=getNumParameters_(); unsigned int i; m_parameterNames.push_back(""); // dummy parameter for(i=0; i<count; i++) { std::string name=getParameterName_(i); FFUInt32 type = getParameterType_ (i); FFMixed def = getParameterDefault_(i); gem::any val; switch(type) { case FF_TYPE_EVENT: //? break; case FF_TYPE_TEXT: val = std::string(reinterpret_cast<const char*>(def.PointerValue)); break; default: val = def.FloatValue; } std::cout << "param#"<<i<<": "<<name<<std::endl; m_parameterNames.push_back(name); m_parameter.set(name, val); } return true; }
/////////////////////////////// // Properties bool filmQT4L::enumProperties(gem::Properties&readable, gem::Properties&writeable) { readable.clear(); writeable.clear(); gem::any value; value=0.; readable.set("fps", value); readable.set("frames", value); readable.set("tracks", value); readable.set("width", value); readable.set("height", value); writeable.set("colorspace", value); return false; }
bool videoDECKLINK::enumProperties(gem::Properties&readable, gem::Properties&writeable) { std::string dummy_s; int dummy_i=0; readable.clear(); writeable.clear(); readable.set("width", m_pixBlock.image.xsize); readable.set("height", m_pixBlock.image.ysize); dummy_s="auto"; writeable.set("format", dummy_s); writeable.set("connection", dummy_s); return true; }
void videoOptiTrack::getProperties(gem::Properties&props) { std::vector<std::string>keys=props.keys(); double d; std::string s; props.clear(); if(!m_camera) { return; } unsigned int i; for(i=0; i<keys.size(); i++) { const std::string key=keys[i]; if("width"==key) { props.set(key, m_pixBlock.image.xsize); continue; } if("height"==key) { props.set(key, m_pixBlock.image.ysize); continue; } if("fanspeed"==key && m_camera->IsCameraFanSpeedValid()) { d=m_camera->CameraFanSpeed(); props.set(key, d); continue; } if("temperature"==key && m_camera->IsCameraTempValid()) { d=m_camera->CameraTemp(); props.set(key, d); continue; } #define GETCAMERAPROP_BOOL(name) if(#name == key) {d=m_camera->##name(); props.set(key, d); continue; } else d=0 #define GETCAMERAPROP_INT(name) if(#name == key) {d=m_camera->##name(); props.set(key, d); continue; } else d=0 #define GETCAMERAPROP_STR(name) if(#name == key) {s=m_camera->##name(); props.set(key, s); continue; } else d=0 GETCAMERAPROP_BOOL(AEC); GETCAMERAPROP_BOOL(AGC); GETCAMERAPROP_BOOL(ContinuousIR); GETCAMERAPROP_BOOL(HighPowerMode); GETCAMERAPROP_BOOL(IRFilter); GETCAMERAPROP_BOOL(MarkerOverlay); GETCAMERAPROP_BOOL(TextOverlay); GETCAMERAPROP_INT(Exposure); GETCAMERAPROP_INT(FrameDecimation); GETCAMERAPROP_INT(FrameRate); GETCAMERAPROP_INT(GrayscaleDecimation); GETCAMERAPROP_INT(Intensity); GETCAMERAPROP_INT(PrecisionCap); GETCAMERAPROP_INT(ShutterDelay); GETCAMERAPROP_INT(Threshold); GETCAMERAPROP_STR(Name); #undef GETCAMERAPROP_BOOL #undef GETCAMERAPROP_INT #undef GETCAMERAPROP_STR } }
void imageMAGICK::getWriteCapabilities(std::vector<std::string>&mimetypes, gem::Properties&props) { mimetypes.clear(); props.clear(); mimetypes = m_mimetypes; gem::any value; value=100.f; props.set("quality", value); }
void imageJPEG::getWriteCapabilities(std::vector<std::string>&mimetypes, gem::Properties&props) { mimetypes.clear(); props.clear(); mimetypes.push_back("image/jpeg"); mimetypes.push_back("image/pjpeg"); gem::any value; value=100.f; props.set("quality", value); }
void imageQT::getWriteCapabilities(std::vector<std::string>&mimetypes, gem::Properties&props) { mimetypes.clear(); props.clear(); std::map<std::string, OSType>::iterator it; for(it = s_mime2type.begin(); it!=s_mime2type.end(); ++it) { mimetypes.push_back(it->first); } gem::any value; value=100.f; props.set("quality", value); }
virtual bool enumProperties(gem::Properties&props) { #ifdef __GNUC__ # warning enumerateProperties #endif // shouldn't this return a merge of the properties of all selectedHandles? if(!checkSelectedHandles()) return false; unsigned int i; for(i=0; i<m_selectedHandles.size(); i++) { props.clear(); if(m_selectedHandles[i]->enumProperties(props)) return true; } return false; }
virtual void getProperties(gem::Properties&props) { std::vector<std::string> ids; if(props.type("backends")!=gem::Properties::UNSET) { unsigned int i; for(i=0; i<m_ids.size(); i++) { ids.push_back(m_ids[i]); } } props.erase("backends"); if(m_handle) m_handle->getProperties(props); else props.clear(); if(!ids.empty()) { props.set("backends", ids); } }
void imageTIFF::getWriteCapabilities(std::vector<std::string>&mimetypes, gem::Properties&props) { mimetypes.clear(); props.clear(); mimetypes.push_back("image/tiff"); mimetypes.push_back("image/x-tiff"); gem::any value; value=72.f; props.set("xresolution", value); props.set("yresolution", value); value=std::string("inch"); props.set("resolutionunit", value); value=std::string("PD/GEM"); props.set("software", value); value=std::string(""); props.set("artist", value); props.set("hostcomputer", value); }
virtual void getWriteCapabilities(std::vector<std::string>&mimetypes, gem::Properties&props) { mimetypes.clear(); props.clear(); unsigned int i; for(i=0; i<m_savers.size(); i++) { unsigned int j; std::vector<std::string>mimetypes_; gem::Properties props_; m_savers[i]->getWriteCapabilities(mimetypes_, props_); for(j=0; j<mimetypes_.size(); j++) { const std::string&mimetype=mimetypes_[j]; if(std::find(mimetypes.begin(), mimetypes.end(), mimetype)==mimetypes.end()) { mimetypes.push_back(mimetypes_[j]); } } std::vector<std::string>keys=props_.keys(); for(j=0; j<keys.size(); j++) { props.set(keys[j], props_.get(keys[j])); } } }
bool recordBase :: enumProperties(gem::Properties&props) { props.clear(); return false; }
bool modelASSIMP3 :: enumProperties(gem::Properties&readable, gem::Properties&writeable) { readable.clear(); writeable.clear(); return false; }
bool videoOptiTrack::enumProperties(gem::Properties&readable, gem::Properties&writeable) { readable.clear(); writeable.clear(); writeable.set("width", m_pixBlock.image.xsize); readable.set("width", m_pixBlock.image.xsize); writeable.set("height", m_pixBlock.image.ysize); readable.set("height", m_pixBlock.image.ysize); #define SETCAMERAPROP_BOOL(name) writeable.set(#name, 1); #define SETCAMERAPROP_INT(name) writeable.set(#name, 1); #define SETCAMERAPROP_STR(name) writeable.set(#name, std::string("")); SETCAMERAPROP_BOOL(AEC); SETCAMERAPROP_BOOL(AGC); SETCAMERAPROP_BOOL(ContinuousIR); SETCAMERAPROP_BOOL(EnableBlockingMask); SETCAMERAPROP_BOOL(HighPowerMode); SETCAMERAPROP_BOOL(IRFilter); SETCAMERAPROP_BOOL(MarkerOverlay); SETCAMERAPROP_BOOL(TextOverlay); SETCAMERAPROP_INT(Exposure); SETCAMERAPROP_INT(FrameDecimation); SETCAMERAPROP_INT(FrameRate); SETCAMERAPROP_INT(GrayscaleDecimation); SETCAMERAPROP_INT(Intensity); SETCAMERAPROP_INT(PrecisionCap); SETCAMERAPROP_INT(ShutterDelay); SETCAMERAPROP_INT(StatusIntensity); SETCAMERAPROP_INT(Threshold); SETCAMERAPROP_STR(Name); #undef SETCAMERAPROP_BOOL #undef SETCAMERAPROP_INT #undef SETCAMERAPROP_STR #define GETCAMERAPROP_BOOL(name) readable.set(#name, 1); #define GETCAMERAPROP_INT(name) readable.set(#name, 0); #define GETCAMERAPROP_FLT(name) readable.set(#name, 0); #define GETCAMERAPROP_STR(name) readable.set(#name, std::string("")); GETCAMERAPROP_BOOL(AEC); GETCAMERAPROP_BOOL(AGC); GETCAMERAPROP_BOOL(ContinuousIR); GETCAMERAPROP_BOOL(HighPowerMode); GETCAMERAPROP_BOOL(IRFilter); GETCAMERAPROP_BOOL(MarkerOverlay); GETCAMERAPROP_BOOL(TextOverlay); GETCAMERAPROP_INT(Exposure); GETCAMERAPROP_INT(FrameDecimation); GETCAMERAPROP_INT(FrameRate); GETCAMERAPROP_INT(GrayscaleDecimation); GETCAMERAPROP_INT(Intensity); GETCAMERAPROP_INT(PrecisionCap); GETCAMERAPROP_INT(ShutterDelay); GETCAMERAPROP_INT(Threshold); GETCAMERAPROP_FLT(fanspeed); GETCAMERAPROP_FLT(temperature); GETCAMERAPROP_STR(Name); #undef GETCAMERAPROP_BOOL #undef GETCAMERAPROP_INT #undef GETCAMERAPROP_STR return true; }
void imageBase::getWriteCapabilities(std::vector<std::string>&mimetypes, gem::Properties&props) { mimetypes.clear(); props.clear(); }