← Back to team overview

openshot.code team mailing list archive

[Branch ~openshot.code/openshot/main] Rev 564: Revision 556 resulted in no audio effects being added to Openshot if running version 0.7.4 or les...

 

------------------------------------------------------------
revno: 564
committer: Andy Finch <we.rocked.in79@xxxxxxxxx>
branch nick: openshot
timestamp: Mon 2011-09-12 21:49:21 +0100
message:
  Revision 556 resulted in no audio effects being added to Openshot if running version 0.7.4 or less of MLT. This update fixes that by checking the version of MLT before skipping any sox audio effects.
  
  So for versions 0.7.4 or less, the behaviour should be as before. For versions greater than 0.7.4, no unknown sox effects are added.
modified:
  openshot/windows/TreeEffects.py


--
lp:openshot
https://code.launchpad.net/~openshot.code/openshot/main

Your team OpenShot Code is subscribed to branch lp:openshot.
To unsubscribe from this branch go to https://code.launchpad.net/~openshot.code/openshot/main/+edit-subscription
=== modified file 'openshot/windows/TreeEffects.py'
--- openshot/windows/TreeEffects.py	2011-09-05 04:36:22 +0000
+++ openshot/windows/TreeEffects.py	2011-09-12 20:49:21 +0000
@@ -139,12 +139,19 @@
 					print "Warning: effect not found in your version of Frei0r: %s" % my_effect.service
 					continue
 
-			# does the sox installation include this effect?
-			if my_effect.service.startswith("sox"):
-				if ("sox.%s" % my_effect.audio_effect) not in self.project.form.filters:
-					# don't add this effect, skip to the next one
-					print "Warning: effect not found in your version of Sox: %s" % ("sox:%s" % my_effect.audio_effect)
-					continue
+			# The way sox effects filters are indentified in MLT
+			# changed in 0.7.4. Previously, there was just a generic 'sox' filter.
+			# From 0.7.4, each sox effect is output individually.
+			# The following check will only work with versions 0.7.4 and above
+			# of MLT.
+			if self.project.form.MyVideo:
+				if self.project.form.MyVideo.check_version(0, 7, 4):
+					# does the sox installation include this effect?
+					if my_effect.service.startswith("sox"):
+						if ("sox.%s" % my_effect.audio_effect) not in self.project.form.filters:
+							# don't add this effect, skip to the next one
+							print "Warning: effect not found in your version of Sox: %s" % ("sox:%s" % my_effect.audio_effect)
+							continue
 			
 			# check if a filter matches (if any)
 			if not self.does_match_filter(my_effect, filter):