msmith - in flumotion/trunk: .
flumotion/component/producers/playlist flumotion/test
flumotion-commit at lists.fluendo.com
flumotion-commit at lists.fluendo.com
Tue May 22 18:44:31 CEST 2007
Author: msmith
Date: Tue May 22 18:44:28 2007
New Revision: 5003
Modified:
flumotion/trunk/ChangeLog
flumotion/trunk/flumotion/component/producers/playlist/smartscale.py
flumotion/trunk/flumotion/test/test_component.py
Log:
* flumotion/component/producers/playlist/smartscale.py:
Older versions of gst-python don't have gst.Fraction.__float__, so
don't use it.
Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog (original)
+++ flumotion/trunk/ChangeLog Tue May 22 18:44:28 2007
@@ -1,5 +1,11 @@
2007-05-22 Michael Smith <msmith at fluendo.com>
+ * flumotion/component/producers/playlist/smartscale.py:
+ Older versions of gst-python don't have gst.Fraction.__float__, so
+ don't use it.
+
+2007-05-22 Michael Smith <msmith at fluendo.com>
+
* misc/pycheckerhelp.py
* flumotion/admin/admin.py:
* flumotion/admin/command/commands.py:
Modified: flumotion/trunk/flumotion/component/producers/playlist/smartscale.py
==============================================================================
--- flumotion/trunk/flumotion/component/producers/playlist/smartscale.py (original)
+++ flumotion/trunk/flumotion/component/producers/playlist/smartscale.py Tue May 22 18:44:28 2007
@@ -158,7 +158,9 @@
else:
par = self.parout
dar = self.darin
- if float(self.darin) > float(self.darout):
+ fdarin = float(self.darin.num) / float(self.darin.denom)
+ fdarout = float(self.darout.num) / float(self.darout.denom)
+ if fdarin > fdarout:
self.log("incoming DAR is greater that ougoing DAR. Adding top/bottom borders")
# width, PAR stays the same as output
# calculate newheight = (PAR * widthout) / DAR
Modified: flumotion/trunk/flumotion/test/test_component.py
==============================================================================
--- flumotion/trunk/flumotion/test/test_component.py (original)
+++ flumotion/trunk/flumotion/test/test_component.py Tue May 22 18:44:28 2007
@@ -247,11 +247,15 @@
def testErrors(self):
d, pipeline = pipelineFactory('')
- def pipelineFactoryErrback(failure):
- assert(isinstance(failure, failure.Failure))
- d.addCallback(pipelineFactoryErrback)
+ def notCalled(res):
+ self.fail("Should not be reachable")
+ def pipelineFactoryErrback(f):
+ assert(isinstance(f, failure.Failure))
+
+ d.addCallback(notCalled)
+ d.addErrback(pipelineFactoryErrback)
return d
- testErrors.skip = "Help, I cant seem to port properly"
+ #testErrors.skip = "Help, I cant seem to port properly"
if __name__ == '__main__':
unittest.main()
More information about the flumotion-commit
mailing list