def do_keyframe(self, user_data): # Forces a keyframe on all video encoders event = GstVideo.video_event_new_downstream_force_key_unit( self.clock.get_time(), 0, 0, True, 0) self.pipeline.send_event(event) return True
def request_iframe(self): src = self.pipe.get_by_name('iframe') event = GstVideo.video_event_new_downstream_force_key_unit( Gst.CLOCK_TIME_NONE, Gst.CLOCK_TIME_NONE, Gst.CLOCK_TIME_NONE, True, 0) src.send_event(event) src.unref()
def force_keyframe(self): return # nothing … clock = self.get_clock() now = clock.get_time() force_keyframe_event = GstVideo.video_event_new_downstream_force_key_unit(now, now, now, True, 0) self.source.send_event(force_keyframe_event)
def request_iframe(self): src = self.pipe.get_by_name('iframe') event = GstVideo.video_event_new_downstream_force_key_unit(Gst.CLOCK_TIME_NONE, Gst.CLOCK_TIME_NONE, Gst.CLOCK_TIME_NONE, True, 0) src.send_event(event) src.unref()