INFO=GETINFO(VW) Returns a structure whose fields contain information about the opened video object. This structure may be flattened to a cell array and used with the videoWriter constructor to recreate the current video file. SEE ALSO videoWriter Copyright (c) 2006 Gerald Dalley See "MIT.txt" in the installation directory for licensing details (especially when using this library on GNU/Linux).
0001 function info = getinfo(vw) 0002 %INFO=GETINFO(VW) 0003 % Returns a structure whose fields contain information about the opened 0004 % video object. This structure may be flattened to a cell array and used 0005 % with the videoWriter constructor to recreate the current video file. 0006 % 0007 %SEE ALSO 0008 % videoWriter 0009 % 0010 %Copyright (c) 2006 Gerald Dalley 0011 %See "MIT.txt" in the installation directory for licensing details (especially 0012 %when using this library on GNU/Linux). 0013 0014 [names, vals] = feval(vw.plugin, 'getinfo', vw.handle); 0015 info = cell2struct({vals{:}}, {names{:}}, 2); 0016 0017 % be nice and convert anything that looks like a number into one. 0018 for i=1:length(names) 0019 name = names{i}; 0020 if (length(info.(name)) < 64) 0021 num = str2num(info.(name)); 0022 if numel(num) > 0 0023 info.(name) = num; 0024 end 0025 end 0026 end