use mplayer gst is to slow
This commit is contained in:
parent
acc061ad8e
commit
a6d52af083
2 changed files with 46 additions and 12 deletions
|
|
@ -431,6 +431,11 @@ class ArchiveFile(SQLObject):
|
|||
f = join(cache.cache_root, 'frame', self.md5sum[:4], self.md5sum)
|
||||
oxdb_makedir(f)
|
||||
return f
|
||||
|
||||
def _get_stillFolder(self):
|
||||
f = join(cache.cache_root, 'still', self.md5sum[:4], self.md5sum)
|
||||
oxdb_makedir(f)
|
||||
return f
|
||||
|
||||
def _get_timelineFile(self):
|
||||
return join(cache.cache_root, 'timeline', self.md5sum[:4], "%s.png" % self.md5sum)
|
||||
|
|
@ -438,10 +443,6 @@ class ArchiveFile(SQLObject):
|
|||
def _get_posterStillFile(self):
|
||||
return join(cache.cache_root, 'posterStill', self.md5sum[:4], "%s.png" % self.md5sum)
|
||||
|
||||
def stillFile(self, position):
|
||||
position = oxlib.getValidFilename(position)
|
||||
return join(cache.cache_root, 'still', self.md5sum[:4], "%s_%s.png" % (self.md5sum, position))
|
||||
|
||||
def removeMiniMovie(self):
|
||||
if exists(self.mini_movie_file):
|
||||
os.remove(self.mini_movie_file)
|
||||
|
|
@ -740,13 +741,13 @@ class ArchiveFile(SQLObject):
|
|||
return cache.loadPosterStill(self, position)
|
||||
|
||||
def still(self, position):
|
||||
still = self.stillFile(position)
|
||||
still = os.path.join(self.stillFolder, "%s.%s" % (position.replace(':', '.'), 'png'))
|
||||
if not exists(still):
|
||||
oxdb_makedir(dirname(still))
|
||||
movieFile = self.absolutePath
|
||||
if os.path.splitext(movieFile)[-1] in ('.mov', '.mpg', '.mpeg'):
|
||||
movieFile = self.mini_movie_file
|
||||
extract_still(movieFile, still, position)
|
||||
extract_still(movieFile, position, self.stillFolder, -1)
|
||||
if exists(still):
|
||||
return cache.loadFile(still)
|
||||
return ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue