* morituri/common/checksum.py:
* morituri/common/common.py: * morituri/common/encode.py: * morituri/image/image.py: * morituri/test/test_common_encode.py: Moved quoteParse.
This commit is contained in:
@@ -84,7 +84,7 @@ class ChecksumTask(gstreamer.GstPipelineTask):
|
||||
filesrc location="%s" !
|
||||
decodebin name=decode ! audio/x-raw-int !
|
||||
appsink name=sink sync=False emit-signals=True
|
||||
''' % common.quoteParse(self._path).encode('utf-8')
|
||||
''' % gstreamer.quoteParse(self._path).encode('utf-8')
|
||||
|
||||
def paused(self):
|
||||
sink = self.pipeline.get_by_name('sink')
|
||||
|
||||
@@ -67,15 +67,6 @@ def framesToHMSF(frames):
|
||||
|
||||
return "%02d:%02d:%02d.%02d" % (h, m, s, f)
|
||||
|
||||
def quoteParse(path):
|
||||
"""
|
||||
Quote a path for use in gst.parse_launch.
|
||||
"""
|
||||
# Make sure double quotes are escaped. See
|
||||
# morituri.test.test_common_checksum
|
||||
|
||||
return path.replace('"', '\\"')
|
||||
|
||||
class Persister(object):
|
||||
"""
|
||||
I wrap an optional pickle to persist an object to disk.
|
||||
|
||||
@@ -168,9 +168,9 @@ class EncodeTask(gstreamer.GstPipelineTask):
|
||||
level name=level !
|
||||
%s ! identity name=identity !
|
||||
filesink location="%s" name=sink''' % (
|
||||
common.quoteParse(self._inpath).encode('utf-8'),
|
||||
gstreamer.quoteParse(self._inpath).encode('utf-8'),
|
||||
self._profile.pipeline,
|
||||
common.quoteParse(self._outpath).encode('utf-8'))
|
||||
gstreamer.quoteParse(self._outpath).encode('utf-8'))
|
||||
|
||||
def parsed(self):
|
||||
tagger = self.pipeline.get_by_name('tagger')
|
||||
@@ -295,7 +295,7 @@ class TagReadTask(gstreamer.GstPipelineTask):
|
||||
filesrc location="%s" !
|
||||
decodebin name=decoder !
|
||||
fakesink''' % (
|
||||
common.quoteParse(self._path).encode('utf-8'))
|
||||
gstreamer.quoteParse(self._path).encode('utf-8'))
|
||||
|
||||
def bus_eos_cb(self, bus, message):
|
||||
self.debug('eos, scheduling stop')
|
||||
@@ -334,8 +334,8 @@ class TagWriteTask(task.Task):
|
||||
filesrc location="%s" !
|
||||
flactag name=tagger !
|
||||
filesink location="%s"''' % (
|
||||
common.quoteParse(self._inpath).encode('utf-8'),
|
||||
common.quoteParse(self._outpath).encode('utf-8')))
|
||||
gstreamer.quoteParse(self._inpath).encode('utf-8'),
|
||||
gstreamer.quoteParse(self._outpath).encode('utf-8')))
|
||||
|
||||
# set tags
|
||||
tagger = self._pipeline.get_by_name('tagger')
|
||||
|
||||
Reference in New Issue
Block a user