+class MplexTaskPostcondition(Condition):
+ def check(self, task):
+ if task.error == task.ERROR_UNDERRUN:
+ return True
+ return task.error is None
+
+ def getErrorMessage(self, task):
+ print "[MplexTaskPostcondition] getErrorMessage", task
+ return {
+ task.ERROR_UNDERRUN: ("Can't multiplex source video!"),
+ task.ERROR_UNKNOWN: ("An unknown error occured!")
+ }[task.error]
+