[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    k3b_0_11_branch: kdeextragear-1/k3b
From:       Sebastian Trueg <sebastian () trueg ! de>
Date:       2005-04-20 20:29:18
Message-ID: 20050420202918.6D660651 () office ! kde ! org
[Download RAW message or body]

CVS commit by trueg: 

two patches by two nice users:
1. do not overload the event queue with update events if the progress
   in md5 sum calculation did not change.
2. BACKPORT: support for newer transcode versions


  M +2 -0      ChangeLog   1.64.2.84
  M +2 -2      configure.in.in   1.48.2.5
  M +16 -2     src/rip/k3bdvdrippingprocess.cpp   1.32.2.2
  M +12 -3     src/tools/k3bmd5job.cpp   1.7.2.2


--- kdeextragear-1/k3b/ChangeLog  #1.64.2.83:1.64.2.84
@@ -2,4 +2,6 @@
 K3b now ejects the source DVD when reader and writer device are the same (no more 
 accidently overwriting the rewritable source DVD)
+Fixed problem with very slow data verification (the progress was updated way too \
often) (thanks to Simon) +BACKPORT: support for newer transcode versions.
 
 0.11.23

--- kdeextragear-1/k3b/configure.in.in  #1.48.2.4:1.48.2.5
@@ -219,6 +219,6 @@
 )
 
+RESMGR_LIB=""
 if test "$ac_cv_use_regmgr" != "no"; then
-  RESMGR_LIB=""
   KDE_CHECK_HEADERS(resmgr.h, [
          KDE_CHECK_LIB(resmgr,rsm_open_device,[
@@ -227,6 +227,6 @@
          ])
   ])
-  AC_SUBST(RESMGR_LIB)
 fi
+AC_SUBST(RESMGR_LIB)
 dnl === check for resmgr - end ============
 

--- kdeextragear-1/k3b/src/rip/k3bdvdrippingprocess.cpp  #1.32.2.1:1.32.2.2
@@ -84,6 +84,14 @@ void K3bDvdRippingProcess::checkRippingM
     if( (*m_dvd).getMaxAngle() == 1 ) {
         kdDebug() << "K3bDvdRippingProcess) Rip Title" << endl;
+        K3bVersion tccatVersion = \
k3bcore->externalBinManager()->binObject("tccat")->version; +        kdDebug() << \
"(K3bDvdRippingProcess) Tccat Version: " << tccatVersion.majorVersion() << "." << \
tccatVersion.minorVersion() << "." << tccatVersion.patchLevel() << endl; +        if( \
tccatVersion.majorVersion() == 0 && tccatVersion.minorVersion() == 6 && \
tccatVersion.patchLevel() < 12){ +                //transcode <= 0.6.11
         m_ripMode = "-P " + m_title;
     } else {
+                //transcode >= 0.6.12
+                m_ripMode = "-T " + m_title + ",-1 -L";
+        }
+    } else {
         kdDebug() << "K3bDvdRippingProcess) Rip Angle" << endl;
         // workaround due to buggy transcode, angle selection doesn't work with -1 \
(all chapters) @@ -120,5 +128,10 @@ void K3bDvdRippingProcess::startRippingP
     m_delAudioProcess = true;
     */
+
     const K3bExternalBin *m_tccatBin = \
k3bcore->externalBinManager()->binObject("tccat"); +
+    /*
+     * This check probably not required any more
+     *
     if( m_tccatBin->version >= K3bVersion( 0, 6, 12 ) ) {
       emit infoMessage( i18n("Sorry, K3b does not support ripping Video DVDs with \
transcode >= 0.1.12 yet."), @@ -127,4 +140,5 @@ void \
K3bDvdRippingProcess::startRippingP  return;
     }
+    */
 
     m_ripProcess = new KShellProcess();

--- kdeextragear-1/k3b/src/tools/k3bmd5job.cpp  #1.7.2.1:1.7.2.2
@@ -41,4 +41,5 @@ public:
       isoFile(0),
       maxSize(0) {
+    progress = 0;
   }
 
@@ -48,4 +49,5 @@ public:
   QString filename;
   int fileDes;
+  int progress;
   K3bCdDevice::CdDevice* device;
 
@@ -233,12 +235,19 @@ void K3bMd5Job::slotUpdate()
         emit percent( 100 );
         emit finished(true);
+        d->progress = 0;
       }
       else {
         d->readData += read;
         d->md5.update( d->data, read );
+        int currentProgress = 0;
         if( d->isoFile || !d->filename.isEmpty() )
-          emit percent( (int)((double)d->readData * 100.0 / (double)d->imageSize) );
+          currentProgress = (int)((double)d->readData * 100.0 / \
(double)d->imageSize);  else if( d->maxSize > 0 )
-          emit percent( (int)((double)d->readData * 100.0 / (double)d->maxSize) );
+          currentProgress = (int)((double)d->readData * 100.0 / (double)d->maxSize) \
; +
+        if( currentProgress > d->progress ) {
+          d->progress = currentProgress;
+          emit percent( d->progress );
+        }
       }
     }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic