From ab0d5b59ab88da4887de2d866920091ab75ef549 Mon Sep 17 00:00:00 2001 From: Joar Wandborg Date: Thu, 29 Mar 2012 23:53:05 +0200 Subject: [PATCH] Cleaned up media_types.video.transcoders --- mediagoblin/media_types/video/transcoders.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mediagoblin/media_types/video/transcoders.py b/mediagoblin/media_types/video/transcoders.py index 088f6e1e..d3375aef 100644 --- a/mediagoblin/media_types/video/transcoders.py +++ b/mediagoblin/media_types/video/transcoders.py @@ -28,6 +28,8 @@ import Image from gst.extend import discoverer +_log = logging.getLogger(__name__) + gobject.threads_init() CPU_COUNT = 2 @@ -37,15 +39,13 @@ try: except NotImplementedError: _log.warning('multiprocessing.cpu_count not implemented') -_log = logging.getLogger(__name__) - os.putenv('GST_DEBUG_DUMP_DOT_DIR', '/tmp') def pixbuf_to_pilbuf(buf): data = list() for i in range(0, len(buf), 3): - r, g, b = [i for i in struct.unpack('BBB', buf[i:i + 3])] + r, g, b = struct.unpack('BBB', buf[i:i + 3]) data.append((r, g, b)) return data @@ -229,7 +229,7 @@ class VideoThumbnailer: im.putdata(data) - im.save(self.dest_path); + im.save(self.dest_path) _log.info('Saved thumbnail') -- 2.25.1