Seek to start/end with home/end
This commit is contained in:
parent
ed71a3a05c
commit
cf529cae28
1 changed files with 14 additions and 0 deletions
|
@ -302,6 +302,20 @@ class MainWindow(Gtk.ApplicationWindow):
|
||||||
self._seek_relative(-60)
|
self._seek_relative(-60)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
elif keyval == Gdk.keyval_from_name("Home"):
|
||||||
|
self.pipeline.seek_simple(
|
||||||
|
Gst.Format.TIME, Gst.SeekFlags.FLUSH | Gst.SeekFlags.KEY_UNIT, 0
|
||||||
|
)
|
||||||
|
return True
|
||||||
|
|
||||||
|
elif keyval == Gdk.keyval_from_name("End"):
|
||||||
|
success, duration = self.pipeline.query_duration(Gst.Format.TIME)
|
||||||
|
if success:
|
||||||
|
self.pipeline.seek_simple(
|
||||||
|
Gst.Format.TIME, Gst.SeekFlags.FLUSH | Gst.SeekFlags.KEY_UNIT, duration - 1
|
||||||
|
)
|
||||||
|
return True
|
||||||
|
|
||||||
elif keyval == Gdk.keyval_from_name("j"):
|
elif keyval == Gdk.keyval_from_name("j"):
|
||||||
self._cycle_subtitles()
|
self._cycle_subtitles()
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue