TOOLS: Improve GUI for Ogg encoding options

This makes it possible to encode using a target quality instead of
target bitrate and also makes min and max bitrates optionals.
This fixes bug #3092367.
This commit is contained in:
Thierry Crozat
2011-04-06 18:23:21 +01:00
parent cf8d0206f1
commit 79ebea97c5
8 changed files with 158 additions and 55 deletions
+11
View File
@@ -892,6 +892,9 @@ void CompressionTool::setOggQuality(const std::string& arg) {
if (oggparms.quality < -1.f || oggparms.quality > 10.f)
throw ToolException("Quality out of bounds (-q), must be between -1 and 10.");
// Also unset nominal bitrate so that quality is used
oggparms.nominalBitr = -1;
}
void CompressionTool::setOggMinBitrate(const std::string& arg) {
@@ -924,6 +927,14 @@ void CompressionTool::setOggMaxBitrate(const std::string& arg) {
throw ToolException("Maximum bitrate out of bounds (-M), must be between 8 and 160.");
}
void CompressionTool::unsetOggMinBitrate() {
oggparms.minBitr = -1;
}
void CompressionTool::unsetOggMaxBitrate() {
oggparms.maxBitr = -1;
}
bool CompressionTool::processMp3Parms() {
while (!_arguments.empty()) {
std::string arg = _arguments.front();