From f2894bde95a7cac0eb4a8188e0cd15b2ab0f88c8 Mon Sep 17 00:00:00 2001 From: yomguy Date: Wed, 26 Sep 2012 14:28:35 +0200 Subject: [PATCH] fix api doc and adaprter property --- timeside/api.py | 6 +++--- timeside/core.py | 9 +-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/timeside/api.py b/timeside/api.py index f3fb08f..ab877e2 100644 --- a/timeside/api.py +++ b/timeside/api.py @@ -55,11 +55,11 @@ class IProcessor(Interface): def blocksize(): """The total number of frames that this processor can output for each step - in the pipeline, or None if the duration is unknown.""" + in the pipeline, or None if the number is unknown.""" def totalframes(): - """The total number of frames that this processor can output, or None if - the duration is unknown.""" + """The total number of frames that this processor will output, or None if + the number is unknown.""" def process(self, frames=None, eod=False): """Process input frames and return a (output_frames, eod) tuple. diff --git a/timeside/core.py b/timeside/core.py index f87dc34..8fecc21 100644 --- a/timeside/core.py +++ b/timeside/core.py @@ -123,18 +123,11 @@ class FixedSizeInputAdapter(object): return blocksize - def totalframes(self, input_totalframes): """Return the total number of frames that this adapter will output according to the input_blocksize argument""" - totalframes = input_totalframes - if self.pad: - mod = input_totalframes % self.buffer_size - if mod: - totalframes += self.buffer_size - mod - - return totalframes + return input_totalframes def process(self, frames, eod): """Returns an iterator over tuples of the form (buffer, eod) where buffer is a -- 2.39.5