function info = getinfo(vw)
%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). 

[names, vals] = feval(vw.plugin, 'getinfo', vw.handle);
info = cell2struct({vals{:}}, {names{:}}, 2);

% be nice and convert anything that looks like a number into one.
for i=1:length(names)
  name = names{i};
  if (length(info.(name)) < 64)
    num  = str2num(info.(name));
    if numel(num) > 0
      info.(name) = num;
    end
  end
end

buzsakilab
github-repos/MATLAB/buzsakilab-buzcode/buzcode-2d700a38b3c2a860ad1333be90f14d7a37a72815/externalPackages/chronux_2_12/fly_track/videoIO/videoIO_2006b/@videoWriter/getinfo.m
buzcode
github-repos/MATLAB/buzsakilab-buzcode
2d700a38b3c2a860ad1333be90f14d7a37a72815