"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "read-linear.h" between
dvdisaster-0.79.3.tar.gz and dvdisaster-0.79.5.tar.gz

About: dvdisaster provides a margin of safety against data loss on CD, DVD and BD media caused by aging or scratches. Development version.

read-linear.h  (dvdisaster-0.79.3):read-linear.h  (dvdisaster-0.79.5)
/* dvdisaster: Additional error correction for optical media. /* dvdisaster: Additional error correction for optical media.
* Copyright (C) 2004-2010 Carsten Gnoerlich. * Copyright (C) 2004-2015 Carsten Gnoerlich.
* Project home page: http://www.dvdisaster.com
* Email: carsten@dvdisaster.com -or- cgnoerlich@fsfe.org
* *
* This program is free software; you can redistribute it and/or modify * Email: carsten@dvdisaster.org -or- cgnoerlich@fsfe.org
* Project homepage: http://www.dvdisaster.org
*
* This file is part of dvdisaster.
*
* dvdisaster is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * dvdisaster is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with dvdisaster. If not, see <http://www.gnu.org/licenses/>.
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA,
* or direct your browser at http://www.gnu.org.
*/ */
#ifndef READ_LINEAR_H #ifndef READ_LINEAR_H
#define READ_LINEAR_H #define READ_LINEAR_H
#include "rs02-includes.h"
/* /*
* Local data package used during reading * Local data package used during reading
*/ */
#define READ_BUFFERS 128 /* equals 4MB of buffer space */ #define READ_BUFFERS 128 /* equals 4MB of buffer space */
typedef struct typedef struct
{ LargeFile *readerImage; /* we need two file handles to prevent LargeSeek() * / { LargeFile *readerImage; /* we need two file handles to prevent LargeSeek() * /
LargeFile *writerImage; /* race conditions between the reader and writer */ LargeFile *writerImage; /* race conditions between the reader and writer */
struct _DeviceHandle *dh; Image *image;
EccInfo *ei; Method *eccMethod; /* Ecc method selected for this image */
EccHeader *eccHeader; /* accompanying Ecc header */
GThread *worker; GThread *worker;
struct MD5Context md5ctxt; /* Complete image checksum (RS01) */ struct MD5Context md5ctxt; /* Complete image checksum (RS01) */
struct MD5Context dataCtxt; /* Image section checksums (RS02) */ struct MD5Context dataCtxt; /* Image section checksums (RS02) */
struct MD5Context crcCtxt; /* Image section checksums (RS02) */ struct MD5Context crcCtxt; /* Image section checksums (RS02) */
struct MD5Context eccCtxt; /* Ecc layer checksum (RS02) */ struct MD5Context eccCtxt; /* Ecc layer checksum (RS02) */
struct MD5Context metaCtxt; /* Ecc meta checksum (RS02) */ struct MD5Context metaCtxt; /* Ecc meta checksum (RS02) */
int doMD5sums; /* whether we should calculate the above */ int doMD5sums; /* whether we should calculate the above */
int savedSectorSkip; int savedSectorSkip;
CrcBuf *crcBuf; /* CRC sums retrieved from above */ CrcBuf *crcBuf; /* CRC sums retrieved from above */
RS02Layout *lay; /* needed for processing RS02 images */
unsigned char *fingerprint; /* needed for missing sector generation */
char *volumeLabel; char *volumeLabel;
/* Data exchange between reader and worker */ /* Data exchange between reader and worker */
struct _AlignedBuffer *alignedBuf[READ_BUFFERS]; struct _AlignedBuffer *alignedBuf[READ_BUFFERS];
gint64 bufferedSector[READ_BUFFERS]; gint64 bufferedSector[READ_BUFFERS];
int nSectors[READ_BUFFERS]; int nSectors[READ_BUFFERS];
int bufState[READ_BUFFERS]; int bufState[READ_BUFFERS];
GMutex *mutex; GMutex *mutex;
GCond *canRead, *canWrite; GCond *canRead, *canWrite;
int readPtr,writePtr; int readPtr,writePtr;
char *workerError; char *workerError;
/* for usage within the reader */ /* for usage within the reader */
gint64 sectors; /* medium capacity (total number of sectors
) */
gint64 dataSectors; /* crc protected data sectors (RS02) */
gint64 firstSector, lastSector; /* reading range */ gint64 firstSector, lastSector; /* reading range */
gint64 readPos; /* current sector reading position */ gint64 readPos; /* current sector reading position */
Bitmap *readMap; /* map of already read sectors */ Bitmap *readMap; /* map of already read sectors */
gint64 readMarker; gint64 readMarker;
int rereading; /* TRUE if working on existing image */ int rereading; /* TRUE if working on existing image */
char *msg; char *msg;
GTimer *speedTimer,*readTimer; GTimer *speedTimer,*readTimer;
int unreportedError; int unreportedError;
skipping to change at line 88 skipping to change at line 84
int lastPercent; int lastPercent;
int firstSpeedValue; int firstSpeedValue;
double speed,lastSpeed; double speed,lastSpeed;
gint64 readOK, lastReadOK; gint64 readOK, lastReadOK;
int previousReadErrors; int previousReadErrors;
int previousCRCErrors; int previousCRCErrors;
gint64 deadWritten; gint64 deadWritten;
gint64 lastErrorsPrinted; gint64 lastErrorsPrinted;
int pass; int pass;
int maxC2; /* max C2 error since last output */ int maxC2; /* max C2 error since last output */
int crcIncomplete; /* CRC information was found incomplete (RS0 3 only) */
/* for drawing the curve and spiral */ /* for drawing the curve and spiral */
gint lastCopied; gint lastCopied;
gint lastSegment; gint lastSegment;
gint lastPlotted; gint lastPlotted;
gint lastPlottedY; gint lastPlottedY;
gint activeRenderers; gint activeRenderers;
GMutex *rendererMutex;
} read_closure; } read_closure;
#endif /* READ_LINEAR_H */ #endif /* READ_LINEAR_H */
 End of changes. 11 change blocks. 
18 lines changed or deleted 15 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS