com.googlepages.dronten.jripper
Class Command

java.lang.Object
  extended by com.googlepages.dronten.jripper.Command

public class Command
extends java.lang.Object

Build shell commands to execute console applications in threads.


Field Summary
static boolean DEBUG
           
 
Constructor Summary
Command()
           
 
Method Summary
static void createEncoderForCD(Album album, Track track, java.util.Vector<BaseThread> threads, java.lang.String outFileName, boolean wholecd)
          Encode streams from cd to wav/mp3/ogg/flac/aac files.
static void createEncoderForFiles(Album album, Track track, java.util.Vector<BaseThread> threads, java.lang.String outFileName)
          Encode wav/mp3/ogg/flac/aac files to wav/mp3/ogg/flac/aac.
INPUT OUTPUT RESULT PROGRESS
cd <=> m4a OK OK
cd <=> mp3 OK OK
cd <=> ogg OK OK
cd <=> flac OK OK
cd <=> wav OK OK

m4a <=> m4a ERROR OK Patched exe
m4a <=> mp3 OK OK Patched exe
m4a <=> ogg OK OK Patched exe
m4a <=> flac ERROR OK Patched exe
m4a <=> wav OK OK Patched exe

mp3 <=> m4a OK OK
mp3 <=> mp3 OK OK
mp3 <=> ogg OK OK
mp3 <=> flac OK! OK
mp3 <=> wav OK OK

ogg <=> m4a OK OK
ogg <=> mp3 OK OK
ogg <=> ogg OK OK
ogg <=> flac OK! OK
ogg <=> wav OK OK

flac <=> m4a OK ERROR flac doesn't flush progress?
flac <=> mp3 OK ERROR
flac <=> ogg OK ERROR
flac <=> flac OK ERROR
flac <=> wav OK ERROR

wav <=> m4a OK OK
wav <=> mp3 OK OK
wav <=> ogg OK OK
wav <=> flac OK OK
wav <=> wav OK OK
static void createEncoderForWavFiles(Album album, Track track, java.util.Vector<BaseThread> threads, java.lang.String outFileName)
          Encode wav files to mp3/ogg/flac/aac.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static boolean DEBUG
Constructor Detail

Command

public Command()
Method Detail

createEncoderForCD

public static void createEncoderForCD(Album album,
                                      Track track,
                                      java.util.Vector<BaseThread> threads,
                                      java.lang.String outFileName,
                                      boolean wholecd)
                               throws java.lang.Exception
Encode streams from cd to wav/mp3/ogg/flac/aac files.

Parameters:
album - Album object
track - Current cd track
threads - Thread vector, one thread for every track
outFileName - Result file
wholecd - true if whole cd is to be ripped into one track
Throws:
java.lang.Exception - Throws exception if some error occured

createEncoderForFiles

public static void createEncoderForFiles(Album album,
                                         Track track,
                                         java.util.Vector<BaseThread> threads,
                                         java.lang.String outFileName)
                                  throws java.lang.Exception
Encode wav/mp3/ogg/flac/aac files to wav/mp3/ogg/flac/aac.
INPUT OUTPUT RESULT PROGRESS
cd <=> m4a OK OK
cd <=> mp3 OK OK
cd <=> ogg OK OK
cd <=> flac OK OK
cd <=> wav OK OK

m4a <=> m4a ERROR OK Patched exe
m4a <=> mp3 OK OK Patched exe
m4a <=> ogg OK OK Patched exe
m4a <=> flac ERROR OK Patched exe
m4a <=> wav OK OK Patched exe

mp3 <=> m4a OK OK
mp3 <=> mp3 OK OK
mp3 <=> ogg OK OK
mp3 <=> flac OK! OK
mp3 <=> wav OK OK

ogg <=> m4a OK OK
ogg <=> mp3 OK OK
ogg <=> ogg OK OK
ogg <=> flac OK! OK
ogg <=> wav OK OK

flac <=> m4a OK ERROR flac doesn't flush progress?
flac <=> mp3 OK ERROR
flac <=> ogg OK ERROR
flac <=> flac OK ERROR
flac <=> wav OK ERROR

wav <=> m4a OK OK
wav <=> mp3 OK OK
wav <=> ogg OK OK
wav <=> flac OK OK
wav <=> wav OK OK

Parameters:
album - Album object
track - Track object
threads - Thread arrray which will conain this encoder/decoder task
outFileName - Name of encoded track
Throws:
java.lang.Exception - Throws exception if some error occured

createEncoderForWavFiles

public static void createEncoderForWavFiles(Album album,
                                            Track track,
                                            java.util.Vector<BaseThread> threads,
                                            java.lang.String outFileName)
                                     throws java.lang.Exception
Encode wav files to mp3/ogg/flac/aac.

Parameters:
album - Album object
track - Track object
threads - Thread arrray which will conain this encoder/decoder task
outFileName - Name of encoded track
Throws:
java.lang.Exception - Throws exception if some error occured