at.tuwien.ifs.somtoolbox.apps.viewer.controls.multichannelPlayback
Class DecoderThread

java.lang.Object
  extended by java.lang.Thread
      extended by at.tuwien.ifs.somtoolbox.apps.viewer.controls.multichannelPlayback.DecoderThread
All Implemented Interfaces:
Runnable

public class DecoderThread
extends Thread

(Based on AudioDecoder.java from jsresources.org)

Version:
$Id: DecoderThread.java 3888 2010-11-02 17:42:53Z frank $
Author:
Ewald Peiszer

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  int channel
           
private  File encodedFile
           
protected static LinkedHashMap<File,DecoderThread> lhmCurrentlyDecoding
          Static data structure not to decode a file twice at the same time
private  PlaybackThread nt
           
private  File pcmFile
           
private  boolean stats
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DecoderThread(PlaybackThread nt, File encF, int channel, boolean stats)
           
 
Method Summary
static String getDecodedFileName(File encF)
           
 File getEncodedFile()
           
 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

lhmCurrentlyDecoding

protected static LinkedHashMap<File,DecoderThread> lhmCurrentlyDecoding
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 File encodedFile

pcmFile

private File pcmFile

channel

private int channel

stats

private boolean stats

nt

private PlaybackThread nt
Constructor Detail

DecoderThread

public DecoderThread(PlaybackThread nt,
                     File encF,
                     int channel,
                     boolean stats)
              throws FileNotFoundException
Throws:
FileNotFoundException
Method Detail

getDecodedFileName

public static String getDecodedFileName(File encF)

run

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

getPcmFile

public File getPcmFile()

getEncodedFile

public File getEncodedFile()