resindvd: Add a keypress mapping for switching audio track
authorJan Schmidt <thaytan@noraisin.net>
Mon, 26 Oct 2009 11:00:34 +0000 (11:00 +0000)
committerJan Schmidt <thaytan@noraisin.net>
Tue, 27 Oct 2009 12:23:25 +0000 (12:23 +0000)
For debugging purposes, make keys 1-8 switch audio track.

ext/resindvd/resindvdsrc.c

index 07162aad12347419f3edced9102c625a51c0bf8a..a4ac9dc420075369189b05d2172211052ada4ef2 100644 (file)
@@ -1581,6 +1581,10 @@ rsn_dvdsrc_handle_navigation_event (resinDvdSrc * src, GstEvent * event)
       } else if (g_str_equal (key, "bracketright")) {
         nav_res =
             rsn_dvdsrc_do_command (src, GST_NAVIGATION_COMMAND_NEXT_ANGLE);
+      } else if (key && key[0] >= '1' && key[0] <= '8') {
+        gint new_stream = key[0] - '1';
+        GST_INFO_OBJECT (src, "Selecting audio stream %d", new_stream);
+        rsn_dvdsrc_prepare_audio_stream_event (src, new_stream, new_stream);
       }
       break;
     }