Commit 94ef6709 authored by zmoelnig's avatar zmoelnig
Browse files

use the first handle that opens a target

git-svn-id: https://pd-gem.svn.sourceforge.net/svnroot/pd-gem/trunk/Gem@3655 49b2a0ca-c541-4d49-a7ef-d785e4371512
parent 030ed2a2
......@@ -198,24 +198,22 @@ void pix_record :: startRecording()
return;
}
gem::record *handle=NULL;
// find a handle for the current settings (filename, codec, props)
const std::string codec=m_codec;
if(m_handle) {
stopRecording();
m_handle=NULL;
}
m_currentFrame = 0;
int i=0;
for(i=0; i<m_handles.size(); i++) {
// check whether the handle supports the requested codec
handle=m_handles[i];
gem::record *handle=m_handles[i];
if(!codec.empty() && !handle->setCodec(codec))
continue;
if(handle->start(m_filename, m_props)) {
m_handle=handle;
post("open successfull...");
} else {
handle=NULL;
break;
}
}
if(m_handle) {
......
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