[hamradio-commits] [qsstv] 01/05: New upstream version 9.2.6+repack

Dave Hibberd hibby-guest at moszumanska.debian.org
Sat Jan 20 13:22:12 UTC 2018


This is an automated email from the git hooks/post-receive script.

hibby-guest pushed a commit to branch master
in repository qsstv.

commit 2a68a6de2a319360a3fa764e5b59b20b31afa52c
Author: hibby <d at vehibberd.com>
Date:   Sat Jan 20 12:29:32 2018 +0000

    New upstream version 9.2.6+repack
---
 qsstv/appglobal.cpp                                |   2 +-
 qsstv/config/directoriesconfig.cpp                 |   2 +-
 qsstv/config/drmprofileconfig.ui                   |  23 +-
 qsstv/dispatch/dispatcher.cpp                      |   3 +
 qsstv/documentation/manual/manual.txt              |  19 +-
 qsstv/documentation/manual/manual/Copying.html     |   2 +-
 .../manual/manual/Gallery_template.png             | Bin 101784 -> 0 bytes
 qsstv/documentation/manual/manual/Gallery_tx.png   | Bin 395505 -> 0 bytes
 qsstv/documentation/manual/manual/RXDRM.html       |   4 +-
 qsstv/documentation/manual/manual/RXSSTV.html      |   2 +-
 qsstv/documentation/manual/manual/TXDRM.html       |   4 +-
 qsstv/documentation/manual/manual/TXSSTV.html      |   2 +-
 qsstv/documentation/manual/manual/_copying.html    |  77 -----
 qsstv/documentation/manual/manual/_r_x_d_r_m.html  | 138 ---------
 .../documentation/manual/manual/_r_x_s_s_t_v.html  | 121 --------
 qsstv/documentation/manual/manual/_t_x_d_r_m.html  | 124 --------
 .../documentation/manual/manual/_t_x_s_s_t_v.html  | 149 ---------
 qsstv/documentation/manual/manual/changelog.html   |  21 +-
 qsstv/documentation/manual/manual/credits.html     |   2 +-
 qsstv/documentation/manual/manual/editor.html      |   2 +-
 .../documentation/manual/manual/externalprog.html  |   2 +-
 qsstv/documentation/manual/manual/fixdrm.html      |   2 +-
 qsstv/documentation/manual/manual/gallery.html     |   2 +-
 .../manual/manual/gettingstarted.html              |   2 +-
 qsstv/documentation/manual/manual/imagepopup.html  |   2 +-
 qsstv/documentation/manual/manual/index.html       |   2 +-
 .../documentation/manual/manual/installation.html  |   2 +-
 qsstv/documentation/manual/manual/pages.html       |   2 +-
 qsstv/documentation/manual/manual/statusbar.html   |   2 +-
 qsstv/documentation/manual/manual/todo1.html       |   2 +-
 qsstv/documentation/manual/manual/whatsnew.html    |   2 +-
 qsstv/drmrx/drmstatusframe.ui                      | 164 +++++-----
 qsstv/logbook/logbook.cpp                          |   2 +-
 qsstv/mainwidgets/rxfunctions.cpp                  |   3 +-
 qsstv/mainwidgets/rxwidget.ui                      |   6 +-
 qsstv/mainwidgets/txfunctions.cpp                  |   2 +-
 qsstv/mainwidgets/txwidget.cpp                     |   4 +-
 qsstv/mainwidgets/txwidget.ui                      |   9 +-
 qsstv/mainwindow.ui                                |   4 +-
 qsstv/qsstv.pro                                    |   5 +-
 qsstv/rig/freqdisplay.ui                           |   4 +-
 qsstv/rig/rigcontrol.cpp                           |  26 +-
 qsstv/rig/rigcontrol.h                             |   6 +
 qsstv/sound/soundalsa.cpp                          |  25 +-
 qsstv/sound/soundalsa.h                            |   1 +
 qsstv/sound/soundbase.cpp                          |   9 +-
 qsstv/sound/soundbase.h                            |   4 +-
 qsstv/sound/wavio.cpp                              | 173 ++++++-----
 qsstv/sound/wavio.h                                |   4 +-
 qsstv/sstv/modes/modeavt.cpp                       |   6 +-
 qsstv/sstv/modes/modeavt.h                         |   2 +-
 qsstv/sstv/modes/modebase.cpp                      |  22 +-
 qsstv/sstv/modes/modebase.h                        |   2 +-
 qsstv/sstv/modes/modegbr2.cpp                      |   7 +-
 qsstv/sstv/sstvparam.cpp                           |   2 +-
 qsstv/sstv/sstvrx.cpp                              |  11 +-
 qsstv/sstv/syncprocessor.cpp                       |   2 +-
 qsstv/utils/color.cpp                              |   3 +-
 qsstv/utils/ftp.cpp                                |   2 +-
 qsstv/videocapt/cameradialog.cpp                   | 332 ++++++++++++---------
 qsstv/videocapt/cameradialog.h                     |   5 +
 qsstv/videocapt/cameradialog.ui                    |   2 +-
 qsstv/videocapt/imagesettings.ui                   |   2 +-
 qsstv/videocapt/videocapture.cpp                   |  20 +-
 qsstv/videocapt/videocapture.h                     |   4 +-
 65 files changed, 583 insertions(+), 1011 deletions(-)

diff --git a/qsstv/appglobal.cpp b/qsstv/appglobal.cpp
index 3bfc431..751fd8c 100644
--- a/qsstv/appglobal.cpp
+++ b/qsstv/appglobal.cpp
@@ -7,7 +7,7 @@
 
 const QString MAJORVERSION  = "9.2";
 const QString CONFIGVERSION = "9.0";
-const QString MINORVERSION  = ".4";
+const QString MINORVERSION  = ".6";
 const QString LOGVERSION = ("qsstv."+MAJORVERSION+MINORVERSION+".log");
 const QString ORGANIZATION = "ON4QZ";
 const QString APPLICATION  = ("qsstv_" +CONFIGVERSION);
diff --git a/qsstv/config/directoriesconfig.cpp b/qsstv/config/directoriesconfig.cpp
index a8d0d3b..0698491 100644
--- a/qsstv/config/directoriesconfig.cpp
+++ b/qsstv/config/directoriesconfig.cpp
@@ -43,7 +43,7 @@ void directoriesConfig::readSettings()
   txStockImagesPath=qSettings.value("txStockImagesPath",QString(getenv("HOME"))+"/tx_stock/").toString();
   templatesPath=qSettings.value("templatesPath",QString(getenv("HOME"))+"/templates/").toString();
   audioPath=qSettings.value("audioPath",QString(getenv("HOME"))+"/audio/").toString();
-  docURL=qSettings.value("docURL","http://users.telenet.be/on4qz/qsstv_9/manual").toString();
+  docURL=qSettings.value("docURL","http://users.telenet.be/on4qz/qsstv/manual").toString();
   saveTXimages=qSettings.value("saveTXimages",false).toBool();
   qSettings.endGroup();
   setParams();
diff --git a/qsstv/config/drmprofileconfig.ui b/qsstv/config/drmprofileconfig.ui
index 5d8984f..073189b 100644
--- a/qsstv/config/drmprofileconfig.ui
+++ b/qsstv/config/drmprofileconfig.ui
@@ -32,7 +32,7 @@
    <item>
     <widget class="QTabWidget" name="tabWidget">
      <property name="currentIndex">
-      <number>2</number>
+      <number>1</number>
      </property>
      <widget class="QWidget" name="Profile1">
       <attribute name="title">
@@ -135,14 +135,17 @@
          </item>
          <item row="0" column="3">
           <widget class="QComboBox" name="drmPF1BandwidthComboBox">
+           <property name="currentText">
+            <string>2.2 kHz</string>
+           </property>
            <item>
             <property name="text">
-             <string>2.2 KHz</string>
+             <string>2.2 kHz</string>
             </property>
            </item>
            <item>
             <property name="text">
-             <string>2.5 KHz</string>
+             <string>2.5 kHz</string>
             </property>
            </item>
           </widget>
@@ -401,14 +404,17 @@
          </item>
          <item row="0" column="3">
           <widget class="QComboBox" name="drmPF2BandwidthComboBox">
+           <property name="currentText">
+            <string>2.2 kHz</string>
+           </property>
            <item>
             <property name="text">
-             <string>2.2 KHz</string>
+             <string>2.2 kHz</string>
             </property>
            </item>
            <item>
             <property name="text">
-             <string>2.5 KHz</string>
+             <string>2.5 kHz</string>
             </property>
            </item>
           </widget>
@@ -667,14 +673,17 @@
          </item>
          <item row="0" column="3">
           <widget class="QComboBox" name="drmPF3BandwidthComboBox">
+           <property name="currentText">
+            <string>2.2 kHz</string>
+           </property>
            <item>
             <property name="text">
-             <string>2.2 KHz</string>
+             <string>2.2 kHz</string>
             </property>
            </item>
            <item>
             <property name="text">
-             <string>2.5 KHz</string>
+             <string>2.5 kHz</string>
             </property>
            </item>
           </widget>
diff --git a/qsstv/dispatch/dispatcher.cpp b/qsstv/dispatch/dispatcher.cpp
index 107daca..238b1b8 100644
--- a/qsstv/dispatch/dispatcher.cpp
+++ b/qsstv/dispatch/dispatcher.cpp
@@ -599,6 +599,9 @@ void dispatcher::uploadToRXServer(QString remoteDir, QString fn)
     case FTPTIMEOUT:
       stmb= new displayMBoxEvent("FTP Error",QString("Connection to %1 timed out").arg(ftpRemoteHost));
     break;
