projects
/
meviz.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
preload videos metadata
[meviz.git]
/
src
/
main
/
java
/
eu
/
svjatoslav
/
meviz
/
encoder
/
BitrateParameter.java
diff --git
a/src/main/java/eu/svjatoslav/meviz/encoder/BitrateParameter.java
b/src/main/java/eu/svjatoslav/meviz/encoder/BitrateParameter.java
index
168f2b4
..
c8aa863
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/encoder/BitrateParameter.java
+++ b/
src/main/java/eu/svjatoslav/meviz/encoder/BitrateParameter.java
@@
-1,7
+1,7
@@
/*
* Meviz - Various tools collection to work with multimedia.
* Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
/*
* Meviz - Various tools collection to work with multimedia.
* Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
@@
-14,13
+14,34
@@
import eu.svjatoslav.commons.commandline.parameterparser.Parameter;
public class BitrateParameter extends Parameter {
public class BitrateParameter extends Parameter {
- public BitrateParameter(String description) {
+ static public enum bitrate {
+ LOW, MEDIUM, HIGH, COPY
+ }
+
+ public BitrateParameter(final String description) {
super(description, ArgumentCount.SINGLE);
}
super(description, ArgumentCount.SINGLE);
}
+ @Override
+ public BitrateParameter addAliases(final String... aliasArray) {
+ addAliasesProtected(aliasArray);
+ return this;
+ }
+
@Override
public String describeFormat() {
return "Target bitrate [LOW / MEDIUM / HIGH / COPY]";
@Override
public String describeFormat() {
return "Target bitrate [LOW / MEDIUM / HIGH / COPY]";
+ };
+
+ @Override
+ public bitrate getValue() {
+ return bitrate.valueOf(arguments.get(0).toUpperCase());
+ }
+
+ @Override
+ public BitrateParameter setMandatory() {
+ setMandatoryProtected();
+ return this;
}
@Override
}
@Override
@@
-33,12
+54,4
@@
public class BitrateParameter extends Parameter {
return true;
}
return true;
}
-
- static public enum bitrate {
- LOW, MEDIUM, HIGH, COPY
- };
-
- public bitrate getValue() {
- return bitrate.valueOf(getArgumentsAsStrings().get(0).toUpperCase());
- }
}
}