pvtvideoio_parseplugin.m

来自「Video IO toolbox for matlab. 用directsho」· M 代码 · 共 28 行

M
28
字号
function [plugin,pluginArgs] = pvtVideoIO_parsePlugin(plugin, pluginArgs)
%[plugin,pluginArgs] = pvtVideoIO_parsePlugin(plugin, pluginArgs)
%  PRIVATE function for the VideoIO Library.  Typical users should not use
%  this function.  This function is shared by multiple components in a way
%  that it cannot sit in a private/ directory, hence the verbose name.
%
%  Takes an existing guess/default for a plugin name plus the vargin
%  portion of a videoReader/videoWriter constructor call.  If part of the
%  pluginArgs contains an override for the plugin, those arguments are
%  removed and the plugin name is overridden.  If not, plugin and
%  pluginArgs are left alone.  
%
%Example:
%  [plugin,pluginArgs] = pvtVideoIO_parsePlugin('ffmpegPopen2', ...
%    {'codec','xvid', 'plugin','ffmpegDirect'})
%  --> plugin='ffmpegDirect'; pluginArgs={'codec','xvid'};
%
%Copyright (c) 2008 Gerald Dalley
%See "MIT.txt" in the installation directory for licensing details (especially
%when using this library on GNU/Linux). 

if (~isempty(pluginArgs))
  [pluginSpecified,idx] = ismember('plugin', {pluginArgs{1:2:end}});
  if pluginSpecified
    plugin = pluginArgs{idx*2};
    pluginArgs = { pluginArgs{1:idx*2-2}, pluginArgs{idx*2+1:end} };
  end
end

⌨️ 快捷键说明

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