org.mmbase.streams.transcoders
Class CommandTranscoder

java.lang.Object
  extended by org.mmbase.streams.transcoders.AbstractTranscoder
      extended by org.mmbase.streams.transcoders.CommandTranscoder
All Implemented Interfaces:
Serializable, Cloneable, Transcoder, PublicCloneable<Transcoder>
Direct Known Subclasses:
FFMpeg2TheoraTranscoder, FFMpegTranscoder, SegmenterTranscoder

public abstract class CommandTranscoder
extends AbstractTranscoder

A transcoder based on an external command, like ffmpeg or ffmpeg2theora.

Version:
$Id: CommandTranscoder.java 42564 2010-06-15 09:26:30Z andre $
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mmbase.streams.transcoders.AbstractTranscoder
clone, codec, format, in, mimeType, out, PACKAGE
 
Constructor Summary
CommandTranscoder()
           
 
Method Summary
 CommandTranscoder clone()
           
protected abstract  String[] getArguments()
           
protected abstract  String getCommand()
           
protected  String[] getEnvironment()
           
protected  LoggerWriter getErrorWriter(Logger log)
           
 String getKey()
          Overrides the generation of a key in AbstractTranscoder to add extra transcoding parameters that were not set by Settings annotations on the transcoders.
protected  LoggerWriter getOutputWriter(Logger log)
           
 void setMethod(CommandExecutor.Method m)
           
 void setPath(String p)
           
 void setProperty(String key, String value)
           
protected  void transcode(Logger log)
           
 
Methods inherited from class org.mmbase.streams.transcoders.AbstractTranscoder
getCodec, getFormat, getIn, getInstance, getMimeType, getOut, init, setCodec, setFormat, setMimeType, toString, transcode
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommandTranscoder

public CommandTranscoder()
Method Detail

setProperty

public void setProperty(String key,
                        String value)

setMethod

public void setMethod(CommandExecutor.Method m)

setPath

public void setPath(String p)

getCommand

protected abstract String getCommand()

getEnvironment

protected String[] getEnvironment()

getArguments

protected abstract String[] getArguments()

getOutputWriter

protected LoggerWriter getOutputWriter(Logger log)

getErrorWriter

protected LoggerWriter getErrorWriter(Logger log)

getKey

public final String getKey()
Overrides the generation of a key in AbstractTranscoder to add extra transcoding parameters that were not set by Settings annotations on the transcoders.

Specified by:
getKey in interface Transcoder
Overrides:
getKey in class AbstractTranscoder

transcode

protected void transcode(Logger log)
                  throws Exception
Specified by:
transcode in class AbstractTranscoder
Throws:
Exception

clone

public CommandTranscoder clone()
Specified by:
clone in interface PublicCloneable<Transcoder>
Overrides:
clone in class AbstractTranscoder


MMBase 2.0-SNAPSHOT - null