Arghhh...
Sorry,... there's a small bug from a last minute change: :-(
In dvbcut.h it should read
double jog_offset;
instead of
int jog_offset;
Corrected patch file is attached...
ciao
Ralph
--- svn/src/dvbcut.cpp 2006-09-23 23:08:54.000000000 +0200
+++ mydvbcut/src/dvbcut.cpp 2006-09-24 15:19:54.000000000 +0200
@@ -149,6 +149,19 @@
// Note: delta is a multiple of 120 (see Qt documentation)
wheel_delta =
settings.readNumEntry(DVBCUT_QSETTINGS_PATH "wheel_delta", 120);
+ jog_maximum =
+ settings.readNumEntry(DVBCUT_QSETTINGS_PATH "jog_maximum", 180000);
+ jog_threshold =
+ settings.readNumEntry(DVBCUT_QSETTINGS_PATH "jog_threshold", 50);
+ // that's in 1/100 frames! (readDoubleNumEntry does not exist?)
+ // to increase the "zero frames"-region of the jog-slider
+ jog_offset =
+ settings.readNumEntry(DVBCUT_QSETTINGS_PATH "jog_offset", 40)/100.;
+ // sub-intervals of jog_maximum
+ jog_interval =
+ settings.readNumEntry(DVBCUT_QSETTINGS_PATH "jog_interval", 1);
+ lin_interval =
+ settings.readNumEntry(DVBCUT_QSETTINGS_PATH "lin_interval", 3600);
}
// install event handler
@@ -711,10 +724,26 @@
int relpic=0;
- if (v>=4000)
- relpic=int(exp(alpha*(v-4000))+.5);
- else if (v<=-4000)
- relpic=-int(exp(alpha*(-v-4000))+.5);
+ /*
+ if (v>jog_offset)
+ relpic=int(exp(alpha*(v-jog_offset))+.5);
+ else if (v<-jog_offset)
+ relpic=-int(exp(alpha*(-v-jog_offset))+.5);
+ */
+ /*
+ alternative function
+ (fits better to external tick interval setting, because jog_offset
+ only affects scale at small numbers AND range of 1 frame is NOT smaller
+ than range of 0 and 2 frames as in old function!)
+ */
+ if (v>0) {
+ relpic=int(exp(alpha*v)-jog_offset);
+ if(relpic<0) relpic=0;
+ }
+ else if (v<0) {
+ relpic=-int(exp(-alpha*v)-jog_offset);
+ if(relpic>0) relpic=0;
+ }
int newpic=jogmiddlepic+relpic;
if (newpic<0)
@@ -722,10 +751,10 @@
else if (newpic>=pictures)
newpic=pictures-1;
- if (relpic>50) {
+ if (relpic>jog_threshold) {
newpic=mpg->nextiframe(newpic);
fine=false;
- } else if (relpic<-50) {
+ } else if (relpic<-jog_threshold) {
fine=false;
} else
fine=true;
@@ -1209,9 +1238,13 @@
linslider->setMaxValue(pictures-1);
linslider->setLineStep(int(300*fps));
linslider->setPageStep(int(900*fps));
- linslider->setTickInterval(int(3600*fps));
+ linslider->setTickInterval(int(lin_interval*fps));
- alpha=log(180000)/96000.;
+ //alpha=log(jog_maximum)/double(100000-jog_offset);
+ // with alternative function
+ alpha=log(jog_maximum)/100000.;
+ if(jog_interval>0)
+ jogslider->setTickInterval(int(100000/jog_interval));
imagedisplay->setBackgroundMode(Qt::NoBackground);
curpic=~0;
--- svn/src/dvbcut.h 2006-09-23 23:08:54.000000000 +0200
+++ mydvbcut/src/dvbcut.h 2006-09-24 14:40:46.000000000 +0200
@@ -63,6 +63,11 @@
int wheel_increments[WHEEL_INCR_num];
int wheel_threshold;
int wheel_delta;
+ int jog_maximum;
+ int jog_threshold;
+ double jog_offset;
+ int jog_interval;
+ int lin_interval;
protected:
// QPixmap getpixmap(int picture, bool allgop=false);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
DVBCUT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dvbcut-user