projects
/
vuplus_dvbapp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support turbo2.
[vuplus_dvbapp]
/
lib
/
python
/
Plugins
/
Extensions
/
DVDBurn
/
Process.py
diff --git
a/lib/python/Plugins/Extensions/DVDBurn/Process.py
b/lib/python/Plugins/Extensions/DVDBurn/Process.py
old mode 100644
(file)
new mode 100755
(executable)
index
642a898
..
816551c
--- a/
lib/python/Plugins/Extensions/DVDBurn/Process.py
+++ b/
lib/python/Plugins/Extensions/DVDBurn/Process.py
@@
-5,7
+5,7
@@
from Screens.MessageBox import MessageBox
class png2yuvTask(Task):
def __init__(self, job, inputfile, outputfile):
Task.__init__(self, job, "Creating menu video")
class png2yuvTask(Task):
def __init__(self, job, inputfile, outputfile):
Task.__init__(self, job, "Creating menu video")
- self.setTool("
/usr/bin/
png2yuv")
+ self.setTool("png2yuv")
self.args += ["-n1", "-Ip", "-f25", "-j", inputfile]
self.dumpFile = outputfile
self.weighting = 15
self.args += ["-n1", "-Ip", "-f25", "-j", inputfile]
self.dumpFile = outputfile
self.weighting = 15
@@
-21,7
+21,7
@@
class png2yuvTask(Task):
class mpeg2encTask(Task):
def __init__(self, job, inputfile, outputfile):
Task.__init__(self, job, "Encoding menu video")
class mpeg2encTask(Task):
def __init__(self, job, inputfile, outputfile):
Task.__init__(self, job, "Encoding menu video")
- self.setTool("
/usr/bin/
mpeg2enc")
+ self.setTool("mpeg2enc")
self.args += ["-f8", "-np", "-a2", "-o", outputfile]
self.inputFile = inputfile
self.weighting = 25
self.args += ["-f8", "-np", "-a2", "-o", outputfile]
self.inputFile = inputfile
self.weighting = 25
@@
-36,7
+36,7
@@
class mpeg2encTask(Task):
class spumuxTask(Task):
def __init__(self, job, xmlfile, inputfile, outputfile):
Task.__init__(self, job, "Muxing buttons into menu")
class spumuxTask(Task):
def __init__(self, job, xmlfile, inputfile, outputfile):
Task.__init__(self, job, "Muxing buttons into menu")
- self.setTool("
/usr/bin/
spumux")
+ self.setTool("spumux")
self.args += [xmlfile]
self.inputFile = inputfile
self.dumpFile = outputfile
self.args += [xmlfile]
self.inputFile = inputfile
self.dumpFile = outputfile
@@
-54,7
+54,7
@@
class spumuxTask(Task):
class MakeFifoNode(Task):
def __init__(self, job, number):
Task.__init__(self, job, "Make FIFO nodes")
class MakeFifoNode(Task):
def __init__(self, job, number):
Task.__init__(self, job, "Make FIFO nodes")
- self.setTool("
/bin/
mknod")
+ self.setTool("mknod")
nodename = self.job.workspace + "/dvd_title_%d" % number + ".mpg"
self.args += [nodename, "p"]
self.weighting = 10
nodename = self.job.workspace + "/dvd_title_%d" % number + ".mpg"
self.args += [nodename, "p"]
self.weighting = 10
@@
-62,14
+62,14
@@
class MakeFifoNode(Task):
class LinkTS(Task):
def __init__(self, job, sourcefile, link_name):
Task.__init__(self, job, "Creating symlink for source titles")
class LinkTS(Task):
def __init__(self, job, sourcefile, link_name):
Task.__init__(self, job, "Creating symlink for source titles")
- self.setTool("
/bin/
ln")
+ self.setTool("ln")
self.args += ["-s", sourcefile, link_name]
self.weighting = 10
class CopyMeta(Task):
def __init__(self, job, sourcefile):
Task.__init__(self, job, "Copy title meta files")
self.args += ["-s", sourcefile, link_name]
self.weighting = 10
class CopyMeta(Task):
def __init__(self, job, sourcefile):
Task.__init__(self, job, "Copy title meta files")
- self.setTool("
/bin/
cp")
+ self.setTool("cp")
from os import listdir
path, filename = sourcefile.rstrip("/").rsplit("/",1)
tsfiles = listdir(path)
from os import listdir
path, filename = sourcefile.rstrip("/").rsplit("/",1)
tsfiles = listdir(path)
@@
-84,8
+84,8
@@
class DemuxTask(Task):
Task.__init__(self, job, "Demux video into ES")
title = job.project.titles[job.i]
self.global_preconditions.append(DiskspacePrecondition(title.estimatedDiskspace))
Task.__init__(self, job, "Demux video into ES")
title = job.project.titles[job.i]
self.global_preconditions.append(DiskspacePrecondition(title.estimatedDiskspace))
- self.setTool("
/usr/bin/
projectx")
- self.args += [inputfile, "-demux", "-out", self.job.workspace ]
+ self.setTool("projectx")
+ self.args += [inputfile, "-demux", "-
set", "ExportPanel.Streamtype.Subpicture=0", "-set", "ExportPanel.Streamtype.Teletext=0", "-
out", self.job.workspace ]
self.end = 300
self.prog_state = 0
self.weighting = 1000
self.end = 300
self.prog_state = 0
self.weighting = 1000
@@
-95,6
+95,8
@@
class DemuxTask(Task):
self.relevantAudioPIDs = [ ]
self.getRelevantAudioPIDs(title)
self.generated_files = [ ]
self.relevantAudioPIDs = [ ]
self.getRelevantAudioPIDs(title)
self.generated_files = [ ]
+ self.mplex_audiofiles = { }
+ self.mplex_videofile = ""
self.mplex_streamfiles = [ ]
if len(self.cutlist) > 1:
self.args += [ "-cut", self.cutfile ]
self.mplex_streamfiles = [ ]
if len(self.cutlist) > 1:
self.args += [ "-cut", self.cutfile ]
@@
-132,8
+134,10
@@
class DemuxTask(Task):
def haveNewFile(self, file):
print "[DemuxTask] produced file:", file, self.currentPID
self.generated_files.append(file)
def haveNewFile(self, file):
print "[DemuxTask] produced file:", file, self.currentPID
self.generated_files.append(file)
- if self.currentPID in self.relevantAudioPIDs or file.endswith("m2v"):
- self.mplex_streamfiles.append(file)
+ if self.currentPID in self.relevantAudioPIDs:
+ self.mplex_audiofiles[self.currentPID] = file
+ elif file.endswith("m2v"):
+ self.mplex_videofile = file
def haveProgress(self, progress):
#print "PROGRESS [%s]" % progress
def haveProgress(self, progress):
#print "PROGRESS [%s]" % progress
@@
-167,6
+171,13
@@
class DemuxTask(Task):
f.close()
def cleanup(self, failed):
f.close()
def cleanup(self, failed):
+ print "[DemuxTask::cleanup]"
+ self.mplex_streamfiles = [ self.mplex_videofile ]
+ for pid in self.relevantAudioPIDs:
+ if pid in self.mplex_audiofiles:
+ self.mplex_streamfiles.append(self.mplex_audiofiles[pid])
+ print self.mplex_streamfiles
+
if failed:
import os
for file in self.generated_files:
if failed:
import os
for file in self.generated_files:
@@
-194,7
+205,7
@@
class MplexTask(Task):
self.weighting = weighting
self.demux_task = demux_task
self.postconditions.append(MplexTaskPostcondition())
self.weighting = weighting
self.demux_task = demux_task
self.postconditions.append(MplexTaskPostcondition())
- self.setTool("
/usr/bin/
mplex")
+ self.setTool("mplex")
self.args += ["-f8", "-o", outputfile, "-v1"]
if inputfiles:
self.args += inputfiles
self.args += ["-f8", "-o", outputfile, "-v1"]
if inputfiles:
self.args += inputfiles
@@
-222,7
+233,7
@@
class RemoveESFiles(Task):
def __init__(self, job, demux_task):
Task.__init__(self, job, "Remove temp. files")
self.demux_task = demux_task
def __init__(self, job, demux_task):
Task.__init__(self, job, "Remove temp. files")
self.demux_task = demux_task
- self.setTool("
/bin/
rm")
+ self.setTool("rm")
self.weighting = 10
def prepare(self):
self.weighting = 10
def prepare(self):
@@
-234,7
+245,7
@@
class DVDAuthorTask(Task):
def __init__(self, job):
Task.__init__(self, job, "Authoring DVD")
self.weighting = 20
def __init__(self, job):
Task.__init__(self, job, "Authoring DVD")
self.weighting = 20
- self.setTool("
/usr/bin/
dvdauthor")
+ self.setTool("dvdauthor")
self.CWD = self.job.workspace
self.args += ["-x", self.job.workspace+"/dvdauthor.xml"]
self.menupreview = job.menupreview
self.CWD = self.job.workspace
self.args += ["-x", self.job.workspace+"/dvdauthor.xml"]
self.menupreview = job.menupreview
@@
-255,7
+266,7
@@
class DVDAuthorTask(Task):
class DVDAuthorFinalTask(Task):
def __init__(self, job):
Task.__init__(self, job, "dvdauthor finalize")
class DVDAuthorFinalTask(Task):
def __init__(self, job):
Task.__init__(self, job, "dvdauthor finalize")
- self.setTool("
/usr/bin/
dvdauthor")
+ self.setTool("dvdauthor")
self.args += ["-T", "-o", self.job.workspace + "/dvd"]
class WaitForResidentTasks(Task):
self.args += ["-T", "-o", self.job.workspace + "/dvd"]
class WaitForResidentTasks(Task):
@@
-292,7
+303,7
@@
class BurnTaskPostcondition(Condition):
class BurnTask(Task):
ERROR_NOTWRITEABLE, ERROR_LOAD, ERROR_SIZE, ERROR_WRITE_FAILED, ERROR_DVDROM, ERROR_ISOFS, ERROR_FILETOOLARGE, ERROR_ISOTOOLARGE, ERROR_MINUSRWBUG, ERROR_UNKNOWN = range(10)
class BurnTask(Task):
ERROR_NOTWRITEABLE, ERROR_LOAD, ERROR_SIZE, ERROR_WRITE_FAILED, ERROR_DVDROM, ERROR_ISOFS, ERROR_FILETOOLARGE, ERROR_ISOTOOLARGE, ERROR_MINUSRWBUG, ERROR_UNKNOWN = range(10)
- def __init__(self, job, extra_args=[], tool="
/bin/
growisofs"):
+ def __init__(self, job, extra_args=[], tool="growisofs"):
Task.__init__(self, job, job.name)
self.weighting = 500
self.end = 120 # 100 for writing, 10 for buffer flush, 10 for closing disc
Task.__init__(self, job, job.name)
self.weighting = 500
self.end = 120 # 100 for writing, 10 for buffer flush, 10 for closing disc
@@
-357,7
+368,7
@@
class BurnTask(Task):
class RemoveDVDFolder(Task):
def __init__(self, job):
Task.__init__(self, job, "Remove temp. files")
class RemoveDVDFolder(Task):
def __init__(self, job):
Task.__init__(self, job, "Remove temp. files")
- self.setTool("
/bin/
rm")
+ self.setTool("rm")
self.args += ["-rf", self.job.workspace]
self.weighting = 10
self.args += ["-rf", self.job.workspace]
self.weighting = 10
@@
-882,16
+893,16
@@
class DVDJob(Job):
volName = self.project.settings.name.getValue()
if output == "dvd":
self.name = _("Burn DVD")
volName = self.project.settings.name.getValue()
if output == "dvd":
self.name = _("Burn DVD")
- tool = "
/bin/
growisofs"
+ tool = "growisofs"
burnargs = [ "-Z", "/dev/" + harddiskmanager.getCD(), "-dvd-compat" ]
if self.project.size/(1024*1024) > self.project.MAX_SL:
burnargs += [ "-use-the-force-luke=4gms", "-speed=1", "-R" ]
elif output == "iso":
self.name = _("Create DVD-ISO")
burnargs = [ "-Z", "/dev/" + harddiskmanager.getCD(), "-dvd-compat" ]
if self.project.size/(1024*1024) > self.project.MAX_SL:
burnargs += [ "-use-the-force-luke=4gms", "-speed=1", "-R" ]
elif output == "iso":
self.name = _("Create DVD-ISO")
- tool = "
/usr/bin/mkisofs
"
+ tool = "
genisoimage
"
isopathfile = getISOfilename(self.project.settings.isopath.getValue(), volName)
burnargs = [ "-o", isopathfile ]
isopathfile = getISOfilename(self.project.settings.isopath.getValue(), volName)
burnargs = [ "-o", isopathfile ]
- burnargs += [ "-dvd-video", "-publisher", "
Dreambox
", "-V", volName, self.workspace + "/dvd" ]
+ burnargs += [ "-dvd-video", "-publisher", "
STB
", "-V", volName, self.workspace + "/dvd" ]
BurnTask(self, burnargs, tool)
RemoveDVDFolder(self)
BurnTask(self, burnargs, tool)
RemoveDVDFolder(self)
@@
-920,14
+931,14
@@
class DVDdataJob(Job):
output = self.project.settings.output.getValue()
volName = self.project.settings.name.getValue()
output = self.project.settings.output.getValue()
volName = self.project.settings.name.getValue()
- tool = "
/bin/
growisofs"
+ tool = "growisofs"
if output == "dvd":
self.name = _("Burn DVD")
burnargs = [ "-Z", "/dev/" + harddiskmanager.getCD(), "-dvd-compat" ]
if self.project.size/(1024*1024) > self.project.MAX_SL:
burnargs += [ "-use-the-force-luke=4gms", "-speed=1", "-R" ]
elif output == "iso":
if output == "dvd":
self.name = _("Burn DVD")
burnargs = [ "-Z", "/dev/" + harddiskmanager.getCD(), "-dvd-compat" ]
if self.project.size/(1024*1024) > self.project.MAX_SL:
burnargs += [ "-use-the-force-luke=4gms", "-speed=1", "-R" ]
elif output == "iso":
- tool = "
/usr/bin/mkisofs
"
+ tool = "
genisoimage
"
self.name = _("Create DVD-ISO")
isopathfile = getISOfilename(self.project.settings.isopath.getValue(), volName)
burnargs = [ "-o", isopathfile ]
self.name = _("Create DVD-ISO")
isopathfile = getISOfilename(self.project.settings.isopath.getValue(), volName)
burnargs = [ "-o", isopathfile ]
@@
-937,7
+948,7
@@
class DVDdataJob(Job):
burnargs += ["-iso-level", "4", "-allow-limited-size" ]
elif self.project.settings.dataformat.getValue() == "udf":
burnargs += ["-udf", "-allow-limited-size" ]
burnargs += ["-iso-level", "4", "-allow-limited-size" ]
elif self.project.settings.dataformat.getValue() == "udf":
burnargs += ["-udf", "-allow-limited-size" ]
- burnargs += [ "-publisher", "
Dreambox
", "-V", volName, "-follow-links", self.workspace ]
+ burnargs += [ "-publisher", "
STB
", "-V", volName, "-follow-links", self.workspace ]
BurnTask(self, burnargs, tool)
RemoveDVDFolder(self)
BurnTask(self, burnargs, tool)
RemoveDVDFolder(self)
@@
-958,6
+969,6
@@
class DVDisoJob(Job):
burnargs = [ "-Z", "/dev/" + harddiskmanager.getCD(), "-dvd-compat" ]
if getSize(imagepath)/(1024*1024) > self.project.MAX_SL:
burnargs += [ "-use-the-force-luke=4gms", "-speed=1", "-R" ]
burnargs = [ "-Z", "/dev/" + harddiskmanager.getCD(), "-dvd-compat" ]
if getSize(imagepath)/(1024*1024) > self.project.MAX_SL:
burnargs += [ "-use-the-force-luke=4gms", "-speed=1", "-R" ]
- burnargs += [ "-dvd-video", "-publisher", "
Dreambox
", "-V", volName, imagepath ]
- tool = "
/bin/
growisofs"
+ burnargs += [ "-dvd-video", "-publisher", "
STB
", "-V", volName, imagepath ]
+ tool = "growisofs"
BurnTask(self, burnargs, tool)
BurnTask(self, burnargs, tool)