[pitivi] factories: add methods to get list of interpolated properties from factories based on stream
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi] factories: add methods to get list of interpolated properties from factories based on stream
- Date: Wed, 24 Jun 2009 14:00:26 +0000 (UTC)
commit 14b3942bb33d557e169cf05eaa7db50e3e53b651
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Wed May 27 16:38:42 2009 -0700
factories: add methods to get list of interpolated properties from factories based on stream
pitivi/factories/base.py | 3 +++
pitivi/factories/file.py | 8 ++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/factories/base.py b/pitivi/factories/base.py
index 614816c..bcdc34a 100644
--- a/pitivi/factories/base.py
+++ b/pitivi/factories/base.py
@@ -190,6 +190,9 @@ class ObjectFactory(Signallable, Loggable):
def __str__(self):
return "<%s: %s>" % (self.__class__.__name__, self.name)
+ def getInterpolatedProperties(self, stream):
+ return {}
+
class SourceFactory(ObjectFactory):
"""
Base class for factories that produce output and have no input.
diff --git a/pitivi/factories/file.py b/pitivi/factories/file.py
index 4343452..5f8ed6a 100644
--- a/pitivi/factories/file.py
+++ b/pitivi/factories/file.py
@@ -42,6 +42,14 @@ class FileSourceFactory(RandomAccessSourceFactory):
# FIXME: backward compatibility
self.filename = uri
+ def getInterpolatedProperties(self, stream):
+ # FIXME: dummy implementation
+ props = RandomAccessSourceFactory.getInterpolatedProperties()
+ if isinstance(stream, AudioStream):
+ return props.update({"volume" : (float, 0.5)})
+ elif isinstance(stream, VideoStream):
+ return props.update({"alpha" : (float, 0.5))
+
class PictureFileSourceFactory(FileSourceFactory):
"""
Factory for image sources.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]