@@ -94,14 +94,6 @@ def __init__(self, *args, **kwargs):
94
94
self .close_button .setVisible (False )
95
95
self .exporting = False
96
96
97
- # Update FPS / Profile timer
98
- # Timer to use a delay before applying new profile/fps data (so we don't spam libopenshot)
99
- self .delayed_fps_timer = None
100
- self .delayed_fps_timer = QTimer ()
101
- self .delayed_fps_timer .setInterval (200 )
102
- self .delayed_fps_timer .setSingleShot (True )
103
- self .delayed_fps_timer .timeout .connect (self .delayed_fps_callback )
104
-
105
97
# Pause playback (to prevent crash since we are fixing to change the timeline's max size)
106
98
get_app ().window .actionPlay_trigger (None , force = "pause" )
107
99
@@ -279,19 +271,6 @@ def __init__(self, *args, **kwargs):
279
271
# Determine the length of the timeline (in frames)
280
272
self .updateFrameRate ()
281
273
282
- def delayed_fps_callback (self ):
283
- """Callback for fps/profile changed event timer
284
- (to delay the timeline mapping so we don't spam libopenshot)"""
285
- # Calculate fps
286
- fps_double = self .timeline .info .fps .ToDouble ()
287
-
288
- # Apply mapping if valid fps detected (anything larger than 300 fps is considered invalid)
289
- if self .timeline and fps_double <= 300.0 :
290
- log .info ("Valid framerate detected, sending to libopenshot: %s" % fps_double )
291
- self .timeline .ApplyMapperToClips ()
292
- else :
293
- log .warning ("Invalid framerate detected, not sending it to libopenshot: %s" % fps_double )
294
-
295
274
def getProfilePath (self , profile_name ):
296
275
"""Get the profile path that matches the name"""
297
276
for profile , path in self .profile_paths .items ():
@@ -346,10 +325,6 @@ def updateFrameRate(self):
346
325
self .timeline .info .channels = self .txtChannels .value ()
347
326
self .timeline .info .channel_layout = self .cboChannelLayout .currentData ()
348
327
349
- # Send changes to libopenshot (apply mappings to all framemappers)
350
- # Start or restart timer to process changes after a small delay
351
- self .delayed_fps_timer .start ()
352
-
353
328
# Determine max frame (based on clips)
354
329
self .timeline_length_int = self .timeline .GetMaxFrame ()
355
330
@@ -836,6 +811,7 @@ def titlestring(sec, fps, mess):
836
811
837
812
# Re-update the timeline FPS again (since the timeline just got clobbered)
838
813
self .updateFrameRate ()
814
+ self .timeline .ApplyMapperToClips ()
839
815
840
816
# Create FFmpegWriter
841
817
try :
0 commit comments