[mythtv] Extra edit mode key bindings

David Engel dlengel at attbi.com
Sat Jun 21 16:59:30 EDT 2003


Here's a patch which adds a few extra key bindings in video edit mode.
Specifically, page up/down, moves to the previous/next cut point
regardless of the current sekkamount and <,/>. move backward/forward
by 10 times the current seekamount.  This makes it a little easier to
move around without having to adjust the seekamount as much.

David
-- 
David Engel
dlengel at attbi.com

Index: libs/libmythtv/NuppelVideoPlayer.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp,v
retrieving revision 1.215
diff -u -r1.215 NuppelVideoPlayer.cpp
--- libs/libmythtv/NuppelVideoPlayer.cpp	19 Jun 2003 14:49:55 -0000	1.215
+++ libs/libmythtv/NuppelVideoPlayer.cpp	21 Jun 2003 20:51:33 -0000
@@ -1978,7 +1980,56 @@
             }
             break;
         }
+    	case Qt::Key_PageUp:
+	{
+	    int old_seekamount = seekamount;
+	    seekamount = -2;
+	    HandleArbSeek(false);
+	    seekamount = old_seekamount;
+            UpdateTimeDisplay();
+	    break;
+	}
+    	case Qt::Key_PageDown:
+	{
+	    int old_seekamount = seekamount;
+	    seekamount = -2;
+	    HandleArbSeek(true);
+	    seekamount = old_seekamount;
+            UpdateTimeDisplay();
+	    break;
+	}
+#define FFREW_MULTICOUNT 10
+        case Qt::Key_Less: case Qt::Key_Comma:
+        {
+            if (seekamount > 0)
+                rewindtime = seekamount * FFREW_MULTICOUNT;
+	    else
+	    {
+		int fps = (int)ceil(video_frame_rate);
+		rewindtime = fps * FFREW_MULTICOUNT / 2;
+	    }
+	    while (rewindtime != 0)
+		usleep(50);
+	    UpdateEditSlider();
+            UpdateTimeDisplay();
+            break;
+        }
+        case Qt::Key_Greater: case Qt::Key_Period:
+        {
+            if (seekamount > 0)
+                fftime = seekamount * FFREW_MULTICOUNT;
+	    else
+	    {
+		int fps = (int)ceil(video_frame_rate);
+		fftime = fps * FFREW_MULTICOUNT / 2;
+	    }
+	    while (fftime != 0)
+		usleep(50);
+	    UpdateEditSlider();
+            UpdateTimeDisplay();
+            break;
+        }
         case Qt::Key_Escape: case Qt::Key_E: case Qt::Key_M:
         {
             DisableEdit();


More information about the mythtv-dev mailing list