Class FrameThread

  extended by javaFlacEncoder.FrameThread
All Implemented Interfaces:

public class FrameThread
extends java.lang.Object
implements java.lang.Runnable

The FrameThread class provides threading support for a Frame object, allowing multi-threaded encodings of FLAC frames. It's job is to repeatedly get a BlockEncodeRequest from a BlockThreadManager, and encode it.

Preston Lacey

Constructor Summary
FrameThread(Frame f, BlockThreadManager manager)
Method Summary
 void run()
          Run method.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public FrameThread(Frame f,
                   BlockThreadManager manager)
Constructor. Sets the Frame object that this FrameThread will use for encodings.

f - Frame object to use for encoding.
manager - BlockThreadManager to use as the BlockEncodeRequest source and destination.
Method Detail


public void run()
Run method. This FrameThread will get a BlockEncodeRequest from the BlockThreadManager, encode the block, return it to the manager, then repeat. If no BlockEncodeRequest is available, or if it recieves a request with the "frameNumber" field set to a negative value, it will break the loop and end, notifying the manager it has ended.

Specified by:
run in interface java.lang.Runnable