+    default:
+      stmb= new displayMBoxEvent("FTP Error",QString("Unknown FTP error: %1").arg(ftpResult));
+    break;
     }
   if(ftpResult!=FTPOK)
     {
diff --git a/qsstv/documentation/manual/manual.txt b/qsstv/documentation/manual/manual.txt
index 76a1b76..e20c66c 100644
--- a/qsstv/documentation/manual/manual.txt
+++ b/qsstv/documentation/manual/manual.txt
@@ -76,6 +76,21 @@ QSSTV 9.2.x has the following new features compared to QSSTV 8.2.x
 
 \page changelog Change log
 
+\li 20170817 QSSTV 9.2.6
+  - Changed the .pro file for autodetecing correct libopenjpg2 (DL1JBE -Tom)
+  - ftp transfer - initialize bug fix (VK6MN- Mike)
+  - Help manual -> path correction  and corrected some typo's (DJ0MBA- Marinus)
+  - SSTV initialize bug fix (Adrian)
+  - Camera support for Raspberry PI Cam
+  - fixed audio loopback use
+  - fixed transmission after stop, image was not restarted at top
+
+
+
+\li 20161022 QSSTV 9.2.5
+- Screen size reduced for use with smaller screens-fixed.
+- rig control - added capabilities test.
+
 \li 20161022 QSSTV 9.2.4
 - some minor bugfixing
 - eliminated online status setting in Config Notication tab (doubled with setting in Operator settings)
@@ -671,7 +686,7 @@ Constellation:
 Receive status
 \image html rxdrm_status.png
 - Mode (A,B or E)
-- Bandwidth (2.3 KHz or 2.5 KHz)
+- Bandwidth (2.2 kHz or 2.5 kHz)
 - Interleave (Short or Long)
 - Protection (Normal or High)
 - QAM (4,16 or 64)
@@ -724,7 +739,7 @@ Mode Selection
 \image html txdrm_options.png
 <br>
 - Mode (A,B or E)
-- Bandwidth (2.3 KHz or 2.5 KHz)
+- Bandwidth (2.2 kHz or 2.5 kHz)
 - Interleave (Short or Long)
 - Protection (Normal or High)
 - QAM (4,16 or 64)
diff --git a/qsstv/documentation/manual/manual/Copying.html b/qsstv/documentation/manual/manual/Copying.html
index a02f06c..c96f98b 100644
--- a/qsstv/documentation/manual/manual/Copying.html
+++ b/qsstv/documentation/manual/manual/Copying.html
@@ -68,7 +68,7 @@ $(document).ready(function(){initNavTree('Copying.html','');});
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/Gallery_template.png b/qsstv/documentation/manual/manual/Gallery_template.png
deleted file mode 100644
index f7f8d8a..0000000
Binary files a/qsstv/documentation/manual/manual/Gallery_template.png and /dev/null differ
diff --git a/qsstv/documentation/manual/manual/Gallery_tx.png b/qsstv/documentation/manual/manual/Gallery_tx.png
deleted file mode 100644
index b776f9f..0000000
Binary files a/qsstv/documentation/manual/manual/Gallery_tx.png and /dev/null differ
diff --git a/qsstv/documentation/manual/manual/RXDRM.html b/qsstv/documentation/manual/manual/RXDRM.html
index 2e07b0c..23fe890 100644
--- a/qsstv/documentation/manual/manual/RXDRM.html
+++ b/qsstv/documentation/manual/manual/RXDRM.html
@@ -89,7 +89,7 @@ $(document).ready(function(){initNavTree('RXDRM.html','');});
 </div>
 <ul>
 <li>Mode (A,B or E)</li>
-<li>Bandwidth (2.3 KHz or 2.5 KHz)</li>
+<li>Bandwidth (2.2 kHz or 2.5 kHz)</li>
 <li>Interleave (Short or Long)</li>
 <li>Protection (Normal or High)</li>
 <li>QAM (4,16 or 64)</li>
@@ -129,7 +129,7 @@ $(document).ready(function(){initNavTree('RXDRM.html','');});
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/RXSSTV.html b/qsstv/documentation/manual/manual/RXSSTV.html
index 6c354aa..7dd6969 100644
--- a/qsstv/documentation/manual/manual/RXSSTV.html
+++ b/qsstv/documentation/manual/manual/RXSSTV.html
@@ -112,7 +112,7 @@ $(document).ready(function(){initNavTree('RXSSTV.html','');});
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/TXDRM.html b/qsstv/documentation/manual/manual/TXDRM.html
index b332e1f..f37d90e 100644
--- a/qsstv/documentation/manual/manual/TXDRM.html
+++ b/qsstv/documentation/manual/manual/TXDRM.html
@@ -83,7 +83,7 @@ $(document).ready(function(){initNavTree('TXDRM.html','');});
 <p> <br />
 </p><ul>
 <li>Mode (A,B or E)</li>
-<li>Bandwidth (2.3 KHz or 2.5 KHz)</li>
+<li>Bandwidth (2.2 kHz or 2.5 kHz)</li>
 <li>Interleave (Short or Long)</li>
 <li>Protection (Normal or High)</li>
 <li>QAM (4,16 or 64)</li>
@@ -115,7 +115,7 @@ Avoid to send huge images (especially if you're not in hybrid mode).<br />
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/TXSSTV.html b/qsstv/documentation/manual/manual/TXSSTV.html
index ad7d66d..7b6a646 100644
--- a/qsstv/documentation/manual/manual/TXSSTV.html
+++ b/qsstv/documentation/manual/manual/TXSSTV.html
@@ -140,7 +140,7 @@ $(document).ready(function(){initNavTree('TXSSTV.html','');});
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/_copying.html b/qsstv/documentation/manual/manual/_copying.html
deleted file mode 100644
index f87169f..0000000
--- a/qsstv/documentation/manual/manual/_copying.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<meta http-equiv="X-UA-Compatible" content="IE=9"/>
-<meta name="generator" content="Doxygen 1.8.9.1"/>
-<title>QSSTV: Copying</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="jquery.js"></script>
-<script type="text/javascript" src="dynsections.js"></script>
-<link href="navtree.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="resize.js"></script>
-<script type="text/javascript" src="navtreedata.js"></script>
-<script type="text/javascript" src="navtree.js"></script>
-<script type="text/javascript">
-  $(document).ready(initResizable);
-  $(window).load(resizeHeight);
-</script>
-<link href="qsstv.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
-<div id="titlearea">
-<table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
-  <td style="padding-left: 0.5em;">
-   <div id="projectname">QSSTV
-    <span id="projectnumber">9.1</span>
-   </div>
-  </td>
- </tr>
- </tbody>
-</table>
-</div>
-<!-- end header part -->
-<!-- Generated by Doxygen 1.8.9.1 -->
-  <div id="navrow1" class="tabs">
-    <ul class="tablist">
-      <li><a href="index.html"><span>Main Page</span></a></li>
-      <li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
-    </ul>
-  </div>
-</div><!-- top -->
-<div id="side-nav" class="ui-resizable side-nav-resizable">
-  <div id="nav-tree">
-    <div id="nav-tree-contents">
-      <div id="nav-sync" class="sync"></div>
-    </div>
-  </div>
-  <div id="splitbar" style="-moz-user-select:none;" 
-       class="ui-resizable-handle">
-  </div>
-</div>
-<script type="text/javascript">
-$(document).ready(function(){initNavTree('_copying.html','');});
-</script>
-<div id="doc-content">
-<div class="header">
-  <div class="headertitle">
-<div class="title">Copying </div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><p>This software uses Qt for Linux: see <a href="http://qt.digia.com/">http://qt.digia.com/</a> The application is released under GPLv3 </p>
-</div></div><!-- contents -->
-</div><!-- doc-content -->
-<!-- start footer part -->
-<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
-  <ul>
-    <li class="navelem"><a class="el" href="index.html">QSSTV 9.1</a></li>
-    <li class="footer">Generated on Fri Jul 8 2016 14:33:50 for QSSTV by
-    <a href="http://www.doxygen.org/index.html">
-    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
-  </ul>
-</div>
-</body>
-</html>
diff --git a/qsstv/documentation/manual/manual/_r_x_d_r_m.html b/qsstv/documentation/manual/manual/_r_x_d_r_m.html
deleted file mode 100644
index f00ae49..0000000
--- a/qsstv/documentation/manual/manual/_r_x_d_r_m.html
+++ /dev/null
@@ -1,138 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<meta http-equiv="X-UA-Compatible" content="IE=9"/>
-<meta name="generator" content="Doxygen 1.8.9.1"/>
-<title>QSSTV: Receive DRM Window</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="jquery.js"></script>
-<script type="text/javascript" src="dynsections.js"></script>
-<link href="navtree.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="resize.js"></script>
-<script type="text/javascript" src="navtreedata.js"></script>
-<script type="text/javascript" src="navtree.js"></script>
-<script type="text/javascript">
-  $(document).ready(initResizable);
-  $(window).load(resizeHeight);
-</script>
-<link href="qsstv.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
-<div id="titlearea">
-<table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
-  <td style="padding-left: 0.5em;">
-   <div id="projectname">QSSTV
-    <span id="projectnumber">9.1</span>
-   </div>
-  </td>
- </tr>
- </tbody>
-</table>
-</div>
-<!-- end header part -->
-<!-- Generated by Doxygen 1.8.9.1 -->
-  <div id="navrow1" class="tabs">
-    <ul class="tablist">
-      <li><a href="index.html"><span>Main Page</span></a></li>
-      <li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
-    </ul>
-  </div>
-</div><!-- top -->
-<div id="side-nav" class="ui-resizable side-nav-resizable">
-  <div id="nav-tree">
-    <div id="nav-tree-contents">
-      <div id="nav-sync" class="sync"></div>
-    </div>
-  </div>
-  <div id="splitbar" style="-moz-user-select:none;" 
-       class="ui-resizable-handle">
-  </div>
-</div>
-<script type="text/javascript">
-$(document).ready(function(){initNavTree('_r_x_d_r_m.html','');});
-</script>
-<div id="doc-content">
-<div class="header">
-  <div class="headertitle">
-<div class="title">Receive DRM Window </div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><div class="image">
-<img src="receivedrm.png" alt="receivedrm.png"/>
-</div>
-<p>SNR (vu-meter S):</p><ul>
-<li>SNR in dB</li>
-</ul>
-<p>Volume (vu-meter V):</p><ul>
-<li>adjust your recording level to half scale (better too low than too high).</li>
-</ul>
-<p>Received segments: </p><div class="image">
-<img src="rxdrm_segments.png" alt="rxdrm_segments.png"/>
-</div>
-<ul>
-<li>green: correctly received segments</li>
-<li>red: missing segments</li>
-</ul>
-<p>Constellation: </p><div class="image">
-<img src="rxdrm_constellation.png" alt="rxdrm_constellation.png"/>
-</div>
-<ul>
-<li>FAC constellation (always QAM 4)</li>
-<li>MSC constellation.</li>
-</ul>
-<p>Receive status </p><div class="image">
-<img src="rxdrm_status.png" alt="rxdrm_status.png"/>
-</div>
-<ul>
-<li>Mode (A,B or E)</li>
-<li>Bandwidth (2.3 KHz or 2.5 KHz)</li>
-<li>Interleave (Short or Long)</li>
-<li>Protection (Normal or High)</li>
-<li>QAM (4,16 or 64)</li>
-<li>SNR (should be above 6 dBm)</li>
-<li>Offset (0 Hz if no frequency offset)</li>
-<li>Total Segm.: total number of segments in the file</li>
-<li>RX Sgmnts.: number of correctly received segment</li>
-<li>Cur. Sgmnt.: segment currently transmitted</li>
-<li>Transp. ID; unique identifier for the current stream.</li>
-<li>Callsign from the transmitting station</li>
-</ul>
-<div class="image">
-<img src="statusleds.png" alt="statusleds.png"/>
-</div>
-<ul>
-<li>TIME: green if time sync else red</li>
-<li>FRAME: green if frame sync else red</li>
-<li>FAC: green if FAC correctly received else red</li>
-<li>MSC:<ul>
-<li>red: incorrectly received</li>
-<li>green: correctly received</li>
-<li>yellow: already received</li>
-</ul>
-</li>
-</ul>
-<p>When an data stream is received , the program will try to decode it and save it in the receive image directory. If the data stream is a text file it will be displayed in a separate window. Just click OK to close it.</p>
-<div class="image">
-<img src="waterfall.png" alt="waterfall.png"/>
-</div>
-<p> Spectrum:<br />
- You can select the spectrum or the waterfall by clicking in this window. In DRM the waterfall gives you better view. The three markers above the waterfall indicate the position of the pilot frequencies. This helps tuning the radio to the correct frequency. <br />
-<br />
- (8) see <a class="el" href="_r_x_s_s_t_v.html">Receive SSTV Window</a> </p>
-</div></div><!-- contents -->
-</div><!-- doc-content -->
-<!-- start footer part -->
-<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
-  <ul>
-    <li class="navelem"><a class="el" href="index.html">QSSTV 9.1</a></li>
-    <li class="footer">Generated on Fri Jul 8 2016 14:33:50 for QSSTV by
-    <a href="http://www.doxygen.org/index.html">
-    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
-  </ul>
-</div>
-</body>
-</html>
diff --git a/qsstv/documentation/manual/manual/_r_x_s_s_t_v.html b/qsstv/documentation/manual/manual/_r_x_s_s_t_v.html
deleted file mode 100644
index 45f918f..0000000
--- a/qsstv/documentation/manual/manual/_r_x_s_s_t_v.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<meta http-equiv="X-UA-Compatible" content="IE=9"/>
-<meta name="generator" content="Doxygen 1.8.9.1"/>
-<title>QSSTV: Receive SSTV Window</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="jquery.js"></script>
-<script type="text/javascript" src="dynsections.js"></script>
-<link href="navtree.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="resize.js"></script>
-<script type="text/javascript" src="navtreedata.js"></script>
-<script type="text/javascript" src="navtree.js"></script>
-<script type="text/javascript">
-  $(document).ready(initResizable);
-  $(window).load(resizeHeight);
-</script>
-<link href="qsstv.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
-<div id="titlearea">
-<table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
-  <td style="padding-left: 0.5em;">
-   <div id="projectname">QSSTV
-    <span id="projectnumber">9.1</span>
-   </div>
-  </td>
- </tr>
- </tbody>
-</table>
-</div>
-<!-- end header part -->
-<!-- Generated by Doxygen 1.8.9.1 -->
-  <div id="navrow1" class="tabs">
-    <ul class="tablist">
-      <li><a href="index.html"><span>Main Page</span></a></li>
-      <li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
-    </ul>
-  </div>
-</div><!-- top -->
-<div id="side-nav" class="ui-resizable side-nav-resizable">
-  <div id="nav-tree">
-    <div id="nav-tree-contents">
-      <div id="nav-sync" class="sync"></div>
-    </div>
-  </div>
-  <div id="splitbar" style="-moz-user-select:none;" 
-       class="ui-resizable-handle">
-  </div>
-</div>
-<script type="text/javascript">
-$(document).ready(function(){initNavTree('_r_x_s_s_t_v.html','');});
-</script>
-<div id="doc-content">
-<div class="header">
-  <div class="headertitle">
-<div class="title">Receive SSTV Window </div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><div class="image">
-<img src="rxwidget1.png" alt="rxwidget1.png"/>
-</div>
-<p> Menu toolbar: </p><ul>
-<li><div class="image">
-<img src="start.png" alt="start.png"/>
-</div>
- start receiving images </li>
-<li><div class="image">
-<img src="stop.png" alt="stop.png"/>
-</div>
- stop receiving images </li>
-<li><div class="image">
-<img src="replay.png" alt="replay.png"/>
-</div>
- force a restart (e.g. when you see a wrong synchronization then click the restart button). </li>
-<li><div class="image">
-<img src="filesave.png" alt="filesave.png"/>
-</div>
- save the image at any time using the save button. You will probably want to use this if the Auto-save is not selected. Note only active in SSTV mode. </li>
-<li><div class="image">
-<img src="eraser.png" alt="eraser.png"/>
-</div>
- erase the screen</li>
-</ul>
-<p>Sync Indicator (vu-meter S):</p><ul>
-<li>sync quality ranging from 0-10</li>
-</ul>
-<p>Volume (vu-meter V):</p><ul>
-<li>adjust your recording level to half scale.</li>
-</ul>
-<p>SSTV tab:</p><ul>
-<li>Use VIS Code: the reception will only start if a correct VIS code is received. If left unchecked, QSSTV will auto-detect the modes (this is the most used method).</li>
-<li>Auto-slant: A lot of times the receive clock of the local station is not equal to the transmit clock of the sending station. The result is a slanted image. If The auto-slant is activated, the program will automatically try to compensate for those clock differences. You may notice a momentary freeze of the image build-up while the program is recalculating the image.</li>
-<li>Auto-save: When the program detect the end of the image, the image will be saved to disk.</li>
-<li>Save if Complete %: Auto-save if the image is at least completed for the indicated percentage.</li>
-<li>Mode: you can either select AUTO or one of the supported SSTV modes. When AUTO is selected, the program will try to determine the mode of the image it is receiving. If a specific mode is selected the program will reject all images except if they are transmitted in the selected mode.</li>
-<li>Signals: Normal and DX. When the Sensitivity is set to DX the signal will run until the end of the image before resynchronization.</li>
-</ul>
-<p>Spectrum and Waterfall:<br />
- There are three markers for SSTV (red lines):</p><ul>
-<li>1200: Sync frequency</li>
-<li>1500: Lower video frequency</li>
-<li>2300: Upper video frequency In DRM, the markers indicate the 3 unmodulated carrier frequencies </li>
-</ul>
-</div></div><!-- contents -->
-</div><!-- doc-content -->
-<!-- start footer part -->
-<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
-  <ul>
-    <li class="navelem"><a class="el" href="index.html">QSSTV 9.1</a></li>
-    <li class="footer">Generated on Fri Jul 8 2016 14:33:50 for QSSTV by
-    <a href="http://www.doxygen.org/index.html">
-    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
-  </ul>
-</div>
-</body>
-</html>
diff --git a/qsstv/documentation/manual/manual/_t_x_d_r_m.html b/qsstv/documentation/manual/manual/_t_x_d_r_m.html
deleted file mode 100644
index e7d9f1d..0000000
--- a/qsstv/documentation/manual/manual/_t_x_d_r_m.html
+++ /dev/null
@@ -1,124 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<meta http-equiv="X-UA-Compatible" content="IE=9"/>
-<meta name="generator" content="Doxygen 1.8.9.1"/>
-<title>QSSTV: Transmit DRM Window</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="jquery.js"></script>
-<script type="text/javascript" src="dynsections.js"></script>
-<link href="navtree.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="resize.js"></script>
-<script type="text/javascript" src="navtreedata.js"></script>
-<script type="text/javascript" src="navtree.js"></script>
-<script type="text/javascript">
-  $(document).ready(initResizable);
-  $(window).load(resizeHeight);
-</script>
-<link href="qsstv.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
-<div id="titlearea">
-<table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
-  <td style="padding-left: 0.5em;">
-   <div id="projectname">QSSTV
-    <span id="projectnumber">9.1</span>
-   </div>
-  </td>
- </tr>
- </tbody>
-</table>
-</div>
-<!-- end header part -->
-<!-- Generated by Doxygen 1.8.9.1 -->
-  <div id="navrow1" class="tabs">
-    <ul class="tablist">
-      <li><a href="index.html"><span>Main Page</span></a></li>
-      <li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
-    </ul>
-  </div>
-</div><!-- top -->
-<div id="side-nav" class="ui-resizable side-nav-resizable">
-  <div id="nav-tree">
-    <div id="nav-tree-contents">
-      <div id="nav-sync" class="sync"></div>
-    </div>
-  </div>
-  <div id="splitbar" style="-moz-user-select:none;" 
-       class="ui-resizable-handle">
-  </div>
-</div>
-<script type="text/javascript">
-$(document).ready(function(){initNavTree('_t_x_d_r_m.html','');});
-</script>
-<div id="doc-content">
-<div class="header">
-  <div class="headertitle">
-<div class="title">Transmit DRM Window </div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><div class="image">
-<img src="transmitdrm.png" alt="transmitdrm.png"/>
-</div>
-<p>see also <a class="el" href="_t_x_s_s_t_v.html#sstvMenu">sstvMenu</a> under SSTV TX</p>
-<ul>
-<li><div class="image">
-<img src="binary.png" alt="binary.png"/>
-</div>
- Click here to send a binary file (basically any file will do)</li>
-<li><div class="image">
-<img src="hybrid_checkbox.png" alt="hybrid_checkbox.png"/>
-</div>
- When this check-box is checked, the image is transmitted in hybrid mode.</li>
-</ul>
-<p>For the other icons and actions see also <a class="el" href="_t_x_s_s_t_v.html">Transmit SSTV Window</a> <br />
- <br />
- Mode Selection </p><div class="image">
-<img src="txdrm_options.png" alt="txdrm_options.png"/>
-</div>
-<p> <br />
-</p><ul>
-<li>Mode (A,B or E)</li>
-<li>Bandwidth (2.3 KHz or 2.5 KHz)</li>
-<li>Interleave (Short or Long)</li>
-<li>Protection (Normal or High)</li>
-<li>QAM (4,16 or 64)</li>
-<li>Reed Solomon: (rs1, rs2, rs3 or rs4).File encoder for forward error correction. On HF it is recommended to always use Reed Solomon. The most often used is rs2. The higher the number, the more protection but also the more overhead.</li>
-<li>Profile: quick selection of a profile (i.e. settings of mode,QAM ...) as defined in the Options->Configuration->DRM Profiles) <br />
-</li>
-</ul>
-<div class="image">
-<img src="txdrm_status.png" alt="txdrm_status.png"/>
-</div>
-<p>The TX progress-bar indicates the progress of the transmission.</p>
-<p>see also <a class="el" href="_t_x_s_s_t_v.html#Control">Control</a> under SSTV TX</p><ul>
-<li>Last received image will be updated automatically as new images are received. They can be inserted if you use a template containing an "image replay object" see also <a class="el" href="editor.html">Editor</a> <br />
-</li>
-<li>Compression <br />
-<br />
-</li>
-</ul>
-<div class="image">
-<img src="txdrm_compression.png" alt="txdrm_compression.png"/>
-</div>
-<p> <br />
-Avoid to send huge images (especially if you're not in hybrid mode).<br />
- You can drag the slider to compress the image before it is sent (the original image is not modified). The file size is shown on the right. You can see the result in the image frame when you release the handle. <br />
- Note: This does not include the overhead of the RS-encoding. </p>
-</div></div><!-- contents -->
-</div><!-- doc-content -->
-<!-- start footer part -->
-<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
-  <ul>
-    <li class="navelem"><a class="el" href="index.html">QSSTV 9.1</a></li>
-    <li class="footer">Generated on Fri Jul 8 2016 14:33:50 for QSSTV by
-    <a href="http://www.doxygen.org/index.html">
-    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
-  </ul>
-</div>
-</body>
-</html>
diff --git a/qsstv/documentation/manual/manual/_t_x_s_s_t_v.html b/qsstv/documentation/manual/manual/_t_x_s_s_t_v.html
deleted file mode 100644
index d3308bd..0000000
--- a/qsstv/documentation/manual/manual/_t_x_s_s_t_v.html
+++ /dev/null
@@ -1,149 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<meta http-equiv="X-UA-Compatible" content="IE=9"/>
-<meta name="generator" content="Doxygen 1.8.9.1"/>
-<title>QSSTV: Transmit SSTV Window</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="jquery.js"></script>
-<script type="text/javascript" src="dynsections.js"></script>
-<link href="navtree.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="resize.js"></script>
-<script type="text/javascript" src="navtreedata.js"></script>
-<script type="text/javascript" src="navtree.js"></script>
-<script type="text/javascript">
-  $(document).ready(initResizable);
-  $(window).load(resizeHeight);
-</script>
-<link href="qsstv.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
-<div id="titlearea">
-<table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
-  <td style="padding-left: 0.5em;">
-   <div id="projectname">QSSTV
-    <span id="projectnumber">9.1</span>
-   </div>
-  </td>
- </tr>
- </tbody>
-</table>
-</div>
-<!-- end header part -->
-<!-- Generated by Doxygen 1.8.9.1 -->
-  <div id="navrow1" class="tabs">
-    <ul class="tablist">
-      <li><a href="index.html"><span>Main Page</span></a></li>
-      <li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
-    </ul>
-  </div>
-</div><!-- top -->
-<div id="side-nav" class="ui-resizable side-nav-resizable">
-  <div id="nav-tree">
-    <div id="nav-tree-contents">
-      <div id="nav-sync" class="sync"></div>
-    </div>
-  </div>
-  <div id="splitbar" style="-moz-user-select:none;" 
-       class="ui-resizable-handle">
-  </div>
-</div>
-<script type="text/javascript">
-$(document).ready(function(){initNavTree('_t_x_s_s_t_v.html','');});
-</script>
-<div id="doc-content">
-<div class="header">
-  <div class="headertitle">
-<div class="title">Transmit SSTV Window </div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><div class="image">
-<img src="txwidget1.png" alt="txwidget1.png"/>
-</div>
-<p>The TX progress-bar indicates the progress of the transmission. <br />
-<br />
- <a class="anchor" id="sstvMenu"></a>Menu toolbar: </p><ul>
-<li><div class="image">
-<img src="start.png" alt="start.png"/>
-</div>
- start transmitting images </li>
-<li><div class="image">
-<img src="stop.png" alt="stop.png"/>
-</div>
- stop transmitting images </li>
-<li><div class="image">
-<img src="tone.png" alt="tone.png"/>
-</div>
- sends a repeater tone of 1750 Hz </li>
-<li><div class="image">
-<img src="fileopen.png" alt="fileopen.png"/>
-</div>
- loads a file in the transmit window </li>
-<li><div class="image">
-<img src="edit.png" alt="edit.png"/>
-</div>
- opens the image editor </li>
-<li><div class="image">
-<img src="camera.png" alt="camera.png"/>
-</div>
- takes a snapshot if there is a camera installed that is supported by v4l2 </li>
-<li><div class="image">
-<img src="binary.png" alt="binary.png"/>
-</div>
- only used in DRM mode </li>
-<li><div class="image">
-<img src="doubletone.png" alt="doubletone.png"/>
-</div>
- let you select frequency and duration of a tone to send </li>
-<li><div class="image">
-<img src="sweep.png" alt="sweep.png"/>
-</div>
- let you select the sweep frequencies and duration to send </li>
-<li><div class="image">
-<img src="hybrid_dis_checkbox.png" alt="hybrid_dis_checkbox.png"/>
-</div>
- This check-box is disabled in SSTV mode </li>
-<li><div class="image">
-<img src="refreshbutton.png" alt="refreshbutton.png"/>
-</div>
- You can refresh the content of the replay image by clicking the Refresh button (e.g. when you have loaded a new image in the preview image window).</li>
-</ul>
-<ul>
-<li>Select the transmission mode (Martin 1, Scottie etc.).</li>
-</ul>
-<p><a class="anchor" id="Control"></a></p><ul>
-<li>Select CW if you want to append a morse message after the image (the message is set in Options->Configuration->CW) .</li>
-<li>If the VOX check-box is set a tone will be sent before the actual image is sent so that you can use the VOX on your transceiver (if you do not have PTT control).</li>
-<li>Select the template (or none) you want as an overlay (see <a class="el" href="gallery.html">Gallery</a>). Only the templates that are in the Gallery will be available.</li>
-</ul>
-<p>The text inputs correspond to the following macros:</p>
-<ul>
-<li>TO: %c - call of the contacted station </li>
-<li>RSV %r - RSV (radio-strength-video best is 595) </li>
-<li>Op: %o - name of the operator of the contacted station </li>
-<li>x %x - comment1 </li>
-<li>y %y - comment2 </li>
-<li>z %z - comment3 <br />
- see also <a class="el" href="editor.html">Editor</a></li>
-</ul>
-<ul>
-<li>The last received image is displayed at the bottom right. It will be updated automatically as new images are received. They can be inserted if you use a template containing an "image replay object" see also <a class="el" href="editor.html">Editor</a> <br />
- Right clicking on this image also allows you to load other images for insertion. Use the refresh button to update the main window if necessary. </li>
-</ul>
-</div></div><!-- contents -->
-</div><!-- doc-content -->
-<!-- start footer part -->
-<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
-  <ul>
-    <li class="navelem"><a class="el" href="index.html">QSSTV 9.1</a></li>
-    <li class="footer">Generated on Fri Jul 8 2016 14:33:50 for QSSTV by
-    <a href="http://www.doxygen.org/index.html">
-    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
-  </ul>
-</div>
-</body>
-</html>
diff --git a/qsstv/documentation/manual/manual/changelog.html b/qsstv/documentation/manual/manual/changelog.html
index 2319f93..bb08374 100644
--- a/qsstv/documentation/manual/manual/changelog.html
+++ b/qsstv/documentation/manual/manual/changelog.html
@@ -62,6 +62,25 @@ $(document).ready(function(){initNavTree('changelog.html','');});
 </div><!--header-->
 <div class="contents">
 <div class="textblock"><ul>
+<li>20170817 QSSTV 9.2.6<ul>
+<li>Changed the .pro file for autodetecing correct libopenjpg2 (DL1JBE -Tom)</li>
+<li>ftp transfer - initialize bug fix (VK6MN- Mike)</li>
+<li>Help manual -> path correction and corrected some typo's (DJ0MBA- Marinus)</li>
+<li>SSTV initialize bug fix (Adrian)</li>
+<li>Camera support for Raspberry PI Cam</li>
+<li>fixed audio loopback use</li>
+<li>fixed transmission after stop, image was not restarted at top</li>
+</ul>
+</li>
+</ul>
+<ul>
+<li>20161022 QSSTV 9.2.5<ul>
+<li>Screen size reduced for use with smaller screens-fixed.</li>
+<li>rig control - added capabilities test.</li>
+</ul>
+</li>
+</ul>
+<ul>
 <li>20161022 QSSTV 9.2.4<ul>
 <li>some minor bugfixing</li>
 <li>eliminated online status setting in Config Notication tab (doubled with setting in Operator settings)</li>
@@ -214,7 +233,7 @@ $(document).ready(function(){initNavTree('changelog.html','');});
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/credits.html b/qsstv/documentation/manual/manual/credits.html
index 3f163bb..a47994e 100644
--- a/qsstv/documentation/manual/manual/credits.html
+++ b/qsstv/documentation/manual/manual/credits.html
@@ -88,7 +88,7 @@ and adapted by PA0MBO. For more information , see the manual of txrxamadrm.</li>
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/editor.html b/qsstv/documentation/manual/manual/editor.html
index 8caa955..07c5c23 100644
--- a/qsstv/documentation/manual/manual/editor.html
+++ b/qsstv/documentation/manual/manual/editor.html
@@ -194,7 +194,7 @@ You can enter multiple lines of text. Click OK, the window will be hidden and yo
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/externalprog.html b/qsstv/documentation/manual/manual/externalprog.html
index ee43d4c..b870f9f 100644
--- a/qsstv/documentation/manual/manual/externalprog.html
+++ b/qsstv/documentation/manual/manual/externalprog.html
@@ -104,7 +104,7 @@ $(document).ready(function(){initNavTree('externalprog.html','');});
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/fixdrm.html b/qsstv/documentation/manual/manual/fixdrm.html
index 4f4e21c..e1283b0 100644
--- a/qsstv/documentation/manual/manual/fixdrm.html
+++ b/qsstv/documentation/manual/manual/fixdrm.html
@@ -74,7 +74,7 @@ $(document).ready(function(){initNavTree('fixdrm.html','');});
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/gallery.html b/qsstv/documentation/manual/manual/gallery.html
index e4f9383..4e053a7 100644
--- a/qsstv/documentation/manual/manual/gallery.html
+++ b/qsstv/documentation/manual/manual/gallery.html
@@ -89,7 +89,7 @@ $(document).ready(function(){initNavTree('gallery.html','');});
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/gettingstarted.html b/qsstv/documentation/manual/manual/gettingstarted.html
index 4e83eb7..00dd130 100644
--- a/qsstv/documentation/manual/manual/gettingstarted.html
+++ b/qsstv/documentation/manual/manual/gettingstarted.html
@@ -370,7 +370,7 @@ remote           local      st poll reach  delay   offset    disp
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/imagepopup.html b/qsstv/documentation/manual/manual/imagepopup.html
index 2042a66..2ed60f8 100644
--- a/qsstv/documentation/manual/manual/imagepopup.html
+++ b/qsstv/documentation/manual/manual/imagepopup.html
@@ -84,7 +84,7 @@ $(document).ready(function(){initNavTree('imagepopup.html','');});
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/index.html b/qsstv/documentation/manual/manual/index.html
index a2ec081..ae838f5 100644
--- a/qsstv/documentation/manual/manual/index.html
+++ b/qsstv/documentation/manual/manual/index.html
@@ -92,7 +92,7 @@ Introduction</h1>
 <!-- start footer part -->
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/installation.html b/qsstv/documentation/manual/manual/installation.html
index fd46f17..c8cdda0 100644
--- a/qsstv/documentation/manual/manual/installation.html
+++ b/qsstv/documentation/manual/manual/installation.html
@@ -105,7 +105,7 @@ Step 4: Run QSSTV</h1>
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/pages.html b/qsstv/documentation/manual/manual/pages.html
index d4ba8cb..901d579 100644
--- a/qsstv/documentation/manual/manual/pages.html
+++ b/qsstv/documentation/manual/manual/pages.html
@@ -70,7 +70,7 @@ $(document).ready(function(){initNavTree('pages.html','');});
 <!-- start footer part -->
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/statusbar.html b/qsstv/documentation/manual/manual/statusbar.html
index ad05b5e..a894aa9 100644
--- a/qsstv/documentation/manual/manual/statusbar.html
+++ b/qsstv/documentation/manual/manual/statusbar.html
@@ -97,7 +97,7 @@ Note: BSR is greyed out in SSTV. <br />
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/todo1.html b/qsstv/documentation/manual/manual/todo1.html
index 46480ae..4865424 100644
--- a/qsstv/documentation/manual/manual/todo1.html
+++ b/qsstv/documentation/manual/manual/todo1.html
@@ -72,7 +72,7 @@ $(document).ready(function(){initNavTree('todo1.html','');});
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/documentation/manual/manual/whatsnew.html b/qsstv/documentation/manual/manual/whatsnew.html
index 8e5b9a6..8ce7c01 100644
--- a/qsstv/documentation/manual/manual/whatsnew.html
+++ b/qsstv/documentation/manual/manual/whatsnew.html
@@ -82,7 +82,7 @@ $(document).ready(function(){initNavTree('whatsnew.html','');});
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
   <ul>
     <li class="navelem"><a class="el" href="index.html">QSSTV 9.2</a></li>
-    <li class="footer">Generated on Sat Oct 22 2016 16:05:51 for QSSTV by
+    <li class="footer">Generated on Thu Nov 16 2017 18:16:13 for QSSTV by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>
diff --git a/qsstv/drmrx/drmstatusframe.ui b/qsstv/drmrx/drmstatusframe.ui
index d94f3d5..4c5f414 100644
--- a/qsstv/drmrx/drmstatusframe.ui
+++ b/qsstv/drmrx/drmstatusframe.ui
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>387</width>
-    <height>225</height>
+    <width>285</width>
+    <height>210</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -53,12 +53,12 @@
     <number>0</number>
    </property>
    <item>
-    <layout class="QGridLayout" name="gridLayout" rowminimumheight="1,1,1,1">
+    <layout class="QGridLayout" name="gridLayout">
      <property name="verticalSpacing">
       <number>1</number>
      </property>
-     <item row="0" column="0">
-      <widget class="QLabel" name="modeLabel">
+     <item row="3" column="0">
+      <widget class="QLabel" name="offsetLabel">
        <property name="minimumSize">
         <size>
          <width>0</width>
@@ -66,12 +66,12 @@
         </size>
        </property>
        <property name="text">
-        <string>Mode</string>
+        <string>Offset</string>
        </property>
       </widget>
      </item>
-     <item row="0" column="1">
-      <widget class="QLabel" name="modeEdit">
+     <item row="1" column="1">
+      <widget class="QLabel" name="bandwidthEdit">
        <property name="minimumSize">
         <size>
          <width>40</width>
@@ -87,37 +87,47 @@
       </widget>
      </item>
      <item row="0" column="2">
+      <widget class="QLabel" name="interleaveLabel">
+       <property name="minimumSize">
+        <size>
+         <width>0</width>
+         <height>15</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>InterL.</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="0">
       <widget class="QLabel" name="bandwidthLabel">
        <property name="text">
-        <string>Bandwidth</string>
+        <string>Bandw</string>
        </property>
       </widget>
      </item>
-     <item row="0" column="3">
-      <widget class="QLabel" name="bandwidthEdit">
+     <item row="2" column="4">
+      <widget class="QLabel" name="rxSegmentsLabel">
        <property name="minimumSize">
         <size>
-         <width>40</width>
-         <height>0</height>
+         <width>0</width>
+         <height>15</height>
         </size>
        </property>
-       <property name="frameShape">
-        <enum>QFrame::Box</enum>
-       </property>
        <property name="text">
-        <string/>
+        <string>RX  Seg</string>
        </property>
       </widget>
      </item>
-     <item row="0" column="4">
-      <widget class="QLabel" name="qamLabel">
+     <item row="1" column="4">
+      <widget class="QLabel" name="curSegmentLabel">
        <property name="text">
-        <string>QAM</string>
+        <string>Cur. Seg</string>
        </property>
       </widget>
      </item>
-     <item row="0" column="5">
-      <widget class="QLabel" name="qamEdit">
+     <item row="2" column="5">
+      <widget class="QLabel" name="rxSegmentsEdit">
        <property name="minimumSize">
         <size>
          <width>40</width>
@@ -132,21 +142,8 @@
        </property>
       </widget>
      </item>
-     <item row="1" column="0">
-      <widget class="QLabel" name="interleaveLabel">
-       <property name="minimumSize">
-        <size>
-         <width>0</width>
-         <height>15</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>InterLeave</string>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="1">
-      <widget class="QLabel" name="interleaveEdit">
+     <item row="1" column="3">
+      <widget class="QLabel" name="protectionEdit">
        <property name="minimumSize">
         <size>
          <width>40</width>
@@ -161,15 +158,15 @@
        </property>
       </widget>
      </item>
-     <item row="1" column="2">
-      <widget class="QLabel" name="protectionLabel">
+     <item row="2" column="0">
+      <widget class="QLabel" name="qamLabel">
        <property name="text">
-        <string>Protection</string>
+        <string>QAM</string>
        </property>
       </widget>
      </item>
-     <item row="1" column="3">
-      <widget class="QLabel" name="protectionEdit">
+     <item row="0" column="1">
+      <widget class="QLabel" name="modeEdit">
        <property name="minimumSize">
         <size>
          <width>40</width>
@@ -184,14 +181,7 @@
        </property>
       </widget>
      </item>
-     <item row="1" column="4">
-      <widget class="QLabel" name="transportIDLabel">
-       <property name="text">
-        <string>Transp. ID</string>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="5">
+     <item row="0" column="5">
       <widget class="QLabel" name="transportIDEdit">
        <property name="minimumSize">
         <size>
@@ -207,21 +197,22 @@
        </property>
       </widget>
      </item>
-     <item row="2" column="0">
-      <widget class="QLabel" name="offsetLabel">
-       <property name="minimumSize">
-        <size>
-         <width>0</width>
-         <height>15</height>
-        </size>
+     <item row="1" column="2">
+      <widget class="QLabel" name="protectionLabel">
+       <property name="text">
+        <string>Protec</string>
        </property>
+      </widget>
+     </item>
+     <item row="3" column="4">
+      <widget class="QLabel" name="totalSegmentsLabel">
        <property name="text">
-        <string>Offset</string>
+        <string>Total Seg</string>
        </property>
       </widget>
      </item>
-     <item row="2" column="1">
-      <widget class="QLabel" name="offsetEdit">
+     <item row="2" column="3">
+      <widget class="QLabel" name="snrEdit">
        <property name="minimumSize">
         <size>
          <width>40</width>
@@ -243,8 +234,21 @@
        </property>
       </widget>
      </item>
-     <item row="2" column="3">
-      <widget class="QLabel" name="snrEdit">
+     <item row="0" column="0">
+      <widget class="QLabel" name="modeLabel">
+       <property name="minimumSize">
+        <size>
+         <width>0</width>
+         <height>15</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>Mode</string>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="5">
+      <widget class="QLabel" name="totalSegmentsEdit">
        <property name="minimumSize">
         <size>
          <width>40</width>
@@ -259,21 +263,24 @@
        </property>
       </widget>
      </item>
-     <item row="3" column="0">
-      <widget class="QLabel" name="rxSegmentsLabel">
+     <item row="0" column="3">
+      <widget class="QLabel" name="interleaveEdit">
        <property name="minimumSize">
         <size>
-         <width>0</width>
-         <height>15</height>
+         <width>40</width>
+         <height>0</height>
         </size>
        </property>
+       <property name="frameShape">
+        <enum>QFrame::Box</enum>
+       </property>
        <property name="text">
-        <string>RX  Sgmnts</string>
+        <string/>
        </property>
       </widget>
      </item>
      <item row="3" column="1">
-      <widget class="QLabel" name="rxSegmentsEdit">
+      <widget class="QLabel" name="offsetEdit">
        <property name="minimumSize">
         <size>
          <width>40</width>
@@ -288,15 +295,8 @@
        </property>
       </widget>
      </item>
-     <item row="3" column="2">
-      <widget class="QLabel" name="curSegmentLabel">
-       <property name="text">
-        <string>Cur. Sgmnt</string>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="3">
-      <widget class="QLabel" name="currentSegmentEdit">
+     <item row="2" column="1">
+      <widget class="QLabel" name="qamEdit">
        <property name="minimumSize">
         <size>
          <width>40</width>
@@ -311,15 +311,15 @@
        </property>
       </widget>
      </item>
-     <item row="3" column="4">
-      <widget class="QLabel" name="totalSegmentsLabel">
+     <item row="0" column="4">
+      <widget class="QLabel" name="transportIDLabel">
        <property name="text">
-        <string>Total Segm.</string>
+        <string>Transp. ID</string>
        </property>
       </widget>
      </item>
-     <item row="3" column="5">
-      <widget class="QLabel" name="totalSegmentsEdit">
+     <item row="1" column="5">
+      <widget class="QLabel" name="currentSegmentEdit">
        <property name="minimumSize">
         <size>
          <width>40</width>
diff --git a/qsstv/logbook/logbook.cpp b/qsstv/logbook/logbook.cpp
index dd14f86..ffbe1e7 100644
--- a/qsstv/logbook/logbook.cpp
+++ b/qsstv/logbook/logbook.cpp
@@ -10,7 +10,7 @@
 
 slogParam logParamArray[NUMLOGPARAMS]=
 {
-    {"program","QSSTV 8"},
+    {"program","QSSTV 9"},
     {"version", "1"},
     {"date","" },
     {"time",""  },
diff --git a/qsstv/mainwidgets/rxfunctions.cpp b/qsstv/mainwidgets/rxfunctions.cpp
index 39aed5f..b993a77 100644
--- a/qsstv/mainwidgets/rxfunctions.cpp
+++ b/qsstv/mainwidgets/rxfunctions.cpp
@@ -55,6 +55,7 @@ void rxFunctions::run()
               msleep((250*RXSTRIPE)/rxClock);
               if(!soundIOPtr->isCapturing())
                 {
+//                  qDebug() << " not capturing";
                   switchRxState(RXINIT);
                 }
             }
@@ -135,7 +136,7 @@ void rxFunctions::forceInit()
 
 void rxFunctions::stopAndWait()
 {
-  soundIOPtr->idleRX();
+  if(soundIOPtr) soundIOPtr->idleRX();
   switchRxState(RXINIT);
   if(!isRunning())
     {
diff --git a/qsstv/mainwidgets/rxwidget.ui b/qsstv/mainwidgets/rxwidget.ui
index 099608c..980cb2d 100644
--- a/qsstv/mainwidgets/rxwidget.ui
+++ b/qsstv/mainwidgets/rxwidget.ui
@@ -163,8 +163,8 @@
          </property>
          <property name="minimumSize">
           <size>
-           <width>320</width>
-           <height>256</height>
+           <width>280</width>
+           <height>200</height>
           </size>
          </property>
          <property name="maximumSize">
@@ -173,7 +173,7 @@
            <height>16777215</height>
           </size>
          </property>
-         </widget>
+        </widget>
        </item>
       </layout>
      </item>
diff --git a/qsstv/mainwidgets/txfunctions.cpp b/qsstv/mainwidgets/txfunctions.cpp
index 03742a5..9dec610 100644
--- a/qsstv/mainwidgets/txfunctions.cpp
+++ b/qsstv/mainwidgets/txfunctions.cpp
@@ -415,7 +415,7 @@ void txFunctions::stopAndWait()
     {
       qApp->processEvents();
     }
-  soundIOPtr->idleTX();
+  if(soundIOPtr) soundIOPtr->idleTX();
   addToLog("txFunc: stop executed",LOGTXFUNC);
 }
 
diff --git a/qsstv/mainwidgets/txwidget.cpp b/qsstv/mainwidgets/txwidget.cpp
index c3d90b6..dcf9dfa 100644
--- a/qsstv/mainwidgets/txwidget.cpp
+++ b/qsstv/mainwidgets/txwidget.cpp
@@ -330,7 +330,8 @@ void txWidget::slotStart()
 
 void txWidget::slotUpload()
 {
-  if(imageViewerPtr->hasValidImage()) {
+  if(imageViewerPtr->hasValidImage())
+    {
       doTx=0;
       prepareTx();
     }
@@ -498,6 +499,7 @@ void txWidget::slotFileOpen()
 {
   QString fileName;
   imageViewerPtr->openImage(fileName,txStockImagesPath,true,true,true,false);
+  applyTemplate();
 }
 
 void txWidget::slotGenerateSignal()
diff --git a/qsstv/mainwidgets/txwidget.ui b/qsstv/mainwidgets/txwidget.ui
index c0779a3..93f61cf 100644
--- a/qsstv/mainwidgets/txwidget.ui
+++ b/qsstv/mainwidgets/txwidget.ui
@@ -809,7 +809,7 @@
         </palette>
        </property>
        <property name="currentIndex">
-        <number>0</number>
+        <number>1</number>
        </property>
        <widget class="QWidget" name="sstvTXTab">
         <attribute name="title">
@@ -1047,14 +1047,17 @@
              <height>16777215</height>
             </size>
            </property>
+           <property name="currentText">
+            <string>2.2 kHz</string>
+           </property>
            <item>
             <property name="text">
-             <string>2.2 KHz</string>
+             <string>2.2 kHz</string>
             </property>
            </item>
            <item>
             <property name="text">
-             <string>2.5 KHz</string>
+             <string>2.5 kHz</string>
             </property>
            </item>
           </widget>
diff --git a/qsstv/mainwindow.ui b/qsstv/mainwindow.ui
index 597d0b5..d3eff36 100644
--- a/qsstv/mainwindow.ui
+++ b/qsstv/mainwindow.ui
@@ -149,7 +149,7 @@
       </property>
       <property name="minimumSize">
        <size>
-        <width>180</width>
+        <width>160</width>
         <height>0</height>
        </size>
       </property>
@@ -175,7 +175,7 @@
      <x>0</x>
      <y>0</y>
      <width>831</width>
-     <height>20</height>
+     <height>18</height>
     </rect>
    </property>
    <property name="font">
diff --git a/qsstv/qsstv.pro b/qsstv/qsstv.pro
index 870d89d..15545ac 100644
--- a/qsstv/qsstv.pro
+++ b/qsstv/qsstv.pro
@@ -15,8 +15,10 @@ QMAKE_CXXFLAGS_RELEASE += -O3
 
 TARGET = qsstv
 TEMPLATE = app
-INCLUDEPATH += config utils sound widgets dsp dispatch logbook mainwidgets rig sstv videocapt drmrx drmtx xmlrpc  /usr/include/openjpeg-2.1
+INCLUDEPATH += config utils sound widgets dsp dispatch logbook mainwidgets rig sstv videocapt drmrx drmtx xmlrpc
 
+CONFIG += link_pkgconfig
+PKGCONFIG += libopenjp2
 
 SOURCES += main.cpp\
         mainwindow.cpp \
@@ -401,7 +403,6 @@ FORMS += mainwindow.ui \
          -lhamlib \
           -lv4l2 \
          -lv4lconvert \
-         -lopenjp2 \
          -lrt
 
 
diff --git a/qsstv/rig/freqdisplay.ui b/qsstv/rig/freqdisplay.ui
index 0808089..8ddff65 100644
--- a/qsstv/rig/freqdisplay.ui
+++ b/qsstv/rig/freqdisplay.ui
@@ -30,7 +30,7 @@
     <number>1</number>
    </property>
    <item>
-    <widget class="QLabel" name="KHzLabel">
+    <widget class="QLabel" name="kHzLabel">
      <property name="font">
       <font>
        <weight>75</weight>
@@ -38,7 +38,7 @@
       </font>
      </property>
      <property name="text">
-      <string>KHz</string>
+      <string>kHz</string>
      </property>
     </widget>
    </item>
diff --git a/qsstv/rig/rigcontrol.cpp b/qsstv/rig/rigcontrol.cpp
index c6b1991..19e9eab 100644
--- a/qsstv/rig/rigcontrol.cpp
+++ b/qsstv/rig/rigcontrol.cpp
@@ -108,10 +108,22 @@ bool rigControl::init()
     }
     addToLog("rigcontroller successfully opened",LOGRIGCTRL);
     rigControlEnabled=true;
+
+
+
     // int verbose=0;
     // rig_set_debug(verbose<2 ? RIG_DEBUG_NONE: (rig_debug_level_e)verbose);
     // rig_debug(RIG_DEBUG_VERBOSE, "rigctl, %s\n", hamlib_version);
     // test if we can contact the tranceiver
+
+    canSetFreq=(my_rig->caps->set_freq != NULL);
+    canGetFreq=(my_rig->caps->get_freq != NULL);
+    canSetMode=(my_rig->caps->set_mode != NULL);
+    canGetMode=(my_rig->caps->get_mode != NULL);
+    canSetPTT=(my_rig->caps->set_ptt != NULL);
+    canGetPTT=(my_rig->caps->get_ptt != NULL);
+
+
     double fr;
     if(!getFrequency(fr))
     {
@@ -129,7 +141,7 @@ bool rigControl::getFrequency(double &frequency)
     }
     else
     {
-        if(!rigControlEnabled) return false;
+        if(!rigControlEnabled || !canGetFreq) return false;
         retcode = rig_get_freq(my_rig, RIG_VFO_CURR, &frequency);
         if (retcode != RIG_OK )
             frequency=lastFrequency;
@@ -147,9 +159,9 @@ bool rigControl::setFrequency(double frequency)
     }
     else
     {
-        if(!rigControlEnabled) return false;
-        retcode = rig_set_vfo(my_rig, RIG_VFO_CURR);
-        if (retcode != RIG_OK ) {errorMessage(retcode,"setVFO"); return false; }
+        if(!rigControlEnabled || !canSetFreq) return false;
+//        retcode = rig_set_vfo(my_rig, RIG_VFO_CURR);
+//        if (retcode != RIG_OK ) {errorMessage(retcode,"setVFO"); return false; }
         retcode = rig_set_freq(my_rig, RIG_VFO_CURR, frequency);
         if (retcode != RIG_OK ) {errorMessage(retcode,"setFrequency"); return false; }
     }
@@ -177,7 +189,7 @@ bool rigControl::getMode(QString &mode)
         rmode_t rmode;
         pbwidth_t width;
         int retcode;
-        if(!rigControlEnabled) return false;
+        if(!rigControlEnabled || !canGetMode) return false;
         retcode = rig_get_mode(my_rig, RIG_VFO_CURR, &rmode, &width);
         if (retcode != RIG_OK ) {errorMessage(retcode,"getMode"); return false; }
         mode=QString(rig_strrmode(rmode));
@@ -208,7 +220,7 @@ bool rigControl::setMode(QString mode)
     {
         rmode_t rmode=rig_parse_mode(mode.toLatin1().data());
         int retcode;
-        if(!rigControlEnabled) return false;
+        if(!rigControlEnabled || !canSetMode) return false;
         retcode = rig_set_mode(my_rig, RIG_VFO_CURR, rmode, rig_passband_normal(my_rig,rmode));
         if (retcode != RIG_OK ) {errorMessage(retcode,"setMode"); return false; }
     }
@@ -222,7 +234,7 @@ bool rigControl::setPTT(bool on)
     ptt_t ptt;
     /* Hamlib will fall back to RIG_PTT_ON if RIG_PTT_ON_DATA is not available in current hamlib configuration */	
     if(on) ptt=RIG_PTT_ON_DATA; else ptt=RIG_PTT_OFF;
-    if(!rigControlEnabled) return false;
+    if(!rigControlEnabled || !canSetPTT) return false;
     retcode = rig_set_ptt (my_rig, RIG_VFO_CURR,ptt);
     if (retcode != RIG_OK ) {errorMessage(retcode,"setPTT"); return false; }
     return true;
diff --git a/qsstv/rig/rigcontrol.h b/qsstv/rig/rigcontrol.h
index 0aa3661..a725047 100644
--- a/qsstv/rig/rigcontrol.h
+++ b/qsstv/rig/rigcontrol.h
@@ -79,6 +79,12 @@ private:
   bool setPTT(bool On);
   double lastFrequency;
   QStringList xmlModes;
+  bool canSetFreq;
+  bool canGetFreq;
+  bool canSetMode;
+  bool canGetMode;
+  bool canSetPTT;
+  bool canGetPTT;
 
 
 
diff --git a/qsstv/sound/soundalsa.cpp b/qsstv/sound/soundalsa.cpp
index 5f40a76..cd86c9f 100644
--- a/qsstv/sound/soundalsa.cpp
+++ b/qsstv/sound/soundalsa.cpp
@@ -82,6 +82,7 @@ void soundAlsa::preparePlayback()
 int soundAlsa::read(int &countAvailable)
 {
   int i,count;
+
 //  addToLog("1",LOGPERFORM);
    countAvailable=snd_pcm_avail(captureHandle); // check for available frames
   if(countAvailable>=DOWNSAMPLESIZE)
@@ -115,6 +116,17 @@ int soundAlsa::read(int &countAvailable)
        errorOut() <<"Partial read "<< count ;
       return 0;
     }
+
+    if (is32bit)
+    {
+        for(i=1;i<DOWNSAMPLESIZE;i++)
+        {
+//           qDebug()<< QString::number(((qint32 *)tempRXBuffer)[i],16);
+//          tempRXBuffer[i]=(qint16)(((qint32 *)tempRXBuffer)[i]>>16);
+            tempRXBuffer[i]=tempRXBuffer[2*i+1];
+//          qDebug() << QString::number(tempRXBuffer[i],16);
+        }
+    }
     if (isStereo)
     {
       for(i=1;i<DOWNSAMPLESIZE;i++)
@@ -211,6 +223,7 @@ bool soundAlsa::setupSoundParams(bool isCapture)
   int dir=0;
   snd_pcm_t *handle;
   isStereo=false;
+  snd_pcm_format_t  format;
 
   playbackPeriodSize=PERIODSIZE;
   playbackBufferSize=BUFFERSIZE;
@@ -227,6 +240,7 @@ bool soundAlsa::setupSoundParams(bool isCapture)
   {
     return false;
   }
+  err=snd_pcm_hw_params_get_format (hwparams, &format );
 
 
   /* Set the interleaved read/write format */
@@ -234,8 +248,17 @@ bool soundAlsa::setupSoundParams(bool isCapture)
   if(!alsaErrorHandler(err,"Access type not available : ")) return false;
 
   /* Set the sample format */
+  is32bit=false;
   err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_S16_LE );
-  if(!alsaErrorHandler(err,"Sample format Float not available : ")) return false;
+  if(!alsaErrorHandler(err,"Sample format S16_LE not available : "))
+  {
+      is32bit=true;
+      err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_S32_LE );
+      if(!alsaErrorHandler(err,"Sample format S32_LE not available : "))
+      {
+          return false;
+      }
+  }
   /* Set the count of channels */
   if(isCapture)
   {
diff --git a/qsstv/sound/soundalsa.h b/qsstv/sound/soundalsa.h
index 09669d7..91fe2fc 100644
--- a/qsstv/sound/soundalsa.h
+++ b/qsstv/sound/soundalsa.h
@@ -40,6 +40,7 @@ private:
   unsigned int maxChannelsCapture;
   unsigned int minChannelsPlayback;
   unsigned int maxChannelsPlayback;
+  bool is32bit;
 };
 
 #endif // SOUNDALSA_H
diff --git a/qsstv/sound/soundbase.cpp b/qsstv/sound/soundbase.cpp
index 9da6e1c..d9bd297 100644
--- a/qsstv/sound/soundbase.cpp
+++ b/qsstv/sound/soundbase.cpp
@@ -171,6 +171,12 @@ int soundBase::capture()
     {
       switchCaptureState(CPINIT);
     }
+    if(storedFrames<=(ulong)recordingSize*1048576L)
+      {
+        addToLog(QString("writen %1 tofile").arg(count),LOGSOUND);
+        waveOut.write((quint16*)tempRXBuffer,count);
+        storedFrames+=count;
+      }
   }
   downsampleFilterPtr->downSample4(tempRXBuffer);
   volume=downsampleFilterPtr->avgVolumeDb;
@@ -317,6 +323,7 @@ bool soundBase::startCapture()
   soundIOPtr->rxBuffer.reset();
   soundIOPtr->rxVolumeBuffer.reset();
   downsampleFilterPtr->init();
+  storedFrames=0;
   switch(soundRoutingInput)
   {
     case SNDINFROMFILE:
@@ -373,7 +380,7 @@ int soundBase::play()
 
     if(storedFrames<=(ulong)recordingSize*1048576L)
     {
-      waveOut.write((quint16*)txBuffer.readPointer(),numFrames,true); //always stereo
+      waveOut.write((quint16*)txBuffer.readPointer(),numFrames); //always stereo
       storedFrames+=numFrames;
     }
   }
diff --git a/qsstv/sound/soundbase.h b/qsstv/sound/soundbase.h
index 3a3bad0..abefce4 100644
--- a/qsstv/sound/soundbase.h
+++ b/qsstv/sound/soundbase.h
@@ -82,8 +82,8 @@ protected:
 
 
   int sampleRate;
-  qint16 tempRXBuffer[DOWNSAMPLESIZE*2]; // in some cases the hardware interface is stereo
-  quint32 tempTXBuffer[DOWNSAMPLESIZE];
+  qint16 tempRXBuffer[DOWNSAMPLESIZE*2*2]; // in some cases the hardware interface is stereo (can be S16_LE or S32_LE)
+  quint32 tempTXBuffer[DOWNSAMPLESIZE*2];
   bool stopThread;
   eplaybackState playbackState;
   ecaptureState  captureState;
diff --git a/qsstv/sound/wavio.cpp b/qsstv/sound/wavio.cpp
index aa2aa4c..0028cbc 100644
--- a/qsstv/sound/wavio.cpp
+++ b/qsstv/sound/wavio.cpp
@@ -63,27 +63,27 @@ bool  wavIO::openFileForRead(QString fname,bool ask)
   QString tmp;
 
   if (ask)
-  {
-    dirDialog d((QWidget *)mainWindowPtr,"Wave file");
-    QString s=d.openFileName(audioPath,"*");
-    if (s==QString::null) return false;
-    if (s.isEmpty()) return false;
-    inopf.setFileName(s);
-  }
+    {
+      dirDialog d((QWidget *)mainWindowPtr,"Wave file");
+      QString s=d.openFileName(audioPath,"*");
+      if (s==QString::null) return false;
+      if (s.isEmpty()) return false;
+      inopf.setFileName(s);
+    }
   else
-  {
-    inopf.setFileName(fname);
-  }
+    {
+      inopf.setFileName(fname);
+    }
   if(!inopf.open(QIODevice::ReadOnly))
-  {
-    return false;
-  }
+    {
+      return false;
+    }
   reading=true;
   if(inopf.read(&waveHeader.chunkID[0],sizeof(sWave))!=sizeof(sWave))
-  {
-    closeFile();
-    return false;
-  }
+    {
+      closeFile();
+      return false;
+    }
 
 
   // check the header
@@ -91,11 +91,11 @@ bool  wavIO::openFileForRead(QString fname,bool ask)
        ||(!checkString(waveHeader.format,"WAVE"))
        ||(!checkString(waveHeader.subChunk1ID,"fmt "))
        ||(!checkString(waveHeader.subChunk2ID,"data")))
-  {
-    addToLog("wavio read header error",LOGALL);
-    closeFile();
-    return false;
-  }
+    {
+      addToLog("wavio read header error",LOGALL);
+      closeFile();
+      return false;
+    }
 
   if( (waveHeader.subChunk1Size!=16)
       ||(waveHeader.audioFormat!=1)
@@ -104,11 +104,11 @@ bool  wavIO::openFileForRead(QString fname,bool ask)
       //      ||(waveHeader.byteRate!=sizeof(SOUNDFRAME)*samplingrate)
       ||(waveHeader.blockAlign!=waveHeader.numChannels*2)
       ||(waveHeader.bitsPerSample!=16))
-  {
-    addToLog("wavio read header error, not supported",LOGALL);
-    closeFile();
-    return false;
-  }
+    {
+      addToLog("wavio read header error, not supported",LOGALL);
+      closeFile();
+      return false;
+    }
   numberOfChannels=waveHeader.numChannels;
   numberOfSamples=waveHeader.subChunk2Size/(2*numberOfChannels);  // number of mono or stereo samples
   samplesRead=0;
@@ -133,27 +133,27 @@ int  wavIO::read(short int *dPtr ,uint numSamples)
   qint16 *tempBuf;
 
   if(!inopf.isOpen())
-  {
-    addToLog("wavio not open during read",LOGALL);
-    return -1;
-  }
+    {
+      addToLog("wavio not open during read",LOGALL);
+      return -1;
+    }
 
   llen=numSamples*sizeof(quint16)*numberOfChannels; // lenght in bytes
   if(waveHeader.numChannels==1)
-  {
-    result=inopf.read((char*)dPtr,llen); //we do not need conversion
-  }
-  else
-  {
-    tempBuf=new qint16[llen/2];
-    result=inopf.read((char*)tempBuf,llen);
-    for(i=0;i<(result/4);i++)
     {
-      dPtr[i]=tempBuf[2*i];
+      result=inopf.read((char*)dPtr,llen); //we do not need conversion
     }
-    delete [] tempBuf;
+  else
+    {
+      tempBuf=new qint16[llen/2];
+      result=inopf.read((char*)tempBuf,llen);
+      for(i=0;i<(result/4);i++)
+        {
+          dPtr[i]=tempBuf[2*i];
+        }
+      delete [] tempBuf;
 
-  }
+    }
   if(result==0) inopf.close();
   samplesRead+=result/(sizeof(quint16)*numberOfChannels);
   return result/(sizeof(quint16)*numberOfChannels);
@@ -172,19 +172,19 @@ bool  wavIO::openFileForWrite(QString fname,bool ask,bool isStereo)
 {
   QFileInfo fin;
   if (ask)
-  {
-    dirDialog d((QWidget *)mainWindowPtr,"wave IO");
-    QString fn=d.saveFileName(audioPath,"*.wav","wav");
-    inopf.setFileName(fn);
-  }
+    {
+      dirDialog d((QWidget *)mainWindowPtr,"wave IO");
+      QString fn=d.saveFileName(audioPath,"*.wav","wav");
+      inopf.setFileName(fn);
+    }
   else
-  {
-    inopf.setFileName(fname);
-  }
+    {
+      inopf.setFileName(fname);
+    }
   if(!inopf.open(QIODevice::WriteOnly|QIODevice::Truncate))
-  {
-    return false;
-  }
+    {
+      return false;
+    }
   numberOfSamples=0;
   if(isStereo) numberOfChannels=2;
   else numberOfChannels=1;
@@ -206,12 +206,12 @@ bool  wavIO::openFileForWrite(QString fname,bool ask,bool isStereo)
   \return returns true the correct number of samples are written. false otherwise.
 */
 
-bool  wavIO::write(quint16 *dPtr, uint numSamples, bool isStereo)
+bool  wavIO::write(quint16 *dPtr, uint numSamples)
 {
   uint i;
   int len;
   quint16 *tempBufPtr;
-  len=numSamples*sizeof(SOUNDFRAME);
+  len=numSamples*sizeof(quint16)*2; // we're outputting stereo
   tempBufPtr=0;
   quint16 *tmpPtr;
 
@@ -219,38 +219,37 @@ bool  wavIO::write(quint16 *dPtr, uint numSamples, bool isStereo)
 
 
   if((!writing)&&(numSamples!=0))
-  {
-    addToLog("wavio not open during write",LOGALL);
-    return true;
-  }
+    {
+      addToLog("wavio not open during write",LOGALL);
+      return true;
+    }
   if((!writing)&&(numSamples==0)) return true;
   if(numSamples==0)
-  {
-    addToLog(QString("wavio write close samples=%1").arg(numberOfSamples),LOGWAVIO);
-    inopf.flush();
-    writeHeader();
-    closeFile();
-    return true;
-  }
-
-  if((sizeof(SOUNDFRAME)==2) && (isStereo))  // we need stereo output and input is mono
-  {
-    tempBufPtr=new quint16 [numSamples*2];
-    tmpPtr=tempBufPtr;
-    for(i=0;i<numSamples;i++)
+    {
+      addToLog(QString("wavio write close samples=%1").arg(numberOfSamples),LOGWAVIO);
+      inopf.flush();
+      writeHeader();
+      closeFile();
+      return true;
+    }
+
+  // we need stereo output and input is mono
+
+  tempBufPtr=new quint16 [numSamples*2];
+  tmpPtr=tempBufPtr;
+  for(i=0;i<numSamples;i++)
     {
       tempBufPtr[i*2]=dPtr[i];
       tempBufPtr[i*2+1]=0;
     }
-  }
 
   if(inopf.write((char *)tmpPtr,len)!=len)
-  {
-    addToLog("wavio write error",LOGALL);
-    closeFile();
-    if(tempBufPtr) delete []tempBufPtr;
-    return false;
-  }
+    {
+      addToLog("wavio write error",LOGALL);
+      closeFile();
+      if(tempBufPtr) delete []tempBufPtr;
+      return false;
+    }
   numberOfSamples+=numSamples;
   addToLog(QString("wavio write:%1 total samples=%2").arg(numSamples).arg(numberOfSamples),LOGWAVIO);
   if(tempBufPtr) delete []tempBufPtr;
@@ -297,9 +296,9 @@ void wavIO::initHeader()
 bool  wavIO::checkString(char *str,const char *cstr)
 {
   for (int i=0;i<4;i++)
-  {
-    if (str[i]!=cstr[i]) return false;
-  }
+    {
+      if (str[i]!=cstr[i]) return false;
+    }
   return true;
 }
 
@@ -309,12 +308,12 @@ bool  wavIO::writeHeader()
   waveHeader.subChunk2Size=numberOfSamples*sizeof(quint16)*numberOfChannels;
   lseek(inopf.handle(),0,SEEK_SET); //position at beginning
   if((err=inopf.write(&waveHeader.chunkID[0],sizeof(sWave)))!=sizeof(sWave))
-  {
+    {
 
-    addToLog(QString("wavio write header error %1").arg(err),LOGWAVIO);
-    closeFile();
-    return false;
-  }
+      addToLog(QString("wavio write header error %1").arg(err),LOGWAVIO);
+      closeFile();
+      return false;
+    }
   inopf.flush();
   lseek(inopf.handle(),0,SEEK_END); //position at beginning
   addToLog(QString("wavio write header %1 %2 %3 %4").arg(waveHeader.chunkID[0]).arg(waveHeader.chunkID[1]).arg(waveHeader.chunkID[2]).arg(waveHeader.chunkID[3]),LOGWAVIO);
diff --git a/qsstv/sound/wavio.h b/qsstv/sound/wavio.h
index 219dfcf..96bc9d9 100644
--- a/qsstv/sound/wavio.h
+++ b/qsstv/sound/wavio.h
@@ -82,7 +82,7 @@ public:
 	bool openFileForRead(QString fname,bool ask);
   bool openFileForWrite(QString fname, bool ask, bool isStereo);
   int  read (short int *dPtr, uint len);
-  bool write(quint16 *dPtr, uint len, bool isStereo);
+  bool write(quint16 *dPtr, uint len);
 	void setSamplingrate(int sr) {samplingrate=sr;}
   int getNumberOfChannels(){return numberOfChannels;}
   void closeFile();
@@ -97,7 +97,7 @@ public:
 		{
     if(inopf.isOpen())
       {
-      write(NULL,0,false); // flush everything in case we are writing
+      write(NULL,0); // flush everything in case we are writing
 			closeFile();
       }
 		}
diff --git a/qsstv/sstv/modes/modeavt.cpp b/qsstv/sstv/modes/modeavt.cpp
index 8a4022c..92bc7e9 100644
--- a/qsstv/sstv/modes/modeavt.cpp
+++ b/qsstv/sstv/modes/modeavt.cpp
@@ -44,7 +44,7 @@ void modeAVT::setupParams(double clock)
 }
 
 
-modeBase::eModeBase modeAVT::process(quint16 *demod,unsigned int syncPos,bool goToSync)
+modeBase::eModeBase modeAVT::process(quint16 *demod,unsigned int syncPos,bool goToSync,unsigned int rxPos)
 {
   unsigned int i=0;
   unsigned char a,b;
@@ -159,7 +159,7 @@ modeBase::eModeBase modeAVT::process(quint16 *demod,unsigned int syncPos,bool go
                     {
                       avtTrailerDetect=false;
                       debugState=stColorLine0;
-                    return modeBase::process(demod,i,true);
+                    return modeBase::process(demod,i,true,rxPos);
                     }
                 break;
             }
@@ -170,7 +170,7 @@ modeBase::eModeBase modeAVT::process(quint16 *demod,unsigned int syncPos,bool go
 
   else
     {
-      return modeBase::process(demod);
+      return modeBase::process(demod,0,false,rxPos);
     }
   return MBRUNNING;
 }
diff --git a/qsstv/sstv/modes/modeavt.h b/qsstv/sstv/modes/modeavt.h
index dea7b55..62ca15a 100644
--- a/qsstv/sstv/modes/modeavt.h
+++ b/qsstv/sstv/modes/modeavt.h
@@ -32,7 +32,7 @@ class modeAVT : public modeBase
 public:
   modeAVT(esstvMode m,unsigned int len,bool tx,bool narrowMode);
   ~modeAVT();
-  eModeBase process(quint16 *demod, unsigned int syncPos=0, bool goToSync=false);
+  eModeBase process(quint16 *demod, unsigned int syncPos, bool goToSync, unsigned int rxPos);
 protected:
   embState rxSetupLine();
 	void calcPixelPositionTable(unsigned int colorLine,bool tx);
diff --git a/qsstv/sstv/modes/modebase.cpp b/qsstv/sstv/modes/modebase.cpp
index 07ed441..b04f795 100644
--- a/qsstv/sstv/modes/modebase.cpp
+++ b/qsstv/sstv/modes/modebase.cpp
@@ -36,6 +36,8 @@ const QString stateStr[modeBase::MBTXGAPROBOT+1]=
   "ENDOFLINE",
   "EOIMAGE",
   "RXWAIT",
+  "MB1500",
+  "MB2300",
   "TXGAP",
   "TXGAPROBOT"
 };
@@ -171,7 +173,7 @@ void modeBase::redrawFast(bool r)
     }
 }
 
