?? readtests.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
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -