// instrument by jscoverage, do not modifly this file
(function () {
  var BASE;
  if (typeof global === 'object') {
    BASE = global;
  } else if (typeof window === 'object') {
    BASE = window;
  } else {
    throw new Error('[jscoverage] unknow ENV!');
  }
  if (!BASE._$jscoverage) {
    BASE._$jscoverage = {};
    BASE._$jscoverage_cond = {};
    BASE._$jscoverage_done = function (file, line, express) {
      if (arguments.length === 2) {
        BASE._$jscoverage[file][line] ++;
      } else {
        BASE._$jscoverage_cond[file][line] ++;
        return express;
      }
    };
    BASE._$jscoverage_init = function (base, file, lines) {
      var tmp = [];
      for (var i = 0; i < lines.length; i ++) {
        tmp[lines[i]] = 0;
      }
      base[file] = tmp;
    };
  }
})();
_$jscoverage_init(_$jscoverage, "lib/options/misc.js",[4,10,20,22,23,25,26,27,29,30,32,35,39,52,54,55]);
_$jscoverage_init(_$jscoverage_cond, "lib/options/misc.js",[22,29]);
_$jscoverage["lib/options/misc.js"].source = ["/*jshint node:true*/","'use strict';","","var path = require('path');","","/*"," *! Miscellaneous methods"," */","","module.exports = function(proto) {","  /**","   * Use preset","   *","   * @method FfmpegCommand#preset","   * @category Miscellaneous","   * @aliases usingPreset","   *","   * @param {String|Function} preset preset name or preset function","   */","  proto.usingPreset =","  proto.preset = function(preset) {","    if (typeof preset === 'function') {","      preset(this);","    } else {","      try {","        var modulePath = path.join(this.options.presets, preset);","        var module = require(modulePath);","","        if (typeof module.load === 'function') {","          module.load(this);","        } else {","          throw new Error('preset ' + modulePath + ' has no load() function');","        }","      } catch (err) {","        throw new Error('preset ' + modulePath + ' could not be loaded: ' + err.message);","      }","    }","","    return this;","  };","","","  /**","   * Enable experimental codecs","   *","   * @method FfmpegCommand#strict","   * @category Miscellaneous","   * @aliases withStrictExperimental","   *","   * @return FfmpegCommand","   */","  proto.withStrictExperimental =","  proto.strict = function() {","    this._global('-strict', 'experimental');","    return this;","  };","};",""];
"use strict";

_$jscoverage_done("lib/options/misc.js", 4);
var path = require("path");

_$jscoverage_done("lib/options/misc.js", 10);
module.exports = function(proto) {
    _$jscoverage_done("lib/options/misc.js", 20);
    proto.usingPreset = proto.preset = function(preset) {
        _$jscoverage_done("lib/options/misc.js", 22);
        if (_$jscoverage_done("lib/options/misc.js", 22, typeof preset === "function")) {
            _$jscoverage_done("lib/options/misc.js", 23);
            preset(this);
        } else {
            _$jscoverage_done("lib/options/misc.js", 25);
            try {
                _$jscoverage_done("lib/options/misc.js", 26);
                var modulePath = path.join(this.options.presets, preset);
                _$jscoverage_done("lib/options/misc.js", 27);
                var module = require(modulePath);
                _$jscoverage_done("lib/options/misc.js", 29);
                if (_$jscoverage_done("lib/options/misc.js", 29, typeof module.load === "function")) {
                    _$jscoverage_done("lib/options/misc.js", 30);
                    module.load(this);
                } else {
                    _$jscoverage_done("lib/options/misc.js", 32);
                    throw new Error("preset " + modulePath + " has no load() function");
                }
            } catch (err) {
                _$jscoverage_done("lib/options/misc.js", 35);
                throw new Error("preset " + modulePath + " could not be loaded: " + err.message);
            }
        }
        _$jscoverage_done("lib/options/misc.js", 39);
        return this;
    };
    _$jscoverage_done("lib/options/misc.js", 52);
    proto.withStrictExperimental = proto.strict = function() {
        _$jscoverage_done("lib/options/misc.js", 54);
        this._global("-strict", "experimental");
        _$jscoverage_done("lib/options/misc.js", 55);
        return this;
    };
};