Commit 8224a7b3 authored by IOhannes m zmoelnig's avatar IOhannes m zmoelnig

videoVIDS: allow 'verbose' setting without an open device

parent 3f018f68
...@@ -235,6 +235,11 @@ void videoVIDS::setProperties(gem::Properties&props) ...@@ -235,6 +235,11 @@ void videoVIDS::setProperties(gem::Properties&props)
bool videoVIDS::trySetProperties(gem::Properties&props, bool canrestart) bool videoVIDS::trySetProperties(gem::Properties&props, bool canrestart)
{ {
m_props=props; m_props=props;
double dval;
if(props.get("verbose", dval)) {
int i = (int)dval;
videoInput::setVerbose(i>0);
}
if(!m_vi) if(!m_vi)
return false; return false;
std::vector<std::string>keys=props.keys(); std::vector<std::string>keys=props.keys();
...@@ -247,13 +252,8 @@ bool videoVIDS::trySetProperties(gem::Properties&props, bool canrestart) ...@@ -247,13 +252,8 @@ bool videoVIDS::trySetProperties(gem::Properties&props, bool canrestart)
return true; return true;
for(unsigned i=0; i<keys.size(); i++) { for(unsigned i=0; i<keys.size(); i++) {
std::string key=keys[i]; std::string key=keys[i];
double dval;
std::string sval; std::string sval;
if("verbose" == key) { if("verbose" == key) {
if(props.get(key, dval)) {
int i = (int)dval;
videoInput::setVerbose(i>0);
}
} else if(("fps" == key) || ("framerate" == key) ) { } else if(("fps" == key) || ("framerate" == key) ) {
if(props.get(key, dval)) { if(props.get(key, dval)) {
if(m_vi) { if(m_vi) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment