2 * Meviz - Various tools collection to work with multimedia.
3 * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public License
7 * as published by the Free Software Foundation.
10 package eu.svjatoslav.meviz.encoder;
12 import eu.svjatoslav.commons.commandline.parameterparser.ArgumentCount;
13 import eu.svjatoslav.commons.commandline.parameterparser.Parameter;
15 public class BitrateParameter extends Parameter {
17 public BitrateParameter(String description) {
18 super(description, ArgumentCount.SINGLE);
22 public String describeFormat() {
23 return "Target bitrate [LOW / MEDIUM / HIGH]";
27 public boolean validate(final String value) {
29 bitrate.valueOf(value);
30 } catch (final IllegalArgumentException exception) {
37 static public enum bitrate {
41 public bitrate getValue() {
42 return bitrate.valueOf(getArgumentsAsStrings().get(0).toUpperCase());