[pitivi] misc: Rename print_ns to format_ns
- From: Mathieu Duponchelle <mathieudu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] misc: Rename print_ns to format_ns
- Date: Wed, 25 Dec 2013 20:32:42 +0000 (UTC)
commit 43adbb2a409ac879198f2129372f33813d42b3bc
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Fri Dec 13 21:15:28 2013 +0100
misc: Rename print_ns to format_ns
pitivi/timeline/previewers.py | 4 ++--
pitivi/utils/misc.py | 2 +-
pitivi/utils/pipeline.py | 10 +++++-----
pitivi/viewer.py | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/pitivi/timeline/previewers.py b/pitivi/timeline/previewers.py
index 150c520..c882c84 100644
--- a/pitivi/timeline/previewers.py
+++ b/pitivi/timeline/previewers.py
@@ -35,7 +35,7 @@ import renderer
from pitivi.settings import get_dir, xdg_cache_home
from pitivi.utils.signal import Signallable
from pitivi.utils.loggable import Loggable
-from pitivi.utils.misc import binary_search, filename_from_uri, quantize, quote_uri, hash_file, print_ns
+from pitivi.utils.misc import binary_search, filename_from_uri, quantize, quote_uri, hash_file, format_ns
from pitivi.utils.system import CPUUsageTracker
from pitivi.utils.timeline import Zoomable
from pitivi.utils.ui import CONTROL_WIDTH
@@ -394,7 +394,7 @@ class VideoPreviewer(Clutter.ScrollActor, PreviewGenerator, Zoomable, Loggable):
# too much trouble for something which does not happen in
# practice. My last words..
self.fixme("Thumbnail is already set for time: %s, %s",
- print_ns(time), print_ns(original_time))
+ format_ns(time), format_ns(original_time))
return
thumb.set_from_gdkpixbuf_animated(pixbuf)
if time in self.queue:
diff --git a/pitivi/utils/misc.py b/pitivi/utils/misc.py
index 182fb30..6c03a60 100644
--- a/pitivi/utils/misc.py
+++ b/pitivi/utils/misc.py
@@ -61,7 +61,7 @@ def between(a, b, c):
return (a <= b) and (b <= c)
-def print_ns(time):
+def format_ns(time):
if time == Gst.CLOCK_TIME_NONE:
return "CLOCK_TIME_NONE"
diff --git a/pitivi/utils/pipeline.py b/pitivi/utils/pipeline.py
index bba2f9b..ee6f06f 100644
--- a/pitivi/utils/pipeline.py
+++ b/pitivi/utils/pipeline.py
@@ -28,7 +28,7 @@ High-level pipelines
"""
from pitivi.utils.loggable import Loggable
from pitivi.utils.signal import Signallable
-from pitivi.utils.misc import print_ns
+from pitivi.utils.misc import format_ns
from gi.repository import GLib
from gi.repository import GObject
@@ -123,7 +123,7 @@ class Seeker(Signallable, Loggable):
self.emit('seek', position, format)
except PipelineError as e:
self.error("Error while seeking to position:%s format: %r, reason: %s",
- print_ns(position), format, e)
+ format_ns(position), format, e)
# if an exception happened while seeking, properly
# reset ourselves
return False
@@ -285,7 +285,7 @@ class SimplePipeline(Signallable, Loggable):
if not res:
raise PipelineError("Couldn't get position")
- self.log("Got position %s" % print_ns(cur))
+ self.log("Got position %s" % format_ns(cur))
return cur
def getDuration(self, format=Gst.Format.TIME):
@@ -298,7 +298,7 @@ class SimplePipeline(Signallable, Loggable):
if dur is None:
self.info("Invalid duration: None")
else:
- self.log("Got duration %s" % print_ns(dur))
+ self.log("Got duration %s" % format_ns(dur))
if self._duration != dur:
self.emit("duration-changed", dur)
@@ -379,7 +379,7 @@ class SimplePipeline(Signallable, Loggable):
return
if format == Gst.Format.TIME:
- self.debug("position : %s" % print_ns(position))
+ self.debug("position : %s" % format_ns(position))
else:
self.debug("position : %d , format:%d" % (position, format))
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index 0514964..53eb7f5 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -40,7 +40,7 @@ from pitivi.utils.pipeline import Seeker, SimplePipeline
from pitivi.utils.ui import SPACING, hex_to_rgb
from pitivi.utils.widgets import TimeWidget
from pitivi.utils.loggable import Loggable
-from pitivi.utils.misc import print_ns
+from pitivi.utils.misc import format_ns
GlobalSettings.addConfigSection("viewer")
GlobalSettings.addConfigOption("viewerDocked", section="viewer",
@@ -451,7 +451,7 @@ class PitiviViewer(Gtk.VBox, Loggable):
cur_time = time()
if not self._tmp_pipeline:
self.debug("Creating temporary pipeline for clip %s, position %s",
- clip_uri, print_ns(position))
+ clip_uri, format_ns(position))
self._oldTimelinePos = self.pipeline.getPosition()
self._tmp_pipeline = Gst.ElementFactory.make("playbin", None)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]