diff --git a/src/main/groovy/com/chocolatey/pmsencoder/Engine.java b/src/main/groovy/com/chocolatey/pmsencoder/Engine.java index 13b0c93..cd33dc1 100644 --- a/src/main/groovy/com/chocolatey/pmsencoder/Engine.java +++ b/src/main/groovy/com/chocolatey/pmsencoder/Engine.java @@ -84,6 +84,8 @@ public ProcessWrapper launchTranscode(String uri, DLNAMediaInfo media, OutputPar args.add(outfile); } + log.info("command: " + args); + params.input_pipes[0] = pipe; params.minBufferSize = params.minFileSize; params.secondread_minsize = 100000; diff --git a/src/main/groovy/com/chocolatey/pmsencoder/PMSEncoder.groovy b/src/main/groovy/com/chocolatey/pmsencoder/PMSEncoder.groovy index f0bd2b2..c0ca63f 100644 --- a/src/main/groovy/com/chocolatey/pmsencoder/PMSEncoder.groovy +++ b/src/main/groovy/com/chocolatey/pmsencoder/PMSEncoder.groovy @@ -145,7 +145,13 @@ class Matcher extends Logger { config.$DEFAULT_MENCODER_ARGS.each { command.args << it.toString() } } - config.match(command) // we could use the @Delegate annotation, but this is cleaner/clearer + def matched = config.match(command) // we could use the @Delegate annotation, but this is cleaner/clearer + + if (matched) { + log.debug("command: $command") + } + + return matched } } @@ -346,8 +352,10 @@ public class CommandDelegate extends ConfigDelegate { } // DSL accessor ($ARGS): read-write + @Typed(TypePolicy.DYNAMIC) // try to handle GStrings + // FIXME: test this! protected List set$ARGS(List args) { - command.args = args + command.args = args.collect { it.toString() } // handle GStrings } // DSL accessor ($MATCHES): read-only @@ -523,7 +531,7 @@ class Action extends CommandDelegate { @Typed(TypePolicy.DYNAMIC) // XXX try to handle GStrings void set(Map map) { // the sort order is predictable (for tests) as long as we (and Groovy) use LinkedHashMap - map.each { name, value -> setArg(name, value) } + map.each { name, value -> setArg(name.toString(), value.toString()) } } // set an MEncoder option - create it if it doesn't exist diff --git a/src/main/resources/log4j.xml b/src/main/resources/log4j.xml index 74364f5..305286d 100644 --- a/src/main/resources/log4j.xml +++ b/src/main/resources/log4j.xml @@ -43,7 +43,7 @@ --> - +