|
@@ -6,7 +6,9 @@ package de.nplusc.izc.iZpl;
|
|
|
|
|
|
import com.coremedia.iso.IsoFile;
|
|
|
import de.nplusc.izc.tools.IOtools.FileTK;
|
|
|
+import de.nplusc.izc.tools.baseTools.Messagers;
|
|
|
import de.nplusc.izc.tools.baseTools.Tools;
|
|
|
+import de.nplusc.izc.tools.baseTools.arraytools;
|
|
|
import java.io.File;
|
|
|
import java.io.FileInputStream;
|
|
|
import java.io.IOException;
|
|
@@ -32,18 +34,37 @@ public class BurnMe
|
|
|
{
|
|
|
|
|
|
private static String burnprogP;
|
|
|
+ private static String ffmpegpath;
|
|
|
private static String devideID;
|
|
|
public static void Configure()
|
|
|
{
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
String cdrpath = Preferences.userRoot().get("izpl.cdrpath", "...");
|
|
|
if(cdrpath.equals("..."))
|
|
|
+ {
|
|
|
+ Messagers.SingleLineMsg("Navigate to CDRutils", "Okay");
|
|
|
Preferences.userRoot().put("izpl.cdrpath", Tools.FileChooseDlg(new JFrame(), true, false, new String[]
|
|
|
{
|
|
|
"exe"
|
|
|
}));
|
|
|
+ }
|
|
|
cdrpath = FileTK.getFilePath(Preferences.userRoot().get("izpl.cdrpath", "..."));
|
|
|
burnprogP=cdrpath;
|
|
|
|
|
|
+ String ffmp = Preferences.userRoot().get("izpl.ffm", "...");
|
|
|
+ if(ffmp.equals("..."))
|
|
|
+ {
|
|
|
+ Messagers.SingleLineMsg("Navigate to ffmpeg", "Okay");
|
|
|
+ Preferences.userRoot().put("izpl.ffm", Tools.FileChooseDlg(new JFrame(), true, false, new String[]
|
|
|
+ {
|
|
|
+ "exe"
|
|
|
+ }));
|
|
|
+ }
|
|
|
+ ffmp = FileTK.getFilePath(Preferences.userRoot().get("izpl.ffm", "..."));
|
|
|
+ ffmpegpath = ffmp;
|
|
|
+
|
|
|
String drv = Preferences.userRoot().get("izpl.defaultBurner", "...");
|
|
|
if(drv.equals("..."))
|
|
|
{
|
|
@@ -192,10 +213,37 @@ public class BurnMe
|
|
|
JTextArea logg = bpg.getLogPane();
|
|
|
for (List<String[]> list : disks)
|
|
|
{
|
|
|
- Tools.runSingleCmd(true, true, true, true, logg, new String[]{"ping","google.de"});
|
|
|
+ //Tools.runSingleCmd(true, true, true, true, logg, new String[]{"ping","google.de"});
|
|
|
+ FileTK.ensuredirExistence(Tools.processEnvVarsinLine("%temp%\\izpl\\burncache\\cache.map"));
|
|
|
+ String[] filesForCmd = new String[list.size()];
|
|
|
+ for (int i = 0; i < list.size(); i++)
|
|
|
+ {
|
|
|
+ String[] set = list.get(i);
|
|
|
+ String fn = FileTK.getFileName(set[0]);
|
|
|
+ filesForCmd[i] = Tools.processEnvVarsinLine("%temp%\\izpl\\burncache")+"\\"+fn+".wav";
|
|
|
+ //ffmpeg -i input.xxx -acodec pcm_s16le -ac 2 -f wav output.wav
|
|
|
+ Tools.runSingleCmd(true, true, true, true, logg, new String[]{ffmpegpath+"\\ffmpeg","-i",set[0],"-acodec","pcm_s16le","-ar","44100","-ac", "2",/* "-f", "wav ",*/ filesForCmd[i]});
|
|
|
+ }
|
|
|
done++;
|
|
|
status.setValue(done);
|
|
|
+ //Toasten cdrecord -v dev=ATAPI:0,0,0 -audio -pad *.wav
|
|
|
+ String[] temp = arraytools.concatAll( new String[]{burnprogP+"\\cdrecord","-v","dev="+devideID,"-audio","-pad"},filesForCmd);
|
|
|
+
|
|
|
+ //System.out.println(arraytools.ArrayKleben(temp, " "));
|
|
|
+ String t2 = "";
|
|
|
+ for (String string : temp)
|
|
|
+ {
|
|
|
+ t2+=" "+string;
|
|
|
+ }
|
|
|
+
|
|
|
+ System.out.println(t2);
|
|
|
+ //Tools.runSingleCmd(true, true, true, true, logg,temp);
|
|
|
+ //FileTK.verzeichnisKillen(new File(Tools.processEnvVarsinLine("%temp%\\izpl\\burncache\\")));
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //Builder.quickQuit();
|
|
|
}
|
|
|
}
|
|
|
).start();
|