⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readtests.m

📁 Video IO toolbox for matlab. 用directshow做的
💻 M
字号:
function readTests(plugin)
%readTests(plugin)
%  Performs a battery of read tests on a given videoReader plugin
%
%Examples:
%  readTests
%  readTests ffmpegPopen2  % linux & similar
%  readTests ffmpegDirect  % ...if system's gcc is compatible w/ Matlab's
%  readTests DirectShow    % Windows

ienter

if nargin < 1, plugin = defaultVideoIOPlugin; end

% use only constant bit rate and/or indexed videos
doPreciseSeekTests('numbers.uncompressed.avi', plugin, 'preciseFrames',1);
if ispc
  % old versions of ffmpeg on linux didn't handle wmv3 files properly, so
  % skip the test on non-Windows boxes
  doPreciseSeekTests('numbers.wmv3.avi', plugin);
end

% use all
doMultiFullReadTestOnAllLoadables(plugin);

% cause an exception in the mex file
vr = videoReader('numbers.uncompressed.avi', plugin);
try
  vrassert seek(vr, struct('abc', sparse(10)));
  error('The previous seek command should have failed');
  %vr = close(vr);
catch
  vr = close(vr); %#ok<NASGU>
end

% cause an exception in the backend
vr = videoReader('numbers.uncompressed.avi', plugin);
try
  vrassert seek(vr, 'abcdef'); 
  error('The previous seek command should have failed');
  %vr = close(vr);
catch
  close(vr);
  iprintf('Successfully caught backend error: %s\n', lasterr);
end

iexit

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -