gst-play: Add keyboard shortcut '0' to seek to beginning
authorVivia Nikolaidou <vivia@ahiru.eu>
Tue, 22 Sep 2015 20:12:10 +0000 (23:12 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Fri, 2 Oct 2015 14:28:24 +0000 (17:28 +0300)
https://bugzilla.gnome.org/show_bug.cgi?id=755440

tools/gst-play.c

index 40361c0..3517524 100644 (file)
@@ -973,6 +973,7 @@ print_keyboard_help (void)
     "a", N_("change audio track")}, {
     "v", N_("change video track")}, {
     "s", N_("change subtitle track")}, {
+    "0", N_("seek to beginning")}, {
   "k", N_("show keyboard shortcuts")},};
   guint i, chars_to_pad, desc_len, max_desc_len = 0;
 
@@ -1063,6 +1064,9 @@ keyboard_cb (const gchar * key_input, gpointer user_data)
     case 's':
       play_cycle_track_selection (play, GST_PLAY_TRACK_TYPE_SUBTITLE);
       break;
+    case '0':
+      play_do_seek (play, 0, play->rate, play->trick_mode);
+      break;
       /* fall through */
     default:
       if (strcmp (key_input, GST_PLAY_KB_ARROW_RIGHT) == 0) {