give right nodes to build filter function
This commit is contained in:
parent
8f359f4750
commit
c8261011db
@ -162,34 +162,30 @@ class GetSourceFromFolder:
|
|||||||
duration = float(self.probe.format['duration'])
|
duration = float(self.probe.format['duration'])
|
||||||
self.node = {
|
self.node = {
|
||||||
'in': 0,
|
'in': 0,
|
||||||
|
'seek': 0,
|
||||||
'out': duration,
|
'out': duration,
|
||||||
'duration': duration,
|
'duration': duration,
|
||||||
'source': self._media.store[self.index]
|
'source': self._media.store[self.index],
|
||||||
|
'probe': self.probe
|
||||||
}
|
}
|
||||||
if self.index + 1 < len(self._media.store):
|
if self.index < len(self._media.store) - 1:
|
||||||
self.next_probe.load(self._media.store[self.index + 1])
|
self.next_probe.load(self._media.store[self.index + 1])
|
||||||
next_duration = float(self.next_probe.format['duration'])
|
next_duration = float(self.next_probe.format['duration'])
|
||||||
self.node_next = {
|
self.node_next = {
|
||||||
'in': 0,
|
'in': 0,
|
||||||
|
'seek': 0,
|
||||||
'out': next_duration,
|
'out': next_duration,
|
||||||
'duration': next_duration,
|
'duration': next_duration,
|
||||||
'source': self._media.store[self.index + 1]
|
'source': self._media.store[self.index + 1],
|
||||||
|
'probe': self.next_probe
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
self._media.rand()
|
self._media.rand()
|
||||||
self.next_probe.load(self._media.store[0])
|
self.node_next = None
|
||||||
next_duration = float(self.next_probe.format['duration'])
|
|
||||||
self.node_next = {
|
|
||||||
'in': 0,
|
|
||||||
'out': next_duration,
|
|
||||||
'duration': next_duration,
|
|
||||||
'source': self._media.store[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
self.node['src_cmd'] = ['-i', self._media.store[self.index]]
|
self.node['src_cmd'] = ['-i', self._media.store[self.index]]
|
||||||
self.node['filter'] = build_filtergraph(
|
self.node['filter'] = build_filtergraph(
|
||||||
self.node, self.node_last, self.node_next, duration,
|
self.node, self.node_last, self.node_next)
|
||||||
0.0, duration, self.probe)
|
|
||||||
|
|
||||||
yield self.node
|
yield self.node
|
||||||
self.index += 1
|
self.index += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user