[mythtv] Cut points less than 60 seconds apart.

Nigel Pearson nigel at ind.tansu.com.au
Fri Jun 3 04:05:39 UTC 2005


> Is there some way to force insertion of
> a new cut point rather than choosing one of the options above?

	If you are willing to fiddle around in the source,
either change the editing "closeness" threshold in
libs/libmythtv/NuppelVideoPlayer.cpp:

void NuppelVideoPlayer::HandleSelect(void)
{
     bool deletepoint = false;
     QMap<long long, int>::Iterator i;
     int direction = 0;

     for (i = deleteMap.begin(); i != deleteMap.end(); ++i)
     {
         long long pos = framesPlayed - i.key();
         if (pos < 0)
             pos = 0 - pos;
         if (pos < (int)ceil(20 * video_frame_rate))

to something less than 20sec.



	I have been working on a proper fix:

% cvs diff -u libs/libmythtv/NuppelVideoPlayer.cpp
Index: libs/libmythtv/NuppelVideoPlayer.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp,v
retrieving revision 1.473
diff -u -r1.473 NuppelVideoPlayer.cpp
--- libs/libmythtv/NuppelVideoPlayer.cpp        2 Jun 2005 22:41:10 
-0000      1.473
+++ libs/libmythtv/NuppelVideoPlayer.cpp        3 Jun 2005 00:40:10 
-0000
@@ -3074,7 +3074,9 @@
              option3 += QObject::tr("right");
          else
              option3 += QObject::tr("left");
-        QString option4 = QObject::tr("Cancel");
+        QString option4 = QObject::tr("Insert a new cut point: delete 
before");
+        QString option5 = QObject::tr("Insert a new cut point: delete 
after");
+        QString option6 = QObject::tr("Cancel");

          dialogname = "deletemark";
          dialogtype = 0;
@@ -3084,6 +3086,7 @@
          options += option2;
          options += option3;
          options += option4;
+        options += option5;

          osd->NewDialogBox(dialogname, message, options, -1);
      }
@@ -3126,6 +3129,12 @@
              case 3:
                  ReverseMark(deleteframe);
                  break;
+            case 4:
+                AddMark(framesPlayed, 0);
+                break;
+            case 5:
+                AddMark(framesPlayed, 1);
+                break;
              default:
                  break;
          }
%

but this does not display (more than 4 items in the menu is illegal?).

--
Nigel Pearson, nigel at ind.tansu.com.au | "Now the world has gone to bed,
Telstra BI&D, Sydney, Australia       |  Darkness won't engulf my head,
Office: 8255 4222    Fax:  8255 3153  |  I can see by infrared,
Mobile: 0408 664435  Home: 9792 6998  |  How I hate the night." -Marvin



More information about the mythtv-dev mailing list