diff -Nru qpxtool-0.7.1.002/ChangeLog qpxtool-0.7.2/ChangeLog --- qpxtool-0.7.1.002/ChangeLog 2010-03-27 12:15:22.000000000 +0000 +++ qpxtool-0.7.2/ChangeLog 2012-12-13 10:46:19.000000000 +0000 @@ -1,10 +1,20 @@ QPxTool ChangeLog *********************************************** -** 0.7.1_002 (2010-03-27) +** 0.7.2 (2012-12-13) - - some AutoStrategy-related fixes in gui + - initial Blu-Ray media support - fixed binary stripping in MacOSX + - Lite-On plugin: added new CD ERRC commands (fixes low test speed on some devices) + - BD ERRC test on Lite-On drives + - CD and BD FE/TE test in Lite-On plugin implemented, DVD FE/TE test fixed + - DVD FE/TE test in BENQ plugin works now + gui: + - some AutoStrategy-related fixes + - fixed translation loading in win32 + - fixed tests summary updating on results loading + - Drag&Drop support for results loading + - results can be stored in database now *********************************************** ** 0.7.1 (2010-03-10) diff -Nru qpxtool-0.7.1.002/config.h qpxtool-0.7.2/config.h --- qpxtool-0.7.1.002/config.h 2010-03-23 10:51:37.000000000 +0000 +++ qpxtool-0.7.2/config.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -#ifndef __CONFIG_H__ -#define __CONFIG_H__ -#define INSTALL_PREFIX "/usr" -#endif //__CONFIG_H__ diff -Nru qpxtool-0.7.1.002/configure qpxtool-0.7.2/configure --- qpxtool-0.7.1.002/configure 2010-03-27 16:25:38.000000000 +0000 +++ qpxtool-0.7.2/configure 2012-12-04 12:06:33.000000000 +0000 @@ -175,6 +175,89 @@ fi } +check_offset64() +{ + echo -n "Checking off_t size with _FILE_OFFSET_BITS = 64... " + echo " + #define _FILE_OFFSET_BITS 64 + #include + #include + #include + int main(int ac, char** av) { + printf(\"%d\", sizeof(off_t)); + return 0; } + " > $TMPC + +# $__cc $TMPC -o $TMPB 2>/dev/null 1>/dev/null + $__cc $TMPC -o $TMPB + if test "$?" -eq 0; then + OFFT_SIZE=`./$TMPB` + echo $OFFT_SIZE + if test "$OFFT_SIZE" -eq 8; then + OSDEFS=$OSDEFS" -DOFFT_64BIT" + fi + else + echo "no off_t type defined!" + exit 1 + fi + + + echo -n "Checking for fopen64()... " + echo " + #define _FILE_OFFSET_BITS 64 + #include + int main(int ac, char** av) { + FILE* f; + f = fopen64(\"f\",\"r+\"); + return 0; } + " > $TMPC + + $__cc $TMPC -o $TMPB 2>/dev/null 1>/dev/null + if test "$?" -gt 0; then + echo "no" + else + echo "yes" + OSDEFS=$OSDEFS" -DHAVE_FOPEN64" + fi + + + echo -n "Checking for fseek64()... " + echo " + #define _FILE_OFFSET_BITS 64 + #include + int main(int ac, char** av) { + FILE* f; + fseek64(f,0, SEEK_SET); + return 0; } + " > $TMPC + + $__cc $TMPC -o $TMPB 2>/dev/null 1>/dev/null + if test "$?" -gt 0; then + echo "no" + else + echo "yes" + OSDEFS=$OSDEFS" -DHAVE_FSEEK64" + fi + + + echo -n "Checking for fseeko()... " + echo " + #define _FILE_OFFSET_BITS 64 + #include + int main(int ac, char** av) { + FILE* f; + fseeko(f,0, SEEK_SET); + return 0; } + " > $TMPC + + $__cc $TMPC -o $TMPB 2>/dev/null 1>/dev/null + if test "$?" -gt 0; then + echo "no" + else + echo "yes" + OSDEFS=$OSDEFS" -DHAVE_FSEEKO" + fi +} qt_check_qmake() { @@ -356,6 +439,7 @@ @echo \"all - build all\" @echo \"cli - build libs and console tools\" @echo \"gui - build gui only\" + @echo \"plugins - build plugins only\" @echo \"install - install all\" @echo \"cli_install - install libs and console tools\" @echo \"gui_install - install gui only\" @@ -430,9 +514,12 @@ else echo " install -m 755 release/qpxtool.exe \$(DESTDIR)\$(BINDIR)" >> $mf fi + echo " mkdir -p \$(DESTDIR)\$(BINDIR)/locale" >> $mf + echo " install -m 644 locale/*.qm \$(DESTDIR)\$(BINDIR)/locale" >> $mf echo " uninstall: - rm -f \$(DESTDIR)\$(BINDIR)/qpxtool.exe" >> $mf + rm -f \$(DESTDIR)\$(BINDIR)/qpxtool.exe + rm -rf \$(DESTDIR)\$(BINDIR)/locale" >> $mf ;; *) echo " @@ -527,9 +614,7 @@ install: " >> $mf if test "$__enable_debug" = "no" ; then - if test "$OSL" != "darwin" ; then - echo " strip --strip-unneeded \$(LIB)" >> $mf - fi + echo " strip --strip-unneeded \$(LIB)" >> $mf fi echo " mkdir -p \$(DESTDIR)\$(LIBDIR) @@ -563,9 +648,7 @@ install: " >> $mf if test "$__enable_debug" = "no" ; then - if test "$OSL" != "darwin" ; then - echo " strip --strip-unneeded \$(LIB)" >> $mf - fi + echo " strip --strip-unneeded \$(LIB)" >> $mf fi echo " mkdir -p \$(DESTDIR)\$(LIBDIR) @@ -632,9 +715,7 @@ install: " > $mf if test "$__enable_debug" = "no" ; then - if test "$OSL" != "darwin" ; then - echo " strip --strip-unneeded \$(LIB_SHORT)" >> $mf - fi + echo " strip --strip-unneeded \$(LIB_SHORT)" >> $mf fi echo " mkdir -p \$(DESTDIR)\$(PLUGINDIR) @@ -803,6 +884,7 @@ check_make check_compiler +check_offset64 if test "$__enable_png" = "yes" ; then check_libpng diff -Nru qpxtool-0.7.1.002/console/qscan/qscan.cpp qpxtool-0.7.2/console/qscan/qscan.cpp --- qpxtool-0.7.1.002/console/qscan/qscan.cpp 2010-02-17 08:22:16.000000000 +0000 +++ qpxtool-0.7.2/console/qscan/qscan.cpp 2012-12-13 10:46:19.000000000 +0000 @@ -1,6 +1,6 @@ /* * This file is part of the QPxTool project. - * Copyright (C) 2007-2009, Gennady "ShultZ" Kozlov + * Copyright (C) 2007-2012, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -160,6 +160,8 @@ for (int i=0; i<8; i++) if (errc_data & (1<media.type & DISC_DVD) { for (int i=0; i<8; i++) if (errc_data & (1<media.type & DISC_BD) { + for (int i=0; i<8; i++) if (errc_data & (1<media.book_type >> 4) & 0xF], dev->media.book_type & 0xF); + printf(IMEDIA "Media size : %s\n", + dev->media.disc_size ? "80mm" : "120mm"); + printf(IMEDIA "Maximum rate : %s\n", + max_rate_tbl[ dev->media.max_rate ]); if (!(dev->media.type & DISC_DVDRAM)) { get_rpc_state(dev); read_disc_regions(dev); } + } else if (dev->media.type & DISC_BD) { + printf(IMEDIA "Media class : BD\n"); + printf(IMEDIA "Media type : %s\n", mt); + printf(IMEDIA "Media size : %s\n", + dev->media.disc_size ? "80mm" : "120mm"); + printf(IMEDIA "Polarity flags: %02x\n", dev->media.polarity); + printf(IMEDIA "Disc Category : %s\n", dev->media.polarity ? "LTH" : "HTL"); } else { printf(IMEDIA "Media type : unknown\n"); goto end; } + if (scanner && scanner->is_plugin_attached()) { printf(IMEDIA "Available quality tests:%s%s%s%s%s%s\n", dev->media.capacity ? " rt" : "", @@ -613,11 +627,8 @@ printf("\n"); } } - if ( dev->media.type & (DISC_DVD | DISC_BD | DISC_HDDVD) ) { - printf(IMEDIA "Layers : %d\n", dev->media.layers); - } else { - printf(IMEDIA "Layers : 1\n"); - } + printf(IMEDIA "Layers : %d\n", dev->media.layers); + if ( dev->media.type & (DISC_DVD) ) { // read_disc_regions(drive); if (!dev->media.dvdcss.protection) { @@ -647,10 +658,12 @@ printf("Invalid region mask!\n"); } } +/* } else if ( dev->media.type & (DISC_BD) ) { printf(IMEDIA "Protection : ??? (BD)\n"); } else if ( dev->media.type & (DISC_HDDVD) ) { printf(IMEDIA "Protection : ??? (HDDVD)\n"); +*/ } printf(IMEDIA "Erasable : %s\n",dev->media.erasable ? "yes" : "no" ); diff -Nru qpxtool-0.7.1.002/console/qscan/version.h qpxtool-0.7.2/console/qscan/version.h --- qpxtool-0.7.1.002/console/qscan/version.h 2009-01-19 08:50:31.000000000 +0000 +++ qpxtool-0.7.2/console/qscan/version.h 2012-12-13 10:46:19.000000000 +0000 @@ -1,6 +1,6 @@ /* * This file is part of the QPxTool project. - * Copyright (C) 2008-2009, Gennady "ShultZ" Kozlov + * Copyright (C) 2008-2012, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -9,4 +9,5 @@ * See the file "COPYING" for the exact licensing terms. */ -#define VERSION "0.7" +#define VERSION "0.7.2" + diff -Nru qpxtool-0.7.1.002/console/readdvd/imgwriter.cpp qpxtool-0.7.2/console/readdvd/imgwriter.cpp --- qpxtool-0.7.1.002/console/readdvd/imgwriter.cpp 2009-05-20 07:01:08.000000000 +0000 +++ qpxtool-0.7.2/console/readdvd/imgwriter.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -1,36 +1,40 @@ /* * * image writer class for DeadDiscReader - * Copyright (C) 2007, Gennady "ShultZ" Kozlov + * Copyright (C) 2007, 2010, Gennady "ShultZ" Kozlov * */ - -#define __USE_LARGEFILE64 #define _FILE_OFFSET_BITS 64 #include -//#include - -//#include -//#include +#include +#include #include #include "imgwriter.h" +#ifndef HAVE_FOPEN64 +#define fopen64 fopen +#endif + imgwriter::imgwriter(char* fn, smap* map) { mutex = new Mutex(); fname=fn; - if (!(iso = fopen(fname,"r+"))){ - printf("can't open image file, creating new one!\n"); - if (!(iso = fopen(fname,"w+"))){ - printf("can't create image file!\n"); - } +#if !( defined(HAVE_FSEEKO) && defined(OFFT_64BIT) ) && !defined(HAVE_FSEEK64) + printf("Warning! No 64-bit file offset. Image size limits to 2GiB\n"); +#endif + if (!(iso = fopen64(fname,"r+"))){ + printf("can't open image file, creating new one!\n"); + if (!(iso = fopen64(fname,"w+"))){ + printf("can't create image file!\n"); + } } else { - printf("image opened: '%s'\n", fname); - map->load(); + printf("image opened: '%s'\n", fname); + map->load(); } + if (iso) fclose(iso); } imgwriter::~imgwriter() { @@ -38,20 +42,35 @@ } int imgwriter::write(int lba, int scnt, int ssz, void* buff) { - int res=0; - mutex->lock(); - iso = fopen(fname, "r+"); - if (iso) { -#ifdef fseeko - fseeko(iso, ssz*(__off_t)lba, SEEK_SET); + int res=0; +#if defined(HAVE_FSEEKO) && defined(OFFT_64BIT) + off_t offs = ssz*(off_t)lba; +#else + int64_t offs = ssz*(int64_t)lba; +#endif + + mutex->lock(); + iso = fopen64(fname, "r+"); + + if (iso) { +#if defined(HAVE_FSEEKO) && defined(OFFT_64BIT) + if (fseeko(iso, offs, SEEK_SET)) +#elif defined(HAVE_FSEEK64) + if (fseek64(iso, offs, SEEK_SET)) #else - fseek(iso, ssz*(long int)lba, SEEK_SET); + if (fseek(iso, offs, SEEK_SET)) #endif - fwrite(buff, ssz*scnt, 1, iso); + { + printf("\nseek() failed! Offs: %lld (%08LX)\n", offs, offs); + mutex->unlock(); + return 0; + } + res = fwrite(buff, ssz, scnt, iso); +// printf("\nwrote: %ld of %ld\n", res, scnt); fclose(iso); } mutex->unlock(); - return res; + return res; } //void imgwriter::set_file(char* fn) { fname=fn; } diff -Nru qpxtool-0.7.1.002/console/readdvd/imgwriter.h qpxtool-0.7.2/console/readdvd/imgwriter.h --- qpxtool-0.7.1.002/console/readdvd/imgwriter.h 2009-05-20 07:01:49.000000000 +0000 +++ qpxtool-0.7.2/console/readdvd/imgwriter.h 2010-09-21 18:48:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * * image writer class header - * Copyright (C) 2007, Gennady "ShultZ" Kozlov + * Copyright (C) 2007, 2010, Gennady "ShultZ" Kozlov * */ @@ -11,10 +11,6 @@ #define _FILE_OFFSET_BITS 64 #include -//#include - -//#include -//#include #include class smap; diff -Nru qpxtool-0.7.1.002/console/readdvd/reader_disc.cpp qpxtool-0.7.2/console/readdvd/reader_disc.cpp --- qpxtool-0.7.1.002/console/readdvd/reader_disc.cpp 2010-01-21 07:31:18.000000000 +0000 +++ qpxtool-0.7.2/console/readdvd/reader_disc.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -325,8 +325,8 @@ struct timeval t_s, t_e; int32_t sects1X=75; uint32_t lba = 0; - uint32_t scnt=1; - int ctry=0; + int32_t scnt=1; + int32_t ctry=0; bool descramble=0; dev->silent=0; @@ -490,7 +490,9 @@ dev->device, ((float)scnt/(float)sects1X)/((t_e.tv_sec - t_s.tv_sec) + (t_e.tv_usec - t_s.tv_usec) / 1000000.0), lba, dev->media.capacity, - lba, dev->media.capacity, scnt); + lba, dev->media.capacity, +// map->get_done() * 100 / dev->media.capacity, + scnt); if ((dev->err & 0x0FFF00) == 0x23A00) { printf("%s: media removed!\n", dev->device); map->lock(); @@ -503,7 +505,10 @@ case PASS_FIRST: case PASS_CONT: if (!dev->err) { - iso->write(lba, scnt, sector_sz, (void*)dev->rd_buf); + if (iso->write(lba, scnt, sector_sz, (void*)dev->rd_buf) < scnt) { + map->set(lba, BM_WAIT, scnt); + goto exit_reader; + } ctry=0; } else { ctry++; @@ -513,7 +518,10 @@ case PASS_RECOVER1: default: if (!dev->err) { - iso->write(lba, scnt, sector_sz, (void*)dev->rd_buf); + if (iso->write(lba, scnt, sector_sz, (void*)dev->rd_buf) < scnt) { + map->set(lba, BM_WAIT, scnt); + goto exit_reader; + } ctry=0; } else { ctry++; diff -Nru qpxtool-0.7.1.002/console/readdvd/sectmap.cpp qpxtool-0.7.2/console/readdvd/sectmap.cpp --- qpxtool-0.7.1.002/console/readdvd/sectmap.cpp 2009-10-09 19:42:12.000000000 +0000 +++ qpxtool-0.7.2/console/readdvd/sectmap.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -73,10 +73,10 @@ int smap::get_tot() { return sectors; } -unsigned int smap::get_next(unsigned int *lba, mape state, unsigned int *count) { +unsigned int smap::get_next(unsigned int *lba, mape state, int *count) { unsigned int offs=0; - unsigned int cnt=0; - unsigned int icount=1; + int cnt=0; + int icount=1; if (count) icount = *count; // if (lba+scnt > sectors) scnt = sectors - lba; @@ -113,11 +113,11 @@ } -void smap::set(unsigned int sector, mape state, unsigned int count) { +void smap::set(unsigned int sector, mape state, int count) { // if (sector>sectors) return 1; // if (sector+count>sectors) return 2; if(count) { - for (unsigned int i=0; i Sun, 13 Apr 2014 00:18:54 +0400 + +qpxtool (0.7.2-3) unstable; urgency=medium + + * Simplify patch 05-add-hardening-flags-in-compiler-options.patch. + * Update debian/rules: + - simplify rules after changes in related patch + - add options --parallel and --list-missing to dh + * Update debian/qpxtool.install. + + -- Boris Pek Sat, 12 Apr 2014 20:25:56 +0400 + +qpxtool (0.7.2-2) unstable; urgency=medium + + * Update debian/control: + - udate using wrap-and-sort tool + - delete now useless sections "Breaks: qpxtool (<< 0.7.1.002-1)" + - add build dependency from hurd-dev on hurd-i386 + * Add patch 06-make-port-for-hurd-i386.patch: + Make port for Debian GNU/Hurd. + * Update debian/copyright. + + -- Boris Pek Sat, 12 Apr 2014 16:19:23 +0400 + +qpxtool (0.7.2-1) unstable; urgency=medium + + * New maintainer. (Closes: #629599) + * Update to stable release 0.7.2. + * Bump Standards-Version to 3.9.5 (was 3.9.3). + * Update patches + - add 01-do_not_use_lib64_dir.patch + - rewrite 03-ftbfs_kfreebsd.patch + - rewrite 02-desktop_file.patch + - update 04-fix-build-with-libpng15.patch + - delete 01-makefile.patch (it is unnecessary now) + * Update debian/rules: + - add necessary options to configure script for installing files + in according with Debian Policy + - add get-orig-source section + - simplify rules + * Fix lintian notes vcs-field-not-canonical. + * Update years in debian/copyright. + * Update debian/qpxtool.docs. + * Add debian/qpxtool.doc-base. + * Fix a lot of lintian notes hyphen-used-as-minus-sign: + - add fixed debian/man/* files + - add debian/qpxtool.manpages and debian/pxfw.manpages + - update debian/qpxtool.install and debian/pxfw.install + * Update debian/libqpx0.lintian-overrides. + + -- Boris Pek Wed, 26 Feb 2014 16:26:22 +0400 + qpxtool (0.7.1.002-6) unstable; urgency=low * QA upload. diff -Nru qpxtool-0.7.1.002/debian/control qpxtool-0.7.2/debian/control --- qpxtool-0.7.1.002/debian/control 2012-06-26 00:12:39.000000000 +0000 +++ qpxtool-0.7.2/debian/control 2014-04-12 20:19:40.000000000 +0000 @@ -1,22 +1,21 @@ Source: qpxtool Section: otherosfs Priority: optional -Maintainer: Debian QA Group +Maintainer: Boris Pek Build-Depends: debhelper (>= 9), - libcam-dev [kfreebsd-any], - libpng-dev, - qt4-qmake, - libqt4-dev -Standards-Version: 3.9.3 + hurd-dev [hurd-i386], + libcam-dev [kfreebsd-any], + libpng-dev, + libqt4-dev, + qt4-qmake +Standards-Version: 3.9.5 Homepage: http://qpxtool.sourceforge.net/ -Vcs-Git: git://git.debian.org/collab-maint/qpxtool.git -Vcs-Browser: http://git.debian.org/?p=collab-maint/qpxtool.git +Vcs-Git: git://anonscm.debian.org/collab-maint/qpxtool.git +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/qpxtool.git Package: qpxtool Architecture: any -Depends: ${shlibs:Depends}, - libqpx0 (= ${binary:Version}), - ${misc:Depends} +Depends: libqpx0 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} Suggests: pxfw Description: CD/DVD quality checker QPxTool gives you access to all available Quality Checks (Q-Checks) on written @@ -30,10 +29,10 @@ Package: pxfw Architecture: any -Depends: ${shlibs:Depends}, - libqpx0 (= ${binary:Version}), - qpxtool, - ${misc:Depends} +Depends: libqpx0 (= ${binary:Version}), + qpxtool, + ${misc:Depends}, + ${shlibs:Depends} Description: Plextor firmware updater QPxTool gives you access to all available Quality Checks (Q-Checks) on written and blank media, that are available for your drive. This will help you to find @@ -44,11 +43,8 @@ drives. Package: libqpx0 -Breaks: qpxtool (<< 0.7.1.002-1) -Replaces: qpxtool (<< 0.7.1.002-1) Architecture: any -Depends: ${shlibs:Depends}, - ${misc:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} Description: CD/DVD quality checker (shared libraries) QPxTool gives you access to all available Quality Checks (Q-Checks) on written and blank media, that are available for your drive. This will help you to find @@ -58,12 +54,9 @@ This package contains the shared libraries for QPxTool. Package: libqpx-dev -Breaks: qpxtool (<< 0.7.1.002-1) -Replaces: qpxtool (<< 0.7.1.002-1) Architecture: any Section: libdevel -Depends: libqpx0 (= ${binary:Version}), - ${misc:Depends} +Depends: libqpx0 (= ${binary:Version}), ${misc:Depends} Description: CD/DVD quality checker (development files) QPxTool gives you access to all available Quality Checks (Q-Checks) on written and blank media, that are available for your drive. This will help you to find diff -Nru qpxtool-0.7.1.002/debian/copyright qpxtool-0.7.2/debian/copyright --- qpxtool-0.7.1.002/debian/copyright 2012-06-26 00:12:39.000000000 +0000 +++ qpxtool-0.7.2/debian/copyright 2014-04-12 20:19:40.000000000 +0000 @@ -4,15 +4,18 @@ Source: https://sourceforge.net/projects/qpxtool/files/ Files: * -Copyright: 2005-2007 Gennady "ShultZ" Kozlov +Copyright: 2005-2012 Gennady "ShultZ" Kozlov + 1999 Christian Wolff + 1998 Gerald Combs + 2009 Maxim Aldanov + 1999-2003 VideoLAN License: GPL-2+ Files: debian/* -Copyright: - 2010 Alessio Treglia - 2006-2008 Daniel Baumann - 2012 Nobuhiro Iwamatsu - 2012 Boris Pek +Copyright: 2010 Alessio Treglia + 2006-2008 Daniel Baumann + 2012 Nobuhiro Iwamatsu + 2012-2014 Boris Pek License: GPL-2+ License: GPL-2+ diff -Nru qpxtool-0.7.1.002/debian/libqpx0.lintian-overrides qpxtool-0.7.2/debian/libqpx0.lintian-overrides --- qpxtool-0.7.1.002/debian/libqpx0.lintian-overrides 2012-06-26 00:12:39.000000000 +0000 +++ qpxtool-0.7.2/debian/libqpx0.lintian-overrides 2014-04-12 20:19:40.000000000 +0000 @@ -1 +1,6 @@ +# These libraries are for internal use. +libqpx0: package-name-doesnt-match-sonames +libqpx0: no-symbols-control-file + +# libqpx0: spelling-error-in-binary diff -Nru qpxtool-0.7.1.002/debian/man/cdvdcontrol.1 qpxtool-0.7.2/debian/man/cdvdcontrol.1 --- qpxtool-0.7.1.002/debian/man/cdvdcontrol.1 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/debian/man/cdvdcontrol.1 2014-04-12 20:19:40.000000000 +0000 @@ -0,0 +1,423 @@ +.\" cdvdcontrol is released under the GNU GENERAL PUBLIC LICENSE. +.TH "cdvdcontrol" "1" "26 Feb 2014" +.SH "NAME" +cdvdcontrol \- Tool to get full control on your Plextor optical device +.SH "SYNOPSIS" +\fBcdvdcontrol \-l\fR +.br +\fBcdvdcontrol [\-d DEVICE] [OPTION]\fR +.SH "DESCRIPTION" +pxcontrol gives you access on all features that are supported by your Plextor drive. This tool is what you want, when you use optical devices which were manufactured by Plextor. + +\fB\-l\fR scan busses for all available optical devices +.br +.SH "FEATURES" +cdvdcontrol supports the following features: \fBAutoStrategy, BitSetting, DiagnoseMode, GigaRec, Hide-CDR, +MediaLock, PlexEraser, PoweRec, SecuRec, SilentMode, SingleSession, Simulation, SpeedRead and VariRec\fR. + +The available features depend on your drive. Take a look at http://www.plextor.com or simply read the glossar on: +.br +http://qpxtool.sourceforge.net/glossar.html to see supported features. + +.SH "DEVICE" +can be an IDE, SCSI, SATA, USB or FireWire connected optical drive. Not all SATA controller support all Plextor features. + +\fBLinux:\fR +.br +.I /dev/hdX: +IDE device +.br +.I /dev/scdX: +Linux 2.4: SATA, SCSI, USB device, or IDE device via ide-scsi emulation +.br +.I /dev/srX: +Linux 2.6: IDE device via new ATA layer, SCSI or USB device +.br + +\fBOpenBSD/NetBSD:\fR +.br +.I /dev/rcdX +.br + +\fBFreeBSD:\fR +.br +.I /dev/cd: +SCSI device +.br +.I /dev/acd: +ATA device +.br + +\fBMacOS X:\fR +.br +.I /dev/disk: +.br + +\fBwin32:\fR +.br +.I C:,D:,E:, ... X:,Y:,Z: +.br + +.SH "AutoStrategy" +AutoStrategy (AS) is a Feature to determine a writing strategy for an inserted empty DVD media. Writing strategies are saved in the AutoStrategy DataBase (ASDB). This command needs a specified \fBDEVICE\fR. + +.B \-\-as-mode +.I mode +.br + select the AutoStrategy mode + +\fB auto\fR drive selects the strategy from the ASDB or from +.br + the firmware. If there is no entry available, a +.br + new one is created. +.br +\fB forced\fR creates a new ASDB entry, even if there is already +.br + one available in the ASDB. +.br +\fB on\fR an existing AS from the DB is used. If there is no + entry, the strategy from the firmware is used. +.br +\fB off\fR only strategy from the firmware is used. If there + is no entry available, the default strategy is used. + +.B \-\-as-list + view complete ASDB list. + +.B \-\-as-on +.I # +.br + activate ASDB entry number X (value between 1\-10). + +.B \-\-as-off +.I # +.br + deactivate ASDB entry number X (value between 1\-10). + +.B \-\-as-del +.I # +.br + delete ASDB entry number X (value between 1\-10). + +.B \-\-as-clear +.br + remove all ASDB entries form the ASDB. + +.B \-\-as-create +.I mode +.br + creates an AS database entry. +.br + Mode should be combination if [q|f] and [a|r] + +\fB q\fR quick AS creating. +.br +\fB f\fR full AS creating. Media is written. +.br +\fB a\fR AS is appended to the list in the ASDB. +.br +\fB r\fR AS entry replaces relying ASDB entry. + + +.B \-\-as-load +.I # +.br + load an ASDB from a file. +.br +.I Experimental + +.B \-\-as-save +.I # +.br + save ASDB into file. For PX-755/PX-760 only! +.br + PX\-755 export maybe buggy. +.br +.I Experimental + + +.SH "BitSetting" +due to some compatibility problems of some DVD readers, it could make sense to use BitSetting, which sets the Booktype of media to DVD\-ROM. This \fBOPTION\fR requiers a specified \fBDEVIVE\fR. + +.B \-\-bitset+r +.I mode +.br + enable / disable Bitsetting for DVD+R. +.br +\fB on\fR defines DVD+R as DVD\-ROM media. +.br +\fB off\fR keeps DVD+R media as what it is. + +.B \-\-bitset+rdl +.I mode +.br + enable / disable Bitsetting for DVD+R DL. + +\fB on\fR define DVD+R DL media as DVD\-ROM media. +.br +\fB off\fR keeps DVD+R DL media as what it is. + +.SH "DiagnoseMode" +are \fBOPTIONS\fR to detect the drive itself, the current settings and the available features. + +\fB\-c, \-\-current\fR show current status of selected \fBDEVICE\fR. + +\fB\-h, \-\-help\fR show help. + +\fB\-l, \-\-scan\fR search all busses and list detected drives. + +\fB\-s, \-\-supported\fR show features supported by selected \fBDEVICE\fR. + +\fB\-v\fR show output in verbose mode. + +.SH "GigaRec" +Increase (higher value) or Decrease (lower value) the regular capacity, which can be written on CD media. Ejecting the disc results in flushing the GigaRec settings. Buffer UnderrunProof is disabled while GigaRec is active. The recording speed is limited to 4x or 8x DAO. +Use cdrdao or cdrskin for writing media with GigaRec function. Otherwise if you use cdrecord your values are flushed. GigaRec settings need a specified \fBDEVICE\fR. + +.B \-\-gigarec +.I # +.br + set GigaRec to , which is a value in the +.br + range of 0.6, 0.7, ..., 1.3, 1.4 or off. + +.SH "Hide-CDR" +prevents media from being detected by an application as CD\-R to defeat the ATIP protection. Hide\-CDR settings need a specified \fBDEVICE\fR. + +.B \-\-hcdr +.I [on|off] +.br + enable / disable Hide\-CDR. +.br +\fB on\fR enable Hide\-CDR. Defeating ATIP protection. +.br +\fB off\fR disable Hide\-CDR. +.SH "MediaLock" +can lock your media to prevent an accidently opening. It is always a good idea lock the drive. This \fBOPTION\fR needs a specified \fBDEVICE\fR. +.br +.B \-\-lock +.br + enable lock modus. Media can not be removed. +.br +.B \-\-unlock +.br + disable lock modus. Media can be removed. + +.SH "PlexEraser" +destroys the data on your CD/DVD and makes it unreadable. \fBDEVICE\fR needs to be specified for this command. + +.B \-\-destruct +.I mode +.br + WARNING: command destroys your media. + +\fB quick\fR destroy only the lead in of CD/DVD media. +.br +\fB full\fR destroy complete CD/DVD media. + +.SH "PoweRec" +\fBP\fRlextor \fBO\fRptimised \fBW\fRriting \fBE\fRrror \fBRe\fRduction \fBC\fRontrol (PoweRec) should detect the optimized writing speed for your media\-combination. Higher recording speeds than recommended can result in increased writing errors. PoweRec should prevent you from these errors. \fBDEVICE\fR needs to be specified for this command. + +.B \-\-powerec +.I [on|off] +.br + enable / disable PoweRec. +.br +\fB on\fR enable PoweRec. enabled by default. +.br +\fB off\fR disable PoweRec. + +.SH "SecuRec" +Creates a password protected CD\-R. To access a password protected CD\-R, it is necessary to enter the correct password and to specify the \fBDEVICE\fR + +.BI \-\-nosecurec + disable SecuRec. + +.B \-\-securec +.I +.br + enable SecuRec and use a given password. +.br + must have at least four, but not more than ten characters. +.SH "SilentMode" +Allows some speed finetuning on your drives. Lower values result in more silence. You can specify read speed and tray loading speed. \fBDEVICE\fR must be specified for this command. All settings will be active after reboot. ;\-) pxfw /dev/hdX \-r + +.B \-\-silent +.I [on|off] +.br + enable / disable SilentMode + +\fB on\fR enables SilentMode. This will give you access to +.br + further speed and read settings. Default is on. +.br +\fB off\fR disables SilentMode. + +.B \-\-sm-access +.I mode +.br + set access time to slow or fast. This has only an affect in combination with CD/DVD speed setting. + +\fB fast\fR enables fast access mode. Use with speed setting. +.br +\fB slow\fR enables slow access mode. Use with speed setting. + +.B \-\-sm-cd-rd +.I # +.br + set maximum read speed for CDs. Default is 32x. +.br + Select speed value from 4, 8, 24, 32, 40, 48. + +.B \-\-sm-cd-wr +.I # +.br + set maximum write speed for CDs. Default is 32x. +.br + Select speed value from 4, 8, 16, 32, 48. + +.B \-\-sm-dvd-rd +.I # +.br + set maximum read speed for DVDs. Default is 12x. +.br + Select speed value from 2, 5, 8, 12, 16. + +.B \-\-sm-eject +.I # +.br + set tray eject speed. Default is 0. +.br + Select speed value from 0, 1, ..., 80. + +.B \-\-sm-load +.I # +.br + set tray load speed. Default is 63. +.br + Select speed value from 0, 1, ... , 80. + +.B \-\-sm-nosave + do not save SilentMode settings + +.SH "SingleSession" +shows only the first session of the CD. You have to enable this feature before you insert the media. This is a useful option for copy protected audio discs. \fBDEVICE\fR must be specified for this command. + +.B \-\-sss +.I mode +.br + enable / disable SingleSession. Default is off. + +\fB on\fR enable SingleSession mode for CD. +.br +\fB off\fR disable SingleSession mode for CD. + +.SH "Simulation" +allows DVD+R writing simulation. \fBDEVICE\fR must be specified for this command. + +.B \-\-dvd-testwrite +.I [on|off] +.br + mode enable / disable DVD+R writing simulation +\fB on\fR enable DVD+R writing simulation mode +.br +\fB off\fR disable DVD+R writing simulation mode +.SH "SpeedRead" +allows increasing the read speed. This deactivates the so called Rip Lock for Video\-DVDs. You can also deativate this feature by keeping the open button of your empty DVD drive pressed for three seconds. SpeedRead can increase vibrations and read errors. \fBDEVICE\fR must be specified for this command. + +.B \-\-spdread +.I mode +.br + enable / disable SpeedRead + +\fB on\fR enable SpeedRead. Disable Rip Lock. +.br +\fB off\fR disable SpeedRead. Set Rip Lock. +.SH "VariRec" +allows some laser power calibration in a range from \-4 to +4. The recording speed is limited to 4x or 8x on CD\-R media and to 2x, 2.4x or 4x on DVD media. The recording strategy can also be changed relying on the used media dye. The writing strategies are determining and documenting your own strategies. You would determine the differences by selecting a stretegy and doimg a writing test. +VariRec settings persist after a reboot. \fBDEVICE\fR must be specified for this command. +Use cdrdao or cdrskin for writing media with VariRec function. Otherwise if you use cdrecord, your values are flushed. + +.B \-\-varirec-cd +.I # +.br + set VariRec power for CD writing or set it to off. +.br + Select value \fB\-4, \-3, \-2, \-1, 0, +2, +2, +3, +4\fR + +.B \-\-varirec\-cd\-strategy +.I mode +.br + select writing strategy for CDs depending +.br + on the used dye (Azo, Cyanine, PhtaloCyanine): +.br + select: \fBdefault, azo, cya, pha, phb, phc, phd\fR + +.B \-\-varirec-dvd +.I # +.br + set VariRec power value for DVD writing or set it to off. +.br + Select value \fB\-4, \-3, \-2, \-1, 0, +2, +2, +3, +4\fR + +.B \-\-varirec-dvd-strategy +.I # +.br + select a predefined DVD writing strategy. +.br + select value \fB0, 1, 2, 3, 4, 5, 6, 7\fR +.br +.SH "PioQuiet" +Pioneer QuietMode feature. +.br +.B \-\-pio-limit +.I [on|off] +.br + turns on/off read speed limit by 24X for CD and 8X for DVD + +.B \-\-pio-quiet +.I mode +.br + sets Pioneer performance profile +.br + available values: quiet, perf, std +.br + \fBquiet\fR turn drive into silent mode +.br + \fBperf\fR turn drive into performance ptomized mode +.br + \fBstd\fR reset drive to standard mode +.br + +.B \-\-pio-nosave +.br + don't make Pioquiet setting permanent + +.SH "EXAMPLES" +\fBcdvdcontrol \-l\fR +.br + list all available optical devices. + +\fBcdvdcontrol \-d /dev/hdc \-\-supported\fR +.br + show features that are supported by drive hdc. + +\fBcdvdcontrol \-d /dev/hda \-\-as\-create q a\fR +.br + create a new ASDB entry for device hda and the +.br + inserted DVD media. Strategy is created quickly +.br + and appended to the already existing ASDB list. + +\fBcdvdcontrol \-d /dev/sr2 \-\-gigarec 0.9\fR +.br + prepare CD for GigaRec 0.9 recording. Use cdrskin +.br + or cdrdao/k3b for writing process. +\fR \fB +\fR \fB +\fR \fB +\fRplease report man page improvements to T.Maguin@web.de\fR diff -Nru qpxtool-0.7.1.002/debian/man/f1tattoo.1 qpxtool-0.7.2/debian/man/f1tattoo.1 --- qpxtool-0.7.1.002/debian/man/f1tattoo.1 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/debian/man/f1tattoo.1 2014-04-12 20:19:40.000000000 +0000 @@ -0,0 +1,107 @@ +.\" f1tattoo is released under the GNU GENERAL PUBLIC LICENSE. +.TH "f1tattoo" "1" "26 Feb 2014" +.br +.SH "NAME" +f1tattoo \- disc T@2 feature for Yamaha F1 CD-RW devices +.SH "SYNOPSIS" +.br +\fBf1tattoo [\-l] [\-h] \fr +.br +\fBf1tattoo \-d DEVICE [\-c] [\-s] [\-\-tattoo-test]\fR +.br +\fBf1tattoo \-d DEVICE \-\-tattoo-raw \fR +.br +\fBf1tattoo \-d DEVICE \-\-tattoo-png \fR +.br +.SH "DESCRIPTION" +f1tattoo is the linux console tool to use the Yamaha disc T@2 feature. You won't get satisfying results on Phtalocyanin dye. +.SH "FEATURES" +You can disc T@2 with these drives: +.br +Yamaha F1 CD-RW, Yamaha F1DX + +.SH "DEVICE" +can be an IDE, SCSI, SATA, USB or FireWire connected optical drive. Not all SATA controller support all Plextor features. + +\fBLinux:\fR +.br +.I /dev/hdX: +IDE device +.br +.I /dev/scdX: +Linux 2.4: SATA, SCSI, USB device, or IDE device via ide-scsi emulation +.br +.I /dev/srX: +Linux 2.6: IDE device via new ATA layer, SCSI or USB device +.br + +\fBOpenBSD/NetBSD:\fR +.br +.I /dev/rcdX +.br + +\fBFreeBSD:\fR +.br +.I /dev/cd: +SCSI device +.br +.I /dev/acd: +ATA device +.br + +\fBMacOS X:\fR +.br +.I /dev/disk: +.br + +\fBwin32:\fR +.br +.I C:,D:,E:, ... X:,Y:,Z: +.br + +.SH "OPTIONS" + +\fB\-l, \-\-scanbus\fR +.br + scan busses for all available CD and DVD devices. + +\fB\-h, \-\-help\fR +.br + help. show available options. + +\fB\-c, \-\-current\fR +.br + show current drive settings of selected device + +\fB\-s, \-\-supported\fR +.br + show supported features of selected device + +\fB\-\-tattoo-test\fR +.br + write DiscT@2 test image + +\fB\-\-tattoo-raw tattoo.raw\fR +.br + write DiscT@2 using raw data from tattoo.raw file + +\fB\-\-tattoo-png tattoo.png\fR +.br + write DiscT@2 using png image from tattoo.png file + check if f1tattoo compiled with png support using \-\-help option + +\fB\-v, \-\-verbose\fR +.br + give verbose output +.SH "EXAMPLES" +\fBf1tattoo \-l\fR +.br + list all available CD- and DVD-devices\fR + +\fBf1tattoo \-d /dev/hdc \-\-tattoo-raw filename.raw\fR +.br + writes DiscT@2 using filename.raw file on media in device /dev/hdc +\fR \fB +\fR \fB +\fR \fB +\fRplease report man page improvements to T.Maguin@web.de\fR diff -Nru qpxtool-0.7.1.002/debian/man/pxfw.8 qpxtool-0.7.2/debian/man/pxfw.8 --- qpxtool-0.7.1.002/debian/man/pxfw.8 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/debian/man/pxfw.8 2014-04-12 20:19:40.000000000 +0000 @@ -0,0 +1,96 @@ +.\" pxfw is released under the GNU GENERAL PUBLIC LICENSE. +.TH "pxfw" "8" "26 Feb 2014" +.SH "NAME" +pxfw \- Firmware flashing tool for Plextor CD/DVD devices +.SH "SYNOPSIS" +\fBpxfw \-l +.br +\fBpxfw \-d DEVICE [\-if\fR firmware.bin\fB] [\-u] [\-f] [\-v]\fR +.br +\fBpxfw \-d DEVICE [\-e] [\-r] [\-t] [\-v]\fR +.br +.SH "DESCRIPTION" +pxfw is the linux firmware flasher for Plextor CD and DVD drives. Remove any disks before flashing. +.SH "FEATURES" +You can flash the firmware of these drives: +.br +Plextor Premium, Premium-2, PX\-712, PX\-716, PX\-755 and PX\-760. +.br +.SH "DEVICE" +can be an IDE, SCSI, SATA, USB or FireWire connected optical drive. Not all SATA controller support all Plextor features. + +\fBLinux:\fR +.br +.I /dev/hdX: +IDE device +.br +.I /dev/scdX: +Linux 2.4: SATA, SCSI, USB device, or IDE device via ide-scsi emulation +.br +.I /dev/srX: +Linux 2.6: IDE device via new ATA layer, SCSI or USB device +.br + +\fBOpenBSD/NetBSD:\fR +.br +.I /dev/rcdX +.br + +\fBFreeBSD:\fR +.br +.I /dev/cd: +SCSI device +.br +.I /dev/acd: +ATA device +.br + +\fBMacOS X:\fR +.br +.I /dev/disk: +.br + +\fBwin32:\fR +.br +.I C:,D:,E:, ... X:,Y:,Z: +.br + +.SH "OPTIONS" + +\fB\-l\fR scan busses for all available CD and DVD devices +.br + +\fB\-if\fR select inputfile. Specify the firmware binary file, which should +.br + be written to DEVICE. + +\fB\-u\fR proceed update. When the firmware checksum test has succeeded, +.br + write firmware to DEVICE. + +\fB\-f\fR force flashing. Even if DEVICE is not recognized, or firmware. +.br + checksum has failed, firmware writing will be forced. +.br + Handle with care. + +\fB\-e\fR read EEPROM from DEVICE. + +\fB\-r\fR reboot the device. + +\fB\-t\fR test which opcodes are supported by the device. + +\fB\-v\fR debug. + +.SH "EXAMPLES" +\fBpxfw \-d /dev/hdc \-if 755_1.07.bin \-u\fR +.br +writes firmware file 755_1.07.bin into Master Drive on Secondary IDE\-Port. + +\fBpxfw \-d /dev/sr3 \-e \-oe file.foo\fR +.br +reades EEPROM from device /dev/sr3 and writes it to file.foo. +\fR \fB +\fR \fB +\fR \fB +\fRplease report man page improvements to T.Maguin@web.de\fB diff -Nru qpxtool-0.7.1.002/debian/man/qpxtool.1 qpxtool-0.7.2/debian/man/qpxtool.1 --- qpxtool-0.7.1.002/debian/man/qpxtool.1 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/debian/man/qpxtool.1 2014-04-12 20:19:40.000000000 +0000 @@ -0,0 +1,14 @@ +.\" qpxtool is released under the GNU GENERAL PUBLIC LICENSE. +.TH "qpxtool" "1" "26 Feb 2014" +.SH "NAME" +qpxtool \- a gui to control qpxtool command line interfaces (cli). +.SH "SYNOPSIS" +\fBqpxtool +.br +.SH "DESCRIPTION" +qpxtool is a gui to control qscan and cdvdcontrol. + +\fR \fB +\fR \fB +\fR \fB +\fRplease report man page improvements to T.Maguin@web.de\fB diff -Nru qpxtool-0.7.1.002/debian/man/qscan.1 qpxtool-0.7.2/debian/man/qscan.1 --- qpxtool-0.7.1.002/debian/man/qscan.1 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/debian/man/qscan.1 2014-04-12 20:19:40.000000000 +0000 @@ -0,0 +1,177 @@ +.\" qscan is released under the GNU GENERAL PUBLIC LICENSE. +.TH "qscan" "1" "26 Feb 2014" +.SH "NAME" +qscan \- console tool for quality measurement of optical media +.SH "SYNOPSIS" +\fBqscan [\-l] [\-h] +.br +\fBqscan \-d DEVICE [\-S] [\-i] [\-m] \fR +.br +\fBqscan \-d DEVICE [\-p] [\-r] [\-w] [\-v] \fR +.br +\fBqscan \-d DEVICE [\-f] [\-s] [\-t] [\-v] \fR +.br +\fBqscan \-d DEVICE \-t wt [\-s #] [\-W] \fR +.br +.SH "DESCRIPTION" +qscan is the linux console tool for error correction measuring with optical devices. +The related plugin allows one to use vendor specific commands on your optical device. +Currently supported vendors are Asus, Benq, Liteon, NEC, Pioneer and Plextor. +For detailed information look at http://qpxtool.sourceforge.net/supported.html +.SH "DEVICE" +can be an IDE, SCSI, SATA, USB or FireWire connected optical drive. Not all SATA controller support all Plextor features. + +\fBLinux:\fR +.br +.I /dev/hdX: +IDE device +.br +.I /dev/scdX: +Linux 2.4: SATA, SCSI, USB device, or IDE device via ide-scsi emulation +.br +.I /dev/srX: +Linux 2.6: IDE device via new ATA layer, SCSI or USB device +.br + +\fBOpenBSD/NetBSD:\fR +.br +.I /dev/rcdX +.br + +\fBFreeBSD:\fR +.br +.I /dev/cd: +SCSI device +.br +.I /dev/acd: +ATA device +.br + +\fBMacOS X:\fR +.br +.I /dev/disk: +.br + +\fBwin32:\fR +.br +.I C:,D:,E:, ... X:,Y:,Z: +.br + +.SH "OPTIONS" + +\fB\-l, \-\-scanbus\fR +.br + scan busses for all available optical devices + +\fB\-h, \-\-help\fR +.br + show help + +\fB\-S, \-\-speeds\fR +.br + detect available read and write speeds for selected \-d DEVICE and the relating media + +\fB\-i, \-\-info\fR +.br + show device info of selected \-d DEVICE + +\fB\-m, \-\-media\fR +.br + show media info of selected \-d DEVICE + +\fB\-p, \-\-plugins\fR +.br + list all available plugins + +\fB\-f, \-\-force-plugin PLUGIN [ ASUS | BENQ | BENQ_DVDROM |GENERIC |LITEON |NEC |PIONEER |PLEXTOR ]\fR +.br + force usage of the selected plugin to use the vendor specific commands for the slected device. +.br + Default behaviour auto detection modus. + +\fB [ASUS]\fR use Asus vendor specific commands +.br +\fB [BENQ]\fR use Benq optical writer vendor specific commands +.br +\fB [BENQ_DVDROM]\fR use Benq optical reader vendor specific commands +.br +\fB [GENERIC]\fR use generic mmc commands +.br +\fB [LITEON]\fR use Liteon vendor specific commands +.br +\fB [NEC]\fR use NEC vendor specific commands +.br +\fB [PIONEER]\fR use Pioneer vendor specific commands +.br +\fB [PLEXTOR]\fR use Plextor vendor specific commands +.br + +\fB\-r #, \-\-rspeed #\fR +.br + set read performance speed to selected value. +.br + Use \-S option before, if you are unsure which speeds are supported + +\fB\-s #, \-\-speed #\fR +.br + set measurement speed to selected value. +.br + Use \-S option before, if you don't know what speeds are supported by your device. +.br + Don't use this with \-r or \-w option. + +\fB\-t, \-\-test [rt|wt|errc|ft|jb|ta] \fR +.br + select the q-check you want to be proceeded. Not all tests are supported by all devices. +.br + For detailed information about the terms read the project page: +.br + http://qpxtool.sourceforge.net/glossar.html + +\fB [rt]\fR read transfer rate measurement +.br +\fB [wt]\fR write transfer rate on blank media +.br +\fB [errc]\fR errror correction \- Cx-scan / PIE, PIF, POE, POF +.br +\fB [ft]\fR focus and tracking error measurement +.br +\fB [jb]\fR jitter and beta measurement +.br +\fB [ta]\fR time analyzer measurement +.br + +\fB\-w #, \-\-wspeed #\fR +.br + set write speed to selected value. +.br + Use \-S option before, if you don't know what write speeds are supported by your device. + +\fB\-v, \-\-verbose\fR +.br + gives verbose output and debug information + +\fB\-W, \-\-write\fR +.br + perform real write instead simulation for write transfer rate + +.SH "EXAMPLES" +\fBqscan \-l\fR +.br + scan all buses for availabale optical devices + +\fBqscan \-d /dev/sr2 \-S\fR +.br + Show available speed steps of device /dev/sr2. + +\fBqscan \-d /dev/sr2 \-t errc \-s 5\fR +.br + Proceed an error correction scan on device /dev/sr2 with 5x speed. + +\fBqscan \-d /dev/sr0 \-t wt \-s 12\fR +.br + Proceed a write performance test in simulation mode on device /dev/sr0 (dummy mode) with 12x speed +\fR \fB +\fR \fB +\fR \fB +\fRplease report man page improvements to T.Maguin@web.de\fB diff -Nru qpxtool-0.7.1.002/debian/man/qscand.1 qpxtool-0.7.2/debian/man/qscand.1 --- qpxtool-0.7.1.002/debian/man/qscand.1 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/debian/man/qscand.1 2014-04-12 20:19:40.000000000 +0000 @@ -0,0 +1,40 @@ +.\" qscand is released under the GNU GENERAL PUBLIC LICENSE. +.TH "qscand" "1" "26 Feb 2014" +.SH "NAME" +qscand \- network wrapper for qscan +.SH "SYNOPSIS" +\fBqscand [\-h] +.br +\fBqscand [\-n] [\-d] +.br +\fBqscand \-i NW-INTERFACE-ADDRESS \-p LISTEN-PORT \fR +.br +.SH "DESCRIPTION" +qscand is a network wrapper which gives you access to your devices through the TCP/IP stacK. + +.SH "OPTIONS" + +\fB\-h, \-\-help\fR +.br + show help + +\fB\-n, \-\-nodaemon\fR +.br + don't daemonize qscand + +\fB\-d, \-\-debug\fR +.br + run qscand in debug mode + +\fB\-i, \-\-iface\fR +.br + select ip address for listening + +\fB\-p, \-\-port\fR +.br + select port for listening + +\fR \fB +\fR \fB +\fR \fB +\fRplease report man page improvements to T.Maguin@web.de\fB diff -Nru qpxtool-0.7.1.002/debian/man/readdvd.1 qpxtool-0.7.2/debian/man/readdvd.1 --- qpxtool-0.7.1.002/debian/man/readdvd.1 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/debian/man/readdvd.1 2014-04-12 20:19:40.000000000 +0000 @@ -0,0 +1,80 @@ +.\" readdvd is released under the GNU GENERAL PUBLIC LICENSE. +.TH "readdvd" "1" "26 Feb 2014" +.SH "NAME" +readdvd \- is creating an image of your source dvd media or medias even if it has / they have corrupted blocks +.SH "SYNOPSIS" +\fBreaddvd [\-l] [\-h] +.br +\fBreaddvd \-d DEVICE1 [\-d DEVICE2] [\-d ...] \-o\fR file.iso\fB [\-s #] [\-v] [\-vv]\fR +.br +.SH "DESCRIPTION" +readdvd reads even a corrupted dvd and writes the the result into a new image file on your harddisk. +.br +.SH "DEVICE" +can be an IDE, SCSI, SATA, USB or FireWire connected optical drive. Not all SATA controller support all Plextor features. + +\fBLinux:\fR +.br +.I /dev/hdX: +IDE device +.br +.I /dev/scdX: +Linux 2.4: SATA, SCSI, USB device, or IDE device via ide-scsi emulation +.br +.I /dev/srX: +Linux 2.6: IDE device via new ATA layer, SCSI or USB device +.br + +\fBOpenBSD/NetBSD:\fR +.br +.I /dev/rcdX +.br + +\fBFreeBSD:\fR +.br +.I /dev/cd: +SCSI device +.br +.I /dev/acd: +ATA device +.br + +\fBMacOS X:\fR +.br +.I /dev/disk: +.br + +\fBwin32:\fR +.br +.I C:,D:,E:, ... X:,Y:,Z: +.br + +.SH "OPTIONS" + +\fB\-l\fR scan busses for all available CD and DVD devices + +\fB\-h\fR help shows available options. + +\fB\-o file.iso\fR +.br + write data to imagefile named file.iso + +\fB\-s \fR# read source media with selected speed + +\fB\-v\fR use verbose mode + +\fB\-vv\fR use extended verbose mode + +.SH "INTERACTIVE MODUS" +\fBq\fR stop reading media and exit + +\fBw\fR save sector map which is currently read and continue with the next one + +.SH "EXAMPLES" +\fBreaddvd \-d /dev/sr0 \-o filename.iso \-s 8 \-v\fR +.br + create an image filename.bin of inserted media in device /dev/sr0 with read speed 8 in verbose mode. +\fR \fB +\fR \fB +\fR \fB +\fRplease report man page improvements to T.Maguin@web.de\fB diff -Nru qpxtool-0.7.1.002/debian/patches/01-do_not_use_lib64_dir.patch qpxtool-0.7.2/debian/patches/01-do_not_use_lib64_dir.patch --- qpxtool-0.7.1.002/debian/patches/01-do_not_use_lib64_dir.patch 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/debian/patches/01-do_not_use_lib64_dir.patch 2014-04-12 20:19:40.000000000 +0000 @@ -0,0 +1,16 @@ +Description: Do not use /usr/lib64/qpxtool for plugins + When option --libdir is used for configuring, plugins directory should + be set properly. +Author: Boris Pek +Last-Update: 2014-02-26 + +--- a/configure ++++ b/configure +@@ -876,6 +876,7 @@ + fi + if test "$libdir" != "" ; then + __libdir=$libdir ++ __plugindir=$__libdir/qpxtool + fi + if test "$mandir" != "" ; then + __mandir=$mandir diff -Nru qpxtool-0.7.1.002/debian/patches/01-makefile.patch qpxtool-0.7.2/debian/patches/01-makefile.patch --- qpxtool-0.7.1.002/debian/patches/01-makefile.patch 2012-06-26 00:12:39.000000000 +0000 +++ qpxtool-0.7.2/debian/patches/01-makefile.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -Author: Alessio Treglia -Description: Remove QTDIR which seems to be not respected, - set QMAKE4 properly. ---- - gui/Makefile | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - ---- qpxtool.orig/gui/Makefile -+++ qpxtool/gui/Makefile -@@ -1,6 +1,4 @@ --QTDIR=/opt/qt4/lib --QMAKE4= qmake4 --export QTDIR QMAKE4 -+QMAKE4= qmake-qt4 - - all: Makefile.qmake - $(MAKE) -f Makefile.qmake diff -Nru qpxtool-0.7.1.002/debian/patches/02-desktop_file.patch qpxtool-0.7.2/debian/patches/02-desktop_file.patch --- qpxtool-0.7.1.002/debian/patches/02-desktop_file.patch 2012-06-26 00:12:39.000000000 +0000 +++ qpxtool-0.7.2/debian/patches/02-desktop_file.patch 2014-04-12 20:19:40.000000000 +0000 @@ -1,14 +1,17 @@ -Author: Alessio Treglia -Description: Fix desktop file according to Freedesktop.org's spec. ---- - gui/qpxtool.desktop | 1 - - 1 file changed, 1 deletion(-) +Description: Fix desktop file +Author: Boris Pek +Last-Update: 2014-02-26 ---- qpxtool.orig/gui/qpxtool.desktop -+++ qpxtool/gui/qpxtool.desktop +--- a/gui/qpxtool.desktop ++++ b/gui/qpxtool.desktop @@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 Name=QPxTool GenericName=CD/DVD media quality checker GenericName[ru]=Проверка качества носителей CD/DVD +@@ -11,3 +10,4 @@ Comment[ru]=Проверка качества носителей CD/DVD + Categories=System; + StartupNotify=true + Terminal=false ++Keywords=CD/DVD;quality;test; diff -Nru qpxtool-0.7.1.002/debian/patches/03-ftbfs_kfreebsd.patch qpxtool-0.7.2/debian/patches/03-ftbfs_kfreebsd.patch --- qpxtool-0.7.1.002/debian/patches/03-ftbfs_kfreebsd.patch 2012-06-26 00:12:39.000000000 +0000 +++ qpxtool-0.7.2/debian/patches/03-ftbfs_kfreebsd.patch 2014-04-12 20:19:40.000000000 +0000 @@ -1,16 +1,41 @@ -Description: Link against libcam to fix FTBFS on kfreebsd. -Author: Alessio Treglia ---- - lib/qpxtransport/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) +Description: Fix FTBFS on Debian GNU/kFreeBSD +Author: Boris Pek +Last-Update: 2014-02-26 ---- qpxtool.orig/lib/qpxtransport/Makefile -+++ qpxtool/lib/qpxtransport/Makefile -@@ -19,6 +19,6 @@ VER_MAJOR = 0 - VER_MINOR = 7 - VER_MICRO = 0 +--- a/configure ++++ b/configure +@@ -797,6 +797,13 @@ + OSLIBS_HW="-lcam" + __defprefix="/usr" + ;; ++ gnu/kfreebsd) ++ OSDEFS="-fPIC" ++ OSLIBS_DL="-ldl" ++ OSLIBS_THREAD="-lpthread" ++ OSLIBS_HW="-lcam" ++ __defprefix="/usr" ++ ;; + netbsd|openbsd) + OSDEFS="-fPIC" + OSLIBS_THREAD="-lpthread" +@@ -828,7 +835,7 @@ + BHOST=`uname -srv` --LDLIBS += $(LIBS_HW) $(LIBS_THREAD) $(LIBS_INET) -+LDLIBS += $(LIBS_HW) $(LIBS_THREAD) $(LIBS_INET) $(QPXTRANSPORT_EXTRA_LIBS) + case "$OSL" in +- linux) ++ linux|gnu/kfreebsd) + __bindir=$__prefix/bin + __sbindir=$__prefix/sbin + if test "$ARCH" = "x86_64" ; then +--- a/lib/qpxtransport/qpx_transport.cpp ++++ b/lib/qpxtransport/qpx_transport.cpp +@@ -31,6 +31,9 @@ - include ../Makefile.lib + //#include + //#include ++#ifdef open64 ++#undef open64 ++#endif + #include + //#include + #include diff -Nru qpxtool-0.7.1.002/debian/patches/04-fix-build-with-libpng15.patch qpxtool-0.7.2/debian/patches/04-fix-build-with-libpng15.patch --- qpxtool-0.7.1.002/debian/patches/04-fix-build-with-libpng15.patch 2012-06-26 00:12:39.000000000 +0000 +++ qpxtool-0.7.2/debian/patches/04-fix-build-with-libpng15.patch 2014-04-12 20:19:40.000000000 +0000 @@ -2,11 +2,11 @@ Author: Nobuhiro Iwamatsu Bug-Debian: http://bugs.debian.org/662481 http://bugs.debian.org/648127 -Last-Update: 2012-06-26 +Last-Update: 2013-04-16 --- a/console/f1tattoo/f1tattoo.cpp +++ b/console/f1tattoo/f1tattoo.cpp -@@ -81,6 +81,58 @@ int get_device_info(drive_info* drive) +@@ -81,6 +81,58 @@ } #ifdef USE_LIBPNG @@ -65,7 +65,7 @@ bool tattoo_read_png(unsigned char *buf, uint32_t rows, FILE *fp) { png_byte header[8]; // 8 is the maximum size that can be checked -@@ -95,6 +147,10 @@ bool tattoo_read_png(unsigned char *buf, +@@ -95,6 +147,10 @@ uint32_t row, col; int c; int32_t r,g,b; @@ -76,7 +76,7 @@ if (fread(header, 1, 8, fp) < 8) { printf("Error reading PNG header\n"); -@@ -129,9 +185,11 @@ bool tattoo_read_png(unsigned char *buf, +@@ -129,9 +185,11 @@ png_read_info(png_ptr, info_ptr); @@ -90,7 +90,7 @@ printf("Image should be 3744 x %d", rows); return 1; } -@@ -140,17 +198,21 @@ bool tattoo_read_png(unsigned char *buf, +@@ -140,17 +198,21 @@ // height = info_ptr->height; // bit_depth = info_ptr->bit_depth; @@ -115,7 +115,7 @@ printf("PNG color type is indexed, but no palette found!"); goto err_read_png; } -@@ -168,49 +230,64 @@ bool tattoo_read_png(unsigned char *buf, +@@ -168,49 +230,64 @@ printf("unlnown PNG color type!\n"); goto err_read_png; } @@ -191,7 +191,7 @@ r = png_row_pointer[col*3]; g = png_row_pointer[col*3+1]; b = png_row_pointer[col*3+2]; -@@ -219,7 +296,7 @@ bool tattoo_read_png(unsigned char *buf, +@@ -219,7 +296,7 @@ } break; case PNG_COLOR_TYPE_RGB_ALPHA: @@ -200,7 +200,7 @@ r = png_row_pointer[col*4]; g = png_row_pointer[col*4+1]; b = png_row_pointer[col*4+2]; -@@ -228,7 +305,7 @@ bool tattoo_read_png(unsigned char *buf, +@@ -228,7 +305,7 @@ } break; case PNG_COLOR_TYPE_GRAY_ALPHA: @@ -209,16 +209,3 @@ raw_row_pointer[col] = png_row_pointer[col*2] ^ 0xFF; } break; ---- a/Makefile -+++ b/Makefile -@@ -10,8 +10,8 @@ LIBS_INET = - LIBS_DL = -ldl - LIBS_THREAD = -lpthread - --LPNG_INC = -I/usr/include/libpng12 --LPNG_LIB = -L/usr/lib -lpng12 -+LPNG_INC = -I/usr/include/lib${LIBPNG_VER} -+LPNG_LIB = -L/usr/lib -l${LIBPNG_VER} - - - CXXFLAGS += -Wall -O2 -fPIC -DUSE_LIBPNG diff -Nru qpxtool-0.7.1.002/debian/patches/05-add-hardening-flags-in-compiler-options.patch qpxtool-0.7.2/debian/patches/05-add-hardening-flags-in-compiler-options.patch --- qpxtool-0.7.1.002/debian/patches/05-add-hardening-flags-in-compiler-options.patch 2012-06-26 00:12:39.000000000 +0000 +++ qpxtool-0.7.2/debian/patches/05-add-hardening-flags-in-compiler-options.patch 2014-04-12 20:19:40.000000000 +0000 @@ -1,17 +1,15 @@ Description: Add hardening flags in compiler options Author: Boris Pek -Last-Update: 2012-06-21 +Last-Update: 2014-04-12 --- a/gui/qpxtool.pro +++ b/gui/qpxtool.pro -@@ -13,6 +13,11 @@ TARGET = qpxtool +@@ -13,6 +13,9 @@ DEPENDPATH += . include locale src INCLUDEPATH += . include -+QMAKE_CXXFLAGS += $(Q_CXXFLAGS) -+QMAKE_CFLAGS_DEBUG += $(Q_CFLAGS) -+QMAKE_CFLAGS_RELEASE += $(Q_CFLAGS) -+QMAKE_LFLAGS += $(Q_LDFLAGS) ++QMAKE_CXXFLAGS += $$(CXXFLAGS) ++QMAKE_LFLAGS += $$(LDFLAGS) + # Input HEADERS += include/about.h \ diff -Nru qpxtool-0.7.1.002/debian/patches/06-make-port-for-hurd-i386.patch qpxtool-0.7.2/debian/patches/06-make-port-for-hurd-i386.patch --- qpxtool-0.7.1.002/debian/patches/06-make-port-for-hurd-i386.patch 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/debian/patches/06-make-port-for-hurd-i386.patch 2014-04-12 20:19:40.000000000 +0000 @@ -0,0 +1,93 @@ +Description: Make port for Debian GNU/Hurd +Author: Boris Pek +Last-Update: 2014-04-12 + +--- a/configure ++++ b/configure +@@ -784,6 +784,12 @@ + OSLIBS_THREAD="-lpthread" + __defprefix="/usr/local" + ;; ++ gnu) ++ OSDEFS="-fPIC" ++ OSLIBS_DL="-ldl" ++ OSLIBS_THREAD="-lpthread" ++ __defprefix="/usr" ++ ;; + darwin) + OSDEFS="-D__unix -fPIC" + OSLIBS_THREAD="-lpthread" +@@ -828,7 +841,7 @@ + BHOST=`uname -srv` + + case "$OSL" in +- linux|gnu/kfreebsd) ++ linux|gnu/kfreebsd|gnu) + __bindir=$__prefix/bin + __sbindir=$__prefix/sbin + if test "$ARCH" = "x86_64" ; then +--- a/lib/qpxtransport/include/qpx_transport.h ++++ b/lib/qpxtransport/include/qpx_transport.h +@@ -90,14 +90,20 @@ + operator unsigned char *() { return ptr; } + }; + +-#if defined(__linux) ++#if defined(__linux) || defined(__GNU__) + + //#include ++#if defined(__linux) + #include ++#elif defined(__GNU__) ++#include ++#endif + //#include + //#include + //#include ++#if defined(__linux) + #include ++#endif + #if !defined(SG_FLAG_LUN_INHIBIT) + # if defined(SG_FLAG_UNUSED_LUN_INHIBIT) + # define SG_FLAG_LUN_INHIBIT SG_FLAG_UNUSED_LUN_INHIBIT +--- a/lib/qpxtransport/qpx_transport.cpp ++++ b/lib/qpxtransport/qpx_transport.cpp +@@ -133,16 +136,22 @@ autofree::autofree() + autofree::~autofree() + { if (ptr) free(ptr); } + +-#if defined(__linux) ++#if defined(__linux) || defined(__GNU__) + + #include +-#include ++#if defined(__linux) + #include ++#elif defined(__GNU__) ++#include ++#endif ++#include + #include + #include + #include + #include ++#if defined(__linux) + #include ++#endif + #if !defined(SG_FLAG_LUN_INHIBIT) + # if defined(SG_FLAG_UNUSED_LUN_INHIBIT) + # define SG_FLAG_LUN_INHIBIT SG_FLAG_UNUSED_LUN_INHIBIT +@@ -235,11 +246,13 @@ int Scsi_Command::transport(Direction dir,void *buf,size_t sz) + cgc.buffer = (unsigned char *)buf; + cgc.buflen = sz; + cgc.data_direction = dir; ++#if !defined(__GNU__) + if (ioctl (fd,CDROM_SEND_PACKET,&cgc)) + { + ret = ERRCODE(_sense.u); + if (ret==0) ret=-1; + } ++#endif + } + return ret; + } diff -Nru qpxtool-0.7.1.002/debian/patches/series qpxtool-0.7.2/debian/patches/series --- qpxtool-0.7.1.002/debian/patches/series 2012-06-26 00:12:39.000000000 +0000 +++ qpxtool-0.7.2/debian/patches/series 2014-04-12 20:19:40.000000000 +0000 @@ -1,5 +1,6 @@ -01-makefile.patch +01-do_not_use_lib64_dir.patch 02-desktop_file.patch 03-ftbfs_kfreebsd.patch 04-fix-build-with-libpng15.patch 05-add-hardening-flags-in-compiler-options.patch +06-make-port-for-hurd-i386.patch diff -Nru qpxtool-0.7.1.002/debian/pxfw.install qpxtool-0.7.2/debian/pxfw.install --- qpxtool-0.7.1.002/debian/pxfw.install 2012-06-26 00:12:39.000000000 +0000 +++ qpxtool-0.7.2/debian/pxfw.install 2014-04-12 20:19:40.000000000 +0000 @@ -1,2 +1 @@ usr/sbin -usr/share/man/man8 diff -Nru qpxtool-0.7.1.002/debian/pxfw.manpages qpxtool-0.7.2/debian/pxfw.manpages --- qpxtool-0.7.1.002/debian/pxfw.manpages 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/debian/pxfw.manpages 2014-04-12 20:19:40.000000000 +0000 @@ -0,0 +1 @@ +debian/man/*.8 diff -Nru qpxtool-0.7.1.002/debian/qpxtool.doc-base qpxtool-0.7.2/debian/qpxtool.doc-base --- qpxtool-0.7.1.002/debian/qpxtool.doc-base 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/debian/qpxtool.doc-base 2014-04-12 20:19:40.000000000 +0000 @@ -0,0 +1,13 @@ +Document: qpxtool +Title: QPxTool release status documentation +Author: Gennady "ShultZ" Kozlov +Abstract: QPxTool is CD/DVD quality checker tool which gives you access to all + available Quality Checks (Q-Checks) on written and blank media, that are + available for your drive. This will help you to find the right media and the + optimized writing speed for your hardware, which will increase the chance for + a long data lifetime. +Section: System/Administration + +Format: HTML +Index: /usr/share/doc/qpxtool/ +Files: /usr/share/doc/qpxtool/*.html diff -Nru qpxtool-0.7.1.002/debian/qpxtool.docs qpxtool-0.7.2/debian/qpxtool.docs --- qpxtool-0.7.1.002/debian/qpxtool.docs 2012-06-26 00:12:39.000000000 +0000 +++ qpxtool-0.7.2/debian/qpxtool.docs 2014-04-12 20:19:40.000000000 +0000 @@ -1,2 +1,4 @@ README TODO +SupportedDevices +status.html diff -Nru qpxtool-0.7.1.002/debian/qpxtool.install qpxtool-0.7.2/debian/qpxtool.install --- qpxtool-0.7.1.002/debian/qpxtool.install 2012-06-26 00:12:39.000000000 +0000 +++ qpxtool-0.7.2/debian/qpxtool.install 2014-04-12 20:19:40.000000000 +0000 @@ -1,5 +1,6 @@ +debian/pixmap/qpxtool.xpm usr/share/pixmaps/ usr/bin usr/lib/qpxtool usr/share/applications usr/share/pixmaps -usr/share/man/man1 +usr/share/qpxtool diff -Nru qpxtool-0.7.1.002/debian/qpxtool.manpages qpxtool-0.7.2/debian/qpxtool.manpages --- qpxtool-0.7.1.002/debian/qpxtool.manpages 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/debian/qpxtool.manpages 2014-04-12 20:19:40.000000000 +0000 @@ -0,0 +1 @@ +debian/man/*.1 diff -Nru qpxtool-0.7.1.002/debian/rules qpxtool-0.7.2/debian/rules --- qpxtool-0.7.1.002/debian/rules 2012-06-26 00:12:39.000000000 +0000 +++ qpxtool-0.7.2/debian/rules 2014-04-12 20:19:40.000000000 +0000 @@ -1,27 +1,19 @@ #!/usr/bin/make -f -DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) +PACKAGE = qpxtool -ifeq (kfreebsd,$(DEB_HOST_ARCH_OS)) -export QPXTRANSPORT_EXTRA_LIBS="-lcam" -endif - -Q_CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) -Q_CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(Q_CPPFLAGS) -Q_CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(Q_CPPFLAGS) -Q_LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed -export Q_CPPFLAGS Q_CFLAGS Q_CXXFLAGS Q_LDFLAGS +DEBIAN_PATH := $(abspath $(dir $(MAKEFILE_LIST))) +USCAN_REPORT = $(shell uscan --noconf --report --dehs $(DEBIAN_PATH)) +CUR_VER = $(shell echo "$(USCAN_REPORT)" | sed -n 's/.*\(.*\)<\/upstream-version>.*/\1/p') +CUR_URL = $(shell echo "$(USCAN_REPORT)" | sed -n 's/.*\(.*\)<\/upstream-url>.*/\1/p') -export LIBPNG_VER="png$(shell dpkg -l | grep libpng | sed -e 's:^.* libpng\([0-9]*\).*$:\1:' | uniq)" +LDFLAGS += -Wl,--as-needed %: - dh $@ + dh $@ --list-missing -override_dh_auto_clean: - [ ! -f Makefile ] || $(MAKE) QMAKE4=qmake-qt4 clean +override_dh_auto_configure: + ./configure --prefix=/usr --libdir=/usr/lib --mandir=/usr/share/man -override_dh_auto_install: - dh_auto_install - install -D -m 0644 debian/pixmap/qpxtool.xpm debian/qpxtool/usr/share/pixmaps/qpxtool.xpm - # Uncompress manpages (they are not max compressed) - gunzip debian/tmp/usr/share/man/man*/*.gz +get-orig-source: + wget -c "$(CUR_URL)" -O "$(PACKAGE)_$(CUR_VER).orig.tar.bz2" Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/document.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/document.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/bd.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/bd.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/cd.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/cd.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/cd_r.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/cd_r.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/cd_rw.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/cd_rw.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/dvd-ram.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/dvd-ram.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/dvd-r_dl.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/dvd-r_dl.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/dvd+r_dl.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/dvd+r_dl.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/dvd-rom.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/dvd-rom.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/dvd-r.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/dvd-r.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/dvd+r.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/dvd+r.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/dvd-rw.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/dvd-rw.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/dvd+rw.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/dvd+rw.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/hddvd-ram.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/hddvd-ram.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/hddvd-rom.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/hddvd-rom.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/hddvd-r.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/hddvd-r.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/media/hddvd-rw.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/media/hddvd-rw.png differ Binary files /tmp/pvfprDxuQU/qpxtool-0.7.1.002/gui/images/search.png and /tmp/uNhKECeV7E/qpxtool-0.7.2/gui/images/search.png differ diff -Nru qpxtool-0.7.1.002/gui/include/db_connection.h qpxtool-0.7.2/gui/include/db_connection.h --- qpxtool-0.7.1.002/gui/include/db_connection.h 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/gui/include/db_connection.h 2010-09-21 18:48:03.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * This file is part of the QPxTool project. + * Copyright (C) 2010 Gennady "ShultZ" Kozlov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * See the file "COPYING" for the exact licensing terms. + * + */ + +#ifndef _DB_CONNECTION_H +#define _DB_CONNECTION_H + +class QSqlDatabase; +class QString; + +class DBParams { +public: + DBParams(); + DBParams(QString driver, + QString host, + QString name, + QString user, + QString pass, + int port = 5432 + ); +// DBParams(const DBParams& p); + ~DBParams() {}; + + bool params_set; + QString driver; + QString host; + int port; + QString name; + QString user; + QString pass; + + QString conn_name; +}; + +bool SqlProbeConnection(const DBParams& par, QString CONNECTION="test connection"); +bool SqlOpenConnection (const DBParams& par, QString CONNECTION="test connection"); +void SqlCloseConnection(QString CONNECTION="test connection"); + +#endif // _DB_CONNECTION_H + diff -Nru qpxtool-0.7.1.002/gui/include/db_report_selection.h qpxtool-0.7.2/gui/include/db_report_selection.h --- qpxtool-0.7.1.002/gui/include/db_report_selection.h 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/gui/include/db_report_selection.h 2010-09-21 18:48:03.000000000 +0000 @@ -0,0 +1,96 @@ +/* + * This file is part of the QPxTool project. + * Copyright (C) 2010 Gennady "ShultZ" Kozlov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * See the file "COPYING" for the exact licensing terms. + * + */ + +#ifndef DB_REPORT_SELECTION +#define DB_REPORT_SELECTION + +#include +#include +#include +#include +#include + +class QLabel; +class QLineEdit; +class QListView; +class QSplitter; +class QPushButton; +class QToolButton; +class QBoxLayout; +class QEvent; +class QTextBrowser; + +class ListModel : public QAbstractListModel +{ + Q_OBJECT +public: + ListModel(QObject *p) : QAbstractListModel(p) {}; + ~ListModel() {}; + + void clear(); + virtual int rowCount(const QModelIndex&) const; + virtual int columnCount(const QModelIndex&) const; + virtual QVariant data(const QModelIndex&, int role) const; + void addRow(int, QString, QIcon icon = QIcon()); + bool setData(int, int role, QVariant); + void removeRow(int); + int getKey(int); + +private: + QList tdata; + QList idata; + QList keys; +}; + + + +class DbReportSelection : public QDialog +{ + Q_OBJECT + +public: + DbReportSelection(QString conn, QWidget *parent = NULL, Qt::WindowFlags fl = 0); + ~DbReportSelection(); + int getReportID() const { return report_id; }; + +private slots: + void load(); + void search(); + void itemActivated(const QModelIndex); + +protected: + bool eventFilter(QObject *o, QEvent *e); + static QImage getMediaLogo(quint64); + +private: + void winit(); + + QBoxLayout *layout, + *layout_l, + *layout_pb; + QTextBrowser *info; + + QLabel *llabel; + QLineEdit *elabel; + QToolButton *elabel_clear, + *elabel_search; + QListView *list; + QPushButton *pb_load, + *pb_cancel; + + ListModel *model; + QSqlDatabase db; + int report_id; +}; + +#endif // DB_REPORT_SELECTION + diff -Nru qpxtool-0.7.1.002/gui/include/device.h qpxtool-0.7.2/gui/include/device.h --- qpxtool-0.7.1.002/gui/include/device.h 2010-02-17 09:24:03.000000000 +0000 +++ qpxtool-0.7.2/gui/include/device.h 2012-11-21 09:56:58.000000000 +0000 @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -56,6 +55,9 @@ #define GRAPH_PO8 (1 << 5) #define GRAPH_POF (1 << 6) +#define GRAPH_LDC (1 << 1) +#define GRAPH_BIS (1 << 4) + #define GRAPH_UNCR (1 << 7) @@ -203,10 +205,21 @@ }; template +struct Errc_BD { + quint64 lba; + float spdx; + T res0; + T ldc, res1, res2; + T bis, res3, res4; + T uncr; +}; + +template union Errc { Errc_ARRAY raw; Errc_CD cd; Errc_DVD dvd; + Errc_BD bd; }; typedef Errc DI_Errc; @@ -217,6 +230,7 @@ void ErrcMAX(DI_Errc *max, const DI_Errc& o); void CDErrcAVG(AVG_Errc *avg, TOT_Errc *tot, uint64_t blocks); void DVDErrcAVG(AVG_Errc *avg, TOT_Errc *tot, uint64_t blocks); +void BDErrcAVG(AVG_Errc *avg, TOT_Errc *tot, uint64_t blocks); struct DI_JB { quint64 lba; @@ -319,6 +333,8 @@ struct MediaInfo { QString type; + QString label; + // bool isCD; // bool isDVD; @@ -360,6 +376,8 @@ }; class MediaWatcher; +class ResultsReader; +class ResultsWriter; class device : public QObject { @@ -413,10 +431,14 @@ void pauseWatcher(); void unpauseWatcher(); - bool save(QIODevice*); - bool load(QIODevice*); + void save(QIODevice*); + bool isSaving(); + bool saveResult(); + void load(QIODevice*); + bool isLoading(); + bool loadResult(); - devtype type; +devtype type; QString host; uint16_t port; QString path; @@ -475,6 +497,9 @@ QTcpSocket *sock; QPxIODevice *io; + ResultsReader *resReader; + ResultsWriter *resWriter; + bool autoupdate; #ifdef MINFO_TREE QList info_media; @@ -498,6 +523,8 @@ void watcherEventNew(); void watcherEventNoMedia(); + void resLoaderDone(); + signals: void mediaRemoved(); void mediaNew(); diff -Nru qpxtool-0.7.1.002/gui/include/errc_detailed.h qpxtool-0.7.2/gui/include/errc_detailed.h --- qpxtool-0.7.1.002/gui/include/errc_detailed.h 2010-02-17 14:42:25.000000000 +0000 +++ qpxtool-0.7.2/gui/include/errc_detailed.h 2012-11-28 05:54:16.000000000 +0000 @@ -49,9 +49,10 @@ const char** labels; QGridLayout *layout; + QGridLayout *layout_top; QPxGraph *graph[8]; - QGridLayout *layoutt; + QGridLayout *layout_summary; QLabel *pl_tot, *pl_max, *pl_avg; QFrame *hline0, *hline1; QLabel *pl_name[8]; diff -Nru qpxtool-0.7.1.002/gui/include/graphtab.h qpxtool-0.7.2/gui/include/graphtab.h --- qpxtool-0.7.1.002/gui/include/graphtab.h 2010-02-11 09:20:12.000000000 +0000 +++ qpxtool-0.7.2/gui/include/graphtab.h 2010-09-21 18:48:03.000000000 +0000 @@ -27,8 +27,6 @@ class devlist; class QPxSettings; -// #define __LEGEND_SHOW_SPEED - class GraphTab : public QWidget { Q_OBJECT diff -Nru qpxtool-0.7.1.002/gui/include/mainwidget.h qpxtool-0.7.2/gui/include/mainwidget.h --- qpxtool-0.7.1.002/gui/include/mainwidget.h 2010-02-17 13:06:24.000000000 +0000 +++ qpxtool-0.7.2/gui/include/mainwidget.h 2010-09-21 18:48:03.000000000 +0000 @@ -49,6 +49,8 @@ void clearMedia(); void selectDevice(); void reconfig(); + void setSidebarVisible(bool); + void selectTab(int); //inline void reconfig() { emit configured(); }; private slots: diff -Nru qpxtool-0.7.1.002/gui/include/mainwindow.h qpxtool-0.7.2/gui/include/mainwindow.h --- qpxtool-0.7.1.002/gui/include/mainwindow.h 2010-02-11 11:49:20.000000000 +0000 +++ qpxtool-0.7.2/gui/include/mainwindow.h 2010-09-21 18:48:03.000000000 +0000 @@ -15,9 +15,13 @@ #include #include +#include #include #include +class QAction; +class QActionGroup; + class QWidget; class QMenuBar; class QToolBar; @@ -75,9 +79,10 @@ void setDevice(int idx); void loejToggle(); void lockToggle(); + void selectTab(); void select_tests(); - void select_tests(device *dev); + void select_tests(device *idev); void run_tests(); void cancel_run_tests(); void terminate_tests(); @@ -96,14 +101,20 @@ void print_results(); void export_results(); void save_results(); + void save_results_db(device *idev = NULL); void load_results(); void load_results(QString); + void load_results_db(); void about(); void tests_done(); void tests_error(); +protected: + virtual void dragEnterEvent(QDragEnterEvent*); + virtual void dropEvent(QDropEvent*); + private: ProgressWidget *progress; void winit(); @@ -142,7 +153,9 @@ QAction *act_exit, *act_pref, *act_save, + *act_save_db, *act_load, + *act_load_db, *act_export, *act_report, *act_print, @@ -153,6 +166,10 @@ *act_stop, *act_about; + QAction *act_sb; + QList act_sblist; + QActionGroup *act_sbgrp; + QWidget *cwidget; QVBoxLayout *layout; @@ -172,9 +189,8 @@ TestDialog *testDialog; -// device - devlist devices; - + devlist devices; // devices +// QSqlDatabase db; // reports database connection // settings QPxSettings set; bool splash; diff -Nru qpxtool-0.7.1.002/gui/include/mcapwidget.h qpxtool-0.7.2/gui/include/mcapwidget.h --- qpxtool-0.7.1.002/gui/include/mcapwidget.h 2009-03-16 14:06:09.000000000 +0000 +++ qpxtool-0.7.2/gui/include/mcapwidget.h 2010-09-21 18:48:03.000000000 +0000 @@ -12,8 +12,6 @@ #include -#define SHOW_X - class MediaCapWidget : public QWidget { Q_OBJECT diff -Nru qpxtool-0.7.1.002/gui/include/pref_common.h qpxtool-0.7.2/gui/include/pref_common.h --- qpxtool-0.7.1.002/gui/include/pref_common.h 2010-02-17 12:32:32.000000000 +0000 +++ qpxtool-0.7.2/gui/include/pref_common.h 2010-09-21 18:48:03.000000000 +0000 @@ -16,16 +16,11 @@ #include #include -class QHBoxLayout; class QVBoxLayout; class QGridLayout; -class QFrame; class QGroupBox; class QLabel; -class QLineEdit; -class QPushButton; -class QComboBox; class QCheckBox; class prefCommon : public QWidget @@ -36,9 +31,6 @@ prefCommon(QPxSettings *iset, QWidget *p=0, Qt::WindowFlags fl=0); ~prefCommon(); -private slots: - void select_rep_path(); - private: QVBoxLayout *layout; @@ -58,15 +50,6 @@ *ck_ftw, *ck_ta; - QGroupBox *box_rep; - QVBoxLayout *layout_rep; - QHBoxLayout *layout_rep_path; - - QLabel *l_rep_path; - QLineEdit *e_rep_path; - QPushButton *pb_rep_path; - QCheckBox *ck_eject; - QPxSettings *set; }; diff -Nru qpxtool-0.7.1.002/gui/include/preferences.h qpxtool-0.7.2/gui/include/preferences.h --- qpxtool-0.7.1.002/gui/include/preferences.h 2010-02-11 10:47:09.000000000 +0000 +++ qpxtool-0.7.2/gui/include/preferences.h 2010-09-21 18:48:03.000000000 +0000 @@ -12,7 +12,7 @@ #ifndef _PREFERENCES_H #define _PREFERENCES_H -#define PREF_PAGES 3 +#define PREF_PAGES 4 #include #include diff -Nru qpxtool-0.7.1.002/gui/include/pref_reports.h qpxtool-0.7.2/gui/include/pref_reports.h --- qpxtool-0.7.1.002/gui/include/pref_reports.h 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/gui/include/pref_reports.h 2010-09-21 18:48:03.000000000 +0000 @@ -0,0 +1,78 @@ +/* + * This file is part of the QPxTool project. + * Copyright (C) 2010 Gennady "ShultZ" Kozlov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * See the file "COPYING" for the exact licensing terms. + * + */ + +#ifndef PREF_REPORTS_H +#define PREF_REPORTS_H + +#include +#include + +class QGridLayout; +class QHBoxLayout; +class QVBoxLayout; + +class QGroupBox; +class QLabel; +class QLineEdit; +class QPushButton; +class QCheckBox; +class QComboBox; +class QSpinBox; + +class prefReports : public QWidget +{ + Q_OBJECT + +public: + prefReports(QPxSettings *iset, QWidget *p=0, Qt::WindowFlags fl=0); + ~prefReports(); + +private slots: + void select_rep_path(); + void box_rep_toggled(bool); + void check_db_connection(); +private: + QVBoxLayout *layout; + + QGroupBox *box_rep; + QVBoxLayout *layout_rep; + QHBoxLayout *layout_rep_path; + + QLabel *l_rep_path; + QLineEdit *e_rep_path; + QPushButton *pb_rep_path; + +// database settings + QGroupBox *box_rep_db; + QGridLayout *layout_db; + QLabel *ldb_driver, + *ldb_host, + *ldb_port, + *ldb_name, + *ldb_user, + *ldb_pass; + QComboBox *db_driver; + QLineEdit *db_host, + *db_name, + *db_user, + *db_pass; + QSpinBox *db_port; + QPushButton *pb_db_check; + QCheckBox *ck_autosave_db; + + QCheckBox *ck_eject; + + QPxSettings *set; +}; + +#endif // PREF_REPORTS_H + diff -Nru qpxtool-0.7.1.002/gui/include/progresswidget.h qpxtool-0.7.2/gui/include/progresswidget.h --- qpxtool-0.7.1.002/gui/include/progresswidget.h 2009-05-06 12:45:46.000000000 +0000 +++ qpxtool-0.7.2/gui/include/progresswidget.h 2010-09-21 18:48:03.000000000 +0000 @@ -1,6 +1,6 @@ /* * This file is part of the QPxTool project. - * Copyright (C) 2009 Gennady "ShultZ" Kozlov + * Copyright (C) 2009-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,6 +14,7 @@ #define PROGRESS_WIDGET_H #include +#include class ProgressWidget: public QWidget { @@ -25,13 +26,23 @@ DirectionBackward = 1, DirectionBoth = 2 }; - + enum ProgressColor { + BgColor = 0, + FrameColor = 1, + TextColor = 2, + RectColor = 3 + }; + ProgressWidget(int, int, QWidget *p); ~ProgressWidget(); void setDirection(ProgressWidget::Direction); void setText(QString); + void setColor(ProgressColor, QColor); public slots: + virtual void setVisible(bool); + +private slots: void step(); protected: @@ -44,7 +55,12 @@ bool dir2; QString text; + + QTimer timer; + QColor col_frame, + col_bg, + col_text, + col_rect; }; #endif - diff -Nru qpxtool-0.7.1.002/gui/include/qpxsettings.h qpxtool-0.7.2/gui/include/qpxsettings.h --- qpxtool-0.7.1.002/gui/include/qpxsettings.h 2010-02-11 09:21:24.000000000 +0000 +++ qpxtool-0.7.2/gui/include/qpxsettings.h 2012-12-03 07:13:07.000000000 +0000 @@ -20,6 +20,8 @@ #include +#include + struct colorSet { QString name; QColor bg,grid,rspeed,wspeed, @@ -112,10 +114,22 @@ QColor *uncr; }; +struct ErrcColorBD{ + QColor *res0; + QColor *ldc; + QColor *res1; + QColor *res2; + QColor *bis; + QColor *res3; + QColor *res4; + QColor *uncr; +}; + union ErrcColor{ QColor *raw[8]; ErrcColorCD cd; ErrcColorDVD dvd; + ErrcColorBD bd; }; #define AFLAG_MWATCH 0x0001 @@ -151,11 +165,16 @@ int tests; // general options + bool show_sidebar; bool show_allctl; bool report_autosave; QString report_path; uint32_t actions_flags; + bool use_reports_db; + bool report_autosave_db; + DBParams db; + // device settings bool useLocal; bool useRemote; @@ -181,6 +200,11 @@ QColor col_taland; ScaleList scales; + +// paths + QString last_res_path_native, + last_res_path_html, + last_res_path_pdf; }; #endif diff -Nru qpxtool-0.7.1.002/gui/include/resultsio.h qpxtool-0.7.2/gui/include/resultsio.h --- qpxtool-0.7.1.002/gui/include/resultsio.h 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/gui/include/resultsio.h 2012-11-21 09:56:58.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * This file is part of the QPxTool project. + * Copyright (C) 2010 Gennady "ShultZ" Kozlov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * See the file "COPYING" for the exact licensing terms. + * + */ + +#ifndef _RESULTSIO_H +#define _RESULTSIO_H + +#include + +#include + +#define RECALC_ON_LOAD 1 + +class ResultsIO : public QThread +{ +public: + ResultsIO(device *dev) :QThread((QObject*)dev) { this->dev = dev; this->res = false; io = NULL; } + ~ResultsIO() {}; + + inline void setIO(QIODevice *io) { this->io = io; }; + inline bool result() { return res; }; + +protected: + QIODevice *io; + device *dev; + bool res; +}; + + +class ResultsReader : public ResultsIO +{ + Q_OBJECT +public: + ResultsReader(device *dev) : ResultsIO(dev) {}; + ~ResultsReader() {}; + +protected: + virtual void run(); +}; + +class ResultsWriter : public ResultsIO +{ + Q_OBJECT +public: + ResultsWriter(device *dev) : ResultsIO(dev) {}; + ~ResultsWriter() {}; + +protected: + virtual void run(); +}; + +#endif // _RESULTSIO_H + diff -Nru qpxtool-0.7.1.002/gui/include/tab_ta.h qpxtool-0.7.2/gui/include/tab_ta.h --- qpxtool-0.7.1.002/gui/include/tab_ta.h 2010-02-11 09:21:53.000000000 +0000 +++ qpxtool-0.7.2/gui/include/tab_ta.h 2010-09-21 18:48:03.000000000 +0000 @@ -24,6 +24,10 @@ class device; class devlist; class QPxSettings; +class ColorLabel; + +//#define __LEGEND_SHOW_TA + #include #include @@ -53,7 +57,10 @@ QBoxLayout *layout; // Selectors/time QBoxLayout *layoutl; - +#ifdef __LEGEND_SHOW_TA + ColorLabel *cl_pit, + *cl_land; +#endif QGroupBox *box_layer; QBoxLayout *lay_layer; QButtonGroup *grp_layer; diff -Nru qpxtool-0.7.1.002/gui/include/tab_transfer.h qpxtool-0.7.2/gui/include/tab_transfer.h --- qpxtool-0.7.1.002/gui/include/tab_transfer.h 2010-02-11 09:21:59.000000000 +0000 +++ qpxtool-0.7.2/gui/include/tab_transfer.h 2010-09-21 18:48:03.000000000 +0000 @@ -20,6 +20,8 @@ #include #include +//#define __LEGEND_SHOW_SPEED + class tabTransfer : public GraphTab { Q_OBJECT diff -Nru qpxtool-0.7.1.002/gui/include/testdialog.h qpxtool-0.7.2/gui/include/testdialog.h --- qpxtool-0.7.1.002/gui/include/testdialog.h 2010-02-11 09:22:04.000000000 +0000 +++ qpxtool-0.7.2/gui/include/testdialog.h 2010-09-21 18:48:03.000000000 +0000 @@ -23,6 +23,7 @@ class QFrame; class QLabel; +class QLineEdit; class QCheckBox; class QComboBox; class QTextBrowser; @@ -54,10 +55,12 @@ QGridLayout *layout; - QLabel *ldev; - QLabel *devid; - QLabel *lmedia; - QLabel *media; + QLabel *ldev, + *devid, + *lmedia, + *media, + *llabel; + QLineEdit *elabel; QGroupBox *grp_tests; QGridLayout *layout_tests; diff -Nru qpxtool-0.7.1.002/gui/include/version.h qpxtool-0.7.2/gui/include/version.h --- qpxtool-0.7.1.002/gui/include/version.h 2010-02-11 09:22:14.000000000 +0000 +++ qpxtool-0.7.2/gui/include/version.h 2012-11-21 12:22:39.000000000 +0000 @@ -13,6 +13,7 @@ #ifndef _QPX_VERSION_H #define _QPX_VERSION_H -#define VERSION "0.7.1" +#define VERSION "0.7.2" #endif + diff -Nru qpxtool-0.7.1.002/gui/locale/qpxtool.de_DE.ts qpxtool-0.7.2/gui/locale/qpxtool.de_DE.ts --- qpxtool-0.7.1.002/gui/locale/qpxtool.de_DE.ts 2010-03-23 12:09:49.000000000 +0000 +++ qpxtool-0.7.2/gui/locale/qpxtool.de_DE.ts 2010-09-21 18:48:03.000000000 +0000 @@ -1,8 +1,10 @@ - + + AboutDialog + About QPxTool QPxTool Info @@ -14,6 +16,45 @@ + DbReportSelection + + + Select report... + + + + + Label: + + + + + Load + Laden + + + + Cancel + Abbrechen + + + + + copy + + + + + Device + Gerät + + + + Date + + + + ErrcDetailedDialog @@ -113,32 +154,45 @@ QPxPreferences - + + + + + Preferences Einstellungen - + + Devices Geräte - + + Colors Farben - + + Common Allgemein - + + + Reports + + + + Save Sichern - + Cancel Abbrechen @@ -146,163 +200,206 @@ QPxToolMW - + Device: Gerät: - + Exit Beenden - + Rescan local bus and network Angeschlossene Geräte aktualisieren - + Update media info Medieninformationen aktualisieren - + Device controls Gerätesteuerung - + Run tests... Tests beginnen... - + Stop tests Tests beenden - + Preferences Einstellungen - + Print test results Testergebnisse drucken - + + Export results to HTML Ergebnisse exportieren - html - + Save results... Ergebnisse speichern... - + Load results... Ergebnisse laden... - + + Save results (DB)... + + + + + Load results (DB)... + + + + + Show sidebar + + + + File Datei - + + View + + + + Device Gerät - + Help Hilfe - + About Info - + + No devices Keine Geräte - + No devices found! Can't run tests Keine Geräte gefunden! Test können nicht ausgeführt werden - + + + + + + Device busy Gerät in Benutzung - + + Bus scan in progress Geräte werden eingelesen - + It seems device already performing test or info updating in progress Gerät ist bereits in Nutzung oder eine Aktualisierung läuft - + + + + + + + + Error Fehler - + Error performing test! Fehler bei Testdurchführung! - + qScan finished with non-zero exit code qScan terminierte mit Rückgabewert ungleich 0 - + + Can't scan bus: some device(s) busy! Kein Einlesen der Geräte: Gerät(e) in Benutzung! - + Searching devices... Gerätesuche... - + No devices found! Keine Geräte gefunden! - + + + + + + + + Warning Warnung - + Unable to start qscan! Local devices will not work Kann qscan nicht starten! Lokale Geräte sind nicht verfügbar - + Unable to connect to qscand at %1:%2 keine Verbindung zu qScand %1:%2 - + Found locked Plextor device! Quality check and some other features will not work Kommandoverschlüsseltes Plextor-Gerät! @@ -310,7 +407,7 @@ Firmware und/oder qScan Berechtigungen prüfen - + No devices found! Nothing to configure @@ -318,106 +415,140 @@ Konfiguration nicht möglich - + + Selected device busy + + + + Retrieving device parameters... Einlesen der Geräteparameter... - + Can't get device features! Gerätefunktionen nicht erkannt! - + Error requesting device settings! Fehler beim Einlesen der Geräteeinstellungen! - + cdvdcontrol finished with non-zero exit code cdvdcontrol terminierte mit Rückgabewert ungleich 0 - + + Unable to create file: Konnte Datei nicht erstellen: - + Save results to file... Ergebnisse in Datei speichern... - + + + Saving results... + + + + + Error saving tests data! Fehler beim Abspeichern der Werte! - + + + + Info Infos - + + Tests data saved in %1 sec Meßwerte in %1 sec gesichert - + + + Unable to open buffer! + + + + + Load results from file... Lade Meßwerte aus Datei... - + Unable to open file: Konnte Datei nicht öffnen: - + + + Loading results... + + + + + Do tests data found in this file! Nutze Testwerte aus dieser Datei! - + + Tests data loaded in %1 sec Meßwerte in %1 gelesen - + Done Beendet - + All tests finished Alle Tests beendet - + + Export results to PDF Ergebnisse als PDF exportieren - + Can't save report Konnte Bericht nicht speichern - + Direcrory not exists and I can't create it Verzeichnis existiert nicht und kann es nicht erstellen - + + Preparing report... Bereite Bericht vor... - + Can't update media info! Device busy Mediadaten nicht aktualisiert! Gerät in Benutzung @@ -425,112 +556,127 @@ TestDialog - + Select tests... Testauswahl... - + Device: Gerät: - + Media: Medium: - + + Label: + + + + Tests: Теsts: - + Speeds: Tempi: - + Read Transfer Rate Lese-Tranferrate - + Write Transfer Rate Schreib-Transferrate - + Simulation Simulation - + Error Correction Fehlerkorrektur - + Jitter/Asymmetry Jitter/Asymmetry - + Focus/Tracking Focus/Track - + Time Analyser Zeitanalyse - + qScan plugin: qScan Plugin: - + Run Start - + Cancel Abbrechen - + + Media label is empty! + + + + + You have define media label! + + + + No tests selected! Keine Testauswahl! - + You have selected no tests! Es wurden keine Tests gewählt! - + < Autodetect > < Autom. Erkennung > - + plugin info error Plugin-Infofehler - + qScan will probe plugin for your drive qScan prüft Plugins für Gerät - + no plugin info Keine Plugin-Infos - + Retrieving test capabilities... Lese Meßfähigkeiten... @@ -631,7 +777,7 @@ Kann cdvdcontrol nicht ausführen! - + Unknown result Unbekanntes Ergebnis @@ -639,142 +785,143 @@ devctlAutostrategyDB - + AutoStrategy DataBase AutoStrategie Datenbank - + Type Typ - + Media ID Medium ID - + Speed Tempo - + Writes Schreiben - + Activate Aktivieren - + Deactivate Deaktivieren - + Remove Entfernen - + Clear Bereinigen - + Strategy creation Strategie erstellen - + Mode Modus - + DB Action DB Aktion - + Create Erstellen - + Quick Schnell - + Full Komplett - + Add Hinzufügen - + Replace Ersetzen - + Retrieving ASDB... Lese ASDB... - + Error Fehler - + Error requesting ASDB! Fehler beim Einlesen der ASDB! - + cdvdcontrol finished with non-zero exit code cdvdcontrol terminierte mit Rückgabewert ungleich 0 - + + Are you sure? Sicher? - + Are you sure to delete strategy #%1? Soll die Strategie #%1 wirklich gelöscht werden? - + Creating strategy... Erzeuge Strategie... - + Are you sure delete all strategies? - + Can't create strategy! - + Strategy creation does not supported on current media: - + supported media types: DVD+R(DL) and DVD-R(DL) @@ -782,47 +929,47 @@ devctlDestruct - + Quick Schnell - + Destruct Lead-in & TOC Zerstöre Lead-in & TOC - + Full Komplett - + Destruct entire disc Zerstöre eingelegte Disk - + Destruct Zerstören - + Are you sure? Sicher? - + Media will be unreadable after this operation! Medium wird nach diesem Vorgang unlesbar sein! - + Data destruction Datenzerstörung - + Destructing data... Zerstöre Daten... @@ -830,32 +977,33 @@ devctlF1Tattoo - + Burn T@2 Schreibe T@2 - + Select T@2 image... Wähle T@2-Bild... - + + Error Fehler - + Can't load image: Bild kann nicht geladen werden: - + Can't create DiscT@2 temporary file! Kann temporäre DiscT@2 Datei nicht anlegen! - + Burning DiscT@2 image... Schreibe DiscT@2 Bild... @@ -863,7 +1011,7 @@ devctlGigarec - + GigaRec limits maximum write speed to 8X only DAO write mode can be used with GigaRec GigaRec reduziert die Maximalgeschwindigkeit auf 8x @@ -875,6 +1023,7 @@ Ursprüngliche Kapazität: + GigaRec capacity: Kapazität GigaRec: @@ -883,42 +1032,42 @@ devctlPioquiet - + Pioneer Quiet Mode Pioneer Flüstermodus - + Quiet Leise - + Standard Standard - + Performance Performant - + Limit read speed to 24X for CD and 8X for DVD Limitiere Lesegeschwindigkeit auf 24x für CD und 8x für DVD - + Permanent Permanent - + Set Setzen - + Profile Profil @@ -946,7 +1095,7 @@ Reset - + Password length must me between 4 and 10 characters. To read SecuRec-protected CD you have to activate SecuRec @@ -1049,42 +1198,42 @@ device - + Updating media info... - + Read Transfer - + Write Transfer - + Error Correction Fehlerkorrektur - + Jitter/Asymmetry - + Focus/Tracking Focus/Track - + Time Analyser Zeitanalyse - + Loading media... @@ -1163,85 +1312,77 @@ prefCommon - Path: - Pfad: + Pfad: - Select directory... - Verzeichnis wählen... + Verzeichnis wählen... - Autosave reports after tests completed - Bericht nach beendetem Test autom. sichern + Bericht nach beendetem Test autom. sichern - + Simulation Simulation - + Error Correction Fehlerkorrektur - + Jitter/Asymmetry Jitter/Asymmetrie - + + Focus/Tracking Focus/Track - + Time Analyser Zeitanalyse - + Read Transfer Rate Lese-Transferrate - + Write Transfer Rate Schreib-Transferrate - + Autostart tests on written media inserted Tests nach Einlegen beschriebener Medien autom. ausführen - + Autostart tests on blank media inserted Tests nach Einlegen leerer Medien autom. ausführen - Eject media after tests finished - Medien nach beendeter Prüfung autom. auswerfen + Medien nach beendeter Prüfung autom. auswerfen - + Default tests for written media Standardtests für beschriebene Medien - + Default tests for blank media Standardtests für unbeschriebene Medien - - - Select directory for reports saving... - - prefDevices @@ -1266,6 +1407,7 @@ qscand Port + Edit host Host bearbeiten @@ -1295,6 +1437,90 @@ + prefReports + + + Autosave reports + + + + + Path: + Pfad: + + + + Select directory for reports saving... + + + + + Use reports database + + + + + Driver: + + + + + Host: + Host: + + + + Port: + Port: + + + + DB name: + + + + + User: + + + + + Password: + + + + + Check + + + + + Autosave reports into database + + + + + Eject media after tests finished + Medien nach beendeter Prüfung autom. auswerfen + + + + Select directory... + Verzeichnis wählen... + + + + Success! + + + + + Database connection successfully +established with given parameters + + + + tabDevInfo @@ -1564,32 +1790,44 @@ tabTA - + + + Layer Layer - + Zone Zonen - + Inner Innen - + Middle Mitte - + Outer Außen - + + Pit + + + + + Land + + + + Time Zeit @@ -1597,19 +1835,29 @@ tabTransfer - + Start Start - + End Ende - + Average Durchschnitt + + + Write + Schreiben + + + + Read + Lesen + diff -Nru qpxtool-0.7.1.002/gui/locale/qpxtool.ru_RU.ts qpxtool-0.7.2/gui/locale/qpxtool.ru_RU.ts --- qpxtool-0.7.1.002/gui/locale/qpxtool.ru_RU.ts 2010-03-23 12:09:49.000000000 +0000 +++ qpxtool-0.7.2/gui/locale/qpxtool.ru_RU.ts 2010-09-21 18:48:03.000000000 +0000 @@ -1,8 +1,10 @@ - + + AboutDialog + About QPxTool О программе @@ -14,6 +16,45 @@ + DbReportSelection + + + Select report... + Выберите отчёт... + + + + Label: + Метка: + + + + Load + Загрузить + + + + Cancel + Отмена + + + + + copy + копия + + + + Device + Устройство + + + + Date + Дата + + + ErrcDetailedDialog @@ -113,32 +154,45 @@ QPxPreferences - + + + + + Preferences Настройки - + + Devices Устройства - + + Colors Цвета - + + Common Общие - + + + Reports + Отчеты + + + Save Сохранить - + Cancel Отмена @@ -146,274 +200,351 @@ QPxToolMW - + Device: Устройство: - + Exit Выход - + Rescan local bus and network Пересканировать шину и сетевые устройства - + Update media info Обновить информацию о носителе - + Device controls Управление устройством - + Run tests... Начать тестирование... - + Stop tests Остановить тестирование - + Preferences Настройки - + Print test results Распечатать результаты тестов - + + Export results to HTML Экспорт результатов в HTML - + Save results... Сохранить результаты... - + Load results... Загрузить результаты... - + + Save results (DB)... + Сохранить результаты (БД)... + + + + Load results (DB)... + Загрузить результаты (БД)... + + + + Show sidebar + Показать боковую панель + + + File Файл - + + View + Вид + + + Device Устройство - + Help Справка - + About О программе - + + No devices Нет устройств - + No devices found! Can't run tests Не могу запустить тестирование: устройства не найдены - + + + + + + Device busy Устройство занято - + + Bus scan in progress Сканирование шины - + It seems device already performing test or info updating in progress Устройство занято тестированием или обновлением информации - + + + + + + + + Error Ошибка - + Error performing test! Ошибка тестирования! - + qScan finished with non-zero exit code qScan завершился с ненулевым кодом возврата - + + Can't scan bus: some device(s) busy! Не могу сканировать шину: некоторые устройства заняты! - + Searching devices... Поиск устройств... - + No devices found! Устройства не найдены! - + + + + + + + + Warning Предупреждение - + Unable to start qscan! Local devices will not work Не могу запустить qscan! Локальные устройства работать не будут - + Unable to connect to qscand at %1:%2 Не могу подключиться к qscand на %1:%2 - + Found locked Plextor device! Quality check and some other features will not work Обнаружен заблокированный Plextor! Тестирование качества и некоторые другие возможности работать не будут - + No devices found! Nothing to configure Устройства не найдены! Нечего настраивать - + + Selected device busy + Выбранное устройство занято + + + Retrieving device parameters... Запрос параметров устройства... - + Can't get device features! Ошибка запроса возможностей устройства! - + Error requesting device settings! Ошибка запроса параметров устройства! - + cdvdcontrol finished with non-zero exit code cdvdcontrol завершился с ненулевым кодом возврата - + + Unable to create file: Не могу создать файл: - + Save results to file... Сохранить результаты в файл... - + + + Saving results... + Сохраняю результаты... + + + + Error saving tests data! Ошибка сохранения данных! - + + + + Info Информация - + + Tests data saved in %1 sec Данные сохранены за %1 секунд - + + + Unable to open buffer! + + + + + Load results from file... Загрузить результаты из файла... - + Unable to open file: Не могу открыть файл: - + + + Loading results... + Загружаю результаты... + + + + Do tests data found in this file! В этом файле нет данных тестирования! - + + Tests data loaded in %1 sec Данные загружены за %1 секунд - + Done Завершено - + All tests finished Все тесты завершены - + + Export results to PDF Экспорт результатов в PDF - + Can't save report Не могу сохранить отчет - + Direcrory not exists and I can't create it Каталог не существует и я не могу его создать - + + Preparing report... Подготовка отчета... - + Can't update media info! Device busy Не могу обновить информацию о носителе: устройство занято @@ -421,112 +552,127 @@ TestDialog - + Select tests... Выберите тесты... - + Device: Устройство: - + Media: Носитель: - + + Label: + Метка: + + + Tests: Тесты: - + Speeds: Скорость: - + Read Transfer Rate Скорость чтения - + Write Transfer Rate Скорость записи - + Simulation Симуляция - + Error Correction Коррекция ошибок - + Jitter/Asymmetry Джиттер/Асимметрия - + Focus/Tracking Фокус/Слежение за дорожкой - + Time Analyser Временной анализ - + qScan plugin: плагин qScan: - + Run Запуск - + Cancel Отмена - + + Media label is empty! + Метка диска не задана! + + + + You have define media label! + Вы должны задать метку диска! + + + No tests selected! Тесты не выбраны! - + You have selected no tests! Вы не выбрали ни один тест! - + < Autodetect > < Автоопределение > - + plugin info error ошибка информации о плагине - + qScan will probe plugin for your drive qScan сам подберет плагин для вашего устройства - + no plugin info нет информации о плагине - + Retrieving test capabilities... Определяю возможности тестирования... @@ -627,7 +773,7 @@ Не мону запустить cdvdcontrol! - + Unknown result Резутьтат неизвестен @@ -635,142 +781,143 @@ devctlAutostrategyDB - + AutoStrategy DataBase Таблица AutoStrategy - + Type Тип - + Media ID Идентификатор - + Speed Скорость - + Writes Записей - + Activate Активировать - + Deactivate Деактивировать - + Remove Удалить - + Clear Очистить - + Strategy creation Создание стратегии - + Mode Режим - + DB Action Действие - + Create Создать - + Quick Быстрый - + Full Расширенный - + Add Добавить - + Replace Заменить - + Retrieving ASDB... Запрос таблицы стратегий... - + Error Ошибка - + Error requesting ASDB! Ошибка чтения таблицы стратегий! - + cdvdcontrol finished with non-zero exit code cdvdcontrol завершился с ненулевым кодом возврата - + + Are you sure? Вы уверены? - + Are you sure to delete strategy #%1? Вы уверены, что хотите удалить стратегию #%1? - + Creating strategy... Создание стратегии... - + Are you sure delete all strategies? Вы уверены, что хотите удалить все стратегии? - + Can't create strategy! Не могу создать стратегию! - + Strategy creation does not supported on current media: Создание стратегии для текущего носителя не поддерживается: - + supported media types: DVD+R(DL) and DVD-R(DL) поддерживаемые типы носителей: DVD+R(DL) и DVD-R(DL) @@ -778,47 +925,47 @@ devctlDestruct - + Quick Быстрое - + Destruct Lead-in & TOC Разрушить Lead-in и TOC - + Full Полное - + Destruct entire disc Разрушить данные по всему диску - + Destruct Уничтожить - + Are you sure? Вы уверены? - + Media will be unreadable after this operation! После этой операции носитель станет нечитаемым! - + Data destruction Уничтожение данных - + Destructing data... Уничтожение данных... @@ -826,32 +973,33 @@ devctlF1Tattoo - + Burn T@2 Записать T@2 - + Select T@2 image... Выберите изображение для T@2... - + + Error Ошибка - + Can't load image: Не могу загрузить изображение: - + Can't create DiscT@2 temporary file! Не могу создать временный файл DiscT@2! - + Burning DiscT@2 image... Пишу изображение DiscT@2... @@ -859,7 +1007,7 @@ devctlGigarec - + GigaRec limits maximum write speed to 8X only DAO write mode can be used with GigaRec При использовании GigaRec скорость записи @@ -871,6 +1019,7 @@ Оригинальная емкость: + GigaRec capacity: Емкость с GigaRec: @@ -879,42 +1028,42 @@ devctlPioquiet - + Pioneer Quiet Mode Pioneer Quiet Mode - + Quiet Тихий - + Standard Стандартный - + Performance Производитальность - + Limit read speed to 24X for CD and 8X for DVD Ограничить скорость чтения на 24X для CD и 8X для DVD - + Permanent Сохранить в знергонезависимой памяти - + Set Установить - + Profile Профиль @@ -942,7 +1091,7 @@ Сбросить - + Password length must me between 4 and 10 characters. To read SecuRec-protected CD you have to activate SecuRec @@ -1048,42 +1197,42 @@ device - + Updating media info... Обновление информации о носителе... - + Read Transfer Скорость чтения - + Write Transfer Скорость записи - + Error Correction Коррекция ошибок - + Jitter/Asymmetry Джиттер/Асимметрия - + Focus/Tracking Фокус/Слежение за дорожкой - + Time Analyser Временной анализ - + Loading media... Загрузка носителя... @@ -1162,84 +1311,80 @@ prefCommon - Path: - Путь: + Путь: - Select directory... - Выберите каталог... + Выберите каталог... - Autosave reports after tests completed - Сохранять отчет после завершения тестов + Сохранять отчет после завершения тестов - + Simulation Симуляция - + Error Correction Коррекция ошибок - + Jitter/Asymmetry Джиттер/Асимметрия - + + Focus/Tracking Фокус/Слежение за дорожкой - + Time Analyser Временной анализ - + Read Transfer Rate Скорость чтения - + Write Transfer Rate Скорость записи - + Autostart tests on written media inserted Автозапуск тестов на записанном диске - + Autostart tests on blank media inserted Автозапуск тестов на чистом диске - Eject media after tests finished - Извлечь диск после завершения тестов + Извлечь диск после завершения тестов - + Default tests for written media Тесты по умолчанию для записанного диска - + Default tests for blank media Тесты по умолчанию для чистого диска - Select directory for reports saving... - Выберите каталог для сохранения отчетов... + Выберите каталог для сохранения отчетов... @@ -1265,6 +1410,7 @@ порт qscand + Edit host Изменить хост @@ -1295,6 +1441,90 @@ + prefReports + + + Autosave reports + Автосохранение отчетов + + + + Path: + Путь: + + + + Select directory for reports saving... + Выберите каталог для сохранения отчетов... + + + + Use reports database + Использовать БД отчетов + + + + Driver: + Драйвер: + + + + Host: + Хост: + + + + Port: + Порт: + + + + DB name: + Имя БД: + + + + User: + Пользователь: + + + + Password: + Пароль: + + + + Check + Проверить + + + + Autosave reports into database + Автосохранение отчетов в БД + + + + Eject media after tests finished + Извлечь диск после завершения тестов + + + + Select directory... + Выберите каталог... + + + + Success! + Успешно! + + + + Database connection successfully +established with given parameters + Подключение к БД установлено с заданными параметрами + + + tabDevInfo @@ -1564,32 +1794,44 @@ tabTA - + + + Layer Слой - + Zone Область - + Inner Внутренняя - + Middle Средняя - + Outer Внешняя - + + Pit + + + + + Land + + + + Time Время @@ -1597,19 +1839,29 @@ tabTransfer - + Start Начало - + End Конец - + Average Среднее + + + Write + Запись + + + + Read + Чтение + diff -Nru qpxtool-0.7.1.002/gui/Makefile qpxtool-0.7.2/gui/Makefile --- qpxtool-0.7.1.002/gui/Makefile 2010-03-23 10:51:37.000000000 +0000 +++ qpxtool-0.7.2/gui/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -QTDIR=/opt/qt4/lib -QMAKE4= qmake4 -export QTDIR QMAKE4 - -all: Makefile.qmake - $(MAKE) -f Makefile.qmake - lrelease -verbose qpxtool.pro - -clean: Makefile.qmake - rm -f Makefile.qmake - rm -f qpxtool - rm -f obj/* - rm -f moc/* - rm -f *~ - rm -f src/*~ - rm -f include/*~ - rm -f locale/*.qm - rm -f qrc_qpxtool.cpp - -install: Makefile.qmake - install -m 755 qpxtool $(DESTDIR)$(BINDIR)/qpxtool - mkdir -p $(DESTDIR)$(PREFIX)/share/qpxtool/locale - install -m 644 locale/*.qm $(DESTDIR)$(PREFIX)/share/qpxtool/locale - mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps - install -m 644 images/q.png $(DESTDIR)$(PREFIX)/share/pixmaps/qpxtool.png - mkdir -p $(DESTDIR)$(PREFIX)/share/applications - install -m 644 qpxtool.desktop $(DESTDIR)$(PREFIX)/share/applications/qpxtool.desktop - -uninstall: - rm -f $(DESTDIR)$(BINDIR)/qpxtool - rm -rf $(DESTDIR)$(PREFIX)/share/qpxtool - rm -f $(DESTDIR)$(PREFIX)/share/pixmaps/qpxtool.png - rm -f $(DESTDIR)$(PREFIX)/share/applications/qpxtool.desktop - -Makefile.qmake: - rm -f Makefile.qmake - $(QMAKE4) LIBS+=-L../lib/lib LIBS+=-lqpxtransport CONFIG+=debug -o Makefile.qmake - -.PHONY: all clean install uninstall diff -Nru qpxtool-0.7.1.002/gui/qpxtool.pro qpxtool-0.7.2/gui/qpxtool.pro --- qpxtool-0.7.1.002/gui/qpxtool.pro 2010-02-15 20:48:10.000000000 +0000 +++ qpxtool-0.7.2/gui/qpxtool.pro 2010-09-21 18:48:03.000000000 +0000 @@ -4,7 +4,7 @@ MOC_DIR=moc OBJECTS_DIR=obj -QT+=network +QT+=network sql CONFIG+=thread INCLUDEPATH+=../lib/include @@ -17,6 +17,8 @@ HEADERS += include/about.h \ include/abstractpreview.h \ include/colorlabel.h \ + include/db_connection.h \ + include/db_report_selection.h \ include/defs.h \ include/device.h \ include/devsettings.h \ @@ -34,12 +36,14 @@ include/pref_colors.h \ include/pref_common.h \ include/pref_devices.h \ + include/pref_reports.h \ include/preferences.h \ include/printpreview.h \ include/progresswidget.h \ include/qpxgraph.h \ include/qpxiodevice.h \ include/qpxsettings.h \ + include/resultsio.h \ include/splitbutton.h \ include/tab_devinfo.h \ include/tab_errc.h \ @@ -55,6 +59,8 @@ SOURCES += src/about.cpp \ src/abstractpreview.cpp \ src/colorlabel.cpp \ + src/db_connection.cpp \ + src/db_report_selection.cpp \ src/device.cpp \ src/devsettings.cpp \ src/devsettings_widgets.cpp \ @@ -71,12 +77,14 @@ src/pref_colors.cpp \ src/pref_common.cpp \ src/pref_devices.cpp \ + src/pref_reports.cpp \ src/preferences.cpp \ src/printpreview.cpp \ src/progresswidget.cpp \ src/qpxgraph.cpp \ src/qpxiodevice.cpp \ src/qpxsettings.cpp \ + src/resultsio.cpp \ src/splitbutton.cpp \ src/tab_devinfo.cpp \ src/tab_errc.cpp \ diff -Nru qpxtool-0.7.1.002/gui/qpxtool.qrc qpxtool-0.7.2/gui/qpxtool.qrc --- qpxtool-0.7.1.002/gui/qpxtool.qrc 2010-02-17 14:09:45.000000000 +0000 +++ qpxtool-0.7.2/gui/qpxtool.qrc 2010-09-21 18:48:03.000000000 +0000 @@ -1,5 +1,25 @@ + images/media/cd.png + images/media/cd_r.png + images/media/cd_rw.png + + images/media/dvd-rom.png + images/media/dvd-ram.png + images/media/dvd-r.png + images/media/dvd-r_dl.png + images/media/dvd-rw.png + images/media/dvd+r.png + images/media/dvd+r_dl.png + images/media/dvd+rw.png + + images/media/hddvd-rom.png + images/media/hddvd-ram.png + images/media/hddvd-r.png + images/media/hddvd-rw.png + + images/media/bd.png + images/q.png images/x.png images/ok.png @@ -13,6 +33,7 @@ images/info.png images/pdf.png images/html.png + images/document.png images/save.png images/directory.png images/fileopen.png @@ -45,6 +66,8 @@ images/disc-eraser.png images/tattoo.png + images/search.png + images/scan.png images/stop.png images/refresh.png diff -Nru qpxtool-0.7.1.002/gui/Session.vim qpxtool-0.7.2/gui/Session.vim --- qpxtool-0.7.1.002/gui/Session.vim 2010-03-23 12:09:33.000000000 +0000 +++ qpxtool-0.7.2/gui/Session.vim 1970-01-01 00:00:00.000000000 +0000 @@ -1,2237 +0,0 @@ -let SessionLoad = 1 -if &cp | set nocp | endif -let s:cpo_save=&cpo -set cpo&vim -imap :Ex i -imap :TlistToggle -imap :wa :make && ./run.sh -imap :wa :make i -imap :tabn i -imap :tabp i -imap :copen -imap :w i -vmap  "+yi -vmap  :call OpenCloseFold() -nmap  :call OpenCloseFold() -map  :qa -map  :wa :mks! -nmap  dd -nmap  -nmap ; :%s/\<=expand("") \>/ -vmap <  >gv -map Q gq -nmap gx NetrwBrowseX -nmap :tabp -nmap :tabn -nmap :wa :make -nmap :wa :make && ./run.sh -nmap :TlistToggle -nmap :Ex -nnoremap NetrwBrowseX :call netrw#NetrwBrowseX(expand(""),0) -vmap :Ex i -omap :Ex -vmap :TlistToggle -omap :TlistToggle -vmap :wa :make && ./run.sh -omap :wa :make && ./run.sh -vmap :wa :make i -omap :wa :make -vmap :tabn i -omap :tabn -vmap :tabp i -omap :tabp -vmap :copen -nmap :copen -vmap :w i -nmap :w -map -imap  yypi -imap  :call OpenCloseFold() -imap  =InsertTabWrapper() -inoremap  u -imap  "+gPi -inoremap  omni#cpp#maycomplete#Complete() -imap  ddi -inoremap . omni#cpp#maycomplete#Dot() -inoremap : omni#cpp#maycomplete#Scope() -inoremap > omni#cpp#maycomplete#Arrow() -imap >Ins> i -imap [ [] -imap { { }O -let &cpo=s:cpo_save -unlet s:cpo_save -set autoindent -set backspace=indent,eol,start -set backup -set complete=.,k,b,t -set completeopt=longest,menuone -set fileencodings=ucs-bom,utf-8,default,latin1 -set formatoptions=tqcr -set helplang=ru -set hidden -set incsearch -set laststatus=2 -set matchpairs=(:),{:} -set mouse=a -set mousemodel=popup -set omnifunc=omni#cpp#complete#Main -set ruler -set scrolljump=7 -set scrolloff=7 -set shiftwidth=4 -set showcmd -set smartindent -set softtabstop=4 -set statusline=%<%f%h%m%r\ %b\ %{&encoding}\ 0x\ \ %l,%c%V\ %P -set tabstop=4 -set whichwrap=b,s,<,>,[,] -set wildcharm= -set wildmenu -let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 -let v:this_session=expand(":p") -silent only -cd ~/projects/qpxtool-0.7.1/gui -if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' - let s:wipebuf = bufnr('%') -endif -set shortmess=aoO -badd +182 src/tab_errc.cpp -badd +26 include/tab_errc.h -badd +39 include/graphtab.h -badd +35 src/mainwidget.cpp -badd +55 include/mainwidget.h -badd +31 src/colorlabel.cpp -badd +19 include/colorlabel.h -badd +16 include/qpxsettings.h -badd +49 src/tab_jb.cpp -badd +47 include/tab_jb.h -badd +33 src/tab_fete.cpp -badd +47 include/tab_fete.h -badd +52 src/graphtab.cpp -badd +37 include/tab_transfer.h -badd +130 src/tab_transfer.cpp -badd +286 src/pref_colors.cpp -badd +41 src/tab_ta.cpp -badd +164 src/qpxgraph.cpp -badd +69 include/tab_ta.h -badd +49 include/qpxgraph.h -badd +63 src/preferences.cpp -badd +43 include/pref_devices.h -badd +22 src/pref_devices.cpp -badd +53 src/pref_common.cpp -badd +39 include/pref_common.h -badd +190 src/errc_detailed.cpp -badd +55 src/qpxsettings.cpp -badd +374 src/mainwindow.cpp -badd +172 include/mainwindow.h -badd +364 include/device.h -badd +734 src/device.cpp -badd +33 include/errc_detailed.h -badd +272 src/testdialog.cpp -badd +1110 src/abstractpreview.cpp -badd +227 src/printpreview.cpp -badd +856 ../lib/qpxtransport/qpx_mmc.cpp -badd +155 ../lib/qpxtransport/include/qpx_mmc.h -badd +43 src/qpxiodevice.cpp -badd +310 ../lib/qpxtransport/include/qpx_mmc_defs.h -badd +39 include/testdialog.h -badd +43 src/tab_devinfo.cpp -badd +41 src/tab_mediainfo.cpp -badd +22 include/mwatcher.h -badd +100 src/mwatcher.cpp -badd +117 /opt/qt4/include/QtCore/qthread.h -badd +62 include/preferences.h -badd +881 src/devsettings_widgets.cpp -badd +53 ../console/qscan/qscan.cpp -badd +38 ../lib/qpxscan/include/qpx_scan.h -badd +71 ../lib/qpxscan/include/qpx_scan_plugin_api.h -badd +70 src/progresswidget.cpp -badd +33 include/progresswidget.h -badd +284 src/textslider.cpp -badd +49 src/image_label.cpp -badd +59 include/image_label.h -badd +75 src/images_list.cpp -badd +38 include/images_list.h -badd +53 src/devsettings.cpp -badd +31 include/devsettings_widgets.h -args src/tab_errc.cpp -edit src/mainwindow.cpp -set splitbelow splitright -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal cindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// -setlocal commentstring=/*%s*/ -setlocal complete=.,k,b,t -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'cpp' -setlocal filetype=cpp -endif -set foldcolumn=1 -setlocal foldcolumn=1 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -set foldmethod=syntax -setlocal foldmethod=syntax -setlocal foldminlines=1 -setlocal foldnestmax=20 -set foldtext=MyFoldText() -setlocal foldtext=MyFoldText() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=0 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:} -setlocal modeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc=omni#cpp#complete#Main -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal smartindent -setlocal softtabstop=4 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'cpp' -setlocal syntax=cpp -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -1 -normal zo -82 -normal zo -93 -normal zo -97 -normal zo -93 -normal zo -82 -normal zo -144 -normal zo -144 -normal zo -202 -normal zo -231 -normal zo -268 -normal zo -290 -normal zo -312 -normal zo -313 -normal zo -312 -normal zc -327 -normal zc -332 -normal zc -338 -normal zo -340 -normal zo -338 -normal zo -349 -normal zo -355 -normal zo -359 -normal zo -349 -normal zo -378 -normal zo -395 -normal zo -406 -normal zo -413 -normal zo -418 -normal zo -413 -normal zo -428 -normal zo -433 -normal zo -441 -normal zo -448 -normal zo -449 -normal zo -448 -normal zo -481 -normal zo -489 -normal zo -506 -normal zo -529 -normal zo -534 -normal zo -529 -normal zo -433 -normal zo -546 -normal zo -563 -normal zo -576 -normal zo -546 -normal zo -597 -normal zo -612 -normal zo -624 -normal zo -637 -normal zo -612 -normal zo -597 -normal zo -660 -normal zo -669 -normal zo -675 -normal zo -680 -normal zo -689 -normal zo -675 -normal zo -669 -normal zo -660 -normal zo -712 -normal zo -734 -normal zo -735 -normal zo -737 -normal zo -735 -normal zo -744 -normal zo -734 -normal zo -751 -normal zo -712 -normal zo -768 -normal zo -775 -normal zo -775 -normal zo -792 -normal zo -792 -normal zo -768 -normal zo -852 -normal zo -858 -normal zo -863 -normal zo -880 -normal zo -852 -normal zo -933 -normal zo -933 -normal zo -991 -normal zo -1003 -normal zo -1010 -normal zo -1018 -normal zo -1024 -normal zo -1025 -normal zo -1025 -normal zo -1024 -normal zo -1018 -normal zo -1046 -normal zo -1053 -normal zo -1061 -normal zo -1063 -normal zo -1063 -normal zo -1061 -normal zo -991 -normal zo -1085 -normal zo -1137 -normal zo -1144 -normal zo -1152 -normal zo -1159 -normal zo -1160 -normal zo -1160 -normal zo -1159 -normal zo -1152 -normal zo -1181 -normal zo -1188 -normal zo -1196 -normal zo -1198 -normal zo -1198 -normal zo -1196 -normal zo -1085 -normal zo -1236 -normal zo -1305 -normal zo -1337 -normal zo -1368 -normal zo -1383 -normal zo -1384 -normal zo -1384 -normal zo -1383 -normal zo -1418 -normal zo -1419 -normal zo -1419 -normal zo -1418 -normal zo -1368 -normal zo -1440 -normal zo -1462 -normal zo -1479 -normal zo -1491 -normal zo -1491 -normal zo -1479 -normal zo -1236 -normal zo -1524 -normal zo -1524 -normal zo -1568 -normal zo -1568 -normal zo -let s:l = 449 - ((16 * winheight(0) + 23) / 46) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -449 -normal! 028l -tabedit include/mainwindow.h -set splitbelow splitright -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal cindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// -setlocal commentstring=/*%s*/ -setlocal complete=.,k,b,t -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'cpp' -setlocal filetype=cpp -endif -set foldcolumn=1 -setlocal foldcolumn=1 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -set foldmethod=syntax -setlocal foldmethod=syntax -setlocal foldminlines=1 -setlocal foldnestmax=20 -set foldtext=MyFoldText() -setlocal foldtext=MyFoldText() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=0 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:} -setlocal modeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc=omni#cpp#complete#Main -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal smartindent -setlocal softtabstop=4 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'cpp' -setlocal syntax=cpp -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -1 -normal zo -45 -normal zo -59 -normal zo -let s:l = 172 - ((27 * winheight(0) + 23) / 46) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -172 -normal! 0 -tabedit src/mainwidget.cpp -set splitbelow splitright -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal cindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// -setlocal commentstring=/*%s*/ -setlocal complete=.,k,b,t -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'cpp' -setlocal filetype=cpp -endif -set foldcolumn=1 -setlocal foldcolumn=1 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -set foldmethod=syntax -setlocal foldmethod=syntax -setlocal foldminlines=1 -setlocal foldnestmax=20 -set foldtext=MyFoldText() -setlocal foldtext=MyFoldText() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=0 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:} -setlocal modeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc=omni#cpp#complete#Main -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal smartindent -setlocal softtabstop=4 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'cpp' -setlocal syntax=cpp -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -24 -normal zo -168 -normal zo -168 -normal zo -let s:l = 35 - ((34 * winheight(0) + 23) / 46) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -35 -normal! 0 -tabedit include/mainwidget.h -set splitbelow splitright -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal cindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// -setlocal commentstring=/*%s*/ -setlocal complete=.,k,b,t -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'cpp' -setlocal filetype=cpp -endif -set foldcolumn=1 -setlocal foldcolumn=1 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -set foldmethod=syntax -setlocal foldmethod=syntax -setlocal foldminlines=1 -setlocal foldnestmax=20 -set foldtext=MyFoldText() -setlocal foldtext=MyFoldText() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=0 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:} -setlocal modeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc=omni#cpp#complete#Main -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal smartindent -setlocal softtabstop=4 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'cpp' -setlocal syntax=cpp -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -40 -normal zo -let s:l = 55 - ((20 * winheight(0) + 23) / 46) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -55 -normal! 0 -tabedit src/device.cpp -set splitbelow splitright -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal cindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// -setlocal commentstring=/*%s*/ -setlocal complete=.,k,b,t -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'cpp' -setlocal filetype=cpp -endif -set foldcolumn=1 -setlocal foldcolumn=1 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -set foldmethod=syntax -setlocal foldmethod=syntax -setlocal foldminlines=1 -setlocal foldnestmax=20 -set foldtext=MyFoldText() -setlocal foldtext=MyFoldText() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=0 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:} -setlocal modeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc=omni#cpp#complete#Main -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal smartindent -setlocal softtabstop=4 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'cpp' -setlocal syntax=cpp -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -1 -normal zo -80 -normal zo -90 -normal zo -110 -normal zo -112 -normal zo -110 -normal zo -120 -normal zo -125 -normal zo -133 -normal zo -200 -normal zo -133 -normal zo -217 -normal zo -222 -normal zo -227 -normal zo -231 -normal zo -217 -normal zo -248 -normal zo -253 -normal zo -289 -normal zo -253 -normal zo -297 -normal zo -301 -normal zo -310 -normal zo -297 -normal zo -340 -normal zo -344 -normal zo -352 -normal zo -358 -normal zo -362 -normal zo -370 -normal zo -384 -normal zo -389 -normal zo -402 -normal zo -415 -normal zo -384 -normal zo -436 -normal zo -465 -normal zo -473 -normal zo -370 -normal zo -340 -normal zo -507 -normal zo -518 -normal zo -546 -normal zo -507 -normal zo -569 -normal zo -578 -normal zo -591 -normal zo -600 -normal zo -608 -normal zo -615 -normal zo -623 -normal zo -630 -normal zo -637 -normal zo -644 -normal zo -651 -normal zo -656 -normal zo -663 -normal zo -669 -normal zo -671 -normal zo -681 -normal zo -669 -normal zo -729 -normal zo -663 -normal zo -651 -normal zo -740 -normal zo -745 -normal zo -751 -normal zo -756 -normal zo -760 -normal zo -762 -normal zo -769 -normal zo -771 -normal zo -769 -normal zo -779 -normal zo -787 -normal zo -794 -normal zo -798 -normal zo -794 -normal zo -811 -normal zo -814 -normal zo -811 -normal zo -851 -normal zo -760 -normal zo -879 -normal zo -756 -normal zo -740 -normal zo -890 -normal zo -898 -normal zo -901 -normal zo -898 -normal zo -920 -normal zo -927 -normal zo -966 -normal zo -981 -normal zo -989 -normal zo -992 -normal zo -996 -normal zo -1006 -normal zo -1024 -normal zo -1034 -normal zo -1061 -normal zo -1006 -normal zo -920 -normal zo -1098 -normal zo -1104 -normal zo -1110 -normal zo -1116 -normal zo -1119 -normal zo -1116 -normal zo -1098 -normal zo -1151 -normal zo -1161 -normal zo -1174 -normal zo -1175 -normal zo -1178 -normal zo -1175 -normal zo -1190 -normal zo -1174 -normal zo -1161 -normal zo -1217 -normal zo -1221 -normal zo -1225 -normal zo -1227 -normal zo -1236 -normal zo -1256 -normal zo -1225 -normal zo -1221 -normal zo -1288 -normal zo -1298 -normal zo -1319 -normal zo -1325 -normal zo -1326 -normal zo -1331 -normal zo -1326 -normal zo -1361 -normal zo -1369 -normal zo -1377 -normal zo -1398 -normal zo -1325 -normal zo -1319 -normal zo -1423 -normal zo -1425 -normal zo -1423 -normal zo -1453 -normal zo -1217 -normal zo -1151 -normal zo -1466 -normal zo -1473 -normal zo -1475 -normal zo -1476 -normal zo -1481 -normal zo -1486 -normal zo -1491 -normal zo -1496 -normal zo -1515 -normal zo -1521 -normal zo -1532 -normal zo -1542 -normal zo -1548 -normal zo -1558 -normal zo -1564 -normal zo -1570 -normal zo -1578 -normal zo -1584 -normal zo -1589 -normal zo -1594 -normal zo -1599 -normal zo -1607 -normal zo -1617 -normal zo -1622 -normal zo -1633 -normal zo -1475 -normal zo -1473 -normal zo -1466 -normal zo -1647 -normal zo -1650 -normal zo -1647 -normal zo -1681 -normal zo -1695 -normal zo -1721 -normal zo -1750 -normal zo -1681 -normal zo -1762 -normal zo -1770 -normal zo -1776 -normal zo -1782 -normal zo -1791 -normal zo -1796 -normal zo -1801 -normal zo -1806 -normal zo -1815 -normal zo -1801 -normal zo -1796 -normal zo -1831 -normal zo -1835 -normal zo -1837 -normal zo -1838 -normal zo -1846 -normal zo -1837 -normal zo -1835 -normal zo -1831 -normal zo -1863 -normal zo -1868 -normal zo -1863 -normal zo -1916 -normal zo -1921 -normal zo -1928 -normal zo -1921 -normal zo -1916 -normal zo -1950 -normal zo -1955 -normal zo -1950 -normal zo -1975 -normal zo -1979 -normal zo -1992 -normal zo -1998 -normal zo -1992 -normal zo -1975 -normal zo -1791 -normal zo -1782 -normal zo -1762 -normal zo -2026 -normal zo -2044 -normal zo -2077 -normal zo -2157 -normal zo -2164 -normal zo -2157 -normal zo -2173 -normal zo -2180 -normal zo -2173 -normal zo -2189 -normal zo -2197 -normal zo -2189 -normal zo -2216 -normal zo -2223 -normal zo -2216 -normal zo -2236 -normal zo -2243 -normal zo -2236 -normal zo -2256 -normal zo -2261 -normal zo -2267 -normal zo -2261 -normal zo -2256 -normal zo -2026 -normal zo -2291 -normal zo -2318 -normal zo -2319 -normal zo -2322 -normal zo -2326 -normal zo -2327 -normal zo -2329 -normal zo -2331 -normal zo -2339 -normal zo -2347 -normal zo -2355 -normal zo -2347 -normal zo -2365 -normal zo -2371 -normal zo -2365 -normal zo -2387 -normal zo -2400 -normal zo -2329 -normal zo -2412 -normal zo -2446 -normal zo -2478 -normal zo -2327 -normal zo -2326 -normal zo -2516 -normal zo -2525 -normal zo -2516 -normal zo -2319 -normal zo -2318 -normal zo -2291 -normal zo -2557 -normal zo -2572 -normal zo -2582 -normal zo -2589 -normal zo -2599 -normal zo -2605 -normal zo -2614 -normal zo -2623 -normal zo -let s:l = 734 - ((22 * winheight(0) + 23) / 46) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -734 -normal! 01l -tabedit include/device.h -set splitbelow splitright -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal cindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// -setlocal commentstring=/*%s*/ -setlocal complete=.,k,b,t -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'cpp' -setlocal filetype=cpp -endif -set foldcolumn=1 -setlocal foldcolumn=1 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -set foldmethod=syntax -setlocal foldmethod=syntax -setlocal foldminlines=1 -setlocal foldnestmax=20 -set foldtext=MyFoldText() -setlocal foldtext=MyFoldText() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=0 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:} -setlocal modeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc=omni#cpp#complete#Main -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal smartindent -setlocal softtabstop=4 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'cpp' -setlocal syntax=cpp -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -1 -normal zo -249 -normal zo -270 -normal zo -249 -normal zo -320 -normal zo -358 -normal zo -365 -normal zo -368 -normal zo -375 -normal zo -482 -normal zo -365 -normal zo -540 -normal zo -let s:l = 343 - ((28 * winheight(0) + 23) / 46) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -343 -normal! 0 -tabedit src/qpxgraph.cpp -set splitbelow splitright -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal cindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// -setlocal commentstring=/*%s*/ -setlocal complete=.,k,b,t -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'cpp' -setlocal filetype=cpp -endif -set foldcolumn=1 -setlocal foldcolumn=1 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -set foldmethod=syntax -setlocal foldmethod=syntax -setlocal foldminlines=1 -setlocal foldnestmax=20 -set foldtext=MyFoldText() -setlocal foldtext=MyFoldText() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=0 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:} -setlocal modeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc=omni#cpp#complete#Main -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal smartindent -setlocal softtabstop=4 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'cpp' -setlocal syntax=cpp -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -let s:l = 164 - ((131 * winheight(0) + 23) / 46) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -164 -normal! 0 -tabedit src/devsettings_widgets.cpp -set splitbelow splitright -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal cindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// -setlocal commentstring=/*%s*/ -setlocal complete=.,k,b,t -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'cpp' -setlocal filetype=cpp -endif -set foldcolumn=1 -setlocal foldcolumn=1 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -set foldmethod=syntax -setlocal foldmethod=syntax -setlocal foldminlines=1 -setlocal foldnestmax=20 -set foldtext=MyFoldText() -setlocal foldtext=MyFoldText() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=0 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:} -setlocal modeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc=omni#cpp#complete#Main -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal smartindent -setlocal softtabstop=4 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'cpp' -setlocal syntax=cpp -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -449 -normal zo -449 -normal zo -753 -normal zo -835 -normal zo -842 -normal zo -853 -normal zo -858 -normal zo -868 -normal zo -873 -normal zo -874 -normal zo -873 -normal zo -882 -normal zo -842 -normal zo -895 -normal zo -896 -normal zo -895 -normal zo -902 -normal zo -904 -normal zo -912 -normal zo -917 -normal zo -926 -normal zo -931 -normal zo -940 -normal zo -957 -normal zo -970 -normal zo -981 -normal zo -970 -normal zo -993 -normal zo -1024 -normal zo -1040 -normal zo -1024 -normal zo -1052 -normal zo -1096 -normal zo -1103 -normal zo -1096 -normal zo -1117 -normal zo -1159 -normal zo -1164 -normal zo -1159 -normal zo -1179 -normal zo -1191 -normal zo -1202 -normal zo -1207 -normal zo -1208 -normal zo -1207 -normal zo -1222 -normal zo -1228 -normal zo -1179 -normal zo -902 -normal zo -912 -normal zo -917 -normal zo -926 -normal zo -931 -normal zo -940 -normal zo -957 -normal zo -970 -normal zo -974 -normal zo -991 -normal zo -1003 -normal zo -1034 -normal zo -1050 -normal zo -1034 -normal zo -1062 -normal zo -1106 -normal zo -1113 -normal zo -1106 -normal zo -1127 -normal zo -1169 -normal zo -1174 -normal zo -1169 -normal zo -1189 -normal zo -1201 -normal zo -1212 -normal zo -1217 -normal zo -1218 -normal zo -1217 -normal zo -1232 -normal zo -1238 -normal zo -1189 -normal zo -970 -normal zo -1003 -normal zo -1034 -normal zo -1050 -normal zo -1034 -normal zo -1062 -normal zo -1106 -normal zo -1113 -normal zo -1106 -normal zo -1127 -normal zo -1169 -normal zo -1174 -normal zo -1169 -normal zo -1189 -normal zo -1201 -normal zo -1212 -normal zo -1217 -normal zo -1218 -normal zo -1217 -normal zo -1232 -normal zo -1238 -normal zo -1189 -normal zo -let s:l = 987 - ((7 * winheight(0) + 23) / 46) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -987 -normal! 0 -tabedit include/devsettings_widgets.h -set splitbelow splitright -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal cindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// -setlocal commentstring=/*%s*/ -setlocal complete=.,k,b,t -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'cpp' -setlocal filetype=cpp -endif -set foldcolumn=1 -setlocal foldcolumn=1 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -set foldmethod=syntax -setlocal foldmethod=syntax -setlocal foldminlines=1 -setlocal foldnestmax=20 -set foldtext=MyFoldText() -setlocal foldtext=MyFoldText() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=0 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:} -setlocal modeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc=omni#cpp#complete#Main -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal smartindent -setlocal softtabstop=4 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'cpp' -setlocal syntax=cpp -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -267 -normal zo -let s:l = 33 - ((7 * winheight(0) + 23) / 46) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -33 -normal! 0 -tabnext 8 -if exists('s:wipebuf') - silent exe 'bwipe ' . s:wipebuf -endif -unlet! s:wipebuf -set winheight=1 winwidth=20 shortmess=filnxtToO -let s:sx = expand(":p:r")."x.vim" -if file_readable(s:sx) - exe "source " . s:sx -endif -let &so = s:so_save | let &siso = s:siso_save -doautoall SessionLoadPost -unlet SessionLoad -" vim: set ft=vim : diff -Nru qpxtool-0.7.1.002/gui/sql/db_create.sql qpxtool-0.7.2/gui/sql/db_create.sql --- qpxtool-0.7.1.002/gui/sql/db_create.sql 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/gui/sql/db_create.sql 2010-09-21 18:48:03.000000000 +0000 @@ -0,0 +1,65 @@ +-- +-- This file is part of the QPxTool project. +-- Copyright (C) 2010 Gennady 'ShultZ' Kozlov +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- See the file 'COPYING' for the exact licensing terms. +-- + +CREATE TABLE media_types ( + id bigint NOT NULL, -- identifier, values from libqpxtransport + name varchar(32) NOT NULL, -- human-readable media type name + + CONSTRAINT media_types_pkey PRIMARY KEY (id) +); + +CREATE TABLE dev_vendors ( + id serial NOT NULL, + name char(8), + + CONSTRAINT dev_vendors_pkey PRIMARY KEY (id), + CONSTRAINT dev_vendors_uniq UNIQUE (name) +); + +CREATE TABLE dev_models ( + id serial NOT NULL, + id_vendor integer NOT NULL, + name char(16), + plugin varchar, + + CONSTRAINT dev_models_pkey PRIMARY KEY (id), + CONSTRAINT dev_models_ref_vendors FOREIGN KEY (id_vendor) + REFERENCES dev_vendors (id) MATCH FULL + ON UPDATE RESTRICT ON DELETE RESTRICT, + CONSTRAINT dev_models_uniq UNIQUE (id_vendor,name) +); + +CREATE TABLE reports ( + id serial, +-- media info + id_media_type bigint NOT NULL, -- media type + label varchar(128) NOT NULL, -- media label + copy_idx integer NOT NULL DEFAULT 0, -- backup copy index + +-- device info + dev_id integer, -- device model + dev_fw char(4), -- device firmware + + md5 char(32), -- MD5 sum of written media + metadata text, -- metadata + data_xml bytea, -- report data + datetime timestamp without time zone NOT NULL DEFAULT now(), -- db insertion timestamp + + CONSTRAINT reports_pkey PRIMARY KEY (id), + CONSTRAINT reports_ref_media FOREIGN KEY (id_media_type) + REFERENCES media_types (id) MATCH FULL + ON UPDATE RESTRICT ON DELETE RESTRICT, + CONSTRAINT reports_ref_device FOREIGN KEY (dev_id) + REFERENCES dev_models (id) MATCH FULL + ON UPDATE RESTRICT ON DELETE RESTRICT, + CONSTRAINT reports_label_uniq UNIQUE (label, copy_idx) +); + diff -Nru qpxtool-0.7.1.002/gui/sql/db_drop.sql qpxtool-0.7.2/gui/sql/db_drop.sql --- qpxtool-0.7.1.002/gui/sql/db_drop.sql 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/gui/sql/db_drop.sql 2010-09-21 18:48:03.000000000 +0000 @@ -0,0 +1,15 @@ +-- +-- This file is part of the QPxTool project. +-- Copyright (C) 2010 Gennady 'ShultZ' Kozlov +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- See the file 'COPYING' for the exact licensing terms. +-- + +DROP TABLE reports; +DROP TABLE dev_models; +DROP TABLE dev_vendors; +DROP TABLE media_types; diff -Nru qpxtool-0.7.1.002/gui/sql/db_media_types.sql qpxtool-0.7.2/gui/sql/db_media_types.sql --- qpxtool-0.7.1.002/gui/sql/db_media_types.sql 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/gui/sql/db_media_types.sql 2010-09-21 18:48:03.000000000 +0000 @@ -0,0 +1,55 @@ +-- +-- This file is part of the QPxTool project. +-- Copyright (C) 2010 Gennady 'ShultZ' Kozlov +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- See the file 'COPYING' for the exact licensing terms. +-- + + +-- filling media types list... +INSERT INTO media_types (id,name) VALUES ( 1, 'CD-ROM'); +INSERT INTO media_types (id,name) VALUES ( 2, 'CD-R'); +INSERT INTO media_types (id,name) VALUES ( 4, 'CD-RW'); +INSERT INTO media_types (id,name) VALUES ( 12, 'CD-RW HS'); +INSERT INTO media_types (id,name) VALUES ( 20, 'CD-RW US'); +INSERT INTO media_types (id,name) VALUES ( 28, 'CD-RW US+'); + +INSERT INTO media_types (id,name) VALUES ( 64, 'DVD-ROM'); +INSERT INTO media_types (id,name) VALUES ( 128, 'DVD-RAM'); +INSERT INTO media_types (id,name) VALUES ( 256, 'DVD-R'); +INSERT INTO media_types (id,name) VALUES ( 512, 'DVD-RW'); +INSERT INTO media_types (id,name) VALUES ( 1024, 'DVD-RW Sequential'); +INSERT INTO media_types (id,name) VALUES ( 2048, 'DVD-RW Restricted'); +INSERT INTO media_types (id,name) VALUES ( 4096, 'DVD-R DL'); +INSERT INTO media_types (id,name) VALUES ( 8192, 'DVD-R DL (Layer Jump)'); + +INSERT INTO media_types (id,name) VALUES ( 16384, 'DVD+RW'); +INSERT INTO media_types (id,name) VALUES ( 32768, 'DVD+RW DL'); +INSERT INTO media_types (id,name) VALUES ( 65536, 'DVD+R'); +INSERT INTO media_types (id,name) VALUES ( 131072, 'DVD+R DL'); + +INSERT INTO media_types (id,name) VALUES ( 262144, 'DD CD-ROM'); +INSERT INTO media_types (id,name) VALUES ( 524288, 'DD CD-R'); +INSERT INTO media_types (id,name) VALUES ( 1048576, 'DD CD-RW'); + + +INSERT INTO media_types (id,name) VALUES ( 2097152, 'BD-ROM'); +INSERT INTO media_types (id,name) VALUES ( 4194304, 'BD-R Sequential'); +INSERT INTO media_types (id,name) VALUES ( 8388608, 'BD-R Random Write'); +INSERT INTO media_types (id,name) VALUES ( 16777216, 'BD-RE'); + +INSERT INTO media_types (id,name) VALUES ( 33554432, 'HD DVD-ROM'); +INSERT INTO media_types (id,name) VALUES ( 67108864, 'HD DVD-R'); +INSERT INTO media_types (id,name) VALUES ( 134217728, 'HD DVD-RAM'); +INSERT INTO media_types (id,name) VALUES ( 268435456, 'HD DVD-RW'); +INSERT INTO media_types (id,name) VALUES ( 536870912, 'HD DVD-R DL'); +INSERT INTO media_types (id,name) VALUES ( 1073741824, 'HD DVD-RW DL'); + +INSERT INTO media_types (id,name) VALUES ( 2147483648, 'DVD-RW DL'); -- (1ULL << 31) + + +-- (1ULL << 63) -- 'Unknown media' diff -Nru qpxtool-0.7.1.002/gui/src/db_connection.cpp qpxtool-0.7.2/gui/src/db_connection.cpp --- qpxtool-0.7.1.002/gui/src/db_connection.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/gui/src/db_connection.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -0,0 +1,109 @@ +/* + * This file is part of the QPxTool project. + * Copyright (C) 2010 Gennady "ShultZ" Kozlov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * See the file "COPYING" for the exact licensing terms. + * + */ + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +DBParams::DBParams() +{ + driver = "QPSQL"; + host = "localhost"; + port = 5432; + conn_name = "new connection"; +}; + +DBParams::DBParams(QString idriver, + QString ihost, + QString iname, + QString iuser, + QString ipass, + int iport + ) +{ + driver = idriver; + host = ihost; + name = iname; + user = iuser; + pass = ipass; + port = iport; + conn_name = ""; +}; + +bool SqlProbeConnection(const DBParams& par, QString CONNECTION) +{ + QSqlDatabase Sql_DB; + QString r; + if (SqlOpenConnection(par, CONNECTION)) { + SqlCloseConnection(CONNECTION); + return 1; + } else { + return 0; + } +} + +bool SqlOpenConnection(const DBParams& par, QString CONNECTION) +{ +#ifndef QT_NO_DEBUG + qDebug("Connect..."); +#endif + QSqlDatabase db; + if (CONNECTION.isEmpty()) { + db = QSqlDatabase::addDatabase(par.driver); + } else { + db = QSqlDatabase::addDatabase(par.driver, CONNECTION); + } + db.setHostName( par.host ); + db.setDatabaseName( par.name ); + db.setUserName( par.user ); + db.setPassword( par.pass ); + db.setPort( par.port ); + if ( !db.open() ) { +#ifndef QT_NO_DEBUG + qDebug() << "Failed to open database: (" << par.driver << ")" << par.name << "@" << par.host << ":"; + qDebug() << db.lastError().driverText(); + qDebug() << db.lastError().databaseText(); +#endif + QMessageBox::critical(0, + "Error", + db.lastError().text()); + return 0; + } + return 1; +} + +void SqlCloseConnection(QString CONNECTION) +{ +#ifndef QT_NO_DEBUG + qDebug( "Disconnecting..." ); +#endif + { + QSqlDatabase db; + if (CONNECTION.isEmpty()) { + db = QSqlDatabase::database(); + } else { + db = QSqlDatabase::database(CONNECTION); + } + if (db.isOpen()) db.close(); + } +// Sql_DB.removeDatabase(CONNECTION); + if (!CONNECTION.isEmpty()) QSqlDatabase::removeDatabase(CONNECTION); +} + diff -Nru qpxtool-0.7.1.002/gui/src/db_report_selection.cpp qpxtool-0.7.2/gui/src/db_report_selection.cpp --- qpxtool-0.7.1.002/gui/src/db_report_selection.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/gui/src/db_report_selection.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -0,0 +1,423 @@ +/* + * This file is part of the QPxTool project. + * Copyright (C) 2010 Gennady "ShultZ" Kozlov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * See the file "COPYING" for the exact licensing terms. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "db_report_selection.h" + +#include +#include +#include +#include + +#include + +int ListModel::rowCount(const QModelIndex& p) const +{ +// qDebug() << "ListModel::rowCount() "<< tdata.size(); + if (!p.isValid()) return tdata.size(); + return 0; +} + +int ListModel::columnCount(const QModelIndex& p) const +{ +// qDebug() << "ListModel::columnCount() "<< cols; + return 1; +} + +QVariant ListModel::data(const QModelIndex& p, int role) const +{ + int r = p.row(); + if (p.column()) return QVariant(); +// qDebug() << "ListModel::data("<< r << ","<< c << ")" << role; + if (r<0 || r >= tdata.size() ) return QVariant(); + switch (role) { + case Qt::DisplayRole: + case Qt::ToolTipRole: + case Qt::EditRole: + return QVariant(tdata[r]); + case Qt::DecorationRole: + return QVariant(idata[r]); +// case Qt::FontRole: +// case Qt::TextAlignMentRole: +// case Qt::CheckStateRole: + default: + break; + } + return QVariant(); +} + +void ListModel::clear() { + tdata.clear(); + idata.clear(); + keys.clear(); +} + +void ListModel::addRow(int key, QString text, QIcon icon) +{ + tdata << text; + idata << icon; + keys << key; +} + +bool ListModel::setData(int row, int role, QVariant d) +{ + if (row<0 || row>=tdata.size()) return false; + + switch (role) { + case Qt::DisplayRole: + case Qt::ToolTipRole: + case Qt::EditRole: + tdata[row] = d.toString(); + return true; + case Qt::DecorationRole: + idata[row] = d.value(); + return true; + default: + break; + } + return false; +} + + +void ListModel::removeRow(int row) +{ + if (row<0 || row>=tdata.size()) return; + tdata.removeAt(row); + idata.removeAt(row); + keys.removeAt(row); +} + +int ListModel::getKey(int row) +{ + if (keys.size() <= row) return -1; + return keys[row]; +} + +//******************* +// dialog +//******************* + + +DbReportSelection::DbReportSelection(QString conn, QWidget *parent, Qt::WindowFlags fl) + :QDialog(parent, fl) +{ + report_id = -1; + model = new ListModel(this); + db = QSqlDatabase::database(conn); + winit(); +} + +DbReportSelection::~DbReportSelection() +{ + +} + +void DbReportSelection::winit() +{ + setWindowTitle(tr("Select report...")); + setMinimumWidth(400); + + layout = new QVBoxLayout(this); + layout->setMargin(3); + layout->setSpacing(3); + + layout_l = new QHBoxLayout(); + layout_l->setMargin(0); + layout_l->setSpacing(3); + layout->addLayout(layout_l); +// search filter + llabel = new QLabel(tr("Label:"),this); + layout_l->addWidget(llabel); + + elabel = new QLineEdit(this); + elabel->setMaxLength(128); + elabel->setMinimumHeight(22); + elabel_clear = new QToolButton(elabel); + elabel_clear->setCursor(Qt::ArrowCursor); + elabel_clear->setIcon(QIcon(":images/edit-clear.png")); + elabel_clear->setStyleSheet("QToolButton { border: none; padding: 0px; } " + "QToolButton{" + "border:none;" + "}" + "QToolButton:pressed{" + "background-color:none;" + "}"); + + elabel_search = new QToolButton(this); +// elabel_search->setCursor(Qt::ArrowCursor); + elabel_search->setIcon(QIcon(":images/search.png")); +/* + elabel_search->setStyleSheet("QToolButton { border: none; padding: 0px; } " + "QToolButton{" + "border:none;" + "}" + "QToolButton:pressed{" + "background-color:none;" + "}"); +*/ + elabel->installEventFilter(this); + layout_l->addWidget(elabel); + layout_l->addWidget(elabel_search); + +// search results + list = new QListView(this); + layout->addWidget(list); + + info = new QTextBrowser(this); + info->setMaximumHeight(150); + layout->addWidget(info); + +// buttons + layout_pb = new QHBoxLayout(); + layout_pb->setMargin(0); + layout_pb->setSpacing(3); + layout->addLayout(layout_pb); + + layout_pb->addStretch(10); + pb_load = new QPushButton(QIcon(":images/ok.png"), tr("Load"), this); + pb_load->setEnabled(false); + layout_pb->addWidget(pb_load); + pb_cancel = new QPushButton(QIcon(":images/x.png"), tr("Cancel"), this); + layout_pb->addWidget(pb_cancel); + + + connect(elabel_clear, SIGNAL(clicked()), elabel, SLOT(clear())); + connect(elabel_search, SIGNAL(clicked()), this, SLOT(search())); + + connect(list, SIGNAL(clicked(const QModelIndex)), this, SLOT(itemActivated(const QModelIndex))); + + connect(pb_load, SIGNAL(clicked()), this, SLOT(load())); + connect(pb_cancel, SIGNAL(clicked()), this, SLOT(reject())); + + search(); +} + +void DbReportSelection::search() +{ + QSqlQuery *q; + QIcon icon; + + pb_load->setEnabled(false); + list->setModel(NULL); + model->clear(); + + q = new QSqlQuery(QSqlDatabase::database("reports")); +// qDebug() << "Label pattern:" << elabel->text(); + q->prepare("SELECT \ + reports.id,id_media_type,label,copy_idx,datetime \ + FROM \ + reports \ + WHERE \ + label ILIKE '%"+elabel->text()+"%' \ + ORDER BY datetime"); + if (!q->exec()) { + qDebug() << q->lastError().text(); + goto err; + } + while (q->next()) { + icon = QPixmap::fromImage(getMediaLogo(q->value(1).toULongLong())); + if (!q->value(3).toInt()) + model->addRow( q->value(0).toInt(), q->value(2).toString(), icon); + else + model->addRow( q->value(0).toInt(), q->value(2).toString() + ", "+ tr("copy") + " #" + q->value(3).toString(), icon); + } + list->setModel(model); + +err: + delete q; +} + +void DbReportSelection::load() +{ + accept(); +} + +void DbReportSelection::itemActivated(const QModelIndex idx) +{ + QSqlQuery *q; + QString html; + QString md5; + report_id = model->getKey(idx.row()); + pb_load->setEnabled(true); + + q = new QSqlQuery(QSqlDatabase::database("reports")); + q->prepare("SELECT \ + label,id_media_type,media_types.name, \ + dev_vendors.name,dev_models.name,dev_fw,datetime, \ + copy_idx,md5,metadata \ + FROM \ + reports,media_types,dev_vendors,dev_models \ + WHERE \ + media_types.id=id_media_type AND \ + dev_models.id=dev_id AND \ + dev_vendors.id=id_vendor AND \ + reports.id=:id"); + q->bindValue(":id",report_id); + + if (!q->exec() || !q->next()) { + qDebug() << q->lastError().text(); + goto err; + } + + info->document()->addResource( QTextDocument::ImageResource, + QUrl("images//:media_logo.png"), + getMediaLogo(q->value(1).toULongLong()).scaled( QSize(64,64), Qt::KeepAspectRatio, Qt::SmoothTransformation) ); + md5 = q->value(8).toString().simplified(); + + html = ""; + html+= ""; + html+= ""; + + html+= ""; + html+= ""; + html+=q->value(9).toString(); + html+= "

"+q->value(0).toString()+"
"; + html+= q->value(2).toString()+", "+tr("copy")+"# "+q->value(7).toString()+"
"; + if (!md5.isEmpty()) { + html+= "MD5: " + md5; + } + html+= "
"+tr("Device")+"" + +q->value(3).toString() + +q->value(4).toString() + +q->value(5).toString() + +"
"+tr("Date")+"" + +q->value(6).toDateTime().toString("yyyy.MM.dd hh:mm") + +"
"; + + info->setHtml(html); +err: + delete q; +} + +bool DbReportSelection::eventFilter(QObject *o, QEvent *e) +{ + if (o == elabel) { + if (e->type() == QEvent::Resize) { + int frameWidth = elabel->style()->pixelMetric(QStyle::PM_DefaultFrameWidth); + elabel_clear->resize(elabel->height() - (frameWidth<<1), elabel->height() - (frameWidth<<1)); + elabel_clear->move(elabel->width() - elabel_clear->width() - frameWidth, frameWidth); +/* + elabel_search->resize(elabel->height() - (frameWidth<<1), elabel->height() - (frameWidth<<1)); + elabel_search->move(elabel->width() - elabel_clear->width() - frameWidth, frameWidth); + elabel_clear->resize(elabel->height() - (frameWidth<<1), elabel->height() - (frameWidth<<1)); + elabel_clear->move(elabel->width() - elabel_clear->width() - elabel_search->width() - frameWidth - 10, frameWidth); + elabel->setStyleSheet(QString("QLineEdit { padding-right: %1px; }").arg(elabel_clear->width()+elabel_search->width()+10)); +*/ + elabel->setStyleSheet(QString("QLineEdit { padding-right: %1px; }").arg(elabel_clear->width()+1)); + return true; + } else { + return false; + } + } else { + return QDialog::eventFilter(o,e); + } +} + +QImage DbReportSelection::getMediaLogo(quint64 id) +{ + QImage logo; + switch (id) { +// CD media + case DISC_CDROM: + logo = QImage(":images/media/cd.png"); + break; + case DISC_CDR: + logo = QImage(":images/media/cd_r.png"); + break; + case DISC_CDRW: + logo = QImage(":images/media/cd_rw.png"); + break; +// DVD media + case DISC_DVDROM: + logo = QImage(":images/media/dvd-rom.png"); + break; + case DISC_DVDRAM: + logo = QImage(":images/media/dvd-ram.png"); + break; +// DVD- media + case DISC_DVDmR: + logo = QImage(":images/media/dvd-r.png"); + break; + case DISC_DVDmRW: + case DISC_DVDmRWS: + case DISC_DVDmRWR: + logo = QImage(":images/media/dvd-rw.png"); + break; + case DISC_DVDmRDL: + case DISC_DVDmRDLJ: + logo = QImage(":images/media/dvd-r_dl.png"); + break; + case DISC_DVDmRWDL: + logo = QImage(":images/media/dvd-rw_dl.png"); + break; + +// DVD+ media + case DISC_DVDpR: + logo = QImage(":images/media/dvd+r.png"); + break; + case DISC_DVDpRDL: + logo = QImage(":images/media/dvd+r_dl.png"); + break; + case DISC_DVDpRW: + logo = QImage(":images/media/dvd+rw.png"); + break; + case DISC_DVDpRWDL: + logo = QImage(":images/media/dvd+rw_dl.png"); + break; + + +// DD-CD media + case DISC_DDCD_ROM: + case DISC_DDCD_R: + case DISC_DDCD_RW: + logo = QImage(":images/media/ddcd.png"); + break; + +// Blu-Ray media + case DISC_BD_ROM: + case DISC_BD_R_SEQ: + case DISC_BD_R_RND: + case DISC_BD_RE: + logo = QImage(":images/media/bd.png"); + break; + +// HD DVD media + case DISC_HDDVD_ROM: + logo = QImage(":images/media/hddvd-rom.png"); + break; + case DISC_HDDVD_R: + case DISC_HDDVD_RDL: + logo = QImage(":images/media/hddvd-r.png"); + break; + case DISC_HDDVD_RAM: + logo = QImage(":images/media/hddvd-ram.png"); + break; + case DISC_HDDVD_RW: + case DISC_HDDVD_RWDL: + logo = QImage(":images/media/hddvd-rw.png"); + break; + default: + logo = QImage(); + } + return logo; +} + diff -Nru qpxtool-0.7.1.002/gui/src/device.cpp qpxtool-0.7.2/gui/src/device.cpp --- qpxtool-0.7.1.002/gui/src/device.cpp 2010-02-17 10:06:07.000000000 +0000 +++ qpxtool-0.7.2/gui/src/device.cpp 2012-12-03 07:13:07.000000000 +0000 @@ -15,11 +15,10 @@ #include #include #include -#include -#include #include #include +#include #include "device.h" #include @@ -37,8 +36,6 @@ //#endif #endif -#define RECALC_ON_LOAD 1 - void ErrcADD(Errc *tot, const Errc& o) { for (int i=0; i<8; i++) if (o.raw.err[i] > 0) tot->raw.err[i] += o.raw.err[i]; @@ -67,6 +64,12 @@ } }; +void BDErrcAVG(Errc *avg, Errc *tot, uint64_t blocks) { + avg->bd.ldc = (float) tot->bd.ldc / blocks; + avg->bd.bis = (float) tot->bd.bis / blocks; + avg->bd.uncr = (float) tot->bd.uncr / blocks; +}; + static device NullDev(NULL); /* @@ -178,6 +181,9 @@ autoupdate = 0; + pprocess = 0.0; + nprocess = ""; + test_cap=0; test_req=0; tests = 0; @@ -197,7 +203,10 @@ mutex = new QMutex(); io_mutex = new QMutex(); - if (!p) { + resReader = new ResultsReader(this); + resWriter = new ResultsWriter(this); + +if (!p) { #ifndef QT_NO_DEBUG qDebug() << "device: NULL parent!"; #endif @@ -207,6 +216,7 @@ connect(this, SIGNAL(process_finished()), p, SLOT(process_finished())); connect(this, SIGNAL(process_progress()), p, SLOT(process_progress())); } + connect(resReader, SIGNAL(finished()), this, SLOT(resLoaderDone())); #ifndef QT_NO_DEBUG qDebug("* END: device()"); @@ -257,6 +267,7 @@ // media.isCD = 0; // media.isDVD = 0; + media.label = ""; media.type = "-"; media.category = "-"; media.mid = "-"; @@ -1201,6 +1212,8 @@ else if (td[ii] == "POE") { media.tdata_errc |= GRAPH_POE; } else if (td[ii] == "PO8") { media.tdata_errc |= GRAPH_PO8; } else if (td[ii] == "POF") { media.tdata_errc |= GRAPH_POF; } + else if (td[ii] == "LDC") { media.tdata_errc |= GRAPH_LDC; } + else if (td[ii] == "BIS") { media.tdata_errc |= GRAPH_BIS; } else if (td[ii] == "UNCR"){ media.tdata_errc |= GRAPH_UNCR; } } // qDebug() << "Available ERRC data: " << media.tdata_errc; @@ -1446,7 +1459,7 @@ qout.remove(0,13); qout = qout.simplified(); spidx = qout.indexOf(" "); - pn = qout.mid(0,spidx); + pn = qout.mid(0,spidx).simplified(); pi = qout.mid(spidx+1); pi.remove("("); pi.remove(")"); @@ -1909,6 +1922,28 @@ pprocess = 100.0 * (float) di.dvd.lba / media.creads; emit process_progress(); + } else if (media.type.startsWith("BD") && sl.size()>=9) { + di.bd.lba = sl[1].toInt(); + di.bd.spdx = sl[2].toFloat(); + + di.bd.res0 = 0; + di.bd.ldc = sl[6].toInt(); + di.bd.res1 = 0; + di.bd.res2 = 0; + di.bd.bis = sl[7].toInt(); + di.bd.res3 = 0; + di.bd.res4 = 0; + di.bd.uncr = sl[8].toInt(); + + ErrcADD(&testData.errcTOT, di); + ErrcMAX(&testData.errcMAX, di); + DVDErrcAVG(&testData.errcAVG, &testData.errcTOT, di.dvd.lba >> 4); + testData.errc.append(di); + testData.errc_time = time; + emit block_ERRC(); + + pprocess = 100.0 * (float) di.bd.lba / media.creads; + emit process_progress(); } } break; @@ -2022,537 +2057,30 @@ #endif } -bool device::save(QIODevice *f) +void device::save(QIODevice *f) { #ifndef QT_NO_DEBUG qDebug("device::save()"); #endif - QXmlStreamWriter xml; - - if (!f->isOpen()) return false; - xml.setDevice(f); - - xml.writeStartDocument("1.0"); - xml.writeCharacters("\n"); - xml.writeStartElement("qpxdata"); - xml.writeCharacters("\n"); -// writing metadata -// device info... - xml.writeStartElement("device"); - xml.writeCharacters("\n\t"); - xml.writeStartElement("identify"); - switch (type) { - case DevtypeLocal: - xml.writeAttribute("type","local"); - break; - case DevtypeTCP: - xml.writeAttribute("type","tcp"); - xml.writeAttribute("host", host); - xml.writeAttribute("port", QString::number(port)); - break; - default: - break; - } - xml.writeAttribute("path", path); -// xml.writeAttribute("id", id); - xml.writeAttribute("ven", ven); - xml.writeAttribute("dev", dev); - xml.writeAttribute("sn", sn); - xml.writeAttribute("fw", fw); - xml.writeAttribute("tla", tla); - xml.writeEndElement(); - - xml.writeCharacters("\n\t"); - xml.writeStartElement("info"); - xml.writeAttribute("buf", buf); - xml.writeAttribute("iface",iface); - xml.writeAttribute("loader",loader); - xml.writeAttribute("cap", QString("%1").arg(cap,0,16)); - xml.writeAttribute("cap_rd", QString("%1").arg(cap_rd,0,16)); - xml.writeAttribute("cap_wr", QString("%1").arg(cap_wr,0,16)); - xml.writeEndElement(); - xml.writeCharacters("\n"); - - if (cap & CAP_DVD_CSS) - { - xml.writeCharacters("\t"); - xml.writeStartElement("rpc"); - xml.writeAttribute("phase", QString::number(rpc_phase)); - xml.writeAttribute("region", QString::number(rpc_reg)); - xml.writeAttribute("changes", QString::number(rpc_ch)); - xml.writeAttribute("resets", QString::number(rpc_rst)); - xml.writeEndElement(); - xml.writeCharacters("\n"); - } - -// if (life_dn) { - xml.writeCharacters("\t"); - xml.writeStartElement("lifetime"); - xml.writeAttribute("count", QString::number(life_dn)); - xml.writeAttribute("cd_rd", life_cr); - xml.writeAttribute("cd_wr", life_cw); - xml.writeAttribute("dvd_rd", life_dr); - xml.writeAttribute("dvd_wr", life_dw); - xml.writeEndElement(); - xml.writeCharacters("\n"); -// } - - xml.writeEndElement(); // device - xml.writeCharacters("\n"); - xml.writeStartElement("media"); -// media info - xml.writeCharacters("\n\t"); - xml.writeStartElement("identify"); - xml.writeAttribute("type", media.type); - xml.writeAttribute("category", media.category); - xml.writeAttribute("mid", media.mid); - xml.writeEndElement(); - - xml.writeCharacters("\n\t"); - xml.writeStartElement("capacity"); - xml.writeAttribute("read", QString::number(media.creads)); - xml.writeAttribute("free", QString::number(media.cfrees)); - xml.writeAttribute("tot", QString::number(media.ctots)); - - xml.writeAttribute("read_m", QString::number(media.creadm)); - xml.writeAttribute("free_m", QString::number(media.cfreem)); - xml.writeAttribute("tot_m", QString::number(media.ctotm)); - - xml.writeAttribute("read_msf", media.creadmsf); - xml.writeAttribute("free_msf", media.cfreemsf); - xml.writeAttribute("tot_msf", media.ctotmsf); - xml.writeEndElement(); // capacity - - xml.writeCharacters("\n\t"); - xml.writeStartElement("speeds"); - xml.writeAttribute("rspeeds", media.rspeeds.join(" ")); - xml.writeAttribute("wspeedsd", media.wspeedsd.join(" ")); - xml.writeAttribute("wspeedsm", media.wspeedsm.join(" ")); - xml.writeEndElement(); // misc - - xml.writeCharacters("\n\t"); - xml.writeStartElement("misc"); - xml.writeAttribute("writer", media.writer); - xml.writeAttribute("protection",media.prot); - xml.writeAttribute("regions", media.regions); - xml.writeAttribute("gigarec", QString("%1").arg(media.grec,0,'f',1)); - - xml.writeAttribute("spd1X", QString::number(media.spd1X)); - xml.writeAttribute("layers", QString::number(media.ilayers)); - xml.writeAttribute("erasable", media.erasable); - - xml.writeAttribute("dstate", media.dstate); - xml.writeAttribute("sstate", media.sstate); - xml.writeEndElement(); // misc - - xml.writeCharacters("\n"); - - xml.writeEndElement(); // media - xml.writeCharacters("\n"); -// test speeds - - xml.writeStartElement("tests"); - xml.writeCharacters("\n"); - - if (testData.rt.size()) { - xml.writeCharacters("\t"); - int s = testData.rt.size(); - xml.writeStartElement("rt"); - xml.writeAttribute("speed", QString::number(tspeeds.rt)); - xml.writeAttribute("time", QString("%1").arg(testData.rt_time,0,'f',2)); - - for (int i=0; isetIO(f); + resWriter->start(); } -bool device::load(QIODevice *f) +bool device::isSaving() { return resWriter->isRunning(); }; +bool device::saveResult() { return resWriter->result(); }; + +void device::load(QIODevice *f) { #ifndef QT_NO_DEBUG qDebug("device::load()"); #endif - QXmlStreamReader xml; - QXmlStreamAttributes attr; - QString name; - QStringList data; - bool dataFound = 0, - isQpxData = 0, - isDevice = 0, - isMedia = 0, - isTests = 0; - int test = 0; - int taZone = -1; - - DI_Transfer d_tr; - DI_Errc d_errc; - DI_JB d_jb; - DI_FT d_ft; - DI_TA d_ta; - - if (!f->isOpen()) return false; - xml.setDevice(f); -// xml.version(); - - clearMinfo(); - while(!xml.atEnd()) { - switch (xml.readNext()) { - case QXmlStreamReader::StartElement: - name = xml.name().toString(); - if (xml.name() == "qpxdata") { - dataFound = 1; - isQpxData = 1; - } - if (isQpxData) { - if (test && (xml.name() == "d")) { - data = xml.readElementText().split(","); - switch (test) { - case TEST_RT: - if (data.size() == 3) { - d_tr.lba = data[0].toLongLong(); - d_tr.spdx = data[1].toFloat(); - d_tr.spdk = data[2].toInt(); - testData.rt << d_tr; - } - break; - case TEST_WT: - if (data.size() == 3) { - d_tr.lba = data[0].toLongLong(); - d_tr.spdx = data[1].toFloat(); - d_tr.spdk = data[2].toInt(); - testData.wt << d_tr; - } - break; - case TEST_ERRC: - if (data.size() == 10) { - d_errc.raw.lba = data[0].toLongLong(); - d_errc.raw.spdx = data[1].toFloat(); - for (int i=0; i<8; i++) - d_errc.raw.err[i] = data[2+i].toInt(); -#if RECALC_ON_LOAD - ErrcADD(&testData.errcTOT, d_errc); - ErrcMAX(&testData.errcMAX, d_errc); - if (media.type.startsWith("CD")) { - CDErrcAVG(&testData.errcAVG, &testData.errcTOT, d_errc.cd.lba/75); - } else { - DVDErrcAVG(&testData.errcAVG, &testData.errcTOT, d_errc.dvd.lba >> 4); - } -#endif - testData.errc << d_errc; - } - break; - case TEST_JB: - if (data.size() == 4) { - d_jb.lba = data[0].toLongLong(); - d_jb.spdx = data[1].toFloat(); - d_jb.jitter = data[2].toFloat(); - d_jb.asymm = data[3].toFloat(); -#if RECALC_ON_LOAD - if (!testData.jb.size()) { - testData.jbMM.jmin = d_jb.jitter; - testData.jbMM.jmax = d_jb.jitter; - testData.jbMM.bmin = d_jb.asymm; - testData.jbMM.bmax = d_jb.asymm; - } else { - if (testData.jbMM.jmin > d_jb.jitter) testData.jbMM.jmin = d_jb.jitter; - if (testData.jbMM.jmax < d_jb.jitter) testData.jbMM.jmax = d_jb.jitter; - if (testData.jbMM.bmin > d_jb.asymm) testData.jbMM.bmin = d_jb.asymm; - if (testData.jbMM.bmax < d_jb.asymm) testData.jbMM.bmin = d_jb.asymm; - } -#endif - testData.jb << d_jb; - } - break; - case TEST_FT: - if (data.size() == 4) { - d_ft.lba = data[0].toLongLong(); - d_ft.spdx= data[1].toFloat(); - d_ft.fe = data[2].toInt(); - d_ft.te = data[3].toInt(); -#if RECALC_ON_LOAD - if (testData.ftMAX.fe < d_ft.fe) testData.ftMAX.fe = d_ft.fe; - if (testData.ftMAX.te < d_ft.te) testData.ftMAX.te = d_ft.te; -#endif - testData.ft << d_ft; - } - break; - case TEST_TA: - if (taZone>=0 && taZone<6 && data.size() == 3) { - d_ta.idx = data[0].toInt(); - d_ta.pit = data[1].toInt(); - d_ta.land = data[2].toInt(); - - testData.ta[taZone] << d_ta; - } - break; - } - } else if (isDevice) { - // device information - attr = xml.attributes(); - if (xml.name() == "identify") { -// type = attr.value("type").toInt(); - path = attr.value("path").toString(); - host = attr.value("host").toString(); - port = attr.value("port").toString().toInt(); - path = attr.value("path").toString(); -// id = attr.value("id").toString(); - ven = attr.value("ven").toString(); - dev = attr.value("dev").toString(); - sn = attr.value("sn").toString(); - fw = attr.value("fw").toString(); - tla = attr.value("tla").toString(); - } else if (xml.name() == "info") { - buf = attr.value("buf").toString(); - iface = attr.value("iface").toString(); - loader = attr.value("loader").toString(); - cap = attr.value("cap").toString().toULongLong(NULL, 16); - cap_rd = attr.value("cap_rd").toString().toULongLong(NULL, 16); - cap_wr = attr.value("cap_wr").toString().toULongLong(NULL, 16); - } else if (xml.name() == "rpc") { - rpc_phase = attr.value("phase").toString().toInt(); - rpc_reg = attr.value("region").toString().toInt(); - rpc_ch = attr.value("changes").toString().toInt(); - rpc_rst = attr.value("resets").toString().toInt(); - } else if (xml.name() == "lifetime") { - life_dn = attr.value("count").toString().toInt(); - life_cr = attr.value("cd_rd").toString(); - life_cw = attr.value("cd_wr").toString(); - life_dr = attr.value("dvd_rd").toString(); - life_dw = attr.value("dvd_wr").toString(); - } - } else if (isMedia) { - // media information - attr = xml.attributes(); - if (xml.name() == "identify") { - media.type = attr.value("type").toString(); - media.category = attr.value("category").toString(); - media.mid = attr.value("mid").toString(); - } else if (xml.name() == "capacity") { - media.creads = attr.value("read").toString().toInt(); - media.cfrees = attr.value("free").toString().toInt(); - media.ctots = attr.value("tot").toString().toInt(); - media.creadm = attr.value("read_m").toString().toInt(); - media.cfreem = attr.value("free_m").toString().toInt(); - media.ctotm = attr.value("tot_m").toString().toInt(); - media.creadmsf = attr.value("read_msf").toString(); - media.cfreemsf = attr.value("free_msf").toString(); - media.ctotmsf = attr.value("tot_msf").toString(); - } else if (xml.name() == "speeds") { - media.rspeeds = attr.value("rspeeds" ).toString().split(" ", QString::SkipEmptyParts); - media.wspeedsd = attr.value("wspeedsd").toString().split(" ", QString::SkipEmptyParts); - media.wspeedsm = attr.value("wspeedsm").toString().split(" ", QString::SkipEmptyParts); - } else if (xml.name() == "misc") { - media.writer = attr.value("writer").toString(); - media.prot = attr.value("protection").toString(); - media.regions = attr.value("regions").toString(); - media.grec = attr.value("gigarec").toString().toDouble(); - media.spd1X = attr.value("spd1X").toString().toInt(); - media.layers = attr.value("layers").toString(); - media.erasable= attr.value("erasable").toString(); - media.ilayers = media.layers.toInt(); - media.dstate = attr.value("dstate").toString(); - media.sstate = attr.value("sstate").toString(); - } - } else if (isTests) { - attr = xml.attributes(); - if (xml.name() == "rt") { - test = TEST_RT; - tspeeds.rt = attr.value("speed").toString().toInt(); - testData.rt_time = attr.value("time").toString().toDouble(); - } else if (xml.name() == "wt") { - test = TEST_WT; - tspeeds.wt = attr.value("speed").toString().toInt(); - testData.wt_time = attr.value("time").toString().toDouble(); - } else if (xml.name() == "errc") { - test = TEST_ERRC; - tspeeds.errc = attr.value("speed").toString().toInt(); - testData.errc_time = attr.value("time").toString().toDouble(); - media.tdata_errc = attr.value("data").toString().toInt(); - } else if (xml.name() == "jb") { - test = TEST_JB; - tspeeds.jb = attr.value("speed").toString().toInt(); - testData.jb_time = attr.value("time").toString().toDouble(); - } else if (xml.name() == "ft") { - test = TEST_FT; - tspeeds.ft = attr.value("speed").toString().toInt(); - testData.ft_time = attr.value("time").toString().toDouble(); - } else if (xml.name() == "ta") { - test = TEST_TA; - // tspeeds.ta = attr.value("speed").toString().toInt(); - testData.ta_time = attr.value("time").toString().toDouble(); - } else if ((test == TEST_TA) && (xml.name() == "zone")) { - taZone = attr.value("idx").toString().toInt(); - } - } else if (xml.name() == "device") { - isDevice = 1; - } else if (xml.name() == "media") { - isMedia = 1; - } else if (xml.name() == "tests") { - isTests = 1; - } - } - break; - case QXmlStreamReader::EndElement: - if (isQpxData && xml.name() == "qpxdata") { - isQpxData = 0; - } else if (isDevice && xml.name() == "device") { - isDevice = 0; - } else if (isMedia && xml.name() == "media") { - isMedia = 0; - } else if (isTests && xml.name() == "tests") { - isTests = 0; - } else if (isTests) { - if (test == TEST_RT && xml.name() == "rt") { - test = 0; - } else if (test == TEST_WT && xml.name() == "wt") { - test = 0; - } else if (test == TEST_ERRC && xml.name() == "errc") { - test = 0; - } else if (test == TEST_JB && xml.name() == "jb") { - test = 0; - } else if (test == TEST_FT && xml.name() == "ft") { - test = 0; - } else if (test == TEST_TA && xml.name() == "ta") { - test = 0; - } else if (test == TEST_TA && xml.name() == "zone") { - taZone = -1; - } - } - break; - // case QXmlStreamReader::Characters: - // break; - default: - break; - } - } - -// while ( readData(s) ) {} - emit doneDInfo(0); - emit doneMInfo(0); - - return dataFound; + resReader->setIO(f); + resReader->start(); } +bool device::isLoading() { return resReader->isRunning(); }; +bool device::loadResult() { return resReader->result(); }; + void device::startWatcher() { if (mwatcher) return; @@ -2625,3 +2153,10 @@ emit process_finished(); } +void device::resLoaderDone() { + if (!resReader->result()) return; + + emit doneDInfo(0); + emit doneMInfo(0); +}; + diff -Nru qpxtool-0.7.1.002/gui/src/devsettings_widgets.cpp qpxtool-0.7.2/gui/src/devsettings_widgets.cpp --- qpxtool-0.7.1.002/gui/src/devsettings_widgets.cpp 2010-03-23 12:07:27.000000000 +0000 +++ qpxtool-0.7.2/gui/src/devsettings_widgets.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -735,11 +735,7 @@ progress = new ProgressWidget(10,3,this); progress->setText(tr("Checking media quality...")); progress->show(); - while(dev->isRunning()) { - msleep ( 1 << 7); - progress->step(); - qApp->processEvents(); - } + while(dev->isRunning()) { msleep ( 1 << 5); qApp->processEvents(); } delete progress; if (dev->features.as_mqckres.isEmpty()) { lmqck_res->setText( tr("Unknown result") ); @@ -821,7 +817,7 @@ setMinimumWidth(360); - connect(tree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*)), this, SLOT(db_toggle(QTreeWidgetItem*))); + connect(tree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(db_toggle(QTreeWidgetItem*))); connect(pb_act, SIGNAL(clicked()), this, SLOT(db_act())); connect(pb_deact, SIGNAL(clicked()), this, SLOT(db_deact())); @@ -850,11 +846,7 @@ progress = new ProgressWidget(10,3,this); progress->setText(tr("Retrieving ASDB...")); progress->show(); - while(dev->isRunning()) { - msleep ( 1 << 7); - progress->step(); - qApp->processEvents(); - } + while(dev->isRunning()) { msleep ( 1 << 5); qApp->processEvents(); } #if 0 for (int i=0; i<10; i++) { msleep ( 1 << 7); @@ -971,7 +963,7 @@ ProgressWidget *progress; qDebug("AS: creating strategy..."); // dev-> - if (dev->media.creads && !dev->media.type.startsWith("DVD") || dev->media.erasable == "yes") { + if (dev->media.creads || !dev->media.type.startsWith("DVD") || dev->media.erasable == "yes") { QMessageBox::warning(this, tr("Can't create strategy!"), tr("Strategy creation does not supported on current media: ") + dev->media.type + "\n"+ @@ -988,11 +980,7 @@ progress = new ProgressWidget(10,3,this); progress->setText(tr("Creating strategy...")); progress->show(); - while(dev->isRunning()) { - msleep ( 1 << 7); - progress->step(); - qApp->processEvents(); - } + while(dev->isRunning()) { msleep ( 1 << 5); qApp->processEvents(); } delete progress; db_update(); @@ -1047,11 +1035,7 @@ progress = new ProgressWidget(10,3,this); progress->setText(tr("Destructing data...")); progress->show(); - while(dev->isRunning()) { - msleep ( 1 << 7); - progress->step(); - qApp->processEvents(); - } + while(dev->isRunning()) { msleep ( 1 << 5); qApp->processEvents(); } delete progress; } @@ -1229,11 +1213,7 @@ progress = new ProgressWidget(10,3,this); progress->setText(tr("Burning DiscT@2 image...")); progress->show(); - while(dev->isRunning()) { - msleep ( 1 << 7); - progress->step(); - qApp->processEvents(); - } + while(dev->isRunning()) { msleep ( 1 << 5); qApp->processEvents(); } #if 0 for(int i=0; i<16; i++) { diff -Nru qpxtool-0.7.1.002/gui/src/errc_detailed.cpp qpxtool-0.7.2/gui/src/errc_detailed.cpp --- qpxtool-0.7.1.002/gui/src/errc_detailed.cpp 2010-02-17 14:42:30.000000000 +0000 +++ qpxtool-0.7.2/gui/src/errc_detailed.cpp 2012-12-13 10:46:19.000000000 +0000 @@ -1,6 +1,6 @@ /* * This file is part of the QPxTool project. - * Copyright (C) 2009-2010 Gennady "ShultZ" Kozlov + * Copyright (C) 2009-2012 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,6 +44,17 @@ "UNCR" }; +static const char* labels_bd[8] = { + "", + "LDC", + "", + "", + "BIS", + "", + "", + "UNCR" +}; + static const char* labels_null[8] = { "", "", "", "", "", "", "", "" }; ErrcDetailedDialog::ErrcDetailedDialog(QPxSettings *iset, devlist *idev, QWidget *p, Qt::WindowFlags fl) @@ -60,6 +71,8 @@ labels = labels_cd; } else if (dev->media.type.startsWith("DVD")) { labels = labels_dvd; + } else if (dev->media.type.startsWith("BD-")) { + labels = labels_bd; } else { labels = labels_null; } @@ -69,17 +82,22 @@ layout = new QGridLayout(this); layout->setMargin(3); layout->setSpacing(3); + layout_top = new QGridLayout(); + layout_top->setMargin(0); + layout_top->setSpacing(3); + layout->addLayout(layout_top, 0, 0, 1, 3); settings->loadScale("XERRC"); graph[0] = new QPxGraph(iset, idev, "XERRC", TEST_ERRC, this); - layout->addWidget(graph[0], 0, 1); + layout_top->addWidget(graph[0], 0, 1); + graph[7] = new QPxGraph(iset, idev, "XERRC", TEST_ERRC, this); + layout_top->addWidget(graph[7], 0, 2); + for (int i=0; i<6; i++) { graph[i+1] = new QPxGraph(iset, idev, "XERRC", TEST_ERRC, this); layout->addWidget(graph[i+1], i/3+1, i%3); } - graph[7] = new QPxGraph(iset, idev, "XERRC", TEST_ERRC, this); - layout->addWidget(graph[7], 0, 2); for (int i=0; i<8; i++) { graph[i]->setErrcList(1<setRightMarginHidden(true); } - layoutt = new QGridLayout(); - layoutt->setMargin(0); - layoutt->setHorizontalSpacing(3); - layoutt->setVerticalSpacing(1); - layout->addLayout(layoutt, 0, 0); + layout_summary = new QGridLayout(); + layout_summary->setMargin(0); + layout_summary->setHorizontalSpacing(3); + layout_summary->setVerticalSpacing(1); + layout_top->addLayout(layout_summary, 0, 0); + + layout_top->setColumnStretch(0,1); + layout_top->setColumnStretch(1,1); + layout_top->setColumnStretch(2,1); pl_tot = new QLabel("Tot",this); pl_tot->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - layoutt->addWidget(pl_tot,0,1, 1,2); + layout_summary->addWidget(pl_tot,0,1, 1,2); pl_max = new QLabel("Max",this); pl_max->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - layoutt->addWidget(pl_max,0,3); + layout_summary->addWidget(pl_max,0,3); pl_avg = new QLabel("Avg",this); pl_avg->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - layoutt->addWidget(pl_avg,0,4); + layout_summary->addWidget(pl_avg,0,4); hline0 = new QFrame(this); hline0->setFrameStyle(QFrame::Sunken | QFrame::HLine); - layoutt->addWidget(hline0, 1,0, 1,5); + layout_summary->addWidget(hline0, 1,0, 1,5); for (int i=0; i<8; i++) { pl_name[i] = new QLabel(labels[i], this); pl_name[i]->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); - layoutt->addWidget(pl_name[i], i+2, 0); + layout_summary->addWidget(pl_name[i], i+2, 0); l_tot[i] = new QLabel(this); l_tot[i]->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - layoutt->addWidget(l_tot[i], i+2, 1, 1,2); + layout_summary->addWidget(l_tot[i], i+2, 1, 1,2); l_max[i] = new QLabel(this); l_max[i]->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - layoutt->addWidget(l_max[i], i+2, 3); + layout_summary->addWidget(l_max[i], i+2, 3); l_avg[i] = new QLabel(this); l_avg[i]->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - layoutt->addWidget(l_avg[i], i+2, 4); + layout_summary->addWidget(l_avg[i], i+2, 4); } hline1 = new QFrame(this); hline1->setFrameStyle(QFrame::Sunken | QFrame::HLine); - layoutt->addWidget(hline1, 10,0, 1,5); + layout_summary->addWidget(hline1, 10,0, 1,5); - layoutt->setRowStretch(11,10); + layout_summary->setRowStretch(11,10); for (int i=0; i<8; i++) connect(graph[i], SIGNAL(scaleChanged()), this, SLOT(changeScale())); @@ -154,6 +176,8 @@ labels = labels_cd; } else if (dev->media.type.startsWith("DVD")) { labels = labels_dvd; + } else if (dev->media.type.startsWith("BD-")) { + labels = labels_bd; } else { labels = labels_null; } @@ -175,7 +199,11 @@ dev = idev; } - graph[0]->setVisible(dev->media.type.startsWith("CD-")); + graph[0]->setVisible(labels == labels_cd); + graph[2]->setVisible(labels != labels_bd); + graph[3]->setVisible(labels != labels_bd); + graph[5]->setVisible(labels != labels_bd); + graph[6]->setVisible(labels != labels_bd); for (int i=0; i<8; i++) { // if (!dev->media.tdata_errc || (dev->media.tdata_errc & (1<setText( QString::number(dev->testData.errcTOT.raw.err[i]) ); diff -Nru qpxtool-0.7.1.002/gui/src/main.cpp qpxtool-0.7.2/gui/src/main.cpp --- qpxtool-0.7.1.002/gui/src/main.cpp 2010-02-19 07:47:36.000000000 +0000 +++ qpxtool-0.7.2/gui/src/main.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -45,7 +45,11 @@ #ifndef QT_NO_DEBUG qDebug("* Loading translator..."); #endif +#ifdef _WIN32 + if (!translator->load("qpxtool."+locale, "locale")) { +#else if (!translator->load("qpxtool."+locale, INSTALL_PREFIX"/share/qpxtool/locale")) { +#endif qDebug() << "** Can't load translation for current locale: " << locale; } else { QPxTool->installTranslator(translator); diff -Nru qpxtool-0.7.1.002/gui/src/mainwidget.cpp qpxtool-0.7.2/gui/src/mainwidget.cpp --- qpxtool-0.7.1.002/gui/src/mainwidget.cpp 2010-03-10 13:16:00.000000000 +0000 +++ qpxtool-0.7.2/gui/src/mainwidget.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -18,11 +18,12 @@ #include //#define bstyle "QPushButton::flat { border: none; }" -// pb->setStyleSheet(bstyle); +#define bstyle "QPushButton::flat { text-align: left; }" #define addTabButton(pb,icon,name,tabidx,layout) \ { \ pb = new QPushButton(QIcon(icon),name,bframe); \ + pb->setStyleSheet(bstyle); \ pb->setFlat(true); \ pb->setCheckable(true); \ pb->setIconSize(QSize(24,24)); \ @@ -130,6 +131,9 @@ connect(grp, SIGNAL(buttonClicked(int)), stack, SLOT(setCurrentIndex(int))); layout_buttons->addStretch(10); + + + bframe->setVisible(settings->show_sidebar); #ifndef QT_NO_DEBUG qDebug("END: QPxMainWidget()"); #endif @@ -143,26 +147,12 @@ #endif } -void QPxMainWidget::reconfig() -{ - emit configured(); -} - -void QPxMainWidget::clearDev() -{ - tab_MediaInfo->clear(); - tab_DevInfo->clear(); -} - -void QPxMainWidget::clearMedia() -{ - tab_MediaInfo->clear(); -} - -void QPxMainWidget::selectDevice() -{ - emit deviceSelected(); -} +void QPxMainWidget::setSidebarVisible(bool en) { settings->show_sidebar = en; bframe->setVisible(en); } +void QPxMainWidget::selectTab(int idx) { grp->button(idx)->setChecked(true); stack->setCurrentIndex(idx); } +void QPxMainWidget::reconfig() { emit configured(); } +void QPxMainWidget::clearDev() { tab_MediaInfo->clear(); tab_DevInfo->clear(); } +void QPxMainWidget::clearMedia() { tab_MediaInfo->clear(); } +void QPxMainWidget::selectDevice() { emit deviceSelected(); } void QPxMainWidget::drawGraph(QImage& img, device *dev, int ttype, int eflags) { diff -Nru qpxtool-0.7.1.002/gui/src/mainwindow.cpp qpxtool-0.7.2/gui/src/mainwindow.cpp --- qpxtool-0.7.1.002/gui/src/mainwindow.cpp 2010-03-10 13:20:08.000000000 +0000 +++ qpxtool-0.7.2/gui/src/mainwindow.cpp 2012-12-03 07:13:07.000000000 +0000 @@ -29,14 +29,24 @@ #include #include +#include +#include + +#include #include #include #include #include #include +#include +#include +#include + #include +#include +#include #include #include #include @@ -67,6 +77,7 @@ const QString errcNameCD[8] = { "BLER", "E11", "E21", "E31", "E12", "E22", "E32", "UNCR" }; const QString errcNameDVD[8] = { "res", "PIE", "PI8", "PIF", "POE", "PO8", "POF", "UNCR" }; +const QString errcNameBD[8] = { "res", "LDC", "res", "res", "BIS", "res", "res", "UNCR" }; #include #include @@ -110,7 +121,17 @@ scanbusio = new QPxIODevice(this); dhost = ""; + + if (set.use_reports_db) { + qDebug() << "Connecting to database..."; + if (!SqlOpenConnection(set.db, "reports")) { + qDebug() << "Error connecting to database!"; + set.use_reports_db = false; + } + } + winit(); + if (set.geometry_mw.width() > 0 && set.geometry_mw.height() > 0) setGeometry(set.geometry_mw); scanbus(); @@ -122,6 +143,8 @@ qDebug("END: QPxToolMW()"); #endif splash = 0; + + setAcceptDrops(true); } QPxToolMW::~QPxToolMW () @@ -129,6 +152,10 @@ #ifndef QT_NO_DEBUG qDebug("STA: ~QPxToolMW()"); #endif + if (QSqlDatabase::database("reports").isOpen()) { + qDebug() << "Closing database connection..."; + SqlCloseConnection("reports"); + } settings_save(); #ifndef QT_NO_DEBUG qDebug("Waiting for devices..."); @@ -193,6 +220,7 @@ mwidget = new QPxMainWidget(&set, &devices, cwidget); layout->addWidget(mwidget); + connect(act_sb, SIGNAL(toggled(bool)), mwidget, SLOT(setSidebarVisible(bool))); connect(pb_loej, SIGNAL(clicked()), this, SLOT(loejToggle())); connect(pb_lock, SIGNAL(clicked()), this, SLOT(lockToggle())); @@ -200,18 +228,73 @@ void QPxToolMW::create_actions() { + bool db_open = QSqlDatabase::database("reports").isOpen(); + act_exit = new QAction(QIcon(":images/exit.png"), tr("Exit"), this); act_scanbus = new QAction(QIcon(":images/refresh.png"), tr("Rescan local bus and network"), this); act_minfo = new QAction(QIcon(":images/refresh-media.png"), tr("Update media info"), this); act_devctl = new QAction(QIcon(":images/device.png"), tr("Device controls"), this); + act_devctl->setShortcut( QKeySequence("Ctrl+D") ); act_test = new QAction(QIcon(":images/scan.png"), tr("Run tests..."), this); + act_test->setShortcut( QKeySequence("Ctrl+R") ); act_stop = new QAction(QIcon(":images/stop.png"), tr("Stop tests"), this); act_pref = new QAction(QIcon(":images/settings.png"), tr("Preferences"), this); + act_pref->setShortcut( QKeySequence("Ctrl+C") ); act_print = new QAction(QIcon(":images/printer.png"), tr("Print test results"), this); + act_print->setShortcut( QKeySequence("Ctrl+P") ); act_report = new QAction(QIcon(":images/pdf.png"), tr("Export results to PDF"), this); act_export = new QAction(QIcon(":images/html.png"), tr("Export results to HTML"), this); act_save = new QAction(QIcon(":images/save.png"), tr("Save results..."), this); + act_save->setShortcut( QKeySequence("Ctrl+S") ); act_load = new QAction(QIcon(":images/fileopen.png"), tr("Load results..."), this); + act_load->setShortcut( QKeySequence("Ctrl+O") ); + act_save_db = new QAction(QIcon(":images/db_save.png"), tr("Save results (DB)..."), this); + act_load_db = new QAction(QIcon(":images/db_load.png"), tr("Load results (DB)..."), this); + + act_save_db->setEnabled(db_open); + act_load_db->setEnabled(db_open); + + act_sb = new QAction(QIcon(":images/"), tr("Show sidebar"), this); + act_sb->setShortcut( QKeySequence("Alt+B") ); + act_sb->setCheckable(true); + act_sb->setChecked(set.show_sidebar); + + QAction *act; + act_sbgrp = new QActionGroup(this); + + act = act_sbgrp->addAction(QIcon(":images/device.png"), "Device"); + act_sblist << act; act->setCheckable(true); + act->setShortcut( QKeySequence("Alt+1") ); + connect(act, SIGNAL(triggered()), this, SLOT(selectTab())); + act->setChecked(true); + act = act_sbgrp->addAction(QIcon(":images/disc.png"), "Media"); + act_sblist << act; act->setCheckable(true); + act->setShortcut( QKeySequence("Alt+2") ); + connect(act, SIGNAL(triggered()), this, SLOT(selectTab())); + act = act_sbgrp->addAction(QIcon(":images/test_rt.png"), "Read Transfer"); + act_sblist << act; act->setCheckable(true); + act->setShortcut( QKeySequence("Alt+3") ); + connect(act, SIGNAL(triggered()), this, SLOT(selectTab())); + act = act_sbgrp->addAction(QIcon(":images/test_wt.png"), "Write Transfer"); + act_sblist << act; act->setCheckable(true); + act->setShortcut( QKeySequence("Alt+4") ); + connect(act, SIGNAL(triggered()), this, SLOT(selectTab())); + act = act_sbgrp->addAction(QIcon(":images/test_errc.png"), "Error Correction"); + act_sblist << act; act->setCheckable(true); + act->setShortcut( QKeySequence("Alt+5") ); + connect(act, SIGNAL(triggered()), this, SLOT(selectTab())); + act = act_sbgrp->addAction(QIcon(":images/test_jb.png"), "Jitter/Asymmetry"); + act_sblist << act; act->setCheckable(true); + act->setShortcut( QKeySequence("Alt+6") ); + connect(act, SIGNAL(triggered()), this, SLOT(selectTab())); + act = act_sbgrp->addAction(QIcon(":images/test_ft.png"), "FE/TE"); + act_sblist << act; act->setCheckable(true); + act->setShortcut( QKeySequence("Alt+7") ); + connect(act, SIGNAL(triggered()), this, SLOT(selectTab())); + act = act_sbgrp->addAction(QIcon(":images/test_ta.png"), "Time Analyser"); + act_sblist << act; act->setCheckable(true); + act->setShortcut( QKeySequence("Alt+8") ); + connect(act, SIGNAL(triggered()), this, SLOT(selectTab())); connect(act_exit, SIGNAL(triggered()), this, SLOT(exit())); connect(act_scanbus, SIGNAL(triggered()), this, SLOT(scanbus())); @@ -225,6 +308,8 @@ connect(act_report, SIGNAL(triggered()), this, SLOT(save_report())); connect(act_save, SIGNAL(triggered()), this, SLOT(save_results())); connect(act_load, SIGNAL(triggered()), this, SLOT(load_results())); + connect(act_save_db, SIGNAL(triggered()), this, SLOT(save_results_db())); + connect(act_load_db, SIGNAL(triggered()), this, SLOT(load_results_db())); } void QPxToolMW::winit_menubar() @@ -235,19 +320,32 @@ // menu "file" menu = new QMenu(tr("File"),this); + menu->addAction(act_load_db); + menu->addAction(act_save_db); + menu->addSeparator(); menu->addAction(act_load); menu->addAction(act_save); menu->addAction(act_export); menu->addAction(act_report); menu->addAction(act_print); menu->addSeparator(); + menu->addAction(act_pref); + menu->addSeparator(); menu->addAction(act_exit); + + menubar->addMenu(menu); + +// menu "view" + menu = new QMenu(tr("View"),this); + + menu->addActions(act_sblist); + menu->addSeparator(); + menu->addAction(act_sb); + menubar->addMenu(menu); // menu "device" menu = new QMenu(tr("Device"),this); - menu->addAction(act_pref); - menu->addSeparator(); menu->addAction(act_scanbus); menu->addAction(act_minfo); menu->addAction(act_devctl); @@ -323,6 +421,15 @@ close(); } +void QPxToolMW::selectTab() +{ + int idx; + QAction *act = (QAction*) sender(); + idx = act_sblist.indexOf(act); + if (act<0) return; + mwidget->selectTab(idx); +} + void QPxToolMW::settings_load() { set.load(); @@ -415,9 +522,10 @@ disconnect( dev, SIGNAL(testsDone()), this, SLOT(tests_done()) ); disconnect( dev, SIGNAL(testsError()), this, SLOT(tests_error()) ); - if (set.report_autosave) { + if (set.report_autosave || set.report_autosave_db) { dev->mutex->lock(); - autosave_report(dev); + if (set.report_autosave) autosave_report(dev); + if (set.report_autosave_db) save_results_db(dev); dev->mutex->unlock(); if (set.actions_flags & AFLAG_EJECT_AFTER) dev->setFeature(FEATURE_LOEJ, 0); } @@ -574,9 +682,9 @@ proc->setReadChannel(QProcess::StandardOutput); while(proc->state() == QProcess::Running) { - msleep(1<<7); + msleep(1<<5); qApp->processEvents(); - if (!splash) progress->step(); +// if (!splash) progress->step(); } proc->waitForFinished(10000); @@ -635,9 +743,9 @@ sock->write("close\n"); while(sock->state() == QAbstractSocket::ConnectedState) { - msleep(1<<7); + msleep(1<<5); qApp->processEvents(); - if (!splash) progress->step(); +// if (!splash) progress->step(); } sock->disconnectFromHost(); #ifndef QT_NO_DEBUG @@ -735,7 +843,7 @@ if (!dev->info_set) { dev->update_device_info(); while( dev->isRunning() ) { - msleep ( 1 << 7); + msleep ( 1 << 5); qApp->processEvents(); } dev->update_media_info(); @@ -794,7 +902,7 @@ if ( ((set.actions_flags & AFLAG_AUTOSTART_W) && dev->media.creads ) || ((set.actions_flags & AFLAG_AUTOSTART_B) && - !dev->media.creads || dev->media.type.startsWith("DVD+RW") || dev->media.type.startsWith("DVD-RAM")) + (!dev->media.creads || dev->media.type.startsWith("DVD+RW") || dev->media.type.startsWith("DVD-RAM")) ) ) { select_tests(dev); } @@ -853,7 +961,7 @@ device *dev; devSettings *devSet; #ifndef QT_NO_DEBUG - qDebug("QPxToolMW::preferences()"); + qDebug("QPxToolMW::device_settings()"); #endif if (!devices.size()) { QMessageBox::warning(this, tr("No devices"), tr("No devices found!\nNothing to configure\n")); @@ -866,7 +974,7 @@ } if (!dev->mutex->tryLock()) { mutex_dev.unlock(); - QMessageBox::warning(this, tr("Device busy"), tr("Device busy")); + QMessageBox::warning(this, tr("Device busy"), tr("Selected device busy")); return; } dev->mutex->unlock(); @@ -884,13 +992,8 @@ return; } - while(dev->isRunning()) { - msleep ( 1 << 7); - progress->step(); - qApp->processEvents(); - } + while(dev->isRunning()) { msleep ( 1 << 5); qApp->processEvents(); } delete progress; - disconnect(dev, SIGNAL(doneGetFeatures(int)), this, SLOT(update_features_done(int))); devSet = new devSettings(&set, dev, this); @@ -917,6 +1020,22 @@ pref = new QPxPreferences(&set, this); pref->exec(); delete pref; + + if (QSqlDatabase::database("reports").isOpen()) { + qDebug() << "Closing database connection..."; + SqlCloseConnection("reports"); + } + if (set.use_reports_db) { + qDebug() << "Connecting to database..."; + if (!SqlOpenConnection(set.db, "reports")) { + qDebug() << "Error connecting to database!"; + return; + } + } + bool dbOpen = QSqlDatabase::database("reports").isOpen(); + act_save_db->setEnabled(dbOpen); + act_load_db->setEnabled(dbOpen); + mwidget->reconfig(); } @@ -924,8 +1043,14 @@ { device *dev = devices.current(); QString fname; - fname = QFileDialog::getSaveFileName(this, tr("Export results to PDF"), "", "PDF files (*pdf *.PDF)"); + QFileInfo finfo; + fname = QFileDialog::getSaveFileName(this, tr("Export results to PDF"), set.last_res_path_pdf, "PDF files (*pdf *.PDF)"); if (fname.isEmpty()) return; + + finfo.setFile(fname); + set.last_res_path_pdf = finfo.absoluteDir().canonicalPath(); + qDebug() << "Saving PDF to: " << fname; + save_report(dev, fname); } @@ -999,20 +1124,20 @@ // img = QImage(":images/logo.png"); // doc->addResource(QTextDocument::ImageResource, QUrl("images/logo.png"), img); - progress->step(); qApp->processEvents(); + qApp->processEvents(); if (dev->testData.rt.size() > 0) { img = QImage(HTML_GRAPH_W,HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_RT); doc->addResource(QTextDocument::ImageResource, QUrl("images/rt.png"), img); - progress->step(); qApp->processEvents(); + qApp->processEvents(); } if (dev->testData.wt.size() > 0) { img = QImage(HTML_GRAPH_W,HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_WT); doc->addResource(QTextDocument::ImageResource, QUrl("images/wt.png"), img); - progress->step(); qApp->processEvents(); + qApp->processEvents(); } // if (1) { if (dev->testData.errc.size() > 0) { @@ -1028,7 +1153,7 @@ mwidget->drawGraph(img, dev, TEST_ERRC, (1 << i)); doc->addResource(QTextDocument::ImageResource, QUrl("images/"+errcNameCD[i]+".png"), img); } - progress->step(); qApp->processEvents(); + qApp->processEvents(); } } else if (dev->media.type.startsWith("DVD")) { for (int i=1; i<8; i++) { @@ -1037,7 +1162,17 @@ mwidget->drawGraph(img, dev, TEST_ERRC, (1 << i)); doc->addResource(QTextDocument::ImageResource, QUrl("images/"+errcNameDVD[i]+".png"), img); } - progress->step(); qApp->processEvents(); + qApp->processEvents(); + } + } else if (dev->media.type.startsWith("BD")) { + int residx[] = {1,4,7}; + for (int i=0; i<3; i++) { + if (!dev->media.tdata_errc || (dev->media.tdata_errc & (1<drawGraph(img, dev, TEST_ERRC, (1 << residx[i])); + doc->addResource(QTextDocument::ImageResource, QUrl("images/"+errcNameBD[residx[i]]+".png"), img); + } + qApp->processEvents(); } } #endif @@ -1048,14 +1183,14 @@ mwidget->drawGraph(img, dev, TEST_JB); doc->addResource(QTextDocument::ImageResource, QUrl("images/jb.png"), img); - progress->step(); qApp->processEvents(); + qApp->processEvents(); } if (dev->testData.ft.size() > 0) { img = QImage(HTML_GRAPH_W, HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_FT); doc->addResource(QTextDocument::ImageResource, QUrl("images/ft.png"), img); - progress->step(); qApp->processEvents(); + qApp->processEvents(); } if (dev->test_req & TEST_TA) { @@ -1067,18 +1202,18 @@ mwidget->drawGraph(img, dev, TEST_TA, (l << 28) | (z<<4) | 0); doc->addResource(QTextDocument::ImageResource, QUrl(QString("images/ta%1_%2_p.png").arg(l).arg(z)), img); - progress->step(); qApp->processEvents(); + qApp->processEvents(); img = QImage(HTML_GRAPH_W,HTML_GRAPH_H/2,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_TA, (l << 28) | (z<<4) | 1); doc->addResource(QTextDocument::ImageResource, QUrl(QString("images/ta%1_%2_l.png").arg(l).arg(z)), img); - progress->step(); qApp->processEvents(); + qApp->processEvents(); } } } - delete progress; + delete progress; } void QPxToolMW::export_results() @@ -1091,9 +1226,10 @@ QString fname, idir; QString html; QFile f; + QFileInfo finfo; device *dev = devices.current(); - fname = QFileDialog::getSaveFileName(this, tr("Export results to HTML"), "", "HTML files (*.html)"); + fname = QFileDialog::getSaveFileName(this, tr("Export results to HTML"), set.last_res_path_html, "HTML files (*.html)"); if (fname.isEmpty()) return; progress = new ProgressWidget(10,3,this); @@ -1101,7 +1237,8 @@ progress->show(); f.setFileName(fname); - + finfo.setFile(f); + set.last_res_path_html = finfo.absoluteDir().canonicalPath(); qDebug() << "Saving HTML to: " << fname; int idx = fname.lastIndexOf("/"); @@ -1139,22 +1276,23 @@ mwidget->drawGraph(img, dev, TEST_RT); img.save(fname+"rt.png"); - progress->step(); qApp->processEvents(); + qApp->processEvents(); } if (dev->testData.wt.size() > 0) { img = QImage(HTML_GRAPH_W,HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_WT); img.save(fname+"wt.png"); - progress->step(); qApp->processEvents(); + qApp->processEvents(); } // if (1) { if (dev->testData.errc.size() > 0) { img = QImage(HTML_GRAPH_W,HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_ERRC); img.save(fname+"errc.png"); - progress->step(); qApp->processEvents(); + qApp->processEvents(); + qDebug() << COL_RED << "tdata_errc:" << dev->media.tdata_errc << COL_NORM; #ifdef PRINT_ERRC_DETAILED if (dev->media.type.startsWith("CD")) { for (int i=0; i<8; i++) { @@ -1163,7 +1301,7 @@ mwidget->drawGraph(img, dev, TEST_ERRC, (1 << i)); img.save(fname+errcNameCD[i]+".png"); } - progress->step(); qApp->processEvents(); + qApp->processEvents(); } } else if (dev->media.type.startsWith("DVD")) { for (int i=1; i<8; i++) { @@ -1172,7 +1310,17 @@ mwidget->drawGraph(img, dev, TEST_ERRC, (1 << i)); img.save(fname+errcNameDVD[i]+".png"); } - progress->step(); qApp->processEvents(); + qApp->processEvents(); + } + } else if (dev->media.type.startsWith("BD")) { + int residx[] = {1,4,7}; + for (int i=0; i<3; i++) { + if (!dev->media.tdata_errc || (dev->media.tdata_errc & (1<drawGraph(img, dev, TEST_ERRC, (1 << residx[i])); + img.save(fname+errcNameBD[residx[i]]+".png"); + } + qApp->processEvents(); } } #endif @@ -1183,14 +1331,14 @@ mwidget->drawGraph(img, dev, TEST_JB); img.save(fname+"jb.png"); - progress->step(); qApp->processEvents(); + qApp->processEvents(); } if (dev->testData.ft.size() > 0) { img = QImage(HTML_GRAPH_W,HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_FT); img.save(fname+"ft.png"); - progress->step(); qApp->processEvents(); + qApp->processEvents(); } if (dev->test_req & TEST_TA) { @@ -1202,13 +1350,13 @@ mwidget->drawGraph(img, dev, TEST_TA, (l << 28) | (z<<4) | 0); img.save( QString("images/ta%1_%2_p.png").arg(l).arg(z) ); - progress->step(); qApp->processEvents(); + qApp->processEvents(); img = QImage(HTML_GRAPH_W,HTML_GRAPH_H/2,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_TA, (l << 28) | (z<<4) | 1); img.save( QString("images/ta%1_%2_l.png").arg(l).arg(z) ); - progress->step(); qApp->processEvents(); + qApp->processEvents(); } } } @@ -1404,6 +1552,19 @@ .arg(dev->testData.errcAVG.raw.err[i], 0, 'f', 2); } } + } else if (dev->media.type.startsWith("BD")) { + int residx[] = {1,4,7}; + for (int i=0; i<3; i++) { + if (!dev->media.tdata_errc || (dev->media.tdata_errc & (1<%2%3%4%5\n") + .arg(bgcolor) + .arg(errcNameBD[residx[i]]) + .arg(dev->testData.errcTOT.raw.err[residx[i]]) + .arg(dev->testData.errcMAX.raw.err[residx[i]]) + .arg(dev->testData.errcAVG.raw.err[residx[i]], 0, 'f', 2); + } + } } r+= "\n"; @@ -1433,6 +1594,16 @@ r+= "\n
\n"; } } + } else if (dev->media.type.startsWith("BD")) { + int residx[] = {1,4,7}; + for (int i=0; i<3; i++) { + if (!dev->media.tdata_errc || (dev->media.tdata_errc & (1<\n\t"; + r+= "\t"; + r+= "
"+errcNameBD[residx[i]]; + r+= "\n
\n"; + } + } } #endif } @@ -1528,13 +1699,17 @@ #endif QString fname; QFile f; + QFileInfo finfo; + if (!devices.size()) return; device *dev = devices.current(); - fname = QFileDialog::getSaveFileName(this, tr("Save results to file..."), "", "QPxTool data files (*.qpx)"); - if (fname.isEmpty()) return; + fname = QFileDialog::getSaveFileName(this, tr("Save results to file..."), set.last_res_path_native, "QPxTool data files (*.qpx)"); + if (fname.isEmpty()) return f.setFileName(fname); + finfo.setFile(f); + set.last_res_path_native = finfo.absoluteDir().canonicalPath(); qDebug() << "Saving data to: " << fname; if (!f.open(QIODevice::WriteOnly)) { @@ -1544,7 +1719,16 @@ #ifndef QT_NO_DEBUG gettimeofday(&tb, NULL); #endif - if (!dev->save(&f)) { + + progress = new ProgressWidget(10,3,this); + progress->setText(tr("Saving results...")); + progress->show(); + + dev->save(&f); + while(dev->isSaving()) { msleep ( 1 << 5); qApp->processEvents(); } + + delete progress; + if (!dev->saveResult()) { QMessageBox::warning(this, tr("Warning"), tr("Error saving tests data!")); #ifndef QT_NO_DEBUG } else { @@ -1556,11 +1740,160 @@ f.close(); } +void QPxToolMW::save_results_db(device *idev) +{ +#ifndef QT_NO_DEBUG + qDebug("QPxToolMW::save_results_db()"); + timeval tb,te; +#endif + QByteArray ba; + QSqlQuery *q = NULL; + QBuffer buf(&ba, this); + device *dev = idev; + int id_vendor, id_model, id_media; + + + if (!devices.size()) return; + if (!dev) dev = devices.current(); + +#warning !!! set media label before saving to database + if (dev->media.label.isEmpty()) { + // + } + + progress = new ProgressWidget(10,3,this); + progress->setText(tr("Saving results...")); + progress->show(); + + q = new QSqlQuery(QSqlDatabase::database("reports")); +// read media id + q->prepare("SELECT id FROM media_types WHERE name=:name"); + q->bindValue(":name", dev->media.type); + if (!q->exec()) { + qDebug() << q->lastError().text(); + goto close_db; + } + if (!q->next()) { + qDebug() << "No ID found for current media"; + goto close_db; + } + id_media = q->value(0).toInt(); + qDebug() << "id_media : " << id_media; + +// check&update vendor + q->prepare("SELECT id FROM dev_vendors WHERE name=:name"); + q->bindValue(":name", dev->ven); + if (!q->exec()) { + qDebug() << q->lastError().text(); + goto close_db; + } + if (!q->next()) { + q->prepare("INSERT INTO dev_vendors (name) VALUES (:name) RETURNING id"); + q->bindValue(":name", dev->ven); + if (!q->exec()) { + qDebug() << q->lastError().text(); + goto close_db; + } + q->next(); + qDebug() << "added vendor id " << q->value(0).toInt(); + } + id_vendor = q->value(0).toInt(); + qDebug() << "id_vendor: " << id_vendor; + +// check&update model + q->prepare("SELECT id FROM dev_models WHERE name=:name AND id_vendor=:id_vendor"); + q->bindValue(":id_vendor", id_vendor); + q->bindValue(":name", dev->dev); + if (!q->exec()) { + qDebug() << q->lastError().text(); + goto close_db; + } + if (!q->next()) { +// q->prepare("INSERT INTO dev_models (id_vendor,name) VALUES ("+QString::number(id_vendor)+",'"+dev->dev+"') RETURNING id"); + q->prepare("INSERT INTO dev_models (id_vendor,name) VALUES (:id_vendor,:name) RETURNING id"); + q->bindValue(":id_vendor", id_vendor); + q->bindValue(":name", dev->dev); + if (!q->exec()) { + qDebug() << q->lastError().text(); + goto close_db; + } + q->next(); + qDebug() << "added model id " << q->value(0).toInt(); + } + id_model = q->value(0).toInt(); + qDebug() << "id_model : " << id_model; + +// preparing report data... + qDebug() << "Filling buffer with report data..."; + + if (!buf.open(QIODevice::WriteOnly)) { + QMessageBox::warning(this, tr("Error"), tr("Unable to open buffer!\n")); + goto close_db; + } +#ifndef QT_NO_DEBUG + gettimeofday(&tb, NULL); +#endif + + dev->save(&buf); + while(dev->isSaving()) { msleep ( 1 << 5); qApp->processEvents(); } + + + if (!dev->saveResult()) { + QMessageBox::warning(this, tr("Warning"), tr("Error saving tests data!")); +#ifndef QT_NO_DEBUG + } else { + gettimeofday(&te, NULL); + double t = (te.tv_sec - tb.tv_sec) + (te.tv_usec - tb.tv_usec)/1000000.0; + QMessageBox::information(this, tr("Info"), tr("Tests data saved in %1 sec").arg(t,0,'f',2)); +#endif + } + buf.close(); + + qDebug() << "Buffer prepared, writing to database..."; + +// writing results... + q->prepare("INSERT INTO reports ( \ + dev_id, dev_fw, \ + id_media_type, label, copy_idx, \ + md5, data_xml \ + ) VALUES (\ + :dev_id, :dev_fw, \ + :id_media_type, :label, :copy_idx, \ + :md5, :data_xml \ + ) RETURNING id"); + +#warning empty fields in report saving query!!! + q->bindValue(":dev_id", id_model); + q->bindValue(":dev_fw", dev->fw); + q->bindValue(":id_media_type", id_media); + q->bindValue(":label", dev->media.label); + q->bindValue(":copy_idx", 0); + q->bindValue(":md5", ""); + q->bindValue(":data_xml", ba); + if (!q->exec()) { + qDebug() << q->lastError().text(); + } else { + q->next(); + qDebug() << "added report id " << q->value(0).toInt(); + } + +close_db: + if (q) delete q; + delete progress; +} + void QPxToolMW::load_results() { QString fname; + QFileInfo finfo; if (!devices.size()) return; - fname = QFileDialog::getOpenFileName(this, tr("Load results from file..."), "", "QPxTool data files (*.qpx)"); + fname = QFileDialog::getOpenFileName(this, tr("Load results from file..."), set.last_res_path_native, "QPxTool data files (*.qpx)"); + if (fname.isEmpty()) return; + + finfo.setFile(fname); + set.last_res_path_native = finfo.absoluteDir().canonicalPath(); + qDebug() << "Loading data from: " << fname; + load_results(fname); } @@ -1571,6 +1904,7 @@ timeval tb,te; #endif QFile f; + if (!devices.size()) return; device *dev = devices[0]; @@ -1588,7 +1922,16 @@ #ifndef QT_NO_DEBUG gettimeofday(&tb, NULL); #endif - if (!dev->load(&f)) { + + progress = new ProgressWidget(10,3,this); + progress->setText(tr("Loading results...")); + progress->show(); + + dev->load(&f); + while(dev->isLoading()) { msleep ( 1 << 5); qApp->processEvents(); } + + delete progress; + if (!dev->loadResult()) { QMessageBox::warning(this, tr("Warning"), tr("Do tests data found in this file!")); } else { c_dev->setCurrentIndex(0); @@ -1602,3 +1945,104 @@ // setDevice(0); } +void QPxToolMW::load_results_db() +{ +#ifndef QT_NO_DEBUG + qDebug("QPxToolMW::load_results_db()"); + timeval tb,te; +#endif + QByteArray ba; + QSqlQuery *q = NULL; + QBuffer buf(this); + DbReportSelection *rsel; + int id_report; + + if (!devices.size()) return; + device *dev = devices[0]; + +#ifndef QT_NO_DEBUG + gettimeofday(&tb, NULL); +#endif + + progress = new ProgressWidget(10,3,this); + progress->setText(tr("Loading results...")); +// report selection... + rsel = new DbReportSelection("report", this); + if (rsel->exec() == QDialog::Rejected) { + delete rsel; + return; + } + id_report = rsel->getReportID(); + delete rsel; + + if (id_report<0) { + qDebug() << "Invalid report ID!"; + goto close_db; + } + + progress->show(); + qApp->processEvents(); +// reading report from database + qDebug() << "Reading report from database..."; + + q = new QSqlQuery(QSqlDatabase::database("reports")); + qDebug() << "Report ID:" << id_report; + q->prepare("SELECT data_xml FROM reports WHERE id=:id"); + q->bindValue(":id", id_report); + if (!q->exec()) { + qDebug() << q->lastError().text(); + goto close_db; + } + if (!q->next()) { + qDebug() << "Invalid report ID!"; + goto close_db; + } + + qApp->processEvents(); + ba = q->value(0).toByteArray(); + +// parsing data... + buf.setBuffer(&ba); + if (!buf.open(QIODevice::ReadOnly)) { + QMessageBox::warning(this, tr("Error"), tr("Unable to open buffer!\n")); + goto close_db; + } + + dev->load(&buf); + while(dev->isLoading()) { msleep ( 1 << 5); qApp->processEvents(); } + + if (!dev->loadResult()) { + QMessageBox::warning(this, tr("Warning"), tr("No tests data found in this file!")); + } else { + c_dev->setCurrentIndex(0); +#ifndef QT_NO_DEBUG + gettimeofday(&te, NULL); + double t = (te.tv_sec - tb.tv_sec) + (te.tv_usec - tb.tv_usec)/1000000.0; + QMessageBox::information(this, tr("Info"), tr("Tests data loaded in %1 sec").arg(t,0,'f',2)); +#endif + } + +close_db: + if (q) delete q; + delete progress; +} + +void QPxToolMW::dragEnterEvent(QDragEnterEvent* e) +{ + qDebug() << "dragEnterEvent()"; + if (e->mimeData()->hasFormat("text/plain")) { + QUrl url(e->mimeData()->text().simplified()); + if (url.path().endsWith(".qpx")) + e->acceptProposedAction(); + } +} + +void QPxToolMW::dropEvent(QDropEvent* e) +{ + qDebug() << "dropEvent()"; + QUrl url(e->mimeData()->text().simplified()); + load_results(url.path()); + e->acceptProposedAction(); +} + + diff -Nru qpxtool-0.7.1.002/gui/src/mcapwidget.cpp qpxtool-0.7.2/gui/src/mcapwidget.cpp --- qpxtool-0.7.1.002/gui/src/mcapwidget.cpp 2009-03-16 14:05:59.000000000 +0000 +++ qpxtool-0.7.2/gui/src/mcapwidget.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -14,6 +14,7 @@ #include "mcapwidget.h" +#define SHOW_X #define MAX_ICON_SIZE 16 MediaCapWidget::MediaCapWidget(QString itext, bool tri, quint64 df, QWidget *p, Qt::WindowFlags f) @@ -55,17 +56,13 @@ void MediaCapWidget::setRW() { if (wr) { icon.load(":images/cdwriter.png"); - //icon = QImage(":images/cdwriter.png"); } else if (rd) { icon.load(":images/disc.png"); - //icon = QImage(":images/disc.png"); } else { #ifdef SHOW_X icon.load(":images/x.png"); - //icon = QImage(":images/x.png"); #else icon = QImage(); - //icon.clear(); #endif } diff -Nru qpxtool-0.7.1.002/gui/src/pref_colors.cpp qpxtool-0.7.2/gui/src/pref_colors.cpp --- qpxtool-0.7.1.002/gui/src/pref_colors.cpp 2010-02-11 09:23:26.000000000 +0000 +++ qpxtool-0.7.2/gui/src/pref_colors.cpp 2012-12-13 10:46:19.000000000 +0000 @@ -1,6 +1,6 @@ /* * This file is part of the QPxTool project. - * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov + * Copyright (C) 2008-2012 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -74,10 +74,10 @@ lc_errc[0] = new ColorLabel(*set->col_errc.raw[0], "BLER", 1, this); layout->addWidget(lc_errc[0],idx,0); - lc_errc[4] = new ColorLabel(*set->col_errc.raw[4], "E12/POE", 1, this); + lc_errc[4] = new ColorLabel(*set->col_errc.raw[4], "E12/POE/BIS", 1, this); layout->addWidget(lc_errc[4],idx,1); idx++; - lc_errc[1] = new ColorLabel(*set->col_errc.raw[1], "E11/PIE", 1, this); + lc_errc[1] = new ColorLabel(*set->col_errc.raw[1], "E11/PIE/LDC", 1, this); layout->addWidget(lc_errc[1],idx,0); lc_errc[5] = new ColorLabel(*set->col_errc.raw[5], "E22/POsum8", 1, this); layout->addWidget(lc_errc[5],idx,1); diff -Nru qpxtool-0.7.1.002/gui/src/pref_common.cpp qpxtool-0.7.2/gui/src/pref_common.cpp --- qpxtool-0.7.1.002/gui/src/pref_common.cpp 2010-03-23 11:57:30.000000000 +0000 +++ qpxtool-0.7.2/gui/src/pref_common.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -18,16 +18,9 @@ #include #include -#include -#include #include -#include -#include -#include #include -#include - prefCommon::prefCommon(QPxSettings *iset, QWidget *p, Qt::WindowFlags fl) : QWidget(p,fl) { @@ -47,31 +40,6 @@ layout->addWidget(ck_autow); layout->addWidget(ck_autob); - box_rep = new QGroupBox(tr("Autosave reports after tests completed"),this); - box_rep->setCheckable(true); - layout->addWidget(box_rep); - - layout_rep = new QVBoxLayout(box_rep); - layout_rep->setMargin(3); - layout_rep->setSpacing(3); - - layout_rep_path = new QHBoxLayout(); - layout_rep_path->setMargin(0); - layout_rep_path->setSpacing(3); - layout_rep->addLayout(layout_rep_path); - - l_rep_path = new QLabel(tr("Path:"),box_rep); - e_rep_path = new QLineEdit(box_rep); - pb_rep_path = new QPushButton(QIcon(":images/directory.png"), "", box_rep); - pb_rep_path->setToolTip(tr("Select directory for reports saving...")); - - layout_rep_path->addWidget(l_rep_path); - layout_rep_path->addWidget(e_rep_path); - layout_rep_path->addWidget(pb_rep_path); - - ck_eject = new QCheckBox(tr("Eject media after tests finished"), box_rep); - layout_rep->addWidget(ck_eject); - // default tests for written media pl_testsw = new QLabel("" + tr("Default tests for written media") + "",this); pl_testsw->setAlignment(Qt::AlignCenter); @@ -112,15 +80,10 @@ // creating objects connections... connect(ck_wt, SIGNAL(toggled(bool)), ck_wt_simul, SLOT(setEnabled(bool))); - connect(pb_rep_path, SIGNAL(clicked()), this, SLOT(select_rep_path())); // applying settings... ck_autow->setChecked(set->actions_flags & AFLAG_AUTOSTART_W); ck_autob->setChecked(set->actions_flags & AFLAG_AUTOSTART_B); - ck_eject->setChecked(set->actions_flags & AFLAG_EJECT_AFTER); - - box_rep->setChecked(set->report_autosave); - e_rep_path->setText(set->report_path); ck_rt->setChecked(set->actions_flags & AFLAG_DTEST_RT); ck_wt->setChecked(set->actions_flags & AFLAG_DTEST_WT); @@ -139,10 +102,6 @@ { if (ck_autow->isChecked()) set->actions_flags |= AFLAG_AUTOSTART_W; else set->actions_flags &= ~AFLAG_AUTOSTART_W; if (ck_autob->isChecked()) set->actions_flags |= AFLAG_AUTOSTART_B; else set->actions_flags &= ~AFLAG_AUTOSTART_B; - if (ck_eject->isChecked()) set->actions_flags |= AFLAG_EJECT_AFTER; else set->actions_flags &= ~AFLAG_EJECT_AFTER; - - set->report_autosave = box_rep->isChecked(); - set->report_path = e_rep_path->text(); if (ck_rt->isChecked()) set->actions_flags |= AFLAG_DTEST_RT; else set->actions_flags &= ~AFLAG_DTEST_RT; if (ck_wt->isChecked()) set->actions_flags |= AFLAG_DTEST_WT; else set->actions_flags &= ~AFLAG_DTEST_WT; @@ -154,13 +113,3 @@ if (ck_ta->isChecked()) set->actions_flags |= AFLAG_DTEST_TA; else set->actions_flags &= ~AFLAG_DTEST_TA; } -void prefCommon::select_rep_path() -{ -#ifndef QT_NO_DEBUG - qDebug() << "select_rep_path()"; -#endif - QString path = QFileDialog::getExistingDirectory(this, tr("Select directory..."), e_rep_path->text()); - if (path.isEmpty()) return; - e_rep_path->setText(path); -} - diff -Nru qpxtool-0.7.1.002/gui/src/preferences.cpp qpxtool-0.7.2/gui/src/preferences.cpp --- qpxtool-0.7.1.002/gui/src/preferences.cpp 2010-03-23 11:25:18.000000000 +0000 +++ qpxtool-0.7.2/gui/src/preferences.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -24,6 +24,7 @@ #include #include #include +#include #include "preferences.h" #include @@ -65,8 +66,9 @@ layout->addWidget(ilist); ilist->addLabel(tr("Common"), QImage(":images/settings.png")); - ilist->addLabel(tr("Colors"), QImage(":images/colors.png")); ilist->addLabel(tr("Devices"), QImage(":images/disc.png")); + ilist->addLabel(tr("Colors"), QImage(":images/colors.png")); + ilist->addLabel(tr("Reports"), QImage(":images/document.png")); QObject::connect(ilist, SIGNAL(selected(int)), this, SLOT(setPage(int))); @@ -125,12 +127,16 @@ if (!pages[page]) pages[page] = new prefCommon(&set, this); break; case 1: + setWindowTitle("QPxTool - " + tr("Preferences") + ": " + tr("Devices")); + if (!pages[page]) pages[page] = new prefDevices(&set, this); + break; + case 2: setWindowTitle("QPxTool - " + tr("Preferences") + ": " + tr("Colors")); if (!pages[page]) pages[page] = new prefColors(&set, this); break; - case 2: - setWindowTitle("QPxTool - " + tr("Preferences") + ": " + tr("Devices")); - if (!pages[page]) pages[page] = new prefDevices(&set, this); + case 3: + setWindowTitle("QPxTool - " + tr("Preferences") + ": " + tr("Reports")); + if (!pages[page]) pages[page] = new prefReports(&set, this); break; default: break; diff -Nru qpxtool-0.7.1.002/gui/src/pref_reports.cpp qpxtool-0.7.2/gui/src/pref_reports.cpp --- qpxtool-0.7.1.002/gui/src/pref_reports.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/gui/src/pref_reports.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -0,0 +1,229 @@ +/* + * This file is part of the QPxTool project. + * Copyright (C) 2010 Gennady "ShultZ" Kozlov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * See the file "COPYING" for the exact licensing terms. + * + */ + +#include +#include "pref_reports.h" +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +prefReports::prefReports(QPxSettings *iset, QWidget *p, Qt::WindowFlags fl) + : QWidget(p,fl) +{ + +#ifndef QT_NO_DEBUG + qDebug("STA: prefCommon()"); +#endif + set = iset; + + layout = new QVBoxLayout(this); + layout->setMargin(0); + layout->setSpacing(3); + +// reports -> files + box_rep = new QGroupBox(tr("Autosave reports"),this); + box_rep->setCheckable(true); + layout->addWidget(box_rep); + + layout_rep = new QVBoxLayout(box_rep); + layout_rep->setMargin(3); + layout_rep->setSpacing(3); + + layout_rep_path = new QHBoxLayout(); + layout_rep_path->setMargin(0); + layout_rep_path->setSpacing(3); + layout_rep->addLayout(layout_rep_path); + + l_rep_path = new QLabel(tr("Path:"),box_rep); + e_rep_path = new QLineEdit(box_rep); + pb_rep_path = new QPushButton(QIcon(":images/directory.png"), "", box_rep); + pb_rep_path->setToolTip(tr("Select directory for reports saving...")); + + layout_rep_path->addWidget(l_rep_path); + layout_rep_path->addWidget(e_rep_path); + layout_rep_path->addWidget(pb_rep_path); + +// reports -> database + box_rep_db = new QGroupBox(tr("Use reports database"),this); + box_rep_db->setCheckable(true); + layout->addWidget(box_rep_db); + + layout_db = new QGridLayout(box_rep_db); + layout_db->setMargin(3); + layout_db->setSpacing(3); +// DB driver + ldb_driver = new QLabel( tr("Driver:"), this); + ldb_driver->setMinimumSize(40,22); + ldb_driver->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + layout_db->addWidget(ldb_driver, 0, 0); + + db_driver = new QComboBox(this); + db_driver->setMinimumSize(150,22); + db_driver->addItems(QSqlDatabase::drivers()); + layout_db->addWidget(db_driver, 0, 1, 1, 2); + +// DB host + ldb_host = new QLabel( tr("Host:"), this); + ldb_host->setMinimumSize(40,22); + ldb_host->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + layout_db->addWidget(ldb_host, 1, 0); + + db_host = new QLineEdit(this); + db_host->setMinimumSize(150,22); + layout_db->addWidget(db_host, 1, 1, 1, 2); + +// DB port + ldb_port = new QLabel( tr("Port:"), this); + ldb_port->setMinimumSize(40,22); + ldb_port->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + layout_db->addWidget(ldb_port, 2, 0); + + db_port = new QSpinBox(this); + db_port->setMinimumSize(40,22); + db_port->setMinimum(1); + db_port->setMaximum(65535); + layout_db->addWidget(db_port, 2, 1); + +// DB name + ldb_name = new QLabel( tr("DB name:"), this); + ldb_name->setMinimumSize(40,22); + ldb_name->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + layout_db->addWidget(ldb_name, 3, 0); + + db_name= new QLineEdit(this); + db_name->setMinimumSize(150,22); + layout_db->addWidget(db_name, 3, 1, 1, 2); + +// user + ldb_user = new QLabel( tr("User:"), this); + ldb_user->setMinimumSize(40,22); + ldb_user->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + layout_db->addWidget(ldb_user, 4, 0); + + db_user = new QLineEdit(this); + db_user->setMinimumSize(150,22); + layout_db->addWidget(db_user, 4, 1, 1, 2); + +// passwd + ldb_pass = new QLabel( tr("Password:"), this); + ldb_pass->setMinimumSize(40,22); + ldb_pass->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + layout_db->addWidget(ldb_pass, 5, 0); + + db_pass = new QLineEdit(this); + db_pass->setMinimumSize(150,22); + db_pass->setEchoMode(QLineEdit::Password); + layout_db->addWidget(db_pass, 5, 1, 1, 2); + +// DB connection check button + pb_db_check = new QPushButton(QIcon(":images/ok.png"), tr("Check"), this); + pb_db_check->setMinimumSize(40,22); + layout_db->addWidget(pb_db_check, 6, 2); + + ck_autosave_db = new QCheckBox(tr("Autosave reports into database"), box_rep); + layout_db->addWidget(ck_autosave_db, 7, 0, 1, 3); +// common + ck_eject = new QCheckBox(tr("Eject media after tests finished"), box_rep); + layout->addWidget(ck_eject); + + layout->addStretch(10); + +// creating objects connections... + connect(box_rep, SIGNAL(toggled(bool)), this, SLOT(box_rep_toggled(bool))); + connect(box_rep_db, SIGNAL(toggled(bool)), this, SLOT(box_rep_toggled(bool))); + connect(ck_autosave_db, SIGNAL(toggled(bool)), this, SLOT(box_rep_toggled(bool))); + + connect(pb_rep_path, SIGNAL(clicked()), this, SLOT(select_rep_path())); + connect(pb_db_check, SIGNAL(clicked()), this, SLOT(check_db_connection())); + +// applying settings... + + box_rep->setChecked(set->report_autosave); + e_rep_path->setText(set->report_path); + box_rep_db->setChecked(set->use_reports_db); + ck_autosave_db->setChecked(set->report_autosave_db); + + db_driver->setCurrentIndex( QSqlDatabase::drivers().indexOf(set->db.driver) ); + db_host->setText(set->db.host); + db_port->setValue(set->db.port); + db_name->setText(set->db.name); + db_user->setText(set->db.user); + db_pass->setText(set->db.pass); + + ck_eject->setChecked(set->actions_flags & AFLAG_EJECT_AFTER); +} + +prefReports::~prefReports() +{ + if (ck_eject->isChecked()) set->actions_flags |= AFLAG_EJECT_AFTER; else set->actions_flags &= ~AFLAG_EJECT_AFTER; + + set->report_path = e_rep_path->text(); + set->report_autosave = box_rep->isChecked(); + set->use_reports_db = box_rep_db->isChecked(); + set->report_autosave_db = set->use_reports_db && ck_autosave_db->isChecked(); +} + +void prefReports::select_rep_path() +{ +#ifndef QT_NO_DEBUG + qDebug() << __func__; +#endif + QString path = QFileDialog::getExistingDirectory(this, tr("Select directory..."), e_rep_path->text()); + if (path.isEmpty()) return; + e_rep_path->setText(path); +} + +void prefReports::box_rep_toggled(bool) +{ + ck_eject->setEnabled(box_rep->isChecked() || (box_rep_db->isChecked() && ck_autosave_db->isChecked())); + if(!ck_eject->isEnabled()) ck_eject->setChecked(false); +} + +void prefReports::check_db_connection() +{ +#ifndef QT_NO_DEBUG + qDebug() << __func__; +#endif + DBParams params; + + params.driver = db_driver->currentText(); + params.host = db_host->text(); + params.port = db_port->value(); + params.name = db_name->text(); + params.user = db_user->text(); + params.pass = db_pass->text(); + + if (SqlProbeConnection(params, "test connection")) { + set->db = params; + QMessageBox::information(this, + tr("Success!"), + tr("Database connection successfully\nestablished with given parameters")); + } +} + diff -Nru qpxtool-0.7.1.002/gui/src/progresswidget.cpp qpxtool-0.7.2/gui/src/progresswidget.cpp --- qpxtool-0.7.1.002/gui/src/progresswidget.cpp 2010-03-23 11:03:20.000000000 +0000 +++ qpxtool-0.7.2/gui/src/progresswidget.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -1,6 +1,6 @@ /* * This file is part of the QPxTool project. - * Copyright (C) 2009 Gennady "ShultZ" Kozlov + * Copyright (C) 2009-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -10,13 +10,11 @@ * */ - #include #include #include "progresswidget.h" - ProgressWidget::ProgressWidget(int iblocks, int ishown, QWidget *p) :QWidget(p, Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) { @@ -29,6 +27,14 @@ dir = DirectionBoth; dir2 = 0; + col_frame = palette().color(QPalette::Text); + col_bg = palette().color(QPalette::Window); + col_text = palette().color(QPalette::Text); + col_rect = palette().color(QPalette::Highlight); + + timer.setSingleShot(false); + timer.setInterval(100); + setGeometry(offs.x() + p->width()/2-150, offs.y() + p->height()/2-30, 300, 60); setMinimumSize(300,60); setMaximumSize(300,60); @@ -36,7 +42,19 @@ ProgressWidget::~ProgressWidget() { + timer.stop(); +} +void ProgressWidget::setVisible(bool en) +{ + if (en) { + timer.start(); + connect(&timer, SIGNAL(timeout()), this, SLOT(step())); + } else { + timer.stop(); + disconnect(&timer, SIGNAL(timeout()), this, SLOT(step())); + } + QWidget::setVisible(en); } void ProgressWidget::step() @@ -70,22 +88,38 @@ void ProgressWidget::setDirection(ProgressWidget::Direction idir) { dir = idir; } void ProgressWidget::setText(QString t) { text = t; setWindowTitle(text); } +void ProgressWidget::setColor(ProgressColor role, QColor color) +{ + switch (role) { + case BgColor: + col_bg = color; break; + case FrameColor: + col_frame = color; break; + case TextColor: + col_text = color; break; + case RectColor: + col_rect = color; break; + default: + return; + } +} + void ProgressWidget::paintEvent(QPaintEvent*) { QPainter p(this); int blkw = (width() - 20) / blocks; int offs = 10 + (int)(blkw * ( idx + 0.1 )); - p.setPen(QPen(palette().color(QPalette::Text),1)); + p.setPen(QPen(col_frame,1)); p.drawRect(0,0,width()-1,height()-1); if (text.isEmpty()) { for (int i=0; i> 1 , (int)(blkw*0.8), (int)(blkw*0.8), - QBrush(palette().color(QPalette::Highlight))); + QBrush(col_rect)); } else { - p.setPen(QPen(palette().color(QPalette::Text),1)); + p.setPen(QPen(col_text,1)); QFont f = p.font(); p.setFont(f); @@ -96,7 +130,7 @@ for (int i=0; i> 1, (int)(blkw*0.8), (int)(blkw*0.8), - QBrush(palette().color(QPalette::Highlight))); + QBrush(col_rect)); } } diff -Nru qpxtool-0.7.1.002/gui/src/qpxgraph.cpp qpxtool-0.7.2/gui/src/qpxgraph.cpp --- qpxtool-0.7.1.002/gui/src/qpxgraph.cpp 2010-02-17 11:40:41.000000000 +0000 +++ qpxtool-0.7.2/gui/src/qpxgraph.cpp 2012-11-21 12:54:26.000000000 +0000 @@ -75,6 +75,7 @@ #define GRAPH_DFL_CD (GRAPH_BLER | GRAPH_E22 | GRAPH_E32 | GRAPH_UNCR) #define GRAPH_DFL_DVD (GRAPH_PI8 | GRAPH_PIF | GRAPH_POF | GRAPH_UNCR) +#define GRAPH_DFL_BD (GRAPH_LDC | GRAPH_BIS | GRAPH_UNCR) QPxGraph::QPxGraph(QPxSettings *iset, devlist *idev, QString iname, int ttype, QWidget *p, Qt::WindowFlags fl) : QWidget(p,fl) @@ -302,9 +303,12 @@ if (dev->media.type.startsWith("CD")) { HscaleLBA = 450000/sg.width(); Vscale1X = Vscale; - } else { + } else if (dev->media.type.startsWith("DVD")) { HscaleLBA = (1<<19) * 5 * dev->media.ilayers/sg.width(); Vscale1X = Vscale * 3; + } else if (dev->media.type.startsWith("BD")) { + HscaleLBA = (1<<19) * 25 * dev->media.ilayers/sg.width(); + Vscale1X = Vscale * 4; } p->translate(margin_left+1, 1); @@ -439,9 +443,10 @@ { QPainterPath pps; IntList xerr; - bool isCD; +// bool isCD; int x, xo; int errc; + int errc_dfl = 0; #ifdef SHOW_P95ERRC int M,D; // float M,D; @@ -452,8 +457,14 @@ uint64_t lastLBA=0; bool first; - isCD = dev->media.type.startsWith("CD"); - errc = errcList ? errcList : (isCD ? GRAPH_DFL_CD : GRAPH_DFL_DVD); + if (dev->media.type.startsWith("CD")) { + errc_dfl = GRAPH_DFL_CD; + } else if (dev->media.type.startsWith("DVD")) { + errc_dfl = GRAPH_DFL_DVD; + } else if (dev->media.type.startsWith("BD")) { + errc_dfl = GRAPH_DFL_BD; + } + errc = errcList ? errcList : errc_dfl; #ifndef QT_NO_DEBUG timeval b,e; @@ -823,6 +834,7 @@ float HscaleX; bool isCD = 0; int spdMax; + int GBperLayer; // TestData* data; QFont dfont = p->font(); QFont lfont = dfont; @@ -848,15 +860,24 @@ margin_L-1,0); */ if (dev->media.type.startsWith("CD")) { - Hscale = (s.width()-( margin_left + margin_right )-2) / 1.0 / 100/4500; isCD = 1; + } else if (dev->media.type.startsWith("DVD")) { + isCD = 0; + GBperLayer = 5; + } else if (dev->media.type.startsWith("BD")) { + isCD = 0; + GBperLayer = 25; + } + + if (isCD) { + Hscale = (s.width()-( margin_left + margin_right )-2) / 1.0 / 100/4500; spdMax = 60; } else { - Hscale = (s.width()-( margin_left + margin_right )-2) / 1.0 / 5/ (1<<19) / dev->media.ilayers; - isCD = 0; + Hscale = (s.width()-( margin_left + margin_right )-2) / 1.0 / GBperLayer / (1<<19) / dev->media.ilayers; spdMax = 20; } + HscaleX = (s.width() - (margin_left + margin_right )) / VGRIDS; // vertical grid lines @@ -894,7 +915,7 @@ (int)(HscaleX*2), margin_bottom-2, Qt::AlignVCenter | Qt::AlignHCenter, - QString::number(i*( dev->media.ilayers*5/VGRIDS))+" GB"); + QString::number(i*( dev->media.ilayers*GBperLayer/VGRIDS))+" GB"); } } diff -Nru qpxtool-0.7.1.002/gui/src/qpxsettings.cpp qpxtool-0.7.2/gui/src/qpxsettings.cpp --- qpxtool-0.7.1.002/gui/src/qpxsettings.cpp 2010-02-11 09:23:52.000000000 +0000 +++ qpxtool-0.7.2/gui/src/qpxsettings.cpp 2012-12-03 07:13:07.000000000 +0000 @@ -36,6 +36,7 @@ geometry_pref = QRect(0,0,0,0); // geometry_testsel = QRect(0,0,0,0); + show_sidebar = 0; show_allctl = 0; actions_flags = 0; @@ -74,11 +75,16 @@ geometry_mw = o.geometry_mw; geometry_pref = o.geometry_pref; - show_allctl = o.show_allctl; + show_sidebar = o.show_sidebar; + show_allctl = o.show_allctl; report_autosave = o.report_autosave; report_path = o.report_path; actions_flags = o.actions_flags; + use_reports_db = o.use_reports_db; + report_autosave_db = o.report_autosave_db; + db = o.db; + useLocal = o.useLocal; useRemote = o.useRemote; hosts = o.hosts; @@ -127,12 +133,23 @@ // settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, "qpxtool"); settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, "QPxTool", "qpxtool"); - settings->beginGroup("/general"); + settings->beginGroup("/common"); + show_sidebar = settings->value("show_sidebar", 0).toBool(); show_allctl = settings->value("show_allctl", 0).toBool(); report_autosave = settings->value("report_autosave", 0).toBool(); report_path = settings->value("report_path", "").toString(); actions_flags = settings->value("actions_flags", "0").toUInt(); settings->endGroup(); + settings->beginGroup("/database"); + use_reports_db = settings->value("use_reports_db", 0).toBool(); + report_autosave_db = settings->value("report_autosave_db", 0).toBool(); + db.driver = settings->value("db_driver", "").toString(); + db.host = settings->value("db_host", "").toString(); + db.port = settings->value("db_port", "").toInt(); + db.name = settings->value("db_name", "").toString(); + db.user = settings->value("db_user", "").toString(); + db.pass = settings->value("db_pass", "").toString(); + settings->endGroup(); settings->beginGroup("/geometry"); geometry_mw = settings->value("mainwindow", QRect(0,0,0,0) ).toRect(); @@ -169,6 +186,11 @@ col_tapit = settings->value("ta_pit", defColors.tapit.rgb()).toInt(); col_taland = settings->value("ta_land", defColors.taland.rgb()).toInt(); settings->endGroup(); + settings->beginGroup("/paths"); + last_res_path_native = settings->value("last_res_native","").toString(); + last_res_path_html = settings->value("last_res_html","").toString(); + last_res_path_pdf = settings->value("last_res_pdf","").toString(); + settings->endGroup(); delete settings; } @@ -180,12 +202,25 @@ #endif // settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, "qpxtool"); settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, "QPxTool", "qpxtool"); - settings->beginGroup("/general"); + settings->beginGroup("/common"); + settings->setValue("show_sidebar", show_sidebar); settings->setValue("show_allctl", show_allctl); settings->setValue("report_autosave", report_autosave); settings->setValue("report_path", report_path); settings->setValue("actions_flags", actions_flags); settings->endGroup(); + + settings->beginGroup("/database"); + settings->setValue("use_reports_db", use_reports_db); + settings->setValue("report_autosave_db", report_autosave_db); + settings->setValue("db_driver", db.driver); + settings->setValue("db_host", db.host); + settings->setValue("db_port", db.port); + settings->setValue("db_name", db.name); + settings->setValue("db_user", db.user); + settings->setValue("db_pass", db.pass); + settings->endGroup(); + settings->beginGroup("/geometry"); settings->setValue("mainwindow", geometry_mw); settings->setValue("preferences", geometry_pref); @@ -221,6 +256,12 @@ settings->endGroup(); + settings->beginGroup("/paths"); + settings->setValue("last_res_native", last_res_path_native); + settings->setValue("last_res_html", last_res_path_html); + settings->setValue("last_res_pdf", last_res_path_pdf); + settings->endGroup(); + delete settings; saveScale(); } diff -Nru qpxtool-0.7.1.002/gui/src/resultsio.cpp qpxtool-0.7.2/gui/src/resultsio.cpp --- qpxtool-0.7.1.002/gui/src/resultsio.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/gui/src/resultsio.cpp 2012-12-13 10:46:19.000000000 +0000 @@ -0,0 +1,521 @@ +/* + * This file is part of the QPxTool project. + * Copyright (C) 2010-2012 Gennady "ShultZ" Kozlov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * See the file "COPYING" for the exact licensing terms. + * + */ + +#include "resultsio.h" + +#include +#include +#include +#include + +#include +#include +#include + +void ResultsReader::run() { + QXmlStreamReader xml; + QXmlStreamAttributes attr; + QString name; + QStringList data; + bool dataFound = 0, + isQpxData = 0, + isDevice = 0, + isMedia = 0, + isTests = 0; + int test = 0; + int taZone = -1; + + DI_Transfer d_tr; + DI_Errc d_errc; + DI_JB d_jb; + DI_FT d_ft; + DI_TA d_ta; + + res = false; + + if (!io || !io->isOpen() || !io->isReadable()) { return; } + xml.setDevice(io); +// xml.version(); + + dev->clearMinfo(); + while(!xml.atEnd()) { + switch (xml.readNext()) { + case QXmlStreamReader::StartElement: + name = xml.name().toString(); + if (xml.name() == "qpxdata") { + dataFound = 1; + isQpxData = 1; + } + if (isQpxData) { + if (test && (xml.name() == "d")) { + data = xml.readElementText().split(","); + switch (test) { + case TEST_RT: + if (data.size() == 3) { + d_tr.lba = data[0].toLongLong(); + d_tr.spdx = data[1].toFloat(); + d_tr.spdk = data[2].toInt(); + dev->testData.rt << d_tr; + } + break; + case TEST_WT: + if (data.size() == 3) { + d_tr.lba = data[0].toLongLong(); + d_tr.spdx = data[1].toFloat(); + d_tr.spdk = data[2].toInt(); + dev->testData.wt << d_tr; + } + break; + case TEST_ERRC: + if (data.size() == 10) { + d_errc.raw.lba = data[0].toLongLong(); + d_errc.raw.spdx = data[1].toFloat(); + for (int i=0; i<8; i++) + d_errc.raw.err[i] = data[2+i].toInt(); +#if RECALC_ON_LOAD + ErrcADD(&dev->testData.errcTOT, d_errc); + ErrcMAX(&dev->testData.errcMAX, d_errc); + if (dev->media.type.startsWith("CD")) { + CDErrcAVG(&dev->testData.errcAVG, &dev->testData.errcTOT, d_errc.cd.lba/75); + } else if (dev->media.type.startsWith("DVD")) { + DVDErrcAVG(&dev->testData.errcAVG, &dev->testData.errcTOT, d_errc.dvd.lba >> 4); + } else if (dev->media.type.startsWith("BD")) { + BDErrcAVG(&dev->testData.errcAVG, &dev->testData.errcTOT, d_errc.bd.lba >> 5); + } +#endif + dev->testData.errc << d_errc; + } + break; + case TEST_JB: + if (data.size() == 4) { + d_jb.lba = data[0].toLongLong(); + d_jb.spdx = data[1].toFloat(); + d_jb.jitter = data[2].toFloat(); + d_jb.asymm = data[3].toFloat(); +#if RECALC_ON_LOAD + if (!dev->testData.jb.size()) { + dev->testData.jbMM.jmin = d_jb.jitter; + dev->testData.jbMM.jmax = d_jb.jitter; + dev->testData.jbMM.bmin = d_jb.asymm; + dev->testData.jbMM.bmax = d_jb.asymm; + } else { + if (dev->testData.jbMM.jmin > d_jb.jitter) dev->testData.jbMM.jmin = d_jb.jitter; + if (dev->testData.jbMM.jmax < d_jb.jitter) dev->testData.jbMM.jmax = d_jb.jitter; + if (dev->testData.jbMM.bmin > d_jb.asymm) dev->testData.jbMM.bmin = d_jb.asymm; + if (dev->testData.jbMM.bmax < d_jb.asymm) dev->testData.jbMM.bmin = d_jb.asymm; + } +#endif + dev->testData.jb << d_jb; + } + break; + case TEST_FT: + if (data.size() == 4) { + d_ft.lba = data[0].toLongLong(); + d_ft.spdx= data[1].toFloat(); + d_ft.fe = data[2].toInt(); + d_ft.te = data[3].toInt(); +#if RECALC_ON_LOAD + if (dev->testData.ftMAX.fe < d_ft.fe) dev->testData.ftMAX.fe = d_ft.fe; + if (dev->testData.ftMAX.te < d_ft.te) dev->testData.ftMAX.te = d_ft.te; +#endif + dev->testData.ft << d_ft; + } + break; + case TEST_TA: + if (taZone>=0 && taZone<6 && data.size() == 3) { + d_ta.idx = data[0].toInt(); + d_ta.pit = data[1].toInt(); + d_ta.land = data[2].toInt(); + + dev->testData.ta[taZone] << d_ta; + } + break; + } + } else if (isDevice) { + // device information + attr = xml.attributes(); + if (xml.name() == "identify") { +// dev->type = attr.value("type").toInt(); + dev->path = attr.value("path").toString(); + dev->host = attr.value("host").toString(); + dev->port = attr.value("port").toString().toInt(); + dev->path = attr.value("path").toString(); +// dev->id = attr.value("id").toString(); + dev->ven = attr.value("ven").toString(); + dev->dev = attr.value("dev").toString(); + dev->sn = attr.value("sn").toString(); + dev->fw = attr.value("fw").toString(); + dev->tla = attr.value("tla").toString(); + } else if (xml.name() == "info") { + dev->buf = attr.value("buf").toString(); + dev->iface = attr.value("iface").toString(); + dev->loader = attr.value("loader").toString(); + dev->cap = attr.value("cap").toString().toULongLong(NULL, 16); + dev->cap_rd = attr.value("cap_rd").toString().toULongLong(NULL, 16); + dev->cap_wr = attr.value("cap_wr").toString().toULongLong(NULL, 16); + } else if (xml.name() == "rpc") { + dev->rpc_phase = attr.value("phase").toString().toInt(); + dev->rpc_reg = attr.value("region").toString().toInt(); + dev->rpc_ch = attr.value("changes").toString().toInt(); + dev->rpc_rst = attr.value("resets").toString().toInt(); + } else if (xml.name() == "lifetime") { + dev->life_dn = attr.value("count").toString().toInt(); + dev->life_cr = attr.value("cd_rd").toString(); + dev->life_cw = attr.value("cd_wr").toString(); + dev->life_dr = attr.value("dvd_rd").toString(); + dev->life_dw = attr.value("dvd_wr").toString(); + } + } else if (isMedia) { + // media information + attr = xml.attributes(); + if (xml.name() == "identify") { + dev->media.type = attr.value("type").toString(); + dev->media.category = attr.value("category").toString(); + dev->media.mid = attr.value("mid").toString(); + dev->media.label = attr.value("label").toString(); + } else if (xml.name() == "capacity") { + dev->media.creads = attr.value("read").toString().toInt(); + dev->media.cfrees = attr.value("free").toString().toInt(); + dev->media.ctots = attr.value("tot").toString().toInt(); + dev->media.creadm = attr.value("read_m").toString().toInt(); + dev->media.cfreem = attr.value("free_m").toString().toInt(); + dev->media.ctotm = attr.value("tot_m").toString().toInt(); + dev->media.creadmsf = attr.value("read_msf").toString(); + dev->media.cfreemsf = attr.value("free_msf").toString(); + dev->media.ctotmsf = attr.value("tot_msf").toString(); + } else if (xml.name() == "speeds") { + dev->media.rspeeds = attr.value("rspeeds" ).toString().split(" ", QString::SkipEmptyParts); + dev->media.wspeedsd = attr.value("wspeedsd").toString().split(" ", QString::SkipEmptyParts); + dev->media.wspeedsm = attr.value("wspeedsm").toString().split(" ", QString::SkipEmptyParts); + } else if (xml.name() == "misc") { + dev->media.writer = attr.value("writer").toString(); + dev->media.prot = attr.value("protection").toString(); + dev->media.regions = attr.value("regions").toString(); + dev->media.grec = attr.value("gigarec").toString().toDouble(); + dev->media.spd1X = attr.value("spd1X").toString().toInt(); + dev->media.layers = attr.value("layers").toString(); + dev->media.erasable= attr.value("erasable").toString(); + dev->media.ilayers = dev->media.layers.toInt(); + dev->media.dstate = attr.value("dstate").toString(); + dev->media.sstate = attr.value("sstate").toString(); + } + } else if (isTests) { + attr = xml.attributes(); + if (xml.name() == "rt") { + test = TEST_RT; + dev->tspeeds.rt = attr.value("speed").toString().toInt(); + dev->testData.rt_time = attr.value("time").toString().toDouble(); + } else if (xml.name() == "wt") { + test = TEST_WT; + dev->tspeeds.wt = attr.value("speed").toString().toInt(); + dev->testData.wt_time = attr.value("time").toString().toDouble(); + } else if (xml.name() == "errc") { + test = TEST_ERRC; + dev->tspeeds.errc = attr.value("speed").toString().toInt(); + dev->testData.errc_time = attr.value("time").toString().toDouble(); + dev->media.tdata_errc = attr.value("data").toString().toInt(); + } else if (xml.name() == "jb") { + test = TEST_JB; + dev->tspeeds.jb = attr.value("speed").toString().toInt(); + dev->testData.jb_time = attr.value("time").toString().toDouble(); + } else if (xml.name() == "ft") { + test = TEST_FT; + dev->tspeeds.ft = attr.value("speed").toString().toInt(); + dev->testData.ft_time = attr.value("time").toString().toDouble(); + } else if (xml.name() == "ta") { + test = TEST_TA; + // dev->tspeeds.ta = attr.value("speed").toString().toInt(); + dev->testData.ta_time = attr.value("time").toString().toDouble(); + } else if ((test == TEST_TA) && (xml.name() == "zone")) { + taZone = attr.value("idx").toString().toInt(); + } + } else if (xml.name() == "device") { + isDevice = 1; + } else if (xml.name() == "media") { + isMedia = 1; + } else if (xml.name() == "tests") { + isTests = 1; + } + } + break; + case QXmlStreamReader::EndElement: + if (isQpxData && xml.name() == "qpxdata") { + isQpxData = 0; + } else if (isDevice && xml.name() == "device") { + isDevice = 0; + } else if (isMedia && xml.name() == "media") { + isMedia = 0; + } else if (isTests && xml.name() == "tests") { + isTests = 0; + } else if (isTests) { + if (test == TEST_RT && xml.name() == "rt") { + test = 0; + } else if (test == TEST_WT && xml.name() == "wt") { + test = 0; + } else if (test == TEST_ERRC && xml.name() == "errc") { + test = 0; + } else if (test == TEST_JB && xml.name() == "jb") { + test = 0; + } else if (test == TEST_FT && xml.name() == "ft") { + test = 0; + } else if (test == TEST_TA && xml.name() == "ta") { + test = 0; + } else if (test == TEST_TA && xml.name() == "zone") { + taZone = -1; + } + } + case QXmlStreamReader::Invalid: + qDebug() << COL_RED << "ResultsReader: Invalid token @" << xml.characterOffset() << xml.name() << COL_NORM; + break; + case QXmlStreamReader::NoToken: + case QXmlStreamReader::StartDocument: + case QXmlStreamReader::EndDocument: + case QXmlStreamReader::Characters: + case QXmlStreamReader::Comment: + case QXmlStreamReader::DTD: + case QXmlStreamReader::EntityReference: + case QXmlStreamReader::ProcessingInstruction: + break; + // default: + break; + } + } + res = dataFound; +} + + +void ResultsWriter::run() { + QXmlStreamWriter xml; + res = false; + + if (!io || !io->isOpen() || !io->isWritable()) { return; } + + xml.setDevice(io); + xml.setAutoFormatting(true); + + xml.writeStartDocument("1.0"); + xml.writeStartElement("qpxdata"); +// writing metadata +// device info... + xml.writeStartElement("device"); + xml.writeStartElement("identify"); + switch (dev->type) { + case device::DevtypeLocal: + xml.writeAttribute("type","local"); + break; + case device::DevtypeTCP: + xml.writeAttribute("type","tcp"); + xml.writeAttribute("host", dev->host); + xml.writeAttribute("port", QString::number(dev->port)); + break; + default: + break; + } + xml.writeAttribute("path", dev->path); +// xml.writeAttribute("id", dev->id); + xml.writeAttribute("ven", dev->ven); + xml.writeAttribute("dev", dev->dev); + xml.writeAttribute("sn", dev->sn); + xml.writeAttribute("fw", dev->fw); + xml.writeAttribute("tla", dev->tla); + xml.writeEndElement(); + + xml.writeStartElement("info"); + xml.writeAttribute("buf", dev->buf); + xml.writeAttribute("iface",dev->iface); + xml.writeAttribute("loader",dev->loader); + xml.writeAttribute("cap", QString("%1").arg(dev->cap,0,16)); + xml.writeAttribute("cap_rd", QString("%1").arg(dev->cap_rd,0,16)); + xml.writeAttribute("cap_wr", QString("%1").arg(dev->cap_wr,0,16)); + xml.writeEndElement(); + + if (dev->cap & CAP_DVD_CSS) + { + xml.writeStartElement("rpc"); + xml.writeAttribute("phase", QString::number(dev->rpc_phase)); + xml.writeAttribute("region", QString::number(dev->rpc_reg)); + xml.writeAttribute("changes", QString::number(dev->rpc_ch)); + xml.writeAttribute("resets", QString::number(dev->rpc_rst)); + xml.writeEndElement(); + } + +// if (life_dn) { + xml.writeStartElement("lifetime"); + xml.writeAttribute("count", QString::number(dev->life_dn)); + xml.writeAttribute("cd_rd", dev->life_cr); + xml.writeAttribute("cd_wr", dev->life_cw); + xml.writeAttribute("dvd_rd", dev->life_dr); + xml.writeAttribute("dvd_wr", dev->life_dw); + xml.writeEndElement(); +// } + + xml.writeEndElement(); // device + xml.writeStartElement("media"); +// media info + xml.writeStartElement("identify"); + xml.writeAttribute("type", dev->media.type); + xml.writeAttribute("category", dev->media.category); + xml.writeAttribute("mid", dev->media.mid); + xml.writeAttribute("label", dev->media.label); + xml.writeEndElement(); + + xml.writeStartElement("capacity"); + xml.writeAttribute("read", QString::number(dev->media.creads)); + xml.writeAttribute("free", QString::number(dev->media.cfrees)); + xml.writeAttribute("tot", QString::number(dev->media.ctots)); + + xml.writeAttribute("read_m", QString::number(dev->media.creadm)); + xml.writeAttribute("free_m", QString::number(dev->media.cfreem)); + xml.writeAttribute("tot_m", QString::number(dev->media.ctotm)); + + xml.writeAttribute("read_msf", dev->media.creadmsf); + xml.writeAttribute("free_msf", dev->media.cfreemsf); + xml.writeAttribute("tot_msf", dev->media.ctotmsf); + xml.writeEndElement(); // capacity + + xml.writeStartElement("speeds"); + xml.writeAttribute("rspeeds", dev->media.rspeeds.join(" ")); + xml.writeAttribute("wspeedsd", dev->media.wspeedsd.join(" ")); + xml.writeAttribute("wspeedsm", dev->media.wspeedsm.join(" ")); + xml.writeEndElement(); // misc + + xml.writeStartElement("misc"); + xml.writeAttribute("writer", dev->media.writer); + xml.writeAttribute("protection",dev->media.prot); + xml.writeAttribute("regions", dev->media.regions); + xml.writeAttribute("gigarec", QString("%1").arg(dev->media.grec,0,'f',1)); + + xml.writeAttribute("spd1X", QString::number(dev->media.spd1X)); + xml.writeAttribute("layers", QString::number(dev->media.ilayers)); + xml.writeAttribute("erasable", dev->media.erasable); + + xml.writeAttribute("dstate", dev->media.dstate); + xml.writeAttribute("sstate", dev->media.sstate); + xml.writeEndElement(); // misc + xml.writeEndElement(); // media +// test speeds + + xml.writeStartElement("tests"); + + if (dev->testData.rt.size()) { + int s = dev->testData.rt.size(); + xml.writeStartElement("rt"); + xml.writeAttribute("speed", QString::number(dev->tspeeds.rt)); + xml.writeAttribute("time", QString("%1").arg(dev->testData.rt_time,0,'f',2)); + + for (int i=0; itestData.rt[i].lba) + .arg(dev->testData.rt[i].spdx) + .arg(dev->testData.rt[i].spdk)); + } + xml.writeEndElement(); + } + + if (dev->testData.wt.size()) { + int s = dev->testData.rt.size(); + xml.writeStartElement("wt"); + xml.writeAttribute("speed", QString::number(dev->tspeeds.wt)); + xml.writeAttribute("time", QString("%1").arg(dev->testData.wt_time,0,'f',2)); + + for (int i=0; itestData.wt[i].lba) + .arg(dev->testData.wt[i].spdx) + .arg(dev->testData.wt[i].spdk)); + } + xml.writeEndElement(); + } + + if (dev->testData.errc.size()) { + int s = dev->testData.errc.size(); + xml.writeStartElement("errc"); + xml.writeAttribute("speed", QString::number(dev->tspeeds.errc)); + xml.writeAttribute("time", QString("%1").arg(dev->testData.errc_time,0,'f',2)); + xml.writeAttribute("data", QString::number(dev->media.tdata_errc)); + + for (int i=0; itestData.errc[i].raw.lba).arg(dev->testData.errc[i].raw.spdx,0,'f',2) + + QString("%1,%2,%3,%4,%5,%6,%7,%8") + .arg(dev->testData.errc[i].raw.err[0]) + .arg(dev->testData.errc[i].raw.err[1]) + .arg(dev->testData.errc[i].raw.err[2]) + .arg(dev->testData.errc[i].raw.err[3]) + .arg(dev->testData.errc[i].raw.err[4]) + .arg(dev->testData.errc[i].raw.err[5]) + .arg(dev->testData.errc[i].raw.err[6]) + .arg(dev->testData.errc[i].raw.err[7]) + ); + } + xml.writeEndElement(); + } + + if (dev->testData.jb.size()) { + int s = dev->testData.jb.size(); + xml.writeStartElement("jb"); + xml.writeAttribute("speed", QString::number(dev->tspeeds.jb)); + xml.writeAttribute("time", QString("%1").arg(dev->testData.jb_time,0,'f',2)); + + for (int i=0; itestData.jb[i].lba) + .arg(dev->testData.jb[i].spdx) + .arg(dev->testData.jb[i].jitter) + .arg(dev->testData.jb[i].asymm)); + } + xml.writeEndElement(); + } + + if (dev->testData.ft.size()) { + int s = dev->testData.ft.size(); + xml.writeStartElement("ft"); + xml.writeAttribute("speed", QString::number(dev->tspeeds.ft)); + xml.writeAttribute("time", QString("%1").arg(dev->testData.ft_time,0,'f',2)); + + for (int i=0; itestData.ft[i].lba) + .arg(dev->testData.ft[i].spdx) + .arg(dev->testData.ft[i].fe) + .arg(dev->testData.ft[i].te)); + } + xml.writeEndElement(); + } + + if (dev->testData.ta[0].size()) { + xml.writeStartElement("ta"); + xml.writeAttribute("time", QString("%1").arg(dev->testData.ta_time,0,'f',2)); + + for (int i=0; i<6; i++) { + int s = dev->testData.ta[i].size(); + xml.writeStartElement("zone"); + xml.writeAttribute("idx", QString::number(i)); + + for(int j=0;jtestData.ta[i][j].idx) + .arg(dev->testData.ta[i][j].pit) + .arg(dev->testData.ta[i][j].land) + ); + } + xml.writeEndElement(); + } + xml.writeEndElement(); + } + + xml.writeEndElement(); // tests + xml.writeEndElement(); // qpxdata + xml.writeEndDocument(); + + res = true; +} + diff -Nru qpxtool-0.7.1.002/gui/src/tab_errc.cpp qpxtool-0.7.2/gui/src/tab_errc.cpp --- qpxtool-0.7.1.002/gui/src/tab_errc.cpp 2010-02-17 14:30:49.000000000 +0000 +++ qpxtool-0.7.2/gui/src/tab_errc.cpp 2012-12-13 10:46:19.000000000 +0000 @@ -1,6 +1,6 @@ /* * This file is part of the QPxTool project. - * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov + * Copyright (C) 2008-2012 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -142,6 +142,7 @@ void tabERRC::updateAll() { + bool show_e2 = true; device *dev = devices->current(); GraphTab::updateLast((int)(dev->testData.errc_time), NULL, 1); updateSummary(dev); @@ -153,11 +154,20 @@ pl_e0->setText("PI8"); pl_e1->setText("PIF"); pl_e2->setText("POF"); + } else if (dev->media.type.startsWith("BD")) { + pl_e0->setText("LDC"); + pl_e1->setText("BIS"); + show_e2 = false; } else { pl_e0->setText("BLER/PI8"); pl_e1->setText("E22/PIF"); pl_e2->setText("E32/POF"); } + pl_e2->setVisible(show_e2); + l_e2t->setVisible(show_e2); + l_e2m->setVisible(show_e2); + l_e2a->setVisible(show_e2); + updateLegend(); if (xerrc) xerrc->updateAll(); } @@ -173,6 +183,9 @@ pl_e0->setColor( *(settings->col_errc.dvd.pi8)); pl_e1->setColor( *(settings->col_errc.dvd.pif)); pl_e2->setColor( *(settings->col_errc.dvd.pof)); + } else if (dev->media.type.startsWith("BD")) { + pl_e0->setColor( *(settings->col_errc.bd.ldc)); + pl_e1->setColor( *(settings->col_errc.bd.bis)); } else { pl_e0->setColor( QColor(Qt::black) ); pl_e1->setColor( QColor(Qt::black) ); @@ -229,6 +242,14 @@ l_e2t->setText( QString::number(dev->testData.errcTOT.dvd.pof) ); l_e2m->setNum( dev->testData.errcMAX.dvd.pof ); l_e2a->setText( QString::number(dev->testData.errcAVG.dvd.pof, 'f', 2) ); + } else if (dev->media.type.startsWith("BD")) { + l_e0t->setText( QString::number(dev->testData.errcTOT.bd.ldc) ); + l_e0m->setNum( dev->testData.errcMAX.bd.ldc ); + l_e0a->setText( QString::number(dev->testData.errcAVG.bd.ldc, 'f', 2) ); + + l_e1t->setText( QString::number(dev->testData.errcTOT.bd.bis) ); + l_e1m->setNum( dev->testData.errcMAX.bd.bis ); + l_e1a->setText( QString::number(dev->testData.errcAVG.bd.bis, 'f', 2) ); } } diff -Nru qpxtool-0.7.1.002/gui/src/tab_mediainfo.cpp qpxtool-0.7.2/gui/src/tab_mediainfo.cpp --- qpxtool-0.7.1.002/gui/src/tab_mediainfo.cpp 2010-02-11 09:24:15.000000000 +0000 +++ qpxtool-0.7.2/gui/src/tab_mediainfo.cpp 2012-12-13 10:46:19.000000000 +0000 @@ -1,6 +1,6 @@ /* * This file is part of the QPxTool project. - * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov + * Copyright (C) 2008-2012 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -273,6 +273,7 @@ qDebug("STA: tabMediaInfo::updateData()"); #endif const device *dev = devices->current(); + bool showMSF = dev->media.type.startsWith("CD"); l_type->setText(dev->media.type); l_book->setText(dev->media.category); @@ -312,6 +313,9 @@ l_ctotm->clear(); l_ctotmsf->clear(); } + l_creadmsf->setVisible(showMSF); + l_cfreemsf->setVisible(showMSF); + l_ctotmsf->setVisible(showMSF); l_mid->setText(dev->media.mid); if (!dev->media.rspeeds.size()) diff -Nru qpxtool-0.7.1.002/gui/src/tab_ta.cpp qpxtool-0.7.2/gui/src/tab_ta.cpp --- qpxtool-0.7.1.002/gui/src/tab_ta.cpp 2010-02-11 09:24:20.000000000 +0000 +++ qpxtool-0.7.2/gui/src/tab_ta.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -23,6 +23,8 @@ #include "tab_ta.h" #include +#include + tabTA::tabTA(QPxSettings *iset, devlist *idev, QString iname, QWidget *p, Qt::WindowFlags fl) : QWidget(p, fl) { @@ -79,6 +81,17 @@ lay_zone->addWidget(zone2); grp_zone->addButton(zone2, 2); +// Legend +#ifdef __LEGEND_SHOW_TA + cl_pit = new ColorLabel(settings->col_tapit, tr("Pit"), 0, this); + cl_pit->setMinimumSize(100,20); + layoutl->addWidget(cl_pit); + + cl_land = new ColorLabel(settings->col_taland, tr("Land"), 0, this); + cl_land->setMinimumSize(100,20); + layoutl->addWidget(cl_land); +#endif + layoutl->addStretch(10); // Test time diff -Nru qpxtool-0.7.1.002/gui/src/tab_transfer.cpp qpxtool-0.7.2/gui/src/tab_transfer.cpp --- qpxtool-0.7.1.002/gui/src/tab_transfer.cpp 2010-02-11 09:24:28.000000000 +0000 +++ qpxtool-0.7.2/gui/src/tab_transfer.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -30,12 +30,6 @@ layout_info->setMargin(0); layout_info->setSpacing(3); -#ifdef __LEGEND_SHOW_SPEED - pl_spd = new ColorLabel(irw ? settings->col_wspeed : settings->col_rspeed, "Speed", 0, infow); - pl_spd->setMinimumSize(100,20); - layout_info->addWidget(pl_spd); -#endif - pl_sta = new QLabel(tr("Start"), infow); pl_sta->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); pl_sta->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); @@ -75,6 +69,14 @@ l_avg_kb->setMinimumHeight(22); layout_info->addWidget(l_avg_kb); +#ifdef __LEGEND_SHOW_SPEED + pl_spd = new ColorLabel(irw ? settings->col_wspeed : settings->col_rspeed, + irw ? tr("Write") : tr("Read"), + 0, infow); + pl_spd->setMinimumSize(100,20); + layout_info->addWidget(pl_spd); +#endif + layout_info->addStretch(10); clear(); diff -Nru qpxtool-0.7.1.002/gui/src/testdialog.cpp qpxtool-0.7.2/gui/src/testdialog.cpp --- qpxtool-0.7.1.002/gui/src/testdialog.cpp 2010-02-11 09:24:34.000000000 +0000 +++ qpxtool-0.7.2/gui/src/testdialog.cpp 2012-12-04 07:52:39.000000000 +0000 @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -100,11 +101,19 @@ media->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layout->addWidget(media,1,1); + llabel = new QLabel(tr("Label:"),this); + llabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + layout->addWidget(llabel,2,0); + + elabel = new QLineEdit(this); + elabel->setMaxLength(128); + layout->addWidget(elabel,2,1); + // tests selection // grp_tests = new QGroupBox(tr("Tests"),this); grp_tests = new QGroupBox(this); - layout->addWidget(grp_tests, 2,0, 1,2); + layout->addWidget(grp_tests, 3,0, 1,2); layout_tests = new QGridLayout(grp_tests); layout_tests->setMargin(3); layout_tests->setSpacing(3); @@ -189,7 +198,7 @@ layout_butt = new QHBoxLayout; layout_butt->setMargin(0); layout_butt->setSpacing(3); - layout->addLayout(layout_butt, 3, 0, 1, 2); + layout->addLayout(layout_butt, 4, 0, 1, 2); layout_butt->addStretch(3); butt_run = new QPushButton(tr("Run"),this); @@ -201,8 +210,9 @@ layout->setRowStretch(0,1); layout->setRowStretch(1,1); - layout->setRowStretch(2,20); - layout->setRowStretch(3,1); + layout->setRowStretch(2,1); + layout->setRowStretch(3,20); + layout->setRowStretch(4,1); connect( ck_RT, SIGNAL(clicked(bool)), spd_RT,SLOT(setEnabled(bool))); connect( ck_WT, SIGNAL(clicked(bool)), spd_WT,SLOT(setEnabled(bool))); @@ -241,6 +251,10 @@ void TestDialog::start() { saveData(); + if (elabel->text().isEmpty()) { + QMessageBox::information(this, tr("Media label is empty!"), tr("You have to define a media label!")); + return; + } if (!dev->test_req) { QMessageBox::information(this, tr("No tests selected!"), tr("You have selected no tests!")); return; @@ -248,6 +262,7 @@ #ifndef QT_NO_DEBUG qDebug() << "Selected plugin: "<< dev->plugin; #endif + dev->media.label = elabel->text(); accept(); } @@ -380,7 +395,7 @@ void TestDialog::pluginChanged(int idx) { ProgressWidget *progress; - bool relock=0; +// bool relock=0; // bool preservePluginsList = dev->preservePluginsList; @@ -416,11 +431,7 @@ progress->show(); dev->update_plugin_info(); - while(dev->isRunning()) { - msleep ( 1 << 7); - progress->step(); - qApp->processEvents(); - } + while(dev->isRunning()) { msleep ( 1 << 5); qApp->processEvents(); } delete progress; // dev->preservePluginsList = preservePluginsList; diff -Nru qpxtool-0.7.1.002/INSTALL qpxtool-0.7.2/INSTALL --- qpxtool-0.7.1.002/INSTALL 2009-05-27 11:33:19.000000000 +0000 +++ qpxtool-0.7.2/INSTALL 2010-09-21 18:48:03.000000000 +0000 @@ -1,4 +1,10 @@ -Alailable targets: +To install from source: + ./configure + make + make install + + +Alailable targets for `make`: all - build all cli - build libs and console tools gui - build gui only diff -Nru qpxtool-0.7.1.002/lib/include/colors.h qpxtool-0.7.2/lib/include/colors.h --- qpxtool-0.7.1.002/lib/include/colors.h 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/lib/include/colors.h 2012-11-21 12:22:39.000000000 +0000 @@ -0,0 +1 @@ +#include "../qpxtransport/include/colors.h" diff -Nru qpxtool-0.7.1.002/lib/Makefile.lib qpxtool-0.7.2/lib/Makefile.lib --- qpxtool-0.7.1.002/lib/Makefile.lib 2010-03-23 10:51:37.000000000 +0000 +++ qpxtool-0.7.2/lib/Makefile.lib 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ - -LIB_SHORT = lib$(LIBN).so -LIB_SONAME = $(LIB_SHORT).$(VER_MAJOR) -LIB_SONAMEV= $(LIB_SONAME).$(VER_MINOR) -LIB = $(LIB_SONAMEV).$(VER_MICRO) - -CXXFLAGS += -I. -I./include -I../include -LDFLAGS += -shared -Wl,-soname,$(LIB_SONAME) - - -all: $(LIB) - -$(LIB): $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LDLIBS) - mkdir -p ../lib - ln -fs ../$(DIR)/$(LIB) ../lib/$(LIB_SHORT) - - -clean: - rm -f $(LIB_SHORT)* $(OBJS) ../lib/$(LIB_SHORT) *~ include/*~ - -install: - - mkdir -p $(DESTDIR)$(LIBDIR) - install -m 755 $(LIB) $(DESTDIR)$(LIBDIR) - ln -sf $(LIB) $(DESTDIR)$(LIBDIR)/$(LIB_SONAME) - ln -sf $(LIB_SONAME) $(DESTDIR)$(LIBDIR)/$(LIB_SHORT) - install -m 644 $(HDRS) $(DESTDIR)$(INCDIR)/qpxtool - -uninstall: - rm -f $(DESTDIR)$(LIBDIR)/$(LIB_SHORT) - rm -f $(DESTDIR)$(LIBDIR)/$(LIB_SONAME) - rm -f $(DESTDIR)$(LIBDIR)/$(LIB) - - -.PHONY: all clean install uninstall diff -Nru qpxtool-0.7.1.002/lib/qpxpioneer/include/pioneer_spdctl.h qpxtool-0.7.2/lib/qpxpioneer/include/pioneer_spdctl.h --- qpxtool-0.7.1.002/lib/qpxpioneer/include/pioneer_spdctl.h 2009-11-20 09:22:45.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxpioneer/include/pioneer_spdctl.h 2012-12-10 12:02:55.000000000 +0000 @@ -24,10 +24,22 @@ #define PIO_SPD_NOLIMIT 0x00 #define PIO_SPD_LIMIT 0x01 +#define PIO_PURE_READ_STD 0x00 +#define PIO_PURE_READ_MASTER 0x01 +#define PIO_PURE_READ_PERFECT 0x02 + +const str_dev pioneer_pureread_tbl[]={ + "Standard", + "Master", + "Perfect"}; + extern int pioneer_get_quiet(drive_info* drive); extern int pioneer_set_quiet(drive_info* drive, char silent, bool limit, bool save); extern int pioneer_set_silent(drive_info* drive, char silent, bool save); extern int pioneer_set_spdlim(drive_info* drive, bool limit, bool save); +extern int pioneer_set_peakpower(drive_info* drive, bool en, bool save); +extern int pioneer_set_pureread(drive_info* drive, char pr); #endif + diff -Nru qpxtool-0.7.1.002/lib/qpxpioneer/pioneer_spdctl.cpp qpxtool-0.7.2/lib/qpxpioneer/pioneer_spdctl.cpp --- qpxtool-0.7.1.002/lib/qpxpioneer/pioneer_spdctl.cpp 2009-08-21 06:58:50.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxpioneer/pioneer_spdctl.cpp 2012-12-10 12:02:55.000000000 +0000 @@ -59,3 +59,12 @@ if (!drive->silent) printf("%s\n", (drive->pioneer.limit == limit) ? "OK":"FAIL"); return drive->err; } + +int pioneer_set_peakpower(drive_info* drive, bool en, bool save) +{ +} + +int pioneer_set_pureread(drive_info* drive, char pr) +{ +} + diff -Nru qpxtool-0.7.1.002/lib/qpxplextor/plextor_features.cpp qpxtool-0.7.2/lib/qpxplextor/plextor_features.cpp --- qpxtool-0.7.1.002/lib/qpxplextor/plextor_features.cpp 2010-01-13 13:26:45.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxplextor/plextor_features.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -792,7 +792,10 @@ //* for (j=0; jastrategy.dbcnt; j++) { for (i=0; i<12;i++) if (drive->astrategy.entry[j].MID[i] < 0x20) drive->astrategy.entry[j].MID[i] = 0x20; - printf("S#%02d |%c| DVD%cR [%02X] | %3dX | %13s | %d\n", +// for (i=0; i<12;i++) if (drive->astrategy.entry[j].MID[i] < 0x20 && drive->astrategy.entry[j].MID[i]) drive->astrategy.entry[j].MID[i] = 0x20; + drive->astrategy.entry[j].crap2 = 0; + + printf("S#%02d |%c| DVD%cR [%02X] | %3dX | %12s | %d\n", drive->astrategy.entry[j].number, drive->astrategy.entry[j].enabled ? '*':' ', (drive->astrategy.entry[j].type == 0xA1)? '+':'-', drive->astrategy.entry[j].type, diff -Nru qpxtool-0.7.1.002/lib/qpxscan/include/qpx_scan.h qpxtool-0.7.2/lib/qpxscan/include/qpx_scan.h --- qpxtool-0.7.1.002/lib/qpxscan/include/qpx_scan.h 2010-01-21 10:13:53.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxscan/include/qpx_scan.h 2012-11-21 07:27:54.000000000 +0000 @@ -30,7 +30,6 @@ "/usr/local/lib64/qpxtool", #elif defined (_WIN32) "plugins", - "C:\\Program files\\QPxTool\\plugins", #endif "" }; @@ -93,6 +92,8 @@ int run_dvd_jb(); int run_dvd_ta(); + int run_bd_errc(); + int speed; bool attached; drive_info *dev; diff -Nru qpxtool-0.7.1.002/lib/qpxscan/include/qpx_scan_plugin_api.h qpxtool-0.7.2/lib/qpxscan/include/qpx_scan_plugin_api.h --- qpxtool-0.7.1.002/lib/qpxscan/include/qpx_scan_plugin_api.h 2010-02-17 07:53:59.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxscan/include/qpx_scan_plugin_api.h 2012-11-21 07:27:54.000000000 +0000 @@ -53,6 +53,10 @@ #define CHK_TA_DVD 0x00010000 #define CHK_TA_DVDROM 0x00020000 +#define CHK_RD_BD 0x00040000 +#define CHK_WR_BD 0x00080000 +#define CHK_ERRC_BD 0x00100000 + // ERRC returned data #define ERRC_DATA_BLER 0x01 #define ERRC_DATA_E11 0x02 @@ -61,14 +65,20 @@ #define ERRC_DATA_E12 0x10 #define ERRC_DATA_E22 0x20 #define ERRC_DATA_E32 0x40 + #define ERRC_DATA_PIE 0x06 #define ERRC_DATA_PIF 0x08 #define ERRC_DATA_POE 0x30 #define ERRC_DATA_POF 0x40 + +#define ERRC_DATA_LDC 0x02 +#define ERRC_DATA_BIS 0x10 + #define ERRC_DATA_UNCR 0x80 static const char errc_names_cd[][5] = { "BLER", "E11", "E21", "E31", "E12", "E22", "E32", "UNCR" }; static const char errc_names_dvd[][5] = { "---", "PIE", "PI8", "PIF", "POE", "PO8", "POF", "UNCR" }; +static const char errc_names_bd[][5] = { "---", "LDC", "---", "---", "BIS", "---", "---", "UNCR" }; #define DEV_OK 0 #define DEV_PROBED 1 @@ -86,7 +96,7 @@ class cd_errc { public: - cd_errc() {bler=0; e11=0; e21=0; e31=0; e12=0; e22=0; e32=0; uncr=0;}; + cd_errc() : bler(0), e11(0), e21(0), e31(0), e12(0), e22(0), e32(0), uncr(0) {}; ~cd_errc() {}; inline cd_errc& EMAX(cd_errc& o) { if (blersilent--; + } else if (dev->media.type & DISC_BD) { + printf("Running READ transfer rate test on DVD at speed %d...\n", speed); + rsize=16; + bsize= rsize * 64; // 2M + spd1X = 4500; } else { printf("Can't run read transfer rate test: unsupported media!\n"); return -1; @@ -246,11 +251,7 @@ int argc; char **argv; - if (dev->media.type & DISC_CD) { - printf("Running WRITE transfer rate test for CD at speed %d...\n", speed); - } else if (dev->media.type & DISC_DVD) { - printf("Running WRITE transfer rate test for DVD at speed %d...\n", speed); - } + printf("Running WRITE transfer rate test for CD/DVD/BD at speed %d...\n", speed); // creating argv... argc = 0; @@ -361,6 +362,10 @@ writer = new qpxwriter_dvdram(dev); wsize=32; bsize=1024; spd1X = 1385; + } else if (dev->media.type & (DISC_BD) && dev->media.type != DISC_BD_ROM) { + writer = new qpxwriter_bd(dev); + wsize=32; bsize=1024; + spd1X = 4500; } else { printf("Internal write transfer rate test not implemented for mounted media!"); return -1; @@ -380,8 +385,8 @@ if (dev->media.type & DISC_CD) { printf("Running write transfer rate test on CD at speed %d...\n", dev->parms.write_speed_kb / spd1X); spd1X = 150; - } else if (dev->media.type & DISC_DVD) { - printf("Running write transfer rate test on DVD at speed %d...\n", dev->parms.write_speed_kb / spd1X); + } else if (dev->media.type & (DISC_DVD | DISC_BD)) { + printf("Running write transfer rate test on DVD/BD at speed %d...\n", dev->parms.write_speed_kb / spd1X); } if (writer->open_session()) { @@ -725,11 +730,13 @@ return 0; } +#define MAX_RETRY 16 int qscanner::run_fete() { struct cdvd_ft ft, ft_max, ft_min; long lba=lba_sta; long lbao; + int retry = MAX_RETRY; if (!attached) return -1; if (dev->media.type & DISC_CD) { printf("Running FE/TE test for CD at speed %d...\n", speed); @@ -738,10 +745,12 @@ spd1X = 150; } else if (dev->media.type & DISC_DVD) { printf("Running FE/TE test for DVD at speed %d...\n", speed); -// rsize=16; bsize=128; spd1X = 1385; + } else if (dev->media.type & DISC_BD) { + printf("Running FE/TE test for BD at speed %d...\n", speed); + spd1X = 4500; } else { - printf("Can't run FE/TE test: not supported media!\n"); + printf("Can't run FE/TE test: unsupported media!\n"); return 1; } wait_unit_ready(dev, 6); @@ -757,8 +766,22 @@ for (; (!stop_req) && lbascan_block((void*)&ft,&lba)) { printf("\nBlock scan error! terminating...\n"); stop_req=1; } + if(lba<0) { + if (retry--) + goto block_retry; + printf("\nDrive returned negative LBA %d times! terminating...\n", MAX_RETRY); + stop_req=1; + } + if(lba == lbao) { + if (retry--) + goto block_retry; + printf("\nDrive returned same LBA %d times! terminating...\n", MAX_RETRY); + stop_req=1; + } + retry = MAX_RETRY; gettimeofday(&blke, NULL); ft_max.EMAX(ft); calc_cur_speed(lba-lbao); @@ -808,3 +831,71 @@ return -1; } +// +// BD algo's +// + +int qscanner::run_bd_errc() +{ + bd_errc err, err_tot, err_max; + int errc_data; + long lba=lba_sta; + long lbas; + long lbao; + if (!attached) return -1; + if (!(dev->media.type & DISC_BD)) return 1; +// lba=0; slba=0; + errc_data = plugin->errc_data(); +// seek(dev,lba); + if (plugin->start_test(CHK_ERRC_BD,lba,speed)) { + printf("BD ERRC test init failed!\n"); + return 2; + } + printf("Running BD Error Correction test at speed %d...\n", speed); + + spd1X = 4500; + gettimeofday(&s, NULL); + wait_unit_ready(dev, 6); + lbas = lba; + printf("\nTesting %ld sectors: %ld - %ld\n", lba_end-lba_sta+1, lba_sta, lba_end); + printf(" lba | speed | LDC BIS | UNCR\n"); + for (; (!stop_req) && lbascan_block((void*)&err,&lba)) + { printf("\nBlock scan error! terminating...\n"); stop_req=1; } + err_tot+=err; + err_max.EMAX(err); + gettimeofday(&blke, NULL); + calc_cur_speed(lba-lbao); +// if (!(lba & 0x7F)) { + printf("cur : %7ld | %6.2f X %5d kB/s | %5ld %5ld | %5ld\r", + lba, spdX, spdKB, + err.ldc,err.bis, + err.uncr); +#ifdef USE_FFLUSH + fflush(stdout); +#endif + } + plugin->end_test(); + gettimeofday(&e, NULL); + show_avg_speed(lba); + printf("\n%ld sectors tested: %ld - %ld\n", lba-lba_sta, lba_sta, lba-1); + printf("Test summary:\n"); + printf(" LDC BIS | UNCR\n"); + printf("tot : %5ld %5ld | %5ld\n", + err_tot.ldc,err_tot.bis, + err_tot.uncr); + printf("max : %5ld %5ld | %5ld\n", + err_max.ldc,err_max.bis, + err_max.uncr); + printf("avg : %5.2f %5.2f | %5.2f\n", + err_tot.ldc/(float)(lba>>4),err_tot.bis/(float)(lba>>4), + err_tot.uncr/(float)(lba>>4)); +#ifdef USE_FFLUSH + fflush(stdout); +#endif + return 0; +} + diff -Nru qpxtool-0.7.1.002/lib/qpxscan/qpx_scan.cpp qpxtool-0.7.2/lib/qpxscan/qpx_scan.cpp --- qpxtool-0.7.1.002/lib/qpxscan/qpx_scan.cpp 2010-03-10 13:29:44.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxscan/qpx_scan.cpp 2012-11-21 13:41:44.000000000 +0000 @@ -132,7 +132,7 @@ printf("No media detected!\n"); return 1; } - if (!(dev->media.type & (DISC_CD | DISC_DVD))) { + if (!(dev->media.type & (DISC_CD | DISC_DVD | DISC_BD))) { printf("Unsupported media!\n"); return 2; } @@ -149,6 +149,8 @@ r=run_cd_errc(); } else if (dev->media.type & DISC_DVD) { r=run_dvd_errc(); + } else if (dev->media.type & DISC_BD) { + r=run_bd_errc(); } } else if (!strcmp(test, "jb")) { if (lba_end<0 || lba_end>dev->media.capacity) lba_end = dev->media.capacity-1; diff -Nru qpxtool-0.7.1.002/lib/qpxscan/qpx_writer.cpp qpxtool-0.7.2/lib/qpxscan/qpx_writer.cpp --- qpxtool-0.7.1.002/lib/qpxscan/qpx_writer.cpp 2010-02-03 12:14:01.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxscan/qpx_writer.cpp 2012-11-23 09:59:51.000000000 +0000 @@ -371,3 +371,47 @@ return 0; } +// +// BD-R/RE fonctions +// +int qpxwriter_bd::open_track(uint32_t size) +{ + return (reserve_track(dev,size)); +} + +int qpxwriter_bd::close_track() +{ + flush_cache(dev, 1); + printf("\nWaiting for drive to become ready...\n"); + wait_unit_ready(dev, 300, 1); + return 0; +} + +int qpxwriter_bd::fixate() +{ + if (dev->media.type & (DISC_BD_RE)) { + return fixate_re(); + } else if (dev->media.type & (DISC_BD_R_SEQ | DISC_BD_R_RND)) { + return fixate_r(); + } + return 0; +} + +int qpxwriter_bd::fixate_re() +{ + return 0; +} + +int qpxwriter_bd::fixate_r() +{ + wait_unit_ready(dev, 300, 1); + printf("\nClosing track...\n"); + close_track_session(dev,1, CLOSE_TRACK); // close track + wait_unit_ready(dev, 300, 1); + + printf("\nClosing session...\n"); + close_track_session(dev,1, CLOSE_FINALIZE); // finalize disc + wait_unit_ready(dev, 300, 1); + return 0; +} + diff -Nru qpxtool-0.7.1.002/lib/qpxtransport/common_functions.cpp qpxtool-0.7.2/lib/qpxtransport/common_functions.cpp --- qpxtool-0.7.1.002/lib/qpxtransport/common_functions.cpp 2010-02-10 07:29:15.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxtransport/common_functions.cpp 2010-09-21 18:48:03.000000000 +0000 @@ -1,6 +1,6 @@ /* * This file is part of the QPxTool project. - * Copyright (C) 2005-2009, Gennady "ShultZ" Kozlov + * Copyright (C) 2005-2010, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,55 +17,39 @@ // 64-bit wide functions int64_t bswap64__internal(char* c) { + int64_t *d64; char d[8]; - d[0]=c[7]; - d[1]=c[6]; - d[2]=c[5]; - d[3]=c[4]; - d[4]=c[3]; - d[5]=c[2]; - d[6]=c[1]; - d[7]=c[0]; - return *(int64_t*)d; + d[0]=c[7]; d[1]=c[6]; d[2]=c[5]; d[3]=c[4]; + d[4]=c[3]; d[5]=c[2]; d[6]=c[1]; d[7]=c[0]; + d64 = (int64_t*)d; + return *d64; } uint64_t bswap64u__internal(char* c) { + uint64_t *d64; char d[8]; - d[0]=c[7]; - d[1]=c[6]; - d[2]=c[5]; - d[3]=c[4]; - d[4]=c[3]; - d[5]=c[2]; - d[6]=c[1]; - d[7]=c[0]; - return *(uint64_t*)d; + d[0]=c[7]; d[1]=c[6]; d[2]=c[5]; d[3]=c[4]; + d[4]=c[3]; d[5]=c[2]; d[6]=c[1]; d[7]=c[0]; + d64 = (uint64_t*)d; + return *d64; } int64_t balign64__internal(char* c) { + int64_t *d64; char d[8]; - d[0]=c[0]; - d[1]=c[1]; - d[2]=c[2]; - d[3]=c[3]; - d[4]=c[4]; - d[5]=c[5]; - d[6]=c[6]; - d[7]=c[7]; - return *(int64_t*)d; + d[0]=c[0]; d[1]=c[1]; d[2]=c[2]; d[3]=c[3]; + d[4]=c[4]; d[5]=c[5]; d[6]=c[6]; d[7]=c[7]; + d64 = (int64_t*)d; + return *d64; } uint64_t balign64u__internal(char* c) { + uint64_t *d64; char d[8]; - d[0]=c[0]; - d[1]=c[1]; - d[2]=c[2]; - d[3]=c[3]; - d[4]=c[4]; - d[5]=c[5]; - d[6]=c[6]; - d[7]=c[7]; - return *(uint64_t*)d; + d[0]=c[0]; d[1]=c[1]; d[2]=c[2]; d[3]=c[3]; + d[4]=c[4]; d[5]=c[5]; d[6]=c[6]; d[7]=c[7]; + d64 = (uint64_t*)d; + return *d64; } int64_t qpx_bswap64(char* c) { return bswap64__internal(c); }; @@ -92,39 +76,35 @@ // 32-bit wide functions int32_t bswap32__internal(char* c) { + int32_t *d32; char d[4]; - d[0]=c[3]; - d[1]=c[2]; - d[2]=c[1]; - d[3]=c[0]; - return *(int32_t*)d; + d[0]=c[3]; d[1]=c[2]; d[2]=c[1]; d[3]=c[0]; + d32 = (int32_t*)d; + return *d32; } uint32_t bswap32u__internal(char* c) { + uint32_t *d32; char d[4]; - d[0]=c[3]; - d[1]=c[2]; - d[2]=c[1]; - d[3]=c[0]; - return *(uint32_t*)d; + d[0]=c[3]; d[1]=c[2]; d[2]=c[1]; d[3]=c[0]; + d32 = (uint32_t*)d; + return *d32; } int32_t balign32__internal(char* c) { + int32_t *d32; char d[4]; - d[0]=c[0]; - d[1]=c[1]; - d[2]=c[2]; - d[3]=c[3]; - return *(int32_t*)d; + d[0]=c[0]; d[1]=c[1]; d[2]=c[2]; d[3]=c[3]; + d32 = (int32_t*)d; + return *d32; } uint32_t balign32u__internal(char* c) { + uint32_t *d32; char d[4]; - d[0]=c[0]; - d[1]=c[1]; - d[2]=c[2]; - d[3]=c[3]; - return *(uint32_t*)d; + d[0]=c[0]; d[1]=c[1]; d[2]=c[2]; d[3]=c[3]; + d32 = (uint32_t*)d; + return *d32; } int32_t qpx_bswap32(char* c) { return bswap32__internal(c); }; @@ -150,31 +130,35 @@ // 16-bit wide functions int16_t bswap16__internal(char* c) { + int16_t *d16; char d[2]; - d[0]=c[1]; - d[1]=c[0]; - return *(int16_t*)d; + d[0]=c[1]; d[1]=c[0]; + d16 = (int16_t*)d; + return *d16; } uint16_t bswap16u__internal(char* c) { + uint16_t *d16; char d[2]; - d[0]=c[1]; - d[1]=c[0]; - return *(uint16_t*)d; + d[0]=c[1]; d[1]=c[0]; + d16 = (uint16_t*)d; + return *d16; } int16_t balign16__internal(char* c) { + int16_t *d16; char d[2]; - d[0]=c[0]; - d[1]=c[1]; - return *(int16_t*)d; + d[0]=c[0]; d[1]=c[1]; + d16 = (int16_t*)d; + return *d16; } uint16_t balign16u__internal(char* c) { + uint16_t *d16; char d[2]; - d[0]=c[0]; - d[1]=c[1]; - return *(uint16_t*)d; + d[0]=c[0]; d[1]=c[1]; + d16 = (uint16_t*)d; + return *d16; } int16_t qpx_bswap16(char* c) { return bswap16__internal(c); } diff -Nru qpxtool-0.7.1.002/lib/qpxtransport/include/colors.h qpxtool-0.7.2/lib/qpxtransport/include/colors.h --- qpxtool-0.7.1.002/lib/qpxtransport/include/colors.h 1970-01-01 00:00:00.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxtransport/include/colors.h 2012-12-13 10:46:19.000000000 +0000 @@ -0,0 +1,29 @@ +/* + * This file is part of the QPxTool project. + * Copyright (C) 2012 Gennady "ShultZ" Kozlov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * See the file "COPYING" for the exact licensing terms. + */ + +#ifndef _COLORS_H_INCLUDED +#define _COLORS_H_INCLUDED + +#define COL_GR0 "\E[30;60m" +#define COL_RED "\E[31;60m" +#define COL_GRN "\E[32;60m" +#define COL_YEL "\E[33;60m" +#define COL_BLU "\E[34;60m" +#define COL_VIOL "\E[35;60m" +#define COL_CYAN "\E[36;60m" +#define COL_GR1 "\E[37;60m" +#define COL_NO__ "\E[38;60m" +#define COL_WHITE "\E[39;60m" + +#define COL_NORM "\E[0m" + +#endif + diff -Nru qpxtool-0.7.1.002/lib/qpxtransport/include/common_functions.h qpxtool-0.7.2/lib/qpxtransport/include/common_functions.h --- qpxtool-0.7.1.002/lib/qpxtransport/include/common_functions.h 2009-11-10 13:14:07.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxtransport/include/common_functions.h 2011-07-19 04:41:57.000000000 +0000 @@ -1,6 +1,6 @@ /* * This file is part of the QPxTool project. - * Copyright (C) 2005-2009 Gennady "ShultZ" Kozlov + * Copyright (C) 2005-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -221,7 +221,7 @@ //#elif qpx_BYTE_ORDER == qpx_PDP_ENDIAN #elif BYTE_ORDER == PDP_ENDIAN -#error "PDP endian not supported!" +#error "PDP endian byte order not supported!" #endif @@ -232,14 +232,12 @@ #if defined (_WIN32) - #include - #define msleep(t) Sleep(t) - #define sleep(t) Sleep((t) << 10) - +#include +#define msleep(t) Sleep(t) +#define sleep(t) Sleep((t) << 10) extern int inet_aton(const char *cp, struct in_addr *addr); - #else - #define msleep(t) usleep((t) << 10) +#define msleep(t) usleep((t) << 10) extern int min(int a, int b); extern int max(int a, int b); #endif diff -Nru qpxtool-0.7.1.002/lib/qpxtransport/include/qpx_mmc_defs.h qpxtool-0.7.2/lib/qpxtransport/include/qpx_mmc_defs.h --- qpxtool-0.7.1.002/lib/qpxtransport/include/qpx_mmc_defs.h 2010-02-17 07:57:25.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxtransport/include/qpx_mmc_defs.h 2012-12-03 07:29:52.000000000 +0000 @@ -734,6 +734,12 @@ "unknown", "DVD+RW DL", "DVD+R DL", "unknown" }; +static const str_dev max_rate_tbl[16]={ + "2.52 Mbps", "5.04 Mbps", "10.08 Mbps", "20.16 Mbps", + "30.24 Mbps", "Reserved", "Reserved", "Reserved", + "Reserved", "Reserved", "Reserved", "Reserved", + "Reserved", "Reserved", "Reserved", "Not specified" +}; #define COMMAND_FAILED -0x01 @@ -786,8 +792,8 @@ static const desc64 capabilities[] = { { CAP_REMOVABLE_MEDIA, "Removable media" }, { CAP_COMPOSITE, "Composite out" }, - { CAP_DIGITAL_PORT_1, "Didital port 1" }, - { CAP_DIGITAL_PORT_2, "Didital port 2" }, + { CAP_DIGITAL_PORT_1, "Digital port 1" }, + { CAP_DIGITAL_PORT_2, "Digital port 2" }, { CAP_MULTISESSION, "Multisession" }, { CAP_MODE2_FORM1, "Mode 2 Form 1" }, { CAP_MODE2_FORM2, "Mode 2 Form 2" }, @@ -970,7 +976,8 @@ #define PIO_DVR_109 0x00000010 #define PIO_DVR_110 0x00000020 #define PIO_DVR_111 0x00000040 -#define PIO_DVR_112 0x00000040 +#define PIO_DVR_112 0x00000080 +#define PIO_BDR 0x00000100 //Asus devices #define ASUS_1612 0x00000001 @@ -1001,6 +1008,7 @@ #define LTN_DVDR_G6 0x00000400 #define LTN_DVDR_G7 0x00000800 #define LTN_DVDR_G8 0x00001000 +#define LTN_BDR 0x00002000 #define LTN_iHAx1 0x00002000 #define LTN_iHAx2 0x00004000 diff -Nru qpxtool-0.7.1.002/lib/qpxtransport/include/qpx_mmc.h qpxtool-0.7.2/lib/qpxtransport/include/qpx_mmc.h --- qpxtool-0.7.1.002/lib/qpxtransport/include/qpx_mmc.h 2010-02-09 08:53:04.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxtransport/include/qpx_mmc.h 2012-12-12 12:59:19.000000000 +0000 @@ -127,7 +127,8 @@ MID_type_CD = 1, MID_type_DVDp = 2, MID_type_DVDm = 4, - MID_type_DVDRAM = 8 + MID_type_DVDRAM = 8, + MID_type_BD = 16 }; typedef struct { @@ -138,8 +139,11 @@ uint16_t MID_size; unsigned char MID_raw[4+MID_RAW_MAX]; uint64_t type; // Media subtype - int book_type; // Book type (DVD) - int layers; // Layers num (!CD) + uint8_t book_type; // Book type (DVD) + uint8_t max_rate; + uint8_t disc_size; // indicates 120/80mm disc + uint8_t polarity; // Push-Pull polarity flags per layer for BD (indicates HtL or LtH) + uint8_t layers; // Layers num (!CD) int sectsize; int32_t capacity; // Recorded capacity in sectors msf capacity_msf; @@ -316,6 +320,8 @@ typedef struct { char silent; char limit; + bool peakpower; + char pureread; } pio_quiet; typedef struct { @@ -448,6 +454,7 @@ extern int read_mediaid_dvdram(drive_info* drive); extern int read_mediaid_dvdminus(drive_info* drive); extern int read_mediaid_dvdplus(drive_info* drive); +extern int read_mediaid_bd(drive_info* drive); extern int determine_disc_type(drive_info* drive); extern int mode_sense(drive_info* drive, int page, int page_control, int dest_len); diff -Nru qpxtool-0.7.1.002/lib/qpxtransport/include/qpx_transport.h qpxtool-0.7.2/lib/qpxtransport/include/qpx_transport.h --- qpxtool-0.7.1.002/lib/qpxtransport/include/qpx_transport.h 2009-10-13 07:41:26.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxtransport/include/qpx_transport.h 2012-12-13 10:46:19.000000000 +0000 @@ -8,7 +8,7 @@ // -// modified to use with QPxTool http://qpxtool.sf.net (C) 2005-2009, Gennady "ShultZ" Kozlov +// modified to use with QPxTool http://qpxtool.sf.net (C) 2005-2009,2012, Gennady "ShultZ" Kozlov // #include @@ -64,7 +64,15 @@ #define CREAM_ON_ERRNO(s) do { CREAM_ON_ERRNO_NAKED(s) } while(0) #define FATAL_START(er) (0x80|(er)) -#define ERRCODE(s) ((((s)[2]&0x0F)<<16)|((s)[12]<<8)|((s)[13])) + +#define ERRCODE_FIXED(s) ((((s)[2]&0x0F)<<16)|((s)[12]<<8)|((s)[13])) +#define ERRCODE_DESCR(s) ((((s)[1]&0x0F)<<16)|((s)[2]<<8)|((s)[3])) +#define ERRCODE(s) ((s)[0] == 0x70 || (s)[0] == 0x71 ? \ + ERRCODE_FIXED(s) : \ + ((s)[0] == 0x72 || (s)[0] == 0x73 ? \ + ERRCODE_DESCR(s) : 0)) + +//#define ERRCODE(s) ((((s)[2]&0x0F)<<16)|((s)[12]<<8)|((s)[13])) #define SK(errcode) (((errcode)>>16)&0xF) #define ASC(errcode) (((errcode)>>8)&0xFF) diff -Nru qpxtool-0.7.1.002/lib/qpxtransport/Makefile qpxtool-0.7.2/lib/qpxtransport/Makefile --- qpxtool-0.7.1.002/lib/qpxtransport/Makefile 2009-10-21 10:08:10.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxtransport/Makefile 2012-11-21 12:22:39.000000000 +0000 @@ -6,10 +6,14 @@ sense HDRS = include/qpx_mmc.h \ + include/qpx_mmc_defs.h \ + include/qpx_opcodes.h \ include/qpx_transport.h \ include/common_functions.h \ include/threads.h \ - include/sense.h + include/sense.h \ + include/csstables.h \ + include/colors.h LIBN = qpxtransport SRCS = $(patsubst %,%.cpp, $(SRC)) diff -Nru qpxtool-0.7.1.002/lib/qpxtransport/qpx_mmc.cpp qpxtool-0.7.2/lib/qpxtransport/qpx_mmc.cpp --- qpxtool-0.7.1.002/lib/qpxtransport/qpx_mmc.cpp 2010-03-10 13:26:30.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxtransport/qpx_mmc.cpp 2012-12-13 10:46:19.000000000 +0000 @@ -1,6 +1,6 @@ /* * This file is part of the QPxTool project. - * Copyright (C) 2005-2009 Gennady "ShultZ" Kozlov + * Copyright (C) 2005-2012 Gennady "ShultZ" Kozlov * * original version of CD-R(W) manufacturer identification code got from cdrecord, (C) Joerg Schilling * @@ -19,8 +19,8 @@ #include //#include -//#include "transport.hxx" #include "qpx_mmc.h" +#include "colors.h" #define SPINUP_REVERSE //#define MODE_PAGES_DEBUG @@ -740,7 +740,7 @@ } } #endif - printf("** Scan compleete: %d device(s) found\n", drvcnt); + printf("** Scan complete: %d device(s) found\n", drvcnt); return (drvcnt); } @@ -1802,7 +1802,7 @@ drive->media.capacity_total = phend - phsta + 1; return 0; } - } else if (drive->media.type & DISC_DVDplus) { + } else if (drive->media.type & (DISC_DVDplus | DISC_BD)) { if (drive->media.type & (DISC_DVDpRW | DISC_DVDpRWDL)) { #warning DVD+RW total sectors reading } else { @@ -1869,6 +1869,7 @@ } int read_capacities(drive_info* drive) { + if (!drive->media.type) return 0; // read_disc_info(drive, 24); // drive->media.last_lead_out = (drive->rd_buf[20]&0xFF) << 24 | drive->rd_buf[21]*75*60 + drive->rd_buf[22]*75 + drive->rd_buf[23]; if (read_capacity(drive)) printf("Error reading used capacity\n"); @@ -1962,8 +1963,59 @@ return (DISC_CDR | cd_subtype); } +int read_mediaid_bd(drive_info* drive) { + int i; + unsigned int len; + memset(drive->media.MID, 0, 20); + + for (int i=0; iparms.wr_speed_tbl_media[i] = -1; + + drive->cmd[0] = MMC_READ_DVD_STRUCTURE; + drive->cmd[1] = 1; // media type = BD + drive->cmd[7] = 0x00; + drive->cmd[8] = 0; + drive->cmd[9] = 4; + drive->cmd[11] = 0; + if ((drive->err = drive->cmd.transport(READ,drive->rd_buf,4))) + {if (!drive->silent) sperror ("READ_BD_STRUCTURE 00",drive->err); return 1;} + len = (drive->rd_buf[0]<<8|drive->rd_buf[1]) + 2; + if (len>128) len= 128; + drive->cmd[0] = MMC_READ_DVD_STRUCTURE; + drive->cmd[1] = 1; // media type = BD + drive->cmd[7] = 0x00; + drive->cmd[8] = len>>8; + drive->cmd[9] = len & 0xFF; + drive->cmd[11] = 0; + if ((drive->err = drive->cmd.transport(READ,drive->media.MID_raw,len))) + {if (!drive->silent) sperror ("READ_BD_STRUCTURE 00",drive->err); return 1;} + drive->media.MID_size = len-4; + + if(drive->media.MID_raw[4] != 'D' || drive->media.MID_raw[4+1] != 'I') { + printf("READ_BD_STRUCTURE: got some data, but not disc info\n"); + return 2; + } + drive->media.disc_size = drive->media.MID_raw[4+11] >> 6; + drive->media.polarity = drive->media.MID_raw[4+14]; + + if (drive->media.type & DISC_BD_ROM) { + if (!drive->silent) + printf(COL_YEL "BD-ROM does not contain media ID" COL_NORM "\n"); + return 0; + } + memcpy(drive->media.MID, drive->media.MID_raw + 4+100,6); + i = strlen(drive->media.MID); + drive->media.MID[i++]='-'; + memcpy(drive->media.MID+i, drive->media.MID_raw + 4+100+6,3); + i = strlen(drive->media.MID); + drive->media.MID[i++]='/'; + sprintf(drive->media.MID+i, "%03d", drive->media.MID_raw[4+111]); + + drive->media.MID_type = MID_type_BD; + return 0; +} + int read_mediaid_dvd(drive_info* drive){ - drive->media.MID[0]=0; + memset(drive->media.MID, 0, 20); for (int i=0; iparms.wr_speed_tbl_media[i] = -1; // if (drive->media.type & DISC_DVDRAM) { @@ -2011,14 +2063,13 @@ drive->media.MID_size = len-4; memcpy(drive->media.MID, drive->media.MID_raw + 4+597,16); - drive->media.MID[12]=0; for (i=0; i<12; i++) if(drive->media.MID[i] == 0) drive->media.MID[i]=0x20; drive->media.MID_type = MID_type_DVDRAM; return 0; } - + int read_mediaid_dvdminus(drive_info* drive){ int i; unsigned int len; @@ -2043,21 +2094,16 @@ {if (!drive->silent) sperror ("READ_DVD_STRUCTURE 0E",drive->err); return 1;} drive->media.MID_size = len-4; -// drive->media.MID[0] = 0; memcpy(drive->media.MID, drive->media.MID_raw + 4+17,6); + i = strlen(drive->media.MID); + drive->media.MID[i++]='-'; + memcpy(drive->media.MID+i, drive->media.MID_raw + 4+25,6); /* - drive->media.MID[6]='-'; - memcpy(drive->media.MID+7, drive->media.MID_raw + 29,6); - drive->media.MID[12]=0; -*/ - memcpy(drive->media.MID+6, drive->media.MID_raw + 4+25,6); - drive->media.MID[11]=0; -// drive->media.MID[12]='-'; -// memcpy(drive->media.MID+13, drive->media.MID_raw + 37,6); -// drive->media.MID[18]=0; - - for (i=0; i<12; i++) if(drive->media.MID[i] == 0) drive->media.MID[i]=0x20; + i = strlen(drive->media.MID); + drive->media.MID[i++]='-'; + memcpy(drive->media.MID+i, drive->media.MID_raw + 4+33,6); +*/ drive->media.MID_type = MID_type_DVDm; return 0; } @@ -2085,16 +2131,15 @@ {if (!drive->silent) sperror ("READ_DVD_STRUCTURE 11",drive->err); return 1;} drive->media.MID_size = len-4; -// drive->media.MID[0] = 0; memcpy(drive->media.MID, drive->media.MID_raw + 4+19,8); - drive->media.MID[8]='-'; - memcpy(drive->media.MID+9, drive->media.MID_raw + 4+27,3); - drive->media.MID[12]='-'; - sprintf(drive->media.MID+13, "%03d", drive->media.MID_raw[4+30]); - drive->media.MID[16]=0; + i = strlen(drive->media.MID); + drive->media.MID[i++]='-'; + memcpy(drive->media.MID+i, drive->media.MID_raw + 4+27,3); + i = strlen(drive->media.MID); + drive->media.MID[i++]='/'; + sprintf(drive->media.MID+i, "%03d", drive->media.MID_raw[4+30]); - for (i=0; i<12; i++) if(drive->media.MID[i] == 0) drive->media.MID[i]=0x20; drive->media.MID_type = MID_type_DVDp; // process manufacturer defined write speeds... @@ -2111,7 +2156,6 @@ wr_idx++; } } - return 0; } @@ -2144,6 +2188,10 @@ // int current = 0; // int i=0; drive->media.type = DISC_NODISC; + drive->media.book_type = 0; + drive->media.layers = 1; + drive->media.max_rate = 0x0F; + drive->media.disc_size = 0; drive->media.MID_type = MID_type_NONE; drive->media.MID_size = 0; // drive->media.type = Media_NoMedia; @@ -2189,7 +2237,6 @@ if (!drive->silent) printf("** MID: '%s'\n",drive->media.MID); return 0; } else if (drive->media.type & DISC_DVD) { -// drive->media.type=Media_DVD; drive->rd_buf[4]=0; drive->cmd[0] = MMC_READ_DVD_STRUCTURE; drive->cmd[7] = 0;//0x11; //dvd_dash; @@ -2198,10 +2245,12 @@ if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,36))) if (!drive->silent) sperror ("READ_DVD_STRUCTURE",drive->err); drive->media.book_type = (drive->rd_buf[4] & 0xFF); + drive->media.max_rate = (drive->rd_buf[5] & 0x0F); + drive->media.disc_size = ((drive->rd_buf[5] & 0xF0) >> 4); drive->media.layers = 1 + ((drive->rd_buf[6] & 0x60) >> 5); read_mediaid_dvd(drive); if (!drive->silent) printf("** MID: '%s'\n",drive->media.MID); - if ((!(drive->wr_capabilities & DEVICE_DVD))||(drive->media.type & DISC_DVDROM)) { + if ((!(drive->wr_capabilities & DEVICE_DVD)) && (drive->media.type & DISC_DVDROM)) { if (!drive->silent) { printf("Device can't write DVD's or media detected as DVD-ROM,\n"); printf("trying to corectly detect DVD type...\n"); @@ -2264,11 +2313,22 @@ printf("\n"); */ return 0; + } else if (drive->media.type & DISC_BD) { + drive->rd_buf[4]=0; + drive->cmd[0] = MMC_READ_DVD_STRUCTURE; + drive->cmd[7] = 0;//0x11; //dvd_dash; + drive->cmd[9] = 36; + drive->cmd[11] = 0; + if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,36))) + if (!drive->silent) sperror ("READ_DVD_STRUCTURE",drive->err); + drive->media.book_type = 0; + drive->media.layers = 1 + ((drive->rd_buf[6] & 0x60) >> 5); + read_mediaid_bd(drive); + if (!drive->silent) printf("** MID: '%s'\n",drive->media.MID); } } else { read_capacity(drive); if (drive->media.capacity) { -// drive->media.type=Media_CD; drive->media.type = DISC_CDROM; read_disc_information(drive); } @@ -2383,8 +2443,9 @@ // speedidx = 0; // printf("media.type & DISC_CD = %LX\n", drive->media.type & DISC_CD ); // printf("media.type & DISC_DVD = %LX\n", drive->media.type & DISC_DVD ); - if ( drive->media.type & DISC_DVD ) { - drive->parms.read_speed_kb=22162; + if ( drive->media.type & (DISC_DVD | DISC_BD)) { + bool BD = !!(drive->media.type & DISC_BD); + drive->parms.read_speed_kb= BD ? 71920 : 22162; if (!set_rw_speeds(drive)) { get_rw_speeds(drive); if (!drive->silent) printf("Max DVD speed via GET_CD_SPEED: %dkB/s\n", @@ -2406,14 +2467,14 @@ if (drive->parms.speed_mult < 600) { drive->parms.speed_mult = 176.4; } else { - drive->parms.max_read_speed_dvd = (drive->parms.max_read_speed_kb/1384); - drive->parms.speed_mult = 1385; + drive->parms.max_read_speed_dvd = (drive->parms.max_read_speed_kb/ (BD ? 4494 : 1384) ); + drive->parms.speed_mult = BD ? 4495 : 1385; } } else { drive->parms.max_read_speed_kb = drive->parms.read_speed_kb; if (!drive->silent) printf("GET_PERFORMANCE error: using default multiplier\n"); - drive->parms.max_read_speed_dvd = (drive->parms.max_read_speed_kb/1385); - drive->parms.speed_mult = 1385; + drive->parms.speed_mult = BD ? 4495 : 1385; + drive->parms.max_read_speed_dvd = (drive->parms.max_read_speed_kb/drive->parms.speed_mult); } // drive->parms.read_speed_kb = spd_kb; // set_rw_speeds(drive); @@ -2574,8 +2635,8 @@ if (!drive->silent) printf("Requesting curerent speeds via page 2A...\n"); if (!mode_sense(drive, MODE_PAGE_MM_CAP_STATUS, 00, 256)) { offs=0; while (((drive->rd_buf[offs]) & 0x3F) != 0x2A) offs++; - drive->parms.read_speed_kb = ntoh16(drive->rd_buf+offs+14); - drive->parms.write_speed_kb = ntoh16(drive->rd_buf+offs+28); + drive->parms.read_speed_kb = ntoh16u(drive->rd_buf+offs+14); + drive->parms.write_speed_kb = ntoh16u(drive->rd_buf+offs+28); return 0; } drive->parms.read_speed_kb = 0; @@ -2683,7 +2744,7 @@ int start_stop(drive_info* drive, bool start) { drive->cmd[0]=MMC_START_STOP_UNIT; - drive->cmd[4]=0x01 | start; + drive->cmd[4]= start ? 0x01 : 0; if ((drive->err=drive->cmd.transport(NONE,NULL,0))) { sperror ("START_STOP_UNIT",drive->err); return (drive->err); } return 0; @@ -2691,8 +2752,8 @@ int load_eject(drive_info* drive, bool load, bool IMMED) { drive->cmd[0]=MMC_START_STOP_UNIT; - drive->cmd[1]= IMMED ? 0x01 : 0x00; - drive->cmd[4]=0x02 | load; + drive->cmd[1]= IMMED ? 0x01 : 0; + drive->cmd[4]= load ? 0x02 : 0; if ((drive->err=drive->cmd.transport(NONE,NULL,0))) { if (drive->err != 0x55302) @@ -2703,8 +2764,8 @@ set_lock(drive); drive->cmd[0]=MMC_START_STOP_UNIT; - drive->cmd[1]= IMMED ? 0x01 : 0x00; - drive->cmd[4]=0x02 | load; + drive->cmd[1]= IMMED ? 0x01 : 0; + drive->cmd[4]= load ? 0x02 : 0; if ((drive->err=drive->cmd.transport(NONE,NULL,0))) { sperror ("LOAD_EJECT",drive->err); return (drive->err); } } @@ -2879,21 +2940,13 @@ drive->media.writer[0]=0; drive->rd_buf[8]=0; drive->cmd[0]=MMC_READ_DVD_STRUCTURE; - drive->cmd[5]=0x62; + drive->cmd[5]=0x02; drive->cmd[7]=format; drive->cmd[8]=8; drive->cmd[9]=8; if ((drive->err = drive->cmd.transport(READ,drive->rd_buf,2056)) || (!drive->rd_buf[8])) { - printf("Read Writer Info Method 1 failed\n"); - drive->cmd[0]=MMC_READ_DVD_STRUCTURE; - drive->cmd[5]=0x02; - drive->cmd[7]=format; - drive->cmd[8]=8; - drive->cmd[9]=8; - if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,2056))) { - printf("Read Writer Info Method 2 failed\n"); - return 1; - } + printf("Read Writer Info failed\n"); + return 1; } for (int i=0; i<0x3F; i++) { if (!drive->rd_buf[8+i]) drive->rd_buf[8+i]=0x20; @@ -2952,19 +3005,19 @@ switch (drive->mmc) { case 3: - drive->parms.write_speed_kb=drive->rd_buf[37] << 8 | drive->rd_buf[36]; + drive->parms.write_speed_kb = ntoh16u(drive->rd_buf+36); case 2: if (drive->rd_buf[offs+2] & 0x08)drive->rd_capabilities|=DEVICE_DVD_ROM; if (drive->rd_buf[offs+2] & 0x10)drive->rd_capabilities|=DEVICE_DVD_R; if (drive->rd_buf[offs+2] & 0x20)drive->rd_capabilities|=DEVICE_DVD_RAM; if (drive->rd_buf[offs+3] & 0x10)drive->wr_capabilities|=DEVICE_DVD_R; if (drive->rd_buf[offs+3] & 0x20)drive->wr_capabilities|=DEVICE_DVD_RAM; -// break; case 1: - drive->parms.max_read_speed_kb=drive->rd_buf[offs+9] <<8 | drive->rd_buf[offs+8]; - drive->parms.read_speed_kb=drive->rd_buf[offs+15] <<8 | drive->rd_buf[offs+14]; - drive->parms.max_write_speed_kb=drive->rd_buf[offs+19] <<8 | drive->rd_buf[offs+19]; - drive->parms.write_speed_kb=drive->rd_buf[offs+21] << 8 | drive->rd_buf[offs+20]; + drive->parms.max_read_speed_kb = ntoh16u(drive->rd_buf+offs+8); + drive->parms.read_speed_kb = ntoh16u(drive->rd_buf+offs+14); + drive->parms.max_write_speed_kb = ntoh16u(drive->rd_buf+offs+18); + if (drive->mmc < 3) + drive->parms.write_speed_kb = ntoh16u(drive->rd_buf+offs+20); break; } if (!drive->silent) printf("Max speeds:\tR@%dKBps / W@%dKBps\nCurrent speeds:\tR@%dKBps / W@%dKBps\n", diff -Nru qpxtool-0.7.1.002/lib/qpxtransport/qpx_transport.cpp qpxtool-0.7.2/lib/qpxtransport/qpx_transport.cpp --- qpxtool-0.7.1.002/lib/qpxtransport/qpx_transport.cpp 2009-10-13 07:40:42.000000000 +0000 +++ qpxtool-0.7.2/lib/qpxtransport/qpx_transport.cpp 2012-11-22 07:13:00.000000000 +0000 @@ -12,6 +12,7 @@ // #include +#include "colors.h" #include "qpx_transport.h" const unsigned char scsi_command_size[8] = @@ -102,9 +103,9 @@ NULL ); if (str) - fprintf (stderr,"%s: %s",str,lpMsgBuf); + fprintf (stderr, COL_RED "%s: %s" COL_NORM,str,lpMsgBuf); else - fprintf (stderr,"%s",lpMsgBuf); + fprintf (stderr, COL_RED "%s" COL_NORM,lpMsgBuf); LocalFree(lpMsgBuf); } @@ -120,10 +121,10 @@ sense2str(err, sense_str); if (err==-1) { - fprintf (stderr,"\n:-( unable to %s : [%d] ", cmd, saved_errno); + fprintf (stderr, COL_RED "\n:-( unable to %s : [%d] " COL_NORM, cmd, saved_errno); errno=saved_errno, perror (NULL); } else - fprintf (stderr,"\n:-[ %s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh]: %s\n", + fprintf (stderr, COL_RED "\n:-[ %s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh]: %s\n" COL_NORM, cmd, SK(err), ASC(err), ASCQ(err),sense_str); } diff -Nru qpxtool-0.7.1.002/Makefile qpxtool-0.7.2/Makefile --- qpxtool-0.7.1.002/Makefile 2010-03-23 10:51:37.000000000 +0000 +++ qpxtool-0.7.2/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ -PREFIX = /usr -BINDIR = /usr/bin -SBINDIR = /usr/sbin -LIBDIR = /usr/lib -PLUGINDIR = /usr/lib/qpxtool -INCDIR = /usr/include -MANDIR = /usr/share/man - -BINSUFF = -LIBS_HW = -LIBS_INET = -LIBS_DL = -ldl -LIBS_THREAD = -lpthread - -LPNG_INC = -I/usr/include/libpng12 -LPNG_LIB = -L/usr/lib -lpng12 - - -CXXFLAGS += -Wall -O2 -fPIC -DUSE_LIBPNG -CFLAGS += -Wall -O2 -fPIC -DUSE_LIBPNG -# additional debug options -CXXFLAGS += -g -CFLAGS += -g -export PREFIX BINDIR SBINDIR LIBDIR PLUGINDIR INCDIR MANDIR BINSUFF LIBS_HW LIBS_INET LIBS_DL LIBS_THREAD -export LPNG_INC LPNG_LIB -export CXXFLAGS CFLAGS - -all: cli gui -cli: lib console plugins man - -lib: - $(MAKE) -C lib - -console: lib - $(MAKE) -C console - -plugins: lib - $(MAKE) -C plugins - -man: - $(MAKE) -C man - - -gui: lib - $(MAKE) -C gui - -clean: - $(MAKE) -C lib clean - $(MAKE) -C console clean - $(MAKE) -C plugins clean - $(MAKE) -C man clean - $(MAKE) -C gui clean - -install: all cli_install gui_install - -cli_install: - $(MAKE) -C lib install - $(MAKE) -C console install - $(MAKE) -C plugins install - $(MAKE) -C man install - -gui_install: - $(MAKE) -C gui install - -uninstall: cli_uninstall gui_uninstall - -cli_uninstall: - $(MAKE) -C lib uninstall - $(MAKE) -C console uninstall - $(MAKE) -C plugins uninstall - $(MAKE) -C man uninstall - -gui_uninstall: - $(MAKE) -C gui uninstall - -help: - @echo "" - @echo "Alailable targets:" - @echo "all - build all" - @echo "cli - build libs and console tools" - @echo "gui - build gui only" - @echo "install - install all" - @echo "cli_install - install libs and console tools" - @echo "gui_install - install gui only" - @echo "" - @echo "clean - clean source tree from object files" - @echo "uninstall - uninstall all" - @echo "cli_uninstall - uninstall libs and console tools" - @echo "gui_uninstall - uninstall gui only" - -.PHONY: all clean cli lib console plugins man nogui gui install cli_install gui_install uninstall cli_uninstall gui_uninstall help diff -Nru qpxtool-0.7.1.002/plugins/benq/qscan_cmd.cpp qpxtool-0.7.2/plugins/benq/qscan_cmd.cpp --- qpxtool-0.7.1.002/plugins/benq/qscan_cmd.cpp 2010-02-04 08:28:53.000000000 +0000 +++ qpxtool-0.7.2/plugins/benq/qscan_cmd.cpp 2012-12-07 07:40:53.000000000 +0000 @@ -115,8 +115,6 @@ return (cmd_get_result()); } - -#ifdef BENQ_ENABLE_FETE int scan_benq::cmd_start_fete(int lba) { dev->cmd[0] = 0xFD; @@ -141,7 +139,6 @@ } return 0; } -#endif // ************* Scan init commands ********* int scan_benq::cmd_cd_errc_init(int &speed) @@ -243,12 +240,24 @@ return 0; } - -#ifdef BENQ_ENABLE_FETE int scan_benq::cmd_dvd_fete_init(int &speed) { int r; + dev->cmd[0] = 0xFD; + dev->cmd[1] = 0xF1; + dev->cmd[2] = 0x42; + dev->cmd[3] = 0x45; + dev->cmd[4] = 0x4E; + dev->cmd[5] = 0x51; +#ifdef _BENQ_DEBUG + printf("benq_check_mode_init\n"); +#endif + if ((dev->err=dev->cmd.transport(NONE,NULL,0))){ + if(!dev->silent) sperror ("benq_check_mode_init",dev->err); + return dev->err; + } + // 0x13 16X // 0x12 12X // 0x11 10X ? @@ -286,7 +295,6 @@ } return (cmd_start_fete(0x030000)); } -#endif // ************ Scan commands *********** int scan_benq::cmd_read_block() @@ -459,7 +467,6 @@ return 0; } -#ifdef BENQ_ENABLE_FETE int scan_benq::cmd_dvd_fete_block(cdvd_ft *data) { dev->cmd[0] = 0xFD; @@ -483,10 +490,9 @@ data->te = (ntoh16(dev->rd_buf+3) + 5) / 10; data->fe = (ntoh16(dev->rd_buf+5) + 5) / 10; - lba+=16; + lba+=0x1000; return 0; } -#endif // ************* END SCAN COMMAND ********* int scan_benq::cmd_cd_end() diff -Nru qpxtool-0.7.1.002/plugins/benq/qscan_plugin.cpp qpxtool-0.7.2/plugins/benq/qscan_plugin.cpp --- qpxtool-0.7.1.002/plugins/benq/qscan_plugin.cpp 2010-02-17 07:42:58.000000000 +0000 +++ qpxtool-0.7.2/plugins/benq/qscan_plugin.cpp 2012-12-07 07:40:53.000000000 +0000 @@ -90,13 +90,11 @@ switch (itest) { case CHK_ERRC: return 0; -#ifdef BENQ_ENABLE_FETE case CHK_FETE: // if (dev->media.dstatus) return -1; if (dev->media.type & DISC_DVD & ~DISC_DVDROM) return 0; break; -#endif default: break; } @@ -113,14 +111,11 @@ if (dev->media.type & DISC_DVD) return (int*)SPEEDS_ERRC_DVD; break; -#ifdef BENQ_ENABLE_FETE -#if 0 case CHK_FETE: if (dev->media.type & DISC_DVD) - return (int*)SPEEDS_FETE_DVD; + // just use available write speeds for FE/TE test + return NULL; break; -#endif -#endif default: break; } @@ -140,7 +135,6 @@ lba=ilba; r = cmd_dvd_errc_init(speed); break; -#ifdef BENQ_ENABLE_FETE case CHK_FETE: // if (dev->media.dstatus) return -1; if (dev->media.type & DISC_DVD & ~DISC_DVDROM) { @@ -150,7 +144,6 @@ } else { return 0; } -#endif default: return -1; } @@ -175,14 +168,12 @@ r = cmd_dvd_errc_block((dvd_errc*)data); if(ilba) *ilba = lba; return r; -#ifdef BENQ_ENABLE_FETE case CHK_FETE: if (dev->media.type & DISC_DVD & ~DISC_DVDROM) { r = cmd_dvd_fete_block((cdvd_ft*)data); } else { return -1; } -#endif default: return -1; } @@ -198,11 +189,9 @@ case CHK_ERRC_DVD: r = cmd_dvd_end(); break; -#ifdef BENQ_ENABLE_FETE case CHK_FETE: r = cmd_check_mode_exit(); break; -#endif default: break; } diff -Nru qpxtool-0.7.1.002/plugins/benq/qscan_plugin.h qpxtool-0.7.2/plugins/benq/qscan_plugin.h --- qpxtool-0.7.1.002/plugins/benq/qscan_plugin.h 2010-02-02 09:52:18.000000000 +0000 +++ qpxtool-0.7.2/plugins/benq/qscan_plugin.h 2012-12-07 07:40:53.000000000 +0000 @@ -13,18 +13,16 @@ #ifndef __QSCAN_BENQ_H #define __QSCAN_BENQ_H -//#define BENQ_ENABLE_FETE - #include "qpx_scan_plugin_api.h" static const drivedesclist drivelist = //static drivedesclist drivelist = { - { "BENQ ", DEV_BENQ_WR, "DVD DD DW1620", BENQ_DW1620, CHK_ERRC_CD | CHK_ERRC_DVD }, - { "BENQ ", DEV_BENQ_WR, "DVD DD DW1625", BENQ_DW1625, CHK_ERRC_CD | CHK_ERRC_DVD }, - { "BENQ ", DEV_BENQ_WR, "DVD DD DW1640", BENQ_DW1640, CHK_ERRC_CD | CHK_ERRC_DVD }, - { "BENQ ", DEV_BENQ_WR, "DVD DD DW1650", BENQ_DW1650, CHK_ERRC_CD | CHK_ERRC_DVD }, - { "BENQ ", DEV_BENQ_WR, "DVD DD DW1655", BENQ_DW1655, CHK_ERRC_CD | CHK_ERRC_DVD }, + { "BENQ ", DEV_BENQ_WR, "DVD DD DW1620", BENQ_DW1620, CHK_ERRC_CD | CHK_ERRC_DVD | CHK_FETE}, + { "BENQ ", DEV_BENQ_WR, "DVD DD DW1625", BENQ_DW1625, CHK_ERRC_CD | CHK_ERRC_DVD | CHK_FETE}, + { "BENQ ", DEV_BENQ_WR, "DVD DD DW1640", BENQ_DW1640, CHK_ERRC_CD | CHK_ERRC_DVD | CHK_FETE}, + { "BENQ ", DEV_BENQ_WR, "DVD DD DW1650", BENQ_DW1650, CHK_ERRC_CD | CHK_ERRC_DVD | CHK_FETE}, + { "BENQ ", DEV_BENQ_WR, "DVD DD DW1655", BENQ_DW1655, CHK_ERRC_CD | CHK_ERRC_DVD | CHK_FETE}, // // Plextor PX-740 only works if crossflashed to BENQ DW1640 // { "PLEXTOR ", DEV_BENQ_WR, "DVDR PX-740", BENQ_DW1640, CHK_ERRC_CD | CHK_ERRC_DVD }, @@ -75,10 +73,8 @@ int cmd_dvd_errc_block(dvd_errc *data); int cmd_dvd_end(); -#ifdef BENQ_ENABLE_FETE int cmd_dvd_fete_init(int &speed); int cmd_dvd_fete_block(cdvd_ft *data); -#endif unsigned char sidx; }; diff -Nru qpxtool-0.7.1.002/plugins/liteon/qscan_cmd.cpp qpxtool-0.7.2/plugins/liteon/qscan_cmd.cpp --- qpxtool-0.7.1.002/plugins/liteon/qscan_cmd.cpp 2010-01-26 08:07:04.000000000 +0000 +++ qpxtool-0.7.2/plugins/liteon/qscan_cmd.cpp 2012-12-11 07:56:40.000000000 +0000 @@ -19,13 +19,15 @@ #include #include #include +#include #include // ************* Scan init commands ********* -int scan_liteon::cmd_cd_errc_init() { +int scan_liteon::cmd_cd_errc_init_old() { dev->cmd[0] = 0xDF; dev->cmd[1] = 0xA3; + dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_init_A_cx_scan",dev->err); return 1; } @@ -34,6 +36,7 @@ dev->cmd[0] = 0xDF; dev->cmd[1] = 0xA0; dev->cmd[4] = 0x02; + dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_init_B_cx_scan",dev->err); return 1; } @@ -41,6 +44,7 @@ dev->cmd[0] = 0xDF; dev->cmd[1] = 0xA0; + dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_init_C_cx_scan",dev->err); return 1; } @@ -49,6 +53,7 @@ dev->cmd[0] = 0xDF; dev->cmd[1] = 0xA0; dev->cmd[4] = 0x04; + dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_init_D_cx_scan",dev->err); return 1; } @@ -57,75 +62,155 @@ dev->cmd[0] = 0xDF; dev->cmd[1] = 0xA0; dev->cmd[4] = 0x02; + dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_init_E_cx_scan",dev->err); return 1; } -// printf("LiteOn_init_E_cx_scan: OK\n"); + printf(COL_YEL "LiteOn: using OLD CD ERRC commands" COL_NORM "\n"); + return 0; +} + +int scan_liteon::cmd_cd_errc_init_new() { +// seek to first sector + if (seek(dev, 0)) + return 1; +// check if ERRC command works + dev->cmd[0] = 0xF3; + dev->cmd[1] = 0x0E; + dev->cmd[11] = 0x00; + if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,0x10))) { + sperror ("LiteOn_errc_cd_probe NEW",dev->err); + cd_errc_new = false; + return 1; + } + return 0; +} + +int scan_liteon::cmd_cd_errc_init() { + cd_errc_new = true; + if (cmd_cd_errc_init_new()) + return cmd_cd_errc_init_old(); + printf(COL_GRN "LiteOn: using new CD ERRC commands" COL_NORM "\n"); return 0; } int scan_liteon::cmd_dvd_errc_init() { -// 2B 00 00 00 00 00 00 00 00 00 - dev->cmd[0] = 0x2B; - if ((dev->err=dev->cmd.transport(NONE,NULL,0))){ - sperror ("LiteOn_init_pi_scan",dev->err); return 1; +// seek to first sector + if (seek(dev, 0)) + return 1; +// check if ERRC command works + dev->cmd[0] = 0xF3; + dev->cmd[1] = 0x0E; + dev->cmd[8] = 0x10; + dev->cmd[11]= 0x00; + if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,0x10))){ + sperror ("LiteOn_errc_dvd_probe",dev->err); return 1; + } + return 0; +} + +int scan_liteon::cmd_bd_errc_init() { +// seek to first sector + if (seek(dev, 0)) + return 1; +// check if ERRC command works + dev->cmd[0] = 0xF3; + dev->cmd[1] = 0x0E; + dev->cmd[11] = 0x00; + if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,0x10))){ + sperror ("LiteOn_errc_bd_probe",dev->err); return 1; + } + return 0; +} + +// fe/te data redout +int scan_liteon::cmd_fete_get_data(cdvd_ft *data) { + dev->cmd[0] = 0xDF; + dev->cmd[1] = 0x08; + dev->cmd[2] = 0x02; + dev->cmd[11]= 0x00; + if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,65536))){ + sperror ("LiteOn_FETE get data",dev->err); return 1; + } + data->te=dev->rd_buf[0]; + data->fe=dev->rd_buf[1]; + return 0; +} + +// current position readout for fe/te +int scan_liteon::cmd_fete_get_position() { + dev->cmd[0] = 0xDF; + dev->cmd[1] = 0x02; + dev->cmd[2] = 0x09; + dev->cmd[11]= 0x00; + if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,65536))){ + sperror ("LiteOn_FETE get LBA",dev->err); return 1; } -// printf("LiteOn_init_pi_scan: OK\n"); return 0; } -int scan_liteon::cmd_dvd_fete_init() { -// scan command +int scan_liteon::cmd_cd_fete_init(int& speed) { +// start scan command dev->cmd[0] = 0xDF; dev->cmd[1] = 0x08; dev->cmd[2] = 0x01; + dev->cmd[4] = 0x02; // CD - dev->cmd[3] = 0x03; -/* - dev->cmd[3] = ((lba+0x031000) >> 16) & 0xFF; - dev->cmd[4] = ((lba+0x0100) >> 8) & 0xFF; - dev->cmd[5] = lba & 0xFF; -*/ - dev->cmd[7] = 0x08; // speed or interval ? - dev->cmd[8] = 0x00; // 8X or 4M (2048 sectors) + dev->cmd[7] = speed & 0xFF; + dev->cmd[11]= 0x00; memset(dev->rd_buf,0,16); + if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,16))){ + sperror ("LiteOn_FETE_init scan",dev->err); return 1; + } + return 0; +} - dev->rd_buf[0] = 0x08; - dev->rd_buf[1] = 0x02; - dev->rd_buf[4] = 0x25; - dev->rd_buf[5] = 0x0F; - dev->rd_buf[6] = 0x02; - dev->rd_buf[9] = 0x03; - dev->rd_buf[13] = 0x26; - dev->rd_buf[14] = 0x12; - dev->rd_buf[15] = 0x7F; +int scan_liteon::cmd_dvd_fete_init(int& speed) { +// start scan command + dev->cmd[0] = 0xDF; + dev->cmd[1] = 0x08; + dev->cmd[2] = 0x01; + dev->cmd[3] = 0x03; // DVD + dev->cmd[7] = speed & 0xFF; + dev->cmd[11]= 0x00; + + memset(dev->rd_buf,0,16); if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,16))){ sperror ("LiteOn_FETE_init scan",dev->err); return 1; } + return 0; +} -// fe/te data redout +int scan_liteon::cmd_bd_fete_init(int& speed) { +// start scan command dev->cmd[0] = 0xDF; dev->cmd[1] = 0x08; - dev->cmd[2] = 0x02; - if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,65536))){ - sperror ("LiteOn_FETE_init get data",dev->err); return 1; - } + dev->cmd[2] = 0x01; -// current lba redout - dev->cmd[0] = 0xDF; - dev->cmd[1] = 0x02; - dev->cmd[2] = 0x09; - if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,65536))){ - sperror ("LiteOn_FETE_init get LBA",dev->err); return 1; + dev->cmd[7] = speed & 0xFF; + dev->cmd[11]= 0x00; + + memset(dev->rd_buf,0,16); + + if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,16))){ + sperror ("LiteOn_FETE_init scan",dev->err); return 1; } - int tlba = (dev->rd_buf[0] << 16) | (dev->rd_buf[1] << 8) | dev->rd_buf[2]; - printf("tlba = %d\n", tlba); return 0; } +int scan_liteon::cmd_fete_init(int& speed) { + if (dev->media.type & (DISC_CD & ~DISC_CDROM)) { + return cmd_cd_fete_init(speed); + } else if (dev->media.type & (DISC_DVD & ~DISC_DVDROM)) { + return cmd_dvd_fete_init(speed); + } else if (dev->media.type & (DISC_BD & ~DISC_BD_ROM)) { + return cmd_bd_fete_init(speed); + } + return -1; +} // ********************** CD ERRC commands @@ -134,6 +219,7 @@ dev->cmd[0] = 0xDF; dev->cmd[1] = 0x82; dev->cmd[2] = 0x09; + dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_cx_do_one_interval_scan",dev->err); return 1; } @@ -145,6 +231,7 @@ dev->cmd[0] = 0xDF; dev->cmd[1] = 0x82; dev->cmd[2] = 0x05; + dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_cx_do_one_interval_readout",dev->err); return 1; } @@ -170,14 +257,14 @@ int scan_liteon::cmd_cd_errc_inteval_rst() { dev->cmd[0] = 0xDF; dev->cmd[1] = 0x97; + dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_cx_do_one_interval_rst",dev->err); return 1; } return 0; } -// ********************** DVD ERRC commands -int scan_liteon::cmd_cd_errc_block(cd_errc *data) +int scan_liteon::cmd_cd_errc_block_old(cd_errc *data) { if (cmd_cd_errc_read()) return dev->err; if (cmd_cd_errc_getdata(data)) return dev->err; @@ -187,17 +274,43 @@ return 0; } +int scan_liteon::cmd_cd_errc_block_new(cd_errc *data) +{ + dev->cmd[0] = 0xF3; + dev->cmd[1] = 0x0E; + dev->cmd[11]= 0x00; + if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,10))){ + sperror ("LiteOn_errc_cd_read_block",dev->err); return 1; + } + lba = dev->rd_buf[1] * 60 * 75 + + dev->rd_buf[2] * 75 + + dev->rd_buf[3]; -int scan_liteon::cmd_dvd_errc_block(dvd_errc *data) + data->bler = ntoh16(dev->rd_buf+4); + data->e11 = 0; + data->e21 = 0; + data->e31 = 0; + data->e12 = 0; + data->e22 = ntoh16(dev->rd_buf+6); + data->e32 = 0; + data->uncr = 0; + return 0; +} + +int scan_liteon::cmd_cd_errc_block(cd_errc *data) { -// int i; -// *pie = 0; + return cd_errc_new ? cmd_cd_errc_block_new(data) : cmd_cd_errc_block_old(data); +} +// ********************** DVD ERRC commands +int scan_liteon::cmd_dvd_errc_block(dvd_errc *data) +{ dev->cmd[0] = 0xF3; dev->cmd[1] = 0x0E; dev->cmd[8] = 0x10; + dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,10))){ - sperror ("LiteOn_pi_do_one_interval_scan",dev->err); return 1; + sperror ("LiteOn_errc_dvd_read_block",dev->err); return 1; } #if 0 for (int i=0; i<10; i++) { @@ -208,84 +321,101 @@ // Data Received: // 00000000 00 00 00 8E 00 00 00 00 ....... -// lba+=16; // lba = ((dev->rd_buf[1] << 16 )& 0xFF0000) + ((dev->rd_buf[2] << 8)&0xFF00 ) + (dev->rd_buf[3] & 0xFF); lba = ntoh32(dev->rd_buf); data->pie = ntoh16(dev->rd_buf+4); -// data->pi8 = 0; data->pif = ntoh16(dev->rd_buf+6); data->poe = 0; -// data->po8 = 0; data->pof = 0; return 0; } -// *************** FE/TE scan block -int scan_liteon::cmd_dvd_fete_block(cdvd_ft *data) { -// scan command - dev->cmd[0] = 0xDF; - dev->cmd[1] = 0x08; - dev->cmd[2] = 0x01; - dev->cmd[3] = ((lba+0x031000) >> 16) & 0xFF; - dev->cmd[4] = ((lba+0x0100) >> 8) & 0xFF; - dev->cmd[5] = lba & 0xFF; - - dev->cmd[7] = 0x10; // speed or interval ? - dev->cmd[8] = 0x00; // 16X or 8M (4096 sectors) +// ********************** BD ERRC commands +int scan_liteon::cmd_bd_errc_block(bd_errc *data) +{ + bool retry = false; + if (!lba) { + retry = true; + // if first sector scan requested + // we have to seek to first sector + dev->cmd[0] = MMC_SEEK; + if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,2048))){ + sperror ("READ",dev->err); return 1; + } + } - memset(dev->rd_buf,0,16); +bd_errc_repeat: + dev->cmd[0] = 0xF3; + dev->cmd[1] = 0x0E; + dev->cmd[11]= 0x00; + if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,0x10))) { + sperror ("LiteOn_errc_bd_read_block",dev->err); return 1; + } + lba = ntoh32(dev->rd_buf); - if (!lba) { - dev->rd_buf[0] = 0x08; - dev->rd_buf[1] = 0x02; - dev->rd_buf[4] = 0x25; - dev->rd_buf[5] = 0x0F; - dev->rd_buf[6] = 0x02; - dev->rd_buf[9] = 0x03; - dev->rd_buf[13] = 0x26; - dev->rd_buf[14] = 0x05; - dev->rd_buf[15] = 0x3F; - } else { - dev->rd_buf[0] = (lba >> 16) & 0xFF; - dev->rd_buf[1] = (lba >> 8) & 0xFF; - dev->rd_buf[2] = lba & 0xFF; - - dev->rd_buf[3] = 0x01; - dev->rd_buf[5] = 0x04; - dev->rd_buf[6] = 0x61; - dev->rd_buf[7] = 0x01; + if (!lba && retry) { + retry = false; + goto bd_errc_repeat; } - if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,16))){ - sperror ("LiteOn_FETE scan",dev->err); return 1; + data->ldc = ntoh16(dev->rd_buf+4); + data->bis = ntoh16(dev->rd_buf+6); + data->uncr = 0; + +// workaround to skip strange LDC/BIS data for last block + if (data->ldc > 9700 || data->bis >= 768) { + data->ldc = 0; + data->bis = 0; } + return 0; +} +// *************** FE/TE scan block + +int scan_liteon::cmd_cd_fete_block(cdvd_ft *data) { // fe/te data redout - dev->cmd[0] = 0xDF; - dev->cmd[1] = 0x08; - dev->cmd[2] = 0x02; - if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,65536))){ - sperror ("LiteOn_FETE get data",dev->err); return 1; - } - data->te=dev->rd_buf[0]; - data->fe=dev->rd_buf[1]; + if (cmd_fete_get_data(data)) return 1; // current lba redout - dev->cmd[0] = 0xDF; - dev->cmd[1] = 0x02; - dev->cmd[2] = 0x09; - if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,65536))){ - sperror ("LiteOn_FETE get LBA",dev->err); return 1; - } - lba = (dev->rd_buf[0] << 16) | (dev->rd_buf[1] << 8) | dev->rd_buf[2]; + if (cmd_fete_get_position()) return 1; + int tlba = (((dev->rd_buf[0] >> 4) & 0x0F) * 10 + (dev->rd_buf[0] & 0x0F)) * 60 * 75 + + (((dev->rd_buf[1] >> 4) & 0x0F) * 10 + (dev->rd_buf[1] & 0x0F)) * 75 + + (((dev->rd_buf[2] >> 4) & 0x0F) * 10 + (dev->rd_buf[2] & 0x0F)); + + if (tlba < lba) + return -1; + + lba = tlba; + return 0; +} + +int scan_liteon::cmd_dvd_fete_block(cdvd_ft *data) { +// fe/te data redout + if (cmd_fete_get_data(data)) return 1; + +// current lba redout + if (cmd_fete_get_position()) return 1; + lba = ntoh32(dev->rd_buf) >> 8; + return 0; +} +int scan_liteon::cmd_bd_fete_block(cdvd_ft *data) { +// fe/te data redout + if (cmd_fete_get_data(data)) return 1; + +// current lba redout + if (cmd_fete_get_position()) return 1; + lba = ntoh32(dev->rd_buf); return 0; } // ************* END SCAN COMMANDS ********* int scan_liteon::cmd_cd_errc_end() { + if (cd_errc_new) + return 0; + dev->cmd[0] = 0xDF; dev->cmd[1] = 0xA3; dev->cmd[2] = 0x01; @@ -299,4 +429,9 @@ dev->err = 0; return 0; } + +int scan_liteon::cmd_bd_errc_end() { + dev->err = 0; + return 0; +} diff -Nru qpxtool-0.7.1.002/plugins/liteon/qscan_plugin.cpp qpxtool-0.7.2/plugins/liteon/qscan_plugin.cpp --- qpxtool-0.7.1.002/plugins/liteon/qscan_plugin.cpp 2010-02-17 08:54:44.000000000 +0000 +++ qpxtool-0.7.2/plugins/liteon/qscan_plugin.cpp 2012-12-11 07:56:40.000000000 +0000 @@ -13,25 +13,6 @@ #include #include -static const int SPEEDS_ERRC_CD[] = { - 4*CD_SPEED_MULT, - 8*CD_SPEED_MULT, - 16*CD_SPEED_MULT, - 24*CD_SPEED_MULT, - 32*CD_SPEED_MULT, - 40*CD_SPEED_MULT, - 0 -}; - -static const int SPEEDS_ERRC_DVD[] = { - 2*DVD_SPEED_MULT, - 5*DVD_SPEED_MULT, - 8*DVD_SPEED_MULT, - 12*DVD_SPEED_MULT, - 16*DVD_SPEED_MULT, - 0 -}; - scan_plugin* plugin_create(drive_info* idev){ return new scan_liteon(idev); } @@ -62,6 +43,9 @@ } else if (dev->media.type & DISC_DVD) { if (cmd_dvd_errc_init()) return DEV_FAIL; if (cmd_dvd_errc_end()) return DEV_FAIL; + } else if (dev->media.type & DISC_BD) { + if (cmd_bd_errc_init()) return DEV_FAIL; + if (cmd_bd_errc_end()) return DEV_FAIL; } else { return DEV_FAIL; } @@ -77,6 +61,8 @@ return (ERRC_DATA_BLER|ERRC_DATA_E22|ERRC_DATA_E32|ERRC_DATA_UNCR); } else if (dev->media.type & DISC_DVD) { return (ERRC_DATA_PIE|ERRC_DATA_PIF|ERRC_DATA_UNCR); + } else if (dev->media.type & DISC_BD) { + return (ERRC_DATA_LDC|ERRC_DATA_BIS|ERRC_DATA_UNCR); } return 0; } @@ -89,7 +75,7 @@ return 0; break; case CHK_FETE: - if (dev->media.type & (DISC_DVD & ~DISC_DVDRAM)) + if (dev->media.type & ~DISC_DVDROM) return 0; break; default: @@ -98,20 +84,7 @@ return -1; } -int* scan_liteon::get_test_speeds(unsigned int itest) -{ - switch (itest) { - case CHK_ERRC: - if (dev->media.type & DISC_CD) - return (int*)SPEEDS_ERRC_CD; -// if (dev->media.type & DISC_DVD) -// return (int*)SPEEDS_ERRC_DVD; - break; - default: - break; - } - return NULL; -} +int* scan_liteon::get_test_speeds(unsigned int itest) { return NULL; } int scan_liteon::start_test(unsigned int itest, long ilba, int &speed) { @@ -127,13 +100,17 @@ set_read_speed(speed); r = cmd_dvd_errc_init(); break; + case CHK_ERRC_BD: + lba=ilba; + set_read_speed(speed); + r = cmd_bd_errc_init(); + break; case CHK_FETE: - if (dev->media.type & (DISC_DVD & ~DISC_DVDRAM)) { - set_write_speed(speed); - r = cmd_dvd_fete_init(); - } else { - r = -1; - } + start_stop(dev,1); + seek(dev,0); + if (r = cmd_fete_init(speed)) + return -1; + r = cmd_fete_init(speed); break; default: return -1; @@ -159,9 +136,17 @@ r = cmd_dvd_errc_block((dvd_errc*)data); if(ilba) *ilba = lba; return r; + case CHK_ERRC_BD: + r = cmd_bd_errc_block((bd_errc*)data); + if(ilba) *ilba = lba; + return r; case CHK_FETE: - if (dev->media.type & (DISC_DVD & ~DISC_DVDRAM)) { + if (dev->media.type & DISC_CD) { + r = cmd_cd_fete_block((cdvd_ft*)data); + } else if (dev->media.type & DISC_DVD) { r = cmd_dvd_fete_block((cdvd_ft*)data); + } else if (dev->media.type & DISC_BD) { + r = cmd_bd_fete_block((cdvd_ft*)data); } if(ilba) *ilba = lba; return r; @@ -178,6 +163,10 @@ break; case CHK_ERRC_DVD: cmd_dvd_errc_end(); + break; + case CHK_ERRC_BD: + cmd_bd_errc_end(); + break; case CHK_FETE: return 0; break; diff -Nru qpxtool-0.7.1.002/plugins/liteon/qscan_plugin.h qpxtool-0.7.2/plugins/liteon/qscan_plugin.h --- qpxtool-0.7.1.002/plugins/liteon/qscan_plugin.h 2010-02-17 08:50:36.000000000 +0000 +++ qpxtool-0.7.2/plugins/liteon/qscan_plugin.h 2012-12-11 07:56:40.000000000 +0000 @@ -55,6 +55,9 @@ { "LITE-ON ", DEV_LITEON, "DVDRW DH-20A3", LTN_DVDR_G8, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW DH-20A4", LTN_DVDR_G8, CHK_ERRC_CD | CHK_ERRC_DVD }, + { "ATAPI ", DEV_LITEON, "iHBS112", LTN_BDR, CHK_ERRC_CD | CHK_ERRC_DVD | CHK_ERRC_BD }, + { "ATAPI ", DEV_LITEON, "iHBS212", LTN_BDR, CHK_ERRC_CD | CHK_ERRC_DVD | CHK_ERRC_BD }, + { "ATAPI ", DEV_LITEON, "iHBS312", LTN_BDR, CHK_ERRC_CD | CHK_ERRC_DVD | CHK_ERRC_BD }, { "SONY ", DEV_LITEON, "DVD RW DW-U18A", LTN_DVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DRU-700A", LTN_DVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, @@ -90,7 +93,7 @@ { "PLEXTOR ", DEV_LITEON, "DVR PX-806", LTN_iHAx1, CHK_ERRC_CD | CHK_ERRC_DVD }, { "PLEXTOR ", DEV_LITEON, "DVR PX-850", LTN_iHAx3, CHK_ERRC_CD | CHK_ERRC_DVD }, -// { "Optiarc ", DEV_LITEON, "DVD RW AD-719", LTN_OLD, CHK_ERRC_CD | CHK_ERRC_DVD }, + { "Optiarc ", DEV_LITEON, "DVD RW AD-7191", LTN_DVDR_G6, CHK_ERRC_CD | CHK_ERRC_DVD }, // Slimtype { "Slimtype", DEV_LITEON, "DVD+RW SDW-421S", LTN_SDVDR_G1, CHK_ERRC_CD | CHK_ERRC_DVD }, @@ -145,13 +148,20 @@ virtual const char* desc() { return plugin_desc; }; private: long lba; + bool cd_errc_new; // CD ERRC methods + int cmd_cd_errc_init_old(); + int cmd_cd_errc_init_new(); int cmd_cd_errc_init(); - int cmd_cd_errc_block(cd_errc *data); + int cmd_cd_errc_read(); int cmd_cd_errc_getdata(cd_errc *data); int cmd_cd_errc_inteval_rst(); + int cmd_cd_errc_block_old(cd_errc *data); + int cmd_cd_errc_block_new(cd_errc *data); + int cmd_cd_errc_block(cd_errc *data); + int cmd_cd_errc_end(); // DVD ERRC methods @@ -159,8 +169,24 @@ int cmd_dvd_errc_block(dvd_errc *data); int cmd_dvd_errc_end(); - int cmd_dvd_fete_init(); +// BD ERRC methods + int cmd_bd_errc_init(); + int cmd_bd_errc_block(bd_errc *data); + int cmd_bd_errc_end(); + +// FE/TE test methods + int cmd_fete_init(int& speed); + int cmd_fete_get_data(cdvd_ft *data); + int cmd_fete_get_position(); + + int cmd_cd_fete_init(int& speed); + int cmd_cd_fete_block(cdvd_ft *data); + + int cmd_dvd_fete_init(int& speed); int cmd_dvd_fete_block(cdvd_ft *data); + + int cmd_bd_fete_init(int& speed); + int cmd_bd_fete_block(cdvd_ft *data); }; #endif diff -Nru qpxtool-0.7.1.002/plugins/Makefile.plugin qpxtool-0.7.2/plugins/Makefile.plugin --- qpxtool-0.7.1.002/plugins/Makefile.plugin 2010-03-23 10:51:37.000000000 +0000 +++ qpxtool-0.7.2/plugins/Makefile.plugin 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ - -SRC = qscan_plugin qscan_cmd -HDRS = qscan_plugin.h - -SRCS = $(patsubst %,%.cpp, $(SRC)) -OBJS = $(patsubst %.cpp,%.o,$(SRCS)) - -LIB_SHORT = lib$(LIBN).so -LIB_SONAME = $(LIB_SHORT) -LIB = $(LIB_SHORT) - -CPPFLAGS += -I. -I../../lib/include -LDFLAGS += -shared -Wl,-soname,$(LIB_SONAME) -LDLIBS += -L../../lib/lib -lqpxtransport -lqpxscan - -all: $(LIB) - -$(LIB): $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LDLIBS) - - - mkdir -p ../lib - ln -fs ../$(DIR)/$(LIB) ../lib/$(LIB_SHORT) - -clean: - rm -f $(LIB_SHORT) $(OBJS) ../lib/$(LIB_SHORT) *~ include/*~ - -install: - - mkdir -p $(DESTDIR)$(PLUGINDIR) - install -m 755 $(LIB_SHORT) $(DESTDIR)$(PLUGINDIR) - -uninstall: - rm -f $(DESTDIR)$(PLUGINDIR)/$(LIB_SHORT) - -.PHONY: all clean install uninstall - diff -Nru qpxtool-0.7.1.002/plugins/nec/qscan_cmd.cpp qpxtool-0.7.2/plugins/nec/qscan_cmd.cpp --- qpxtool-0.7.1.002/plugins/nec/qscan_cmd.cpp 2009-12-29 11:57:49.000000000 +0000 +++ qpxtool-0.7.2/plugins/nec/qscan_cmd.cpp 2012-11-21 07:27:54.000000000 +0000 @@ -29,14 +29,14 @@ dev->cmd[0] = 0xF3; dev->cmd[1] = 0x01; if ((dev->err=dev->cmd.transport(NONE, NULL, 0))){ - if(!dev->silent) sperror ("nec_init_cx_scan",dev->err); return 1; + if(!dev->silent) sperror ("nec_init_errc_scan",dev->err); return 1; } /* set scan interval = 75 sectors */ dev->cmd[0] = 0xF3; dev->cmd[1] = 0x02; dev->cmd[8] = 75; // interval in sectors if ((dev->err=dev->cmd.transport(NONE, NULL, 0))){ - if(!dev->silent) sperror ("nec_set_cx_scan_interval",dev->err); return 1; + if(!dev->silent) sperror ("nec_set_scan_interval",dev->err); return 1; } return 0; } @@ -46,14 +46,31 @@ dev->cmd[0] = 0xF3; dev->cmd[1] = 0x01; if ((dev->err=dev->cmd.transport(NONE, NULL, 0))){ - if(!dev->silent) sperror ("nec_init_cx_scan",dev->err); return 1; + if(!dev->silent) sperror ("nec_init_errc_scan",dev->err); return 1; } - /* set scan interval = 8 ECC */ + /* set scan interval = 16 sectors = 1 ECC */ dev->cmd[0] = 0xF3; dev->cmd[1] = 0x02; - dev->cmd[8] = 0x01; // interval in ECC blocks + dev->cmd[8] = 0x01; // interval in ECC blocks if ((dev->err=dev->cmd.transport(NONE, NULL, 0))){ - if(!dev->silent) sperror ("nec_set_cx_scan_interval",dev->err); return 1; + if(!dev->silent) sperror ("nec_set_scan_interval",dev->err); return 1; + } + return 0; +} + +int scan_nec::cmd_bd_errc_init() { + /* initialize scan mode */ + dev->cmd[0] = 0xF3; + dev->cmd[1] = 0x01; + if ((dev->err=dev->cmd.transport(NONE, NULL, 0))){ + if(!dev->silent) sperror ("nec_init_errc_scan",dev->err); return 1; + } + /* set scan interval = 32 sectors (equivalent to 2 ECC blocks on DVD) */ + dev->cmd[0] = 0xF3; + dev->cmd[1] = 0x02; + dev->cmd[8] = 0x02; // interval + if ((dev->err=dev->cmd.transport(NONE, NULL, 0))){ + if(!dev->silent) sperror ("nec_set_scan_interval",dev->err); return 1; } return 0; } @@ -101,6 +118,22 @@ lba=ntoh32(dev->rd_buf); // *lba+=0x80; return 0; +} + +int scan_nec::cmd_bd_errc_block(bd_errc *data) +{ + dev->cmd[0] = 0xF3; + dev->cmd[1] = 0x03; + if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,8))){ + sperror ("nec_bd_errc_do_one_interval",dev->err); + if (dev->err == 0x30200) return 1; + else return -1; + } + data->ldc = ntoh16(dev->rd_buf+4); + data->bis = ntoh16(dev->rd_buf+6); + lba=ntoh32(dev->rd_buf); +// *lba+=0x80; + return 0; } // ************* END SCAN COMMAND ********* diff -Nru qpxtool-0.7.1.002/plugins/nec/qscan_plugin.cpp qpxtool-0.7.2/plugins/nec/qscan_plugin.cpp --- qpxtool-0.7.1.002/plugins/nec/qscan_plugin.cpp 2010-02-17 07:43:32.000000000 +0000 +++ qpxtool-0.7.2/plugins/nec/qscan_plugin.cpp 2012-11-21 07:27:54.000000000 +0000 @@ -65,6 +65,9 @@ } else if (dev->media.type & DISC_DVD) { if (cmd_dvd_errc_init()) return DEV_FAIL; if (cmd_scan_end()) return DEV_FAIL; + } else if (dev->media.type & DISC_BD) { + if (cmd_bd_errc_init()) return DEV_FAIL; + if (cmd_scan_end()) return DEV_FAIL; } else { return DEV_FAIL; } @@ -77,6 +80,8 @@ return (ERRC_DATA_BLER|ERRC_DATA_E22|ERRC_DATA_UNCR); } else if (dev->media.type & DISC_DVD) { return (ERRC_DATA_PIE|ERRC_DATA_PIF|ERRC_DATA_UNCR); + } else if (dev->media.type & DISC_BD) { + return (ERRC_DATA_LDC|ERRC_DATA_BIS|ERRC_DATA_UNCR); } return 0; } diff -Nru qpxtool-0.7.1.002/plugins/nec/qscan_plugin.h qpxtool-0.7.2/plugins/nec/qscan_plugin.h --- qpxtool-0.7.1.002/plugins/nec/qscan_plugin.h 2010-01-26 12:55:38.000000000 +0000 +++ qpxtool-0.7.2/plugins/nec/qscan_plugin.h 2012-11-21 07:27:54.000000000 +0000 @@ -30,7 +30,8 @@ { "_NEC ", DEV_NEC, "DVD_RW ND-457", NEC_4570, CHK_ERRC_CD | CHK_ERRC_DVD }, { "_NEC ", DEV_NEC, "DVD_RW ND-465", NEC_4650, CHK_ERRC_CD | CHK_ERRC_DVD }, { "Optiarc ", DEV_NEC, "DVD RW AD-717", NEC_4650, CHK_ERRC_CD | CHK_ERRC_DVD }, - { "", 0, "", 0} + { "Optiarc ", DEV_NEC, "DVD RW AD-7260", NEC_4650, CHK_ERRC_CD | CHK_ERRC_DVD }, + { "", 0, "", 0} }; static const char plugin_name[]="NEC"; @@ -60,12 +61,14 @@ // CD ERRC methods int cmd_cd_errc_init(); int cmd_cd_errc_block(cd_errc *data); -// int cmd_cd_errc_getdata(cd_errc *data); // DVD ERRC methods int cmd_dvd_errc_init(); int cmd_dvd_errc_block(dvd_errc *data); -// int cmd_dvd_errc_getdata(dvd_errc *data); + +// BD ERRC methods + int cmd_bd_errc_init(); + int cmd_bd_errc_block(bd_errc *data); int cmd_scan_end(); }; diff -Nru qpxtool-0.7.1.002/qpxtool.spec qpxtool-0.7.2/qpxtool.spec --- qpxtool-0.7.1.002/qpxtool.spec 2010-03-27 12:16:00.000000000 +0000 +++ qpxtool-0.7.2/qpxtool.spec 2012-12-13 10:46:19.000000000 +0000 @@ -1,6 +1,6 @@ %define summary CD/DVD media check/drive control tools %define name qpxtool -%define version 0.7.1_002 +%define version 0.7.2 %define release 1 %define vendor Gennady "ShultZ" Kozlov %define packager Gennady "ShultZ" Kozlov @@ -80,7 +80,7 @@ Gennady "ShultZ" Kozlov %prep -%setup -q -n %{name}-%{version} +%setup -q -n %{name} %build #### diff -Nru qpxtool-0.7.1.002/README qpxtool-0.7.2/README --- qpxtool-0.7.1.002/README 2010-02-15 07:14:09.000000000 +0000 +++ qpxtool-0.7.2/README 2010-09-21 18:48:03.000000000 +0000 @@ -1,6 +1,6 @@ ************************************************************ -QPxTool 0.7.1 +QPxTool 0.7.2 http://qpxtool.sourceforge.net diff -Nru qpxtool-0.7.1.002/Session.vim qpxtool-0.7.2/Session.vim --- qpxtool-0.7.1.002/Session.vim 2010-02-17 14:56:24.000000000 +0000 +++ qpxtool-0.7.2/Session.vim 1970-01-01 00:00:00.000000000 +0000 @@ -1,363 +0,0 @@ -let SessionLoad = 1 -if &cp | set nocp | endif -let s:cpo_save=&cpo -set cpo&vim -imap :Ex i -imap :TlistToggle -imap :wa :make && ./run.sh -imap :wa :make i -imap :tabn i -imap :tabp i -imap :copen -imap :w i -vmap  "+yi -vmap  :call OpenCloseFold() -nmap  :call OpenCloseFold() -map  :qa -map  :wa :mks! -nmap  dd -nmap  -nmap ; :%s/\<=expand("") \>/ -vmap <  >gv -map Q gq -nmap gx NetrwBrowseX -nmap :tabp -nmap :tabn -nmap :wa :make -nmap :wa :make && ./run.sh -nmap :TlistToggle -nmap :Ex -nnoremap NetrwBrowseX :call netrw#NetrwBrowseX(expand(""),0) -vmap :Ex i -omap :Ex -vmap :TlistToggle -omap :TlistToggle -vmap :wa :make && ./run.sh -omap :wa :make && ./run.sh -vmap :wa :make i -omap :wa :make -vmap :tabn i -omap :tabn -vmap :tabp i -omap :tabp -vmap :copen -nmap :copen -vmap :w i -nmap :w -map -imap  yypi -imap  :call OpenCloseFold() -imap  =InsertTabWrapper() -inoremap  u -imap  "+gPi -inoremap  omni#cpp#maycomplete#Complete() -imap  ddi -inoremap . omni#cpp#maycomplete#Dot() -inoremap : omni#cpp#maycomplete#Scope() -inoremap > omni#cpp#maycomplete#Arrow() -imap >Ins> i -imap [ [] -imap { { }O -let &cpo=s:cpo_save -unlet s:cpo_save -set autoindent -set backspace=indent,eol,start -set backup -set complete=.,k,b,t -set completeopt=menu,longest -set fileencodings=ucs-bom,utf-8,default,latin1 -set formatoptions=tqcr -set helplang=ru -set hidden -set incsearch -set laststatus=2 -set matchpairs=(:),{:} -set mouse=a -set mousemodel=popup -set omnifunc=omni#cpp#complete#Main -set ruler -set scrolljump=7 -set scrolloff=7 -set shiftwidth=4 -set showcmd -set smartindent -set softtabstop=4 -set statusline=%<%f%h%m%r\ %b\ %{&encoding}\ 0x\ \ %l,%c%V\ %P -set tabstop=4 -set whichwrap=b,s,<,>,[,] -set wildcharm= -set wildmenu -let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 -let v:this_session=expand(":p") -silent only -cd ~/projects/qpxtool-0.7.0_039 -if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' - let s:wipebuf = bufnr('%') -endif -set shortmess=aoO -badd +150 plugins/liteon/qscan_cmd.cpp -badd +1 plugins/plextor/qscan_cmd.cpp -args plugins/liteon/qscan_cmd.cpp -edit plugins/liteon/qscan_cmd.cpp -set splitbelow splitright -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal cindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// -setlocal commentstring=/*%s*/ -setlocal complete=.,k,b,t -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'cpp' -setlocal filetype=cpp -endif -set foldcolumn=1 -setlocal foldcolumn=1 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -set foldmethod=syntax -setlocal foldmethod=syntax -setlocal foldminlines=1 -setlocal foldnestmax=20 -set foldtext=MyFoldText() -setlocal foldtext=MyFoldText() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=0 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:} -setlocal modeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc=omni#cpp#complete#Main -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal smartindent -setlocal softtabstop=4 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'cpp' -setlocal syntax=cpp -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -133 -normal zo -137 -normal zo -133 -normal zo -144 -normal zo -148 -normal zo -152 -normal zo -144 -normal zo -170 -normal zo -173 -normal zo -170 -normal zo -let s:l = 150 - ((20 * winheight(0) + 23) / 47) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -150 -normal! 01l -tabedit plugins/plextor/qscan_cmd.cpp -set splitbelow splitright -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal cindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// -setlocal commentstring=/*%s*/ -setlocal complete=.,k,b,t -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'cpp' -setlocal filetype=cpp -endif -set foldcolumn=1 -setlocal foldcolumn=1 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -set foldmethod=syntax -setlocal foldmethod=syntax -setlocal foldminlines=1 -setlocal foldnestmax=20 -set foldtext=MyFoldText() -setlocal foldtext=MyFoldText() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=0 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:} -setlocal modeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc=omni#cpp#complete#Main -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal smartindent -setlocal softtabstop=4 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'cpp' -setlocal syntax=cpp -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -46 -normal zo -247 -normal zo -393 -normal zo -397 -normal zo -393 -normal zo -let s:l = 264 - ((46 * winheight(0) + 23) / 46) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -264 -normal! 0 -tabnext 2 -if exists('s:wipebuf') - silent exe 'bwipe ' . s:wipebuf -endif -unlet! s:wipebuf -set winheight=1 winwidth=20 shortmess=filnxtToO -let s:sx = expand(":p:r")."x.vim" -if file_readable(s:sx) - exe "source " . s:sx -endif -let &so = s:so_save | let &siso = s:siso_save -doautoall SessionLoadPost -unlet SessionLoad -" vim: set ft=vim : diff -Nru qpxtool-0.7.1.002/status.html qpxtool-0.7.2/status.html --- qpxtool-0.7.1.002/status.html 2010-02-03 12:19:13.000000000 +0000 +++ qpxtool-0.7.2/status.html 2012-12-11 08:00:33.000000000 +0000 @@ -67,49 +67,42 @@ CD DVD BD - HD DVD Read transfer OK OK - - + OK Write transfer OK OK - Error correction OK OK - - + OK Jitter/Asymmetry OK OK - Focus/Tracking OK OK - Time Analyser OK - @@ -119,111 +112,153 @@ qscan: Scan plugins status - - CD + + CD DVD + BD Plugin probe - sectors per interval - + sectors per interval + ERRC JB FE/TE - TA + ERRC JB FE/TE TA + + ERRC + JB + FE/TE CD
ideal is 75 DVD
ideal is 16 + BD
ideal is 32 PLEXTOR - never + never.
few models,
no clones 75 16 + N/A + FULL FULL FULL - + FULL FULL FULL OK + + N/A + N/A + N/A PIONEER 75 16 + N/A + bler,e22 - - - + N/A + N/A + pie,pif - - - + N/A + N/A + N/A + + N/A + N/A + N/A ASUS ~75 ~16 - bler,e22 - - + + bler,e22 + N/A + N/A + pie,pif - - - + N/A + N/A + N/A + + N/A + N/A + N/A NEC 75 16 + ? + bler,e22 - - + N/A + pie,pif + N/A + N/A + + FULL
(untested) - + N/A LITE-ON dangerous 75 - ~17 + 16 + 32 + bler,e22,e32 - - - + N/A + FULL + pie,pif + N/A + FULL + N/A + + FULL FULL - BENQ 75 ? - FULL + + FULL + FULL FULL + N/A + + + @@ -231,39 +266,57 @@ 75 256 + N/A + bler,e22 jitter - - + N/A + pie,pif jitter - - + N/A + N/A + + N/A + N/A + N/A TSST ? ? - bler,e22 - + + bler,e22 + N/A + pie,pif + N/A + N/A + + N/A Generic C2 75 N/A + N/A + C2 only N/A N/A + + N/A + N/A N/A N/A + N/A N/A N/A diff -Nru qpxtool-0.7.1.002/TODO qpxtool-0.7.2/TODO --- qpxtool-0.7.1.002/TODO 2010-02-15 06:57:17.000000000 +0000 +++ qpxtool-0.7.2/TODO 2012-12-04 07:52:39.000000000 +0000 @@ -16,5 +16,7 @@ - crc calc for PX-708A2 / PX-712 gui + - save selected test speeds - table+images groups in print preview - (?) OpenGL graph render engine +