at.tuwien.ifs.somtoolbox.audio
Class DecoderThread

java.lang.Object
  extended by java.lang.Thread
      extended by at.tuwien.ifs.somtoolbox.audio.DecoderThread
All Implemented Interfaces:
java.lang.Runnable

public class DecoderThread
extends java.lang.Thread

Version:
$Id: DecoderThread.java 3583 2010-05-21 10:07:41Z mayer $
Author:
Ewald Peiszer

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  int channel
           
protected static java.util.LinkedHashMap<java.io.File,DecoderThread> currentlyDecoding
          Static data structure not to decode a file twice at the same time.

That means that all files that are currently being decoded have been put into the structure together with the DecoderThread as the value.
private  java.io.File encodedFile
           
private  java.io.File pcmFile
           
private  PlaybackThread playbackThread
           
private  boolean stats
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DecoderThread(PlaybackThread playbackThread, java.io.File encodedFile, int channel, boolean stats, java.lang.String decodedOutputDir, java.lang.String decodedSuffix)
           
 
Method Summary
static java.lang.String getDecodedFileName(java.io.File encodedFile, java.lang.String decodedOutputDir, java.lang.String decodedSuffix)
           
 java.io.File getEncodedFile()
           
 java.io.File getPcmFile()
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

currentlyDecoding

protected static java.util.LinkedHashMap<java.io.File,DecoderThread> currentlyDecoding
Static data structure not to decode a file twice at the same time.

That means that all files that are currently being decoded have been put into the structure together with the DecoderThread as the value.


encodedFile

private java.io.File encodedFile

pcmFile

private java.io.File pcmFile

channel

private int channel

stats

private boolean stats

playbackThread

private PlaybackThread playbackThread
Constructor Detail

DecoderThread

public DecoderThread(PlaybackThread playbackThread,
                     java.io.File encodedFile,
                     int channel,
                     boolean stats,
                     java.lang.String decodedOutputDir,
                     java.lang.String decodedSuffix)
              throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException
Method Detail

getDecodedFileName

public static java.lang.String getDecodedFileName(java.io.File encodedFile,
                                                  java.lang.String decodedOutputDir,
                                                  java.lang.String decodedSuffix)

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

getPcmFile

public java.io.File getPcmFile()

getEncodedFile

public java.io.File getEncodedFile()