msmith - in flumotion/branches/platform-3: . flumotion/component/producers/playlist

flumotion-commit at lists.fluendo.com flumotion-commit at lists.fluendo.com
Thu Jun 14 19:09:16 CEST 2007


Author: msmith
Date: Thu Jun 14 19:09:11 2007
New Revision: 5183

Modified:
   flumotion/branches/platform-3/ChangeLog
   flumotion/branches/platform-3/flumotion/component/producers/playlist/playlist.py
   flumotion/branches/platform-3/flumotion/component/producers/playlist/playlist.xml
Log:
        * flumotion/component/producers/playlist/playlist.py:
        * flumotion/component/producers/playlist/playlist.xml:
          Add configurable pattern, wave for default sources. TODO: add to
          trunk and test?



Modified: flumotion/branches/platform-3/ChangeLog
==============================================================================
--- flumotion/branches/platform-3/ChangeLog	(original)
+++ flumotion/branches/platform-3/ChangeLog	Thu Jun 14 19:09:11 2007
@@ -1,3 +1,10 @@
+2007-06-14  Michael Smith <msmith at fluendo.com>
+
+	* flumotion/component/producers/playlist/playlist.py:
+	* flumotion/component/producers/playlist/playlist.xml:
+	  Add configurable pattern, wave for default sources. TODO: add to
+	  trunk and test?
+
 2007-06-14  Zaheer Abbas Merali  <zaheerabbas at merali dot org>
 
 	* flumotion/component/combiners/switch/switch.py (Switch.cb):

Modified: flumotion/branches/platform-3/flumotion/component/producers/playlist/playlist.py
==============================================================================
--- flumotion/branches/platform-3/flumotion/component/producers/playlist/playlist.py	(original)
+++ flumotion/branches/platform-3/flumotion/component/producers/playlist/playlist.py	Thu Jun 14 19:09:11 2007
@@ -37,10 +37,13 @@
 
 T_ = messages.gettexter('flumotion')
 
-def videotest_gnl_src(name, start, duration, priority):
+def videotest_gnl_src(name, start, duration, priority, pattern=None):
     src = gst.element_factory_make('videotestsrc')
-    # Set videotestsrc to all black.
-    src.props.pattern = 2
+    if pattern:
+        src.props.pattern = pattern
+    else:
+        # Set videotestsrc to all black.
+        src.props.pattern = 2
     gnlsrc = gst.element_factory_make('gnlsource', name)
     gnlsrc.props.start = start
     gnlsrc.props.duration = duration
@@ -51,10 +54,13 @@
 
     return gnlsrc
 
-def audiotest_gnl_src(name, start, duration, priority):
+def audiotest_gnl_src(name, start, duration, priority, wave=None):
     src = gst.element_factory_make('audiotestsrc')
-    # Set audiotestsrc to use silence.
-    src.props.wave = 4 
+    if wave:
+        src.props.wave = wave
+    else:
+        # Set audiotestsrc to use silence.
+        src.props.wave = 4 
     gnlsrc = gst.element_factory_make('gnlsource', name)
     gnlsrc.props.start = start
     gnlsrc.props.duration = duration
@@ -192,15 +198,15 @@
 
         return pipeline
 
-    def _createDefaultSources(self):
+    def _createDefaultSources(self, properties):
         if self._hasVideo:
             vsrc = videotest_gnl_src("videotestdefault", 0, 2**63 - 1, 
-                2**31 - 1)
+                2**31 - 1, properties.get('video-pattern', None))
             self.videocomp.add(vsrc)
 
         if self._hasAudio:
             asrc = audiotest_gnl_src("videotestdefault", 0, 2**63 - 1, 
-                2**31 - 1)
+                2**31 - 1, properties.get('audio-wave', None))
             self.audiocomp.add(asrc)
 
     def _setupClock(self, pipeline):
@@ -316,7 +322,7 @@
         pipeline = self._buildPipeline() 
         self._setupClock(pipeline)
 
-        self._createDefaultSources()
+        self._createDefaultSources(props)
 
         self.connect_feeders(pipeline)
         return pipeline

Modified: flumotion/branches/platform-3/flumotion/component/producers/playlist/playlist.xml
==============================================================================
--- flumotion/branches/platform-3/flumotion/component/producers/playlist/playlist.xml	(original)
+++ flumotion/branches/platform-3/flumotion/component/producers/playlist/playlist.xml	Thu Jun 14 19:09:11 2007
@@ -19,6 +19,11 @@
         <property name="video" type="boolean"
                   description="Output video"/>
 
+        <property name="video-pattern" type="string"
+                  description="Output video pattern for default video"/>
+        <property name="audio-wave" type="string"
+                  description="Output audio wave for default audio"/>
+
         <property name="height" type="int"
                   description="Scaled output height of video" />
         <property name="width" type="int"


More information about the flumotion-commit mailing list