-modeBase::eModeBase modeBase::process(quint16 *demod,unsigned int syncPos,bool goToSync)
+modeBase::eModeBase modeBase::process(quint16 *demod,unsigned int syncPos,bool goToSync,unsigned int rxPos)
 {
   unsigned int i=0;
   if(goToSync)
@@ -247,9 +249,11 @@ modeBase::eModeBase modeBase::process(quint16 *demod,unsigned int syncPos,bool g
             if(sampleCounter>=marker)
               {
                 avgFreqGap/=avgFreqGapCounter;
+                addToLog(QString("GapCounter1 %1 at %2").arg(avgFreqGap).arg(sampleCounter),LOGMODES);
                 if(avgFreqGap > 1900)
                   {
-                    //                    subLine=10;
+                    qDebug() << "switching to 2300"<< QString("GapCounter2 %1 at %2").arg(avgFreqGap).arg(i+ rxPos);
+                    subLine=10;
                   }
                 switchState(MBSETUPLINE);
               }
@@ -266,9 +270,11 @@ modeBase::eModeBase modeBase::process(quint16 *demod,unsigned int syncPos,bool g
             if(sampleCounter>=marker)
               {
                 avgFreqGap/=avgFreqGapCounter;
+                addToLog(QString("GapCounter2 %1 at %2").arg(avgFreqGap).arg(sampleCounter),LOGMODES);
                 if(avgFreqGap < 1900)
                   {
-                    //                    subLine=3;
+                    qDebug() << "switching to 1500" << QString("GapCounter2 %1 at %2").arg(avgFreqGap).arg(i+ rxPos);
+                    subLine=3;
                   }
                 switchState(MBSETUPLINE);
               }
@@ -383,6 +389,9 @@ void modeBase::yuvConversion(unsigned char *array)
       r=(100*array[i]+140*redArrayPtr[i]-17850)/100;
       b=(100*array[i]+178*blueArrayPtr[i]-22695)/100;
       g=(100*array[i]- 71*redArrayPtr[i]-33*blueArrayPtr[i]+13260)/100;
+//      r=b=g=array[i]; //test
+
+
       r=(r>255 ? 255 : r);
       r=(r<0 ? 0 : r);
       b=(b>255 ? 255 : b);
@@ -398,11 +407,14 @@ modeBase::eModeBase modeBase::transmitImage(imageViewer *iv)
 {
   txImPtr=iv;
   if(!iv->hasValidImage()) return MBENDOFIMAGE;
+  addToLog(QString("Starting Transmit Image"),LOGMODES);
   displayLineCounter=0;
   lineCounter=0;
+  sampleCounter=0;
   getLine();
   state=MBSETUPLINE;
   start=0;
+  subLine=0;
   abortRun=false;
   while(!abortRun)
     {
@@ -590,6 +602,8 @@ void modeBase::getLine()
   //      .arg(QString::number((ulong)redArrayPtr,16))
   //      .arg(QString::number((ulong)blueArrayPtr,16)),LOGMODES);
   unsigned int *pixelArray=txImPtr->getScanLineAddress(displayLineCounter);
+
+
   for (unsigned int i=0;i<activeSSTVParam->numberOfPixels;i++)
     {
       t=pixelArray[i];
@@ -605,6 +619,6 @@ void modeBase::getLine()
 
 void modeBase::switchState(embState  newState)
 {
-  addToLog(QString("%1 to %2").arg(stateStr[state]).arg(stateStr[newState]),LOGMODES);
+//  addToLog(QString("%1 to %2").arg(stateStr[state]).arg(stateStr[newState]),LOGMODES);
   state=newState;
 }
diff --git a/qsstv/sstv/modes/modebase.h b/qsstv/sstv/modes/modebase.h
index 48725a8..fa9b57d 100644
--- a/qsstv/sstv/modes/modebase.h
+++ b/qsstv/sstv/modes/modebase.h
@@ -82,7 +82,7 @@ public:
 //    }
 
 	void redrawFast(bool r);
-  virtual eModeBase process(quint16 *demod,unsigned int syncPos=0,bool goToSync=false);
+  virtual eModeBase process(quint16 *demod, unsigned int syncPos, bool goToSync, unsigned int rxPos);
   void init(DSPFLOAT clk);
   unsigned int *debugStatePtr;
   void abort();
diff --git a/qsstv/sstv/modes/modegbr2.cpp b/qsstv/sstv/modes/modegbr2.cpp
index 3f87bed..f51e245 100644
--- a/qsstv/sstv/modes/modegbr2.cpp
+++ b/qsstv/sstv/modes/modegbr2.cpp
@@ -140,14 +140,15 @@ void modeGBR2::calcPixelPositionTable(unsigned int colorLine,bool tx)
 
 unsigned long modeGBR2::adjustSyncPosition(unsigned long syncPos0,bool isRetrace)
 {
-  if(isRetrace) return syncPos0;
+#define SCOTTYCOMPENSATION 15
+  if(isRetrace) return syncPos0+SCOTTYCOMPENSATION;
   if(syncPos0<(unsigned long)(fp+2*visibleLineLength+2*blank+syncDuration/2))
     {
-      return syncPos0+(unsigned long)(bp+visibleLineLength);
+      return syncPos0+(unsigned long)(bp+visibleLineLength)+SCOTTYCOMPENSATION;
     }
   else
     {
-      return syncPos0-(unsigned long)(fp+2*visibleLineLength+2*blank+syncDuration);
+      return syncPos0-(unsigned long)(fp+2*visibleLineLength+2*blank+syncDuration)+SCOTTYCOMPENSATION;
     }
 
 }
diff --git a/qsstv/sstv/sstvparam.cpp b/qsstv/sstv/sstvparam.cpp
index 390b0a6..957bd9e 100644
--- a/qsstv/sstv/sstvparam.cpp
+++ b/qsstv/sstv/sstvparam.cpp
@@ -313,7 +313,7 @@ sSSTVParam SSTVTable[NUMSSTVMODES+1]=
   {"SC2 120",   "SC2-120",SC2_120, 121.74250,320,256,256,0x3F  ,0.00500,0.00100,0.00100,0.00100,0.00500,0.00000,0.00000,0.00000,0.,1900,400 },
   {"SC2 180",   "SC2-180",SC2_180, 182.03850,320,256,256,0xB7  ,0.00500,0.00100,0.00100,0.00100,0.00500,0.00000,0.00000,0.00000,0.,1900,400 },
   {"Robot 24",  "R24",    R24,      24.00150,160,120,120,0x84  ,0.00600,0.00010,0.00300,0.00450,0.00600,0.00000,0.00120,0.00380,0.,1900,400 },
-  {"Robot 36"  ,"R36",    R36,      36.00200,320,240,240,0x88  ,0.00900,0.00010,0.00350,0.00700,0.00900,0.00000,0.00300,0.00540,0.,1900,400 },
+  {"Robot 36"  ,"R36",    R36,      36.00200,320,240,240,0x88  ,0.00900,0.00040,0.00250,0.00700,0.00900,0.00000,0.00300,0.00540,0.,1900,400 },
   {"Robot 72"  ,"R72",    R72,      72.00500,320,240,240,0x0C  ,0.00900,0.00040,0.00350,0.00600,0.00900,0.00040,0.00250,0.00600,0.,1900,400 },
   {"P3"        ,"P3" ,    P3,      203.06420,640,496,496,0x71  ,0.00520,0.00210,0.00080,0.00250,0.00520,0.00104,0.00104,0.00104,0.,1900,400 },
   {"P5"        ,"P5" ,    P5,      304.59600,640,496,496,0x72  ,0.00780,0.00160,0.00160,0.00160,0.00780,0.00160,0.00160,0.00160,0.,1900,400 },
diff --git a/qsstv/sstv/sstvrx.cpp b/qsstv/sstv/sstvrx.cpp
index a050913..de937f0 100644
--- a/qsstv/sstv/sstvrx.cpp
+++ b/qsstv/sstv/sstvrx.cpp
@@ -35,6 +35,7 @@ sstvRx::sstvRx(QObject *parent) : QObject(parent),syncNarrowProc(true),syncWideP
 {
   syncFilterPtr=NULL;
   videoFilterPtr=NULL;
+  syncProcPtr=NULL;
 #ifndef QT_NO_DEBUG
   scopeViewerData=new scopeView("Data Scope");
   scopeViewerSyncNarrow=new scopeView("Sync Scope Narrow");
@@ -258,7 +259,7 @@ void sstvRx::process()
       syncProcPtr->sampleCounter=block*RXSTRIPE;
       syncProcPtr->currentModePtr->setRxSampleCounter(syncProcPtr->sampleCounter);
       syncProcPtr->currentModePtr->redrawFast(true);
-      syncProcPtr->currentModePtr->process(bufferVideoDemod.readPointer(),syncPosition-syncProcPtr->sampleCounter,true);
+      syncProcPtr->currentModePtr->process(bufferVideoDemod.readPointer(),syncPosition-syncProcPtr->sampleCounter,true,syncProcPtr->sampleCounter);
       //    scopeViewerData->addData(SCDATA2,bufferVideoDemod.readPointer(),syncProcPtr->sampleCounter,RXSTRIPE);
       //      addToLog(QString("slant scope add demodIdx=%1; syncProcPtr->sampleCounter=%2").arg(bufferVideoDemod.getReadIndex()).arg(syncProcPtr->sampleCounter),LOGRXFUNC);
 #ifndef QT_NO_DEBUG
@@ -271,7 +272,7 @@ void sstvRx::process()
           bufferVideoDemod.skip(RXSTRIPE);
           syncProcPtr->sampleCounter+=RXSTRIPE;
           //          addToLog(QString("loop readIndex: %1,syncProcPtr->sampleCounter: %2").arg(rxHoldingBuffer.getReadIndex()).arg(syncProcPtr->sampleCounter),LOGRXFUNC);
-          syncProcPtr->currentModePtr->process(bufferVideoDemod.readPointer());
+          syncProcPtr->currentModePtr->process(bufferVideoDemod.readPointer(),0,false,syncProcPtr->sampleCounter);
           //      scopeViewerData->addData(SCDATA2,bufferVideoDemod.readPointer(),syncProcPtr->sampleCounter,RXSTRIPE);
 #ifndef QT_NO_DEBUG
           scopeViewerData->addData(SCDATA3,syncProcPtr->currentModePtr->debugStatePtr,syncProcPtr->sampleCounter,RXSTRIPE);
@@ -303,7 +304,7 @@ void sstvRx::process()
 
       else
         {
-          if(syncProcPtr->currentModePtr->process(bufferVideoDemod.readPointer())==modeBase::MBENDOFIMAGE)
+          if(syncProcPtr->currentModePtr->process(bufferVideoDemod.readPointer(),0,false,syncProcPtr->sampleCounter)==modeBase::MBENDOFIMAGE)
             {
               switchState(END);
             }
@@ -351,14 +352,14 @@ void sstvRx::process()
                 bufferVideoDemod.setReadIndex(bufferIdx);
                 while(bufferVideoDemod.getReadIndex()!=currentIdx)
                   {
-                    if(syncProcPtr->currentModePtr->process(bufferVideoDemod.readPointer())==modeBase::MBENDOFIMAGE)
+                    if(syncProcPtr->currentModePtr->process(bufferVideoDemod.readPointer(),0,false,syncProcPtr->sampleCounter)==modeBase::MBENDOFIMAGE)
                       {
                         switchState(END);
                       }
                     bufferVideoDemod.skip(RXSTRIPE);
 
                   }
-                if(syncProcPtr->currentModePtr->process(bufferVideoDemod.readPointer())==modeBase::MBENDOFIMAGE)
+                if(syncProcPtr->currentModePtr->process(bufferVideoDemod.readPointer(),0,false,syncProcPtr->sampleCounter)==modeBase::MBENDOFIMAGE)
                   {
                     switchState(END);
                   }
diff --git a/qsstv/sstv/syncprocessor.cpp b/qsstv/sstv/syncprocessor.cpp
index d3dbdbf..58b5a2b 100644
--- a/qsstv/sstv/syncprocessor.cpp
+++ b/qsstv/sstv/syncprocessor.cpp
@@ -13,7 +13,7 @@
 #define LINETOLERANCEMODEDETECT 0.015
 #define LINETOLERANCEINSYNC 0.008
 #define SYNCAVGINTEGRATOR 0.09
-#define FILTERDELAYCORRECTION  -8
+#define FILTERDELAYCORRECTION  -18
 #define MINVOLUME 300
 
 //#define DISABLERETRACE
diff --git a/qsstv/utils/color.cpp b/qsstv/utils/color.cpp
index 0f20784..15aeff8 100644
--- a/qsstv/utils/color.cpp
+++ b/qsstv/utils/color.cpp
@@ -41,8 +41,7 @@
 #include <math.h>
 #include <assert.h>
 
-//#include "opj_apps_config.h"
-#include "openjpeg-2.1/openjpeg.h"
+#include "openjpeg.h"
 #include "color.h"
 
 
diff --git a/qsstv/utils/ftp.cpp b/qsstv/utils/ftp.cpp
index b988693..e887bca 100644
--- a/qsstv/utils/ftp.cpp
+++ b/qsstv/utils/ftp.cpp
@@ -155,7 +155,7 @@ eftpError ftpInterface::uploadFile(QString fileName,QString targetFilename,bool
 {
   int id;
   Q_UNUSED(id);
-  eftpError result;
+  eftpError result=FTPOK;
   addToLog("uploadFile",LOGFTP);
   if ( fileName.isNull() )  {
       addToLog("fileName is NULL",LOGFTP);
diff --git a/qsstv/videocapt/cameradialog.cpp b/qsstv/videocapt/cameradialog.cpp
index 4c11854..f6eb964 100644
--- a/qsstv/videocapt/cameradialog.cpp
+++ b/qsstv/videocapt/cameradialog.cpp
@@ -36,63 +36,100 @@
 #include <QPalette>
 //#include <QtWidgets>
 //#include <QDebug>
+#define NUMRES 5
+
+//standard resolutions
+int standardResolution[NUMRES][2]=
+{
+  //  {1920,1080},
+    {1280,720},
+    {800,600},
+    {640,480},
+    {320,240},
+    {160,120}
+};
+
 
 cameraDialog::cameraDialog(QWidget *parent) :
-  QDialog(parent),
-  ui(new Ui::cameraDialog)
+    QDialog(parent),
+    ui(new Ui::cameraDialog)
 {
-  ui->setupUi(this);
-  cameraActive=false;
-  videoCapturePtr=NULL;
-  listCameraDevices();
-  if(cameraList.count()==0)
-  {
-      return;
-  }
-  connect(ui->settingsButton,SIGNAL(clicked()),SLOT(slotSettings()));
-  ui->devicesComboBox->setCurrentIndex(0);
-  imageSettings settingsDialog(cameraList.at(0).deviceName);
-
-  videoCapturePtr=new videoCapture;
-  connect(ui->devicesComboBox,SIGNAL(currentIndexChanged(int)),SLOT(slotDeviceChanged(int)));
-  connect(ui->formatsComboBox,SIGNAL(currentIndexChanged(int)),SLOT(slotFormatChanged(int)));
-  connect(ui->sizeComboBox,SIGNAL(currentIndexChanged(int)),SLOT(slotSizeChanged(int)));
+    ui->setupUi(this);
+    cameraActive=false;
+    videoCapturePtr=NULL;
+    listCameraDevices();
+    if(cameraList.count()==0)
+    {
+        return;
+    }
+    connect(ui->settingsButton,SIGNAL(clicked()),SLOT(slotSettings()));
+    ui->devicesComboBox->setCurrentIndex(0);
+    imageSettings settingsDialog(cameraList.at(0).deviceName);
+
+    videoCapturePtr=new videoCapture;
+    connect(ui->devicesComboBox,SIGNAL(currentIndexChanged(int)),SLOT(slotDeviceChanged(int)));
+    connect(ui->formatsComboBox,SIGNAL(currentIndexChanged(int)),SLOT(slotFormatChanged(int)));
+    connect(ui->sizeComboBox,SIGNAL(currentIndexChanged(int)),SLOT(slotSizeChanged(int)));
+    timerID=0;
+
 }
 
 cameraDialog::~cameraDialog()
 {
-  delete ui;
+    delete ui;
 }
 
 int cameraDialog::exec()
 {
-  if(!restartCapturing(true))
+    if(!restartCapturing(true))
     {
-      QMessageBox::warning(this,"Capturing","Unable to start capturing");
-      return QDialog::Rejected;
+        QMessageBox::warning(this,"Capturing","Unable to start capturing");
+        return QDialog::Rejected;
     }
-  int result;
-  addToLog("cameracontrol exec",LOGCAM);
-  result=QDialog::exec();
-  killTimer(timerID);
-  videoCapturePtr->stopStreaming();
-  videoCapturePtr->close();
-  if(result==QDialog::Accepted) return true;
-  return false;
+    int result;
+    addToLog("cameracontrol exec",LOGCAM);
+    result=QDialog::exec();
+    deactivateTimer();
+    videoCapturePtr->stopStreaming();
+    videoCapturePtr->close();
+    if(result==QDialog::Accepted) return true;
+    return false;
 }
 
 
+void cameraDialog::deactivateTimer()
+{
+  if(timerID) killTimer(timerID);
+  timerID=0;
+}
+
 void cameraDialog::timerEvent(QTimerEvent *)
- {
-     if(videoCapturePtr->getFrame())
-      {
+{ int ret;
+    qDebug() << "capt";
+    ret=videoCapturePtr->getFrame();
+    if(ret>0)
+    {
+
         ui->viewFinder->openImage(*videoCapturePtr->getImage());
-      }
- }
+    }
+    else if(ret==0)
+    {
+        return;
+    }
+   else
+    {
+        deactivateTimer();
+        videoCapturePtr->stopStreaming();
+        videoCapturePtr->close();
+        QMessageBox::critical(this,"Capture error",videoCapturePtr->getErrorString());
+    }
+}
+
+
 
 QImage *cameraDialog::getImage()
 {
-  return videoCapturePtr->getImage();
+    return videoCapturePtr->getImage();
 }
 
 
@@ -100,186 +137,201 @@ QImage *cameraDialog::getImage()
 
 void cameraDialog::slotSettings()
 {
-  imageSettings settingsDialog(cameraList.at(ui->devicesComboBox->currentIndex()).deviceName);
-  settingsDialog.exec();
+    imageSettings settingsDialog(cameraList.at(ui->devicesComboBox->currentIndex()).deviceName);
+    settingsDialog.exec();
 }
 
 void cameraDialog::listCameraDevices()
 {
-  int i;
-  cameraList.clear();
-  QDir devDir("/dev");
-  QStringList devList;
-  devDir.setFilter(QDir::System| QDir::NoSymLinks);
-  devDir.setSorting(QDir::Name);
-  devDir.setNameFilters(QStringList("video*"));
-  devList=devDir.entryList();
-  getCameraInfo(devList);
-  for(i=0;i<cameraList.count();i++)
+    int i;
+    cameraList.clear();
+    QDir devDir("/dev");
+    QStringList devList;
+    devDir.setFilter(QDir::System| QDir::NoSymLinks);
+    devDir.setSorting(QDir::Name);
+    devDir.setNameFilters(QStringList("video*"));
+    devList=devDir.entryList();
+    getCameraInfo(devList);
+    for(i=0;i<cameraList.count();i++)
     {
-      ui->devicesComboBox->addItem(cameraList.at(i).deviceDescription);
+        ui->devicesComboBox->addItem(cameraList.at(i).deviceDescription);
     }
-  if(cameraList.count()>0) setupFormatComboBox(cameraList.at(0));
+    if(cameraList.count()>0) setupFormatComboBox(cameraList.at(0));
 }
 
 
 void cameraDialog::setupFormatComboBox(scameraDevice cd)
 {
-  int i;
-  ui->formatsComboBox->blockSignals(true);
-  ui->formatsComboBox->clear();
-  for(i=0;i<cd.formats.count();i++)
+    int i;
+    ui->formatsComboBox->blockSignals(true);
+    ui->formatsComboBox->clear();
+    for(i=0;i<cd.formats.count();i++)
     {
-      ui->formatsComboBox->addItem(cd.formats.at(i).description);
+        ui->formatsComboBox->addItem(cd.formats.at(i).description);
     }
-  ui->formatsComboBox->setCurrentIndex(cd.formatIdx);
-  ui->formatsComboBox->blockSignals(false);
-  setupSizeComboBox(cd.formats.at(cd.formatIdx));
+    ui->formatsComboBox->setCurrentIndex(cd.formatIdx);
+    ui->formatsComboBox->blockSignals(false);
+    setupSizeComboBox(cd.formats.at(cd.formatIdx));
 }
 
 void cameraDialog::setupSizeComboBox(sformats frmat)
 {
-  int i;
-  ui->sizeComboBox->blockSignals(true);
-  ui->sizeComboBox->clear();
-  for(i=0;i<frmat.cameraSizes.count();i++)
+    int i;
+    ui->sizeComboBox->blockSignals(true);
+    ui->sizeComboBox->clear();
+    for(i=0;i<frmat.cameraSizes.count();i++)
     {
-      ui->sizeComboBox->addItem(frmat.cameraSizes.at(i).description);
+        ui->sizeComboBox->addItem(frmat.cameraSizes.at(i).description);
     }
-  ui->sizeComboBox->setCurrentIndex(frmat.sizeIdx);
-  ui->sizeComboBox->blockSignals(false);
+    ui->sizeComboBox->setCurrentIndex(frmat.sizeIdx);
+    ui->sizeComboBox->blockSignals(false);
 }
 
 
 void cameraDialog::getCameraInfo(QStringList devList)
 {
-  int fd;
-  int i;
-  bool ok=true;
-  QString camDev;
+    int fd;
+    int i;
+    bool ok=true;
+    QString camDev;
 
-  QList <sformats> formats;
+    QList <sformats> formats;
 
-  for(i=0;i<devList.count();i++)
+    for(i=0;i<devList.count();i++)
     {
-      ok=true;
-      struct v4l2_capability cap;
-      memset(&cap, 0, sizeof(cap));
-      camDev=QString("/dev/")+devList.at(i);
-      fd = v4l2_open(camDev.toLatin1().data(), O_RDWR, 0);
-      if(fd < 0)
+        ok=true;
+        struct v4l2_capability cap;
+        memset(&cap, 0, sizeof(cap));
+        camDev=QString("/dev/")+devList.at(i);
+        fd = v4l2_open(camDev.toLatin1().data(), O_RDWR, 0);
+        if(fd < 0)
         {
-          QString msg=QString("Unable to open file %1\n%2").arg(camDev).arg(strerror(errno));
-          QMessageBox::warning(this,"v4l2ucp: Unable to open file", msg, "OK");
-          continue;
+            QString msg=QString("Unable to open file %1\n%2").arg(camDev).arg(strerror(errno));
+            QMessageBox::warning(this,"v4l2ucp: Unable to open file", msg, "OK");
+            continue;
         }
 
-      if(v4l2_ioctl(fd, VIDIOC_QUERYCAP, &cap) == -1)
+        if(v4l2_ioctl(fd, VIDIOC_QUERYCAP, &cap) == -1)
         {
-          QString msg=QString("%1 is not a V4L2 device").arg(camDev);
-          QMessageBox::warning(this, "Camera selection error", msg, "OK");
-          ok=false;
+            QString msg=QString("%1 is not a V4L2 device").arg(camDev);
+            QMessageBox::warning(this, "Camera selection error", msg, "OK");
+            ok=false;
         }
-      formats=getFormatList(fd);
-      if(ok)
+        formats=getFormatList(fd);
+        if(ok)
         {
-          cameraList.append(scameraDevice(camDev,(const char *)cap.card,(const char *)cap.driver,(const char *)cap.bus_info,formats));
+            cameraList.append(scameraDevice(camDev,(const char *)cap.card,(const char *)cap.driver,(const char *)cap.bus_info,formats));
         }
-      v4l2_close(fd);
+        v4l2_close(fd);
     }
 }
 
 QString cameraDialog::pixelFormatStr(int pixelFormat)
 {
-  QString t;
-  t=pixelFormat&0xFF;
-  t+=(pixelFormat>>8)&0xFF;
-  t+=(pixelFormat>>16)&0xFF;
-  t+=(pixelFormat>>24)&0xFF;
-  return t;
+    QString t;
+    t=pixelFormat&0xFF;
+    t+=(pixelFormat>>8)&0xFF;
+    t+=(pixelFormat>>16)&0xFF;
+    t+=(pixelFormat>>24)&0xFF;
+    return t;
 }
 
 QList<sformats> cameraDialog::getFormatList(int fd)
 {
-  int ret;
-  QList<sformats> formatsList;
-  v4l2_frmsizeenum frm;
-  struct v4l2_fmtdesc fmt;
-  QList<scameraSizes> scsList;
-
-  int i = 0;
-  do
+    int j,ret;
+    unsigned int resx,resy;
+    QList<sformats> formatsList;
+    v4l2_frmsizeenum frm;
+    struct v4l2_fmtdesc fmt;
+    QList<scameraSizes> scsList;
+
+    int i = 0;
+    do
     {
-      scsList.clear();
-      memset(&fmt, 0, sizeof fmt);
-      fmt.index = i;
-      fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-      if ((ret = v4l2_ioctl(fd, VIDIOC_ENUM_FMT, &fmt)) < 0)
-        break;
-      else
+        scsList.clear();
+        memset(&fmt, 0, sizeof fmt);
+        fmt.index = i;
+        fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+        if ((ret = v4l2_ioctl(fd, VIDIOC_ENUM_FMT, &fmt)) < 0)
+            break;
+        else
         {
-          frm.index=0;
-          frm.pixel_format=fmt.pixelformat;
-          while(v4l2_ioctl(fd, VIDIOC_ENUM_FRAMESIZES, &frm) >=0)
+            frm.index=0;
+            frm.pixel_format=fmt.pixelformat;
+            while(v4l2_ioctl(fd, VIDIOC_ENUM_FRAMESIZES, &frm) >=0)
             {
-              if(frm.type==V4L2_FRMSIZE_TYPE_DISCRETE)
+                if(frm.type==V4L2_FRMSIZE_TYPE_DISCRETE)
                 {
-                   scsList.append(scameraSizes(frm.discrete.width,frm.discrete.height,QString("%1x%2").arg(frm.discrete.width).arg(frm.discrete.height)));
+                    scsList.append(scameraSizes(frm.discrete.width,frm.discrete.height,QString("%1x%2").arg(frm.discrete.width).arg(frm.discrete.height)));
                 }
-              frm.index++;
+                else // we have a stepwise resolution
+                {
+                    // scsList.append(scameraSizes(frm.stepwise.max_width,frm.stepwise.max_height,QString("%1x%2").arg(frm.stepwise.max_width).arg(frm.stepwise.max_height)));
+                    for(j=0;j<NUMRES;j++)
+                    {
+                        resx=standardResolution[j][0];
+                        resy=standardResolution[j][1];
+                        if((resx<=frm.stepwise.max_width) && (resy<=frm.stepwise.max_height) && (resx>=frm.stepwise.min_width) && (resy>=frm.stepwise.min_height))
+                            scsList.append(scameraSizes(resx,resy,QString("%1x%2").arg(resx).arg(resy)));
+                    }
+                }
+
+                frm.index++;
             }
-          formatsList.append(sformats(fmt.pixelformat,pixelFormatStr(fmt.pixelformat),scsList));
+            formatsList.append(sformats(fmt.pixelformat,pixelFormatStr(fmt.pixelformat),scsList));
         }
-      i++;
+        i++;
     }
-  while (ret != EINVAL);
-  return formatsList;
+    while (ret != EINVAL);
+    return formatsList;
 }
 
 
 void cameraDialog::slotDeviceChanged(int idx)
 {
-  setupFormatComboBox(cameraList.at(idx));
-  slotFormatChanged(cameraList.at(idx).formatIdx);
+    setupFormatComboBox(cameraList.at(idx));
+    slotFormatChanged(cameraList.at(idx).formatIdx);
 }
 
 void cameraDialog::slotFormatChanged(int idx)
 {
-  setupSizeComboBox(cameraList.at(ui->devicesComboBox->currentIndex()).formats.at(idx));
-  slotSizeChanged(cameraList.at(ui->devicesComboBox->currentIndex()).formats.at(idx).sizeIdx);
-  cameraList[(ui->devicesComboBox->currentIndex())].formatIdx=idx;
+    setupSizeComboBox(cameraList.at(ui->devicesComboBox->currentIndex()).formats.at(idx));
+    slotSizeChanged(cameraList.at(ui->devicesComboBox->currentIndex()).formats.at(idx).sizeIdx);
+    cameraList[(ui->devicesComboBox->currentIndex())].formatIdx=idx;
 
 }
 
 void cameraDialog::slotSizeChanged(int idx)
 {
-  cameraList[ui->devicesComboBox->currentIndex()].formats[ui->formatsComboBox->currentIndex()].sizeIdx=idx;
-  restartCapturing();
+    cameraList[ui->devicesComboBox->currentIndex()].formats[ui->formatsComboBox->currentIndex()].sizeIdx=idx;
+    restartCapturing();
 }
 
 bool cameraDialog::restartCapturing(bool first)
 {
+    int ret;
     if(!videoCapturePtr) return false;
-  if(!first)
+    if(!first)
     {
-      killTimer(timerID);
-      videoCapturePtr->stopStreaming();
-      videoCapturePtr->close();
+        deactivateTimer();
+        videoCapturePtr->stopStreaming();
+        videoCapturePtr->close();
     }
-  if(!videoCapturePtr->open(cameraList.at(ui->devicesComboBox->currentIndex()).deviceName))
+    ret=videoCapturePtr->open(cameraList.at(ui->devicesComboBox->currentIndex()).deviceName);
+    if(ret<0)
     {
-      return false;
+        return false;
     }
-  if(!videoCapturePtr->init(cameraList.at(ui->devicesComboBox->currentIndex()).formats.at(ui->formatsComboBox->currentIndex()).format,
-                        cameraList.at(ui->devicesComboBox->currentIndex()).formats.at(ui->formatsComboBox->currentIndex()).cameraSizes.at(ui->sizeComboBox->currentIndex()).width,
-                        cameraList.at(ui->devicesComboBox->currentIndex()).formats.at(ui->formatsComboBox->currentIndex()).cameraSizes.at(ui->sizeComboBox->currentIndex()).height))
+    if(!videoCapturePtr->init(cameraList.at(ui->devicesComboBox->currentIndex()).formats.at(ui->formatsComboBox->currentIndex()).format,
+                              cameraList.at(ui->devicesComboBox->currentIndex()).formats.at(ui->formatsComboBox->currentIndex()).cameraSizes.at(ui->sizeComboBox->currentIndex()).width,
+                              cameraList.at(ui->devicesComboBox->currentIndex()).formats.at(ui->formatsComboBox->currentIndex()).cameraSizes.at(ui->sizeComboBox->currentIndex()).height))
     {
-      return false;
+        return false;
     }
-  cameraActive=true;
-  videoCapturePtr->startSnapshots();
-  timerID=startTimer(50);
-  return true;
+    cameraActive=true;
+    videoCapturePtr->startSnapshots();
+    timerID=startTimer(50);
+    return true;
 }
 
 
diff --git a/qsstv/videocapt/cameradialog.h b/qsstv/videocapt/cameradialog.h
index a3fe024..07fa0df 100644
--- a/qsstv/videocapt/cameradialog.h
+++ b/qsstv/videocapt/cameradialog.h
@@ -2,6 +2,7 @@
 #define CAMERADIALOG_H
 
 #include <QDialog>
+#include <QTimer>
 
 namespace Ui {
 class cameraDialog;
@@ -36,6 +37,7 @@ struct sformats
   int format;
   QString description;
   int sizeIdx;
+  bool stepwise;
   QList<scameraSizes> cameraSizes;
 };
 
@@ -76,6 +78,7 @@ private slots:
   void slotFormatChanged(int idx);
   void slotSizeChanged(int idx);
 
+
 private:
 
   Ui::cameraDialog *ui;
@@ -92,6 +95,8 @@ private:
   void setupSizeComboBox(sformats frmat);
   int timerID;
   bool restartCapturing(bool first=false);
+  void deactivateTimer();
+
 
 };
 
diff --git a/qsstv/videocapt/cameradialog.ui b/qsstv/videocapt/cameradialog.ui
index acf12f0..e3dd38a 100644
--- a/qsstv/videocapt/cameradialog.ui
+++ b/qsstv/videocapt/cameradialog.ui
@@ -11,7 +11,7 @@
    </rect>
   </property>
   <property name="windowTitle">
-   <string>Dialog</string>
+   <string>Camera</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout_2">
    <item>
diff --git a/qsstv/videocapt/imagesettings.ui b/qsstv/videocapt/imagesettings.ui
index 65767b2..8eaa550 100644
--- a/qsstv/videocapt/imagesettings.ui
+++ b/qsstv/videocapt/imagesettings.ui
@@ -11,7 +11,7 @@
    </rect>
   </property>
   <property name="windowTitle">
-   <string>Dialog</string>
+   <string>Camera Device</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout_2">
    <item>
diff --git a/qsstv/videocapt/videocapture.cpp b/qsstv/videocapt/videocapture.cpp
index 79881dd..66f5538 100644
--- a/qsstv/videocapt/videocapture.cpp
+++ b/qsstv/videocapt/videocapture.cpp
@@ -49,6 +49,7 @@
 #include <QMainWindow>
 #include <QImage>
 #include <QPixmap>
+
 #include <QLabel>
 #include <QSize>
 
@@ -208,17 +209,23 @@ bool videoCapture::getFormat(v4l2_format &fmt)
 
 
 
-bool videoCapture::getFrame()
+int videoCapture::getFrame()
 {
   int ret = 0;
-
   // Dequeue a buffer.
+  errorString.clear();
+
   ret = v4l2_ioctl(dev, VIDIOC_DQBUF, &buf);
   //addToLog(QString("Dequeue buffer %1").arg(buf.index),LOGCAM);
-  if (ret < 0)
+  if(ret==EAGAIN)
+  {
+      return 0;
+  }
+  else if (ret < 0)
     {
       addToLog(QString("Unable to dequeue buffer , %1").arg(strerror(errno)),LOGCAM);
-      return false;
+      errorString=QString("Unable to dequeue buffer , %1").arg(strerror(errno));
+      return -1;
     }
 
   convert(mem[buf.index]);
@@ -229,10 +236,9 @@ bool videoCapture::getFrame()
   if (ret < 0)
     {
       addToLog(QString("Unable to requeue buffer %1").arg(errno),LOGCAM);
-      return false;
+      return -1;
     }
-
-  return true;
+  return 1;
 }
 
 
diff --git a/qsstv/videocapt/videocapture.h b/qsstv/videocapt/videocapture.h
index 6b18b66..484c59c 100644
--- a/qsstv/videocapt/videocapture.h
+++ b/qsstv/videocapt/videocapture.h
@@ -48,7 +48,7 @@ public:
 
   bool setFormat(v4l2_format &fmt);
   bool getFormat(v4l2_format &fmt);
-  bool getFrame();
+  int getFrame();
   int currentWidth(v4l2_format fmt) const;
   int currentHeight(v4l2_format fmt) const;
   int currentPixelFormat(v4l2_format fmt) const;
@@ -61,6 +61,7 @@ public:
   bool stopStreaming();
   bool startSnapshots();
   bool init(int pixelFormat, int width, int height);
+  QString getErrorString() {return errorString;}
 
 private:
 	int dev;
@@ -86,6 +87,7 @@ private:
   bool needsConversion;
   QString videoDevice;
   int allocateBuffers(int numBufs);
+  QString errorString;
 
 };
 #endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/qsstv.git



More information about the pkg-hamradio-commits mailing list