Package javazoom.jl.converter
Interface Converter.ProgressListener
- All Known Implementing Classes:
Converter.PrintWriterProgressListener
- Enclosing class:
Converter
public static interface Converter.ProgressListener
This interface is used by the Converter to provide
notification of tasks being carried out by the converter,
and to provide new information as it becomes available.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConversion is complete.static final int -
Method Summary
Modifier and TypeMethodDescriptionbooleanCalled when an exception is thrown during while converting a frame.voidconverterUpdate(int updateID, int param1, int param2) Notifies the listener that new information is available.voiddecodedFrame(int frameNo, Header header, Obuffer o) This method is called after a frame has been decoded.voidparsedFrame(int frameNo, Header header) If the converter wishes to make a first pass over the audio frames, this is called as each frame is parsed.voidThis method is called after each frame has been read, but before it has been decoded.
-
Field Details
-
UPDATE_FRAME_COUNT
static final int UPDATE_FRAME_COUNT- See Also:
-
UPDATE_CONVERT_COMPLETE
static final int UPDATE_CONVERT_COMPLETEConversion is complete. Param1 contains the time to convert in milliseconds. Param2 contains the number of MPEG audio frames converted.- See Also:
-
-
Method Details
-
converterUpdate
void converterUpdate(int updateID, int param1, int param2) Notifies the listener that new information is available.- Parameters:
updateID- Code indicating the information that has been updated.param1- Parameter whose value depends upon the update code.param2- Parameter whose value depends upon the update code. TheupdateIDparameter can take these values: UPDATE_FRAME_COUNT: param1 is the frame count, or -1 if not known. UPDATE_CONVERT_COMPLETE: param1 is the conversion time, param2 is the number of frames converted.
-
parsedFrame
If the converter wishes to make a first pass over the audio frames, this is called as each frame is parsed. -
readFrame
This method is called after each frame has been read, but before it has been decoded.- Parameters:
frameNo- The 0-based sequence number of the frame.header- The Header rerpesenting the frame just read.
-
decodedFrame
This method is called after a frame has been decoded.- Parameters:
frameNo- The 0-based sequence number of the frame.header- The Header rerpesenting the frame just read.o- The Obuffer the deocded data was written to.
-
converterException
Called when an exception is thrown during while converting a frame.- Parameters:
t- TheThrowableinstance that was thrown.- Returns:
trueto continue processing, or false to abort conversion. If this method returnsfalse, the exception is propagated to the caller of the convert() method. Iftrueis returned, the exception is silently ignored and the converter moves onto the next frame.
-