def __init__(self):
self.n_frames = 2
- self.audio_count = 0
- self.video_count = 0
def audio_fade_in(self, frame_out):
child = {'attributes': {u'id': u'fadeout',
return child
def run(self, path_in, path_out):
+ audio_count = 0
+ video_count = 0
+
d = xmltodict(path_in)
for attr in d['children']:
if 'playlist' in attr['name'] and 'children' in attr:
frame_out = att['attributes']['out']
if 'audio' in producer:
- if not self.audio_count % 2:
+ if not audio_count % 2:
att['children'] = [self.audio_fade_in(frame_out)]
else:
att['children'] = [self.audio_fade_out(frame_in)]
- self.audio_count =+ 1
+ audio_count += 1
+
if 'video' in producer:
- if not self.video_count % 2:
+ if not video_count % 2:
att['children'] = [self.video_fade_in(frame_out)]
else:
att['children'] = [self.video_fade_out(frame_in)]
- self.video_count =+ 1
+ video_count += 1
data = dicttoxml(d)
f = open(path_out, 'w')