示例#1
0
    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
示例#2
0
 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()
示例#3
0
    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)
示例#4
0
 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()