[SCM] qjackrcd/master: Imported Upstream version 1.0.5~ds0
alessio at users.alioth.debian.org
alessio at users.alioth.debian.org
Wed Jan 25 16:40:17 UTC 2012
The following commit has been merged in the master branch:
commit cda13cab050ea9b09c92bec960e81d6b2378dc50
Author: Alessio Treglia <alessio at debian.org>
Date: Wed Jan 25 17:32:42 2012 +0100
Imported Upstream version 1.0.5~ds0
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..3c4d8f8
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,18 @@
+QJackRcd, a simple "turnkey" jack QT recorder.
+Copyright (C) 2011 - Olivier ROUITS <olivier.rouits at free.fr>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the
+Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
diff --git a/README b/README
index b1cc5e9..628c570 100644
--- a/README
+++ b/README
@@ -8,7 +8,7 @@ with an automatic split/pause feature when you are away.
Another goal is to have a litle tool ready to use with a minimum of configuration for simple stereo recording needs.
-It manages natively silence by threshold and activation time.
+It manages natively silence by threshold and delay.
Silence event can be used to pause the record or to split files by closing the current record and opening a new one.
Optionaly QJackRcd is enable to post-process each file record at closure in background mode.
@@ -24,8 +24,17 @@ Olivier ROUITS <olivier.rouits at free.fr>
COMPILE
-------
+make clean
make
+DOCS
+----
+
+you must install doxygen before making documentations:
+
+make docs
+
+
EXECUTE
-------
@@ -40,6 +49,15 @@ sudo make install
RELEASES
--------
+SNAPSHOT (testing)
+-
+
+1.0.5 (stable)
+- No translation when installed from source in /usr/local
+- Do not put Doxygen "docs" target mandatory
+- Store/Try to restore last jack connections at launch
+- Default delay is 3 seconds
+
1.0.4 (stable)
- Czech translation from "Pavel Fric"
- Doxygen documentation (docs subdir)
diff --git a/dist.sh b/dist.sh
deleted file mode 100644
index 391851f..0000000
--- a/dist.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-RELEASE="${1:-SNAPSHOT}"
-
-ARCNAME="qjackrcd-${RELEASE}"
-
-echo "### Clean all"
-rm qjackrcd-*.tar.gz &>/dev/null
-rm -rf ".tmp" &>/dev/null
-make distclean &>/dev/null
-
-echo "### Make release ${ARCNAME} from scratch"
-qmake -config release || { echo "### QMake failed"; exit $?; }
-make || { echo "### Make failed"; exit $?; }
-
-echo "### Make tar file ${ARCNAME}.tar.gz"
-mkdir -p ".tmp/${ARCNAME}"
-
-cp -r * .tmp/${ARCNAME}
-cd .tmp
-tar -czf "../${ARCNAME}.tar.gz" "${ARCNAME}" || { echo "### Tar failed"; exit $?; }
-cd ..
-
-rm -rf ".tmp"
-
-if [[ "${RELEASE}" == "SNAPSHOT" ]]
-then
- echo "### Commit in SVN"
- svn ci -m "${ARCNAME}"
- echo "### publish ${ARCNAME} archive to TESTING"
- scp "${ARCNAME}.tar.gz" "orouits,qjackrcd at frs.sourceforge.net:/home/frs/project/q/qj/qjackrcd/testing/"
-elif [[ "${RELEASE}" =~ ^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$ ]]
-then
- echo "### Make tag in SVN /tags/${ARCNAME}"
- svn cp . "svn+ssh://orouits@svn.code.sf.net/p/qjackrcd/code/tags/${ARCNAME}"
- echo "### publish ${ARCNAME} archive to STABLE"
- scp "${ARCNAME}.tar.gz" "orouits,qjackrcd at frs.sourceforge.net:/home/frs/project/q/qj/qjackrcd/stable/"
-elif [[ "${RELEASE}" =~ ^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+[[:alpha:]]$ ]]
-then
- echo "### Make tag in SVN /tags/${ARCNAME}"
- svn cp . "svn+ssh://orouits@svn.code.sf.net/p/qjackrcd/code/tags/${ARCNAME}"
- echo "### publish ${ARCNAME} archive to TESTING"
- scp "${ARCNAME}.tar.gz" "orouits,qjackrcd at frs.sourceforge.net:/home/frs/project/q/qj/qjackrcd/testing/"
-fi
-
-echo "### Done."
diff --git a/main.cpp b/main.cpp
index cb91e38..a2aab16 100644
--- a/main.cpp
+++ b/main.cpp
@@ -19,17 +19,9 @@
/**
* @file main.cpp
* $Author: orouits $
-* $Date: 2011-12-29 18:09:21 +0100 (jeu. 29 déc. 2011) $
-* $Revision: 51 $
-*
-* QJackRcd is a simple QT application to record JACK server outputs (use it with QJackCtl)
-*
-* The initial goal of this project is to record from an old tape, with an automatic split/pause feature when you are away. Another goal is to have a litle tool ready to use with a minimum of configuration for simple stereo recording needs.
-* It manages natively silence by threshold and activation time. Silence event can be used to pause the record or to split files by closing the current record and opening a new one.
-* Optionaly QJackRcd is enable to post-process each file record at closure in background mode. the command is a simple bash command.
-*
-* Made with QTCreator
-* It Depends on jack, sndfile and qt4 libraries.
+* $Date: 2012-01-03 23:21:58 +0100 (mar. 03 janv. 2012) $
+* $Revision: 68 $
+* @brief Main function implementation
*/
/**
@@ -54,7 +46,7 @@
/**
* @fn int main (int argc, char *argv[])
- * @brief Program enrty.
+ * @brief Program entry.
*
* Main doesn't take any special paramerter, only standard QT parameters.
*
@@ -66,8 +58,14 @@ int main(int argc, char *argv[])
QApplication application(argc, argv);
QString locale = QLocale::system().name();
QTranslator translator;
+
+ // for packaged system install
if (!translator.load(QString("qjackrcd_") + locale, "/usr/share/qjackrcd/locale"))
- translator.load(QString("qjackrcd_") + locale, "locale"); // for tests inplace
+ // for install from source
+ if (!translator.load(QString("qjackrcd_") + locale, "/usr/local/share/qjackrcd/locale"))
+ // for dev test
+ translator.load(QString("qjackrcd_") + locale, "locale");
+
application.installTranslator(&translator);
// The recorder
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 828b812..6998935 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -19,8 +19,8 @@
/**
* @file mainwindow.cpp
* $Author: orouits $
-* $Date: 2011-12-29 17:19:05 +0100 (jeu. 29 déc. 2011) $
-* $Revision: 49 $
+* $Date: 2012-01-17 23:57:44 +0100 (mar. 17 janv. 2012) $
+* $Revision: 70 $
* @brief Implementation of MainWindow class
*/
@@ -154,6 +154,8 @@ void MainWindow::writeSettings()
settings.setValue("pauseActivationDelay", recorder->getPauseActivationDelay());
settings.setValue("splitMode", recorder->isSplitMode());
settings.setValue("processCmdLine", recorder->getProcessCmdLine());
+ settings.setValue("connections1", recorder->getJackConnections1());
+ settings.setValue("connections2", recorder->getJackConnections2());
settings.endGroup();
}
@@ -162,9 +164,11 @@ void MainWindow::readSettings()
QSettings settings("qjackrcd", "qjackrcd");
settings.beginGroup("Recorder");
- recorder->setPauseLevel(settings.value("pauseLevel", -20).toInt());
- recorder->setPauseActivationDelay(settings.value("pauseActivationDelay", 2).toInt());
+ recorder->setPauseLevel(settings.value("pauseLevel", -20).toFloat());
+ recorder->setPauseActivationDelay(settings.value("pauseActivationDelay", 3).toInt());
recorder->setSplitMode(settings.value("splitMode", false).toBool());
recorder->setProcessCmdLine(settings.value("processCmdLine", "").toString());
+ recorder->setJackConnections1(settings.value("connections1", "").toString());
+ recorder->setJackConnections2(settings.value("connections2", "").toString());
settings.endGroup();
}
diff --git a/publish.sh b/publish.sh
index 47b5dc6..6abec83 100755
--- a/publish.sh
+++ b/publish.sh
@@ -12,6 +12,7 @@ make distclean &>/dev/null
echo "### Make release ${ARCNAME} from scratch"
qmake -config release
make
+make docs
echo "### Make tar file ${ARCNAME}.tar.gz"
mkdir -p ".tmp/${ARCNAME}"
@@ -29,19 +30,21 @@ then
svn ci -m "${ARCNAME}"
echo "### publish ${ARCNAME} archive to TESTING"
scp "${ARCNAME}.tar.gz" "orouits,qjackrcd at frs.sourceforge.net:/home/frs/project/q/qj/qjackrcd/testing/"
+ scp README "orouits,qjackrcd at frs.sourceforge.net:/home/frs/project/q/qj/qjackrcd/"
elif [[ "${RELEASE}" =~ ^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$ ]]
then
echo "### Make tag in SVN /tags/${ARCNAME}"
svn cp . "svn+ssh://orouits@svn.code.sf.net/p/qjackrcd/code/tags/${ARCNAME}" -m "${ARCNAME}"
- svn cp README "svn+ssh://orouits@svn.code.sf.net/p/qjackrcd/code/README" -m "${ARCNAME}"
echo "### publish ${ARCNAME} archive to STABLE"
scp "${ARCNAME}.tar.gz" "orouits,qjackrcd at frs.sourceforge.net:/home/frs/project/q/qj/qjackrcd/stable/"
+ scp README "orouits,qjackrcd at frs.sourceforge.net:/home/frs/project/q/qj/qjackrcd/"
elif [[ "${RELEASE}" =~ ^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+[[:alpha:]]+$ ]]
then
echo "### Make tag in SVN /tags/${ARCNAME}"
svn cp . "svn+ssh://orouits@svn.code.sf.net/p/qjackrcd/code/tags/${ARCNAME}" -m "${ARCNAME}"
echo "### publish ${ARCNAME} archive to TESTING"
scp "${ARCNAME}.tar.gz" "orouits,qjackrcd at frs.sourceforge.net:/home/frs/project/q/qj/qjackrcd/testing/"
+ scp README "orouits,qjackrcd at frs.sourceforge.net:/home/frs/project/q/qj/qjackrcd/"
fi
echo "### Done."
diff --git a/qjackrcd.pro b/qjackrcd.pro
index 48d757e..e16f2a8 100644
--- a/qjackrcd.pro
+++ b/qjackrcd.pro
@@ -40,6 +40,7 @@ TRANSLATIONS += \
OTHER_FILES += \
README \
+ LICENSE \
publish.sh \
# prepare target
@@ -76,4 +77,3 @@ docs.commands = doxygen Doxyfile
docs.depends = Doxyfile $$SOURCES $$HEADERS
QMAKE_EXTRA_TARGETS += docs
QMAKE_CLEAN += -r $$docs.target
-PRE_TARGETDEPS += docs
diff --git a/qjackrcd.pro.user b/qjackrcd.pro.user
index 0e6a50f..74a37d1 100644
--- a/qjackrcd.pro.user
+++ b/qjackrcd.pro.user
@@ -34,7 +34,7 @@
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Bureau</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
- <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">1</value>
+ <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
<value key="ProjectExplorer.Target.ActiveDeployConfiguration" type="int">0</value>
<value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
<valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
@@ -76,7 +76,7 @@
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
- <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">true</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Debug</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
@@ -126,7 +126,7 @@
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
- <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">true</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Release</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
diff --git a/recorder.cpp b/recorder.cpp
index 0fd25ea..c7855b5 100644
--- a/recorder.cpp
+++ b/recorder.cpp
@@ -19,8 +19,8 @@
/**
* @file recorder.cpp
* $Author: orouits $
-* $Date: 2011-12-31 00:04:45 +0100 (sam. 31 déc. 2011) $
-* $Revision: 61 $
+* $Date: 2012-01-17 23:57:44 +0100 (mar. 17 janv. 2012) $
+* $Revision: 70 $
* @brief Implementation of Recorder class
*/
@@ -46,6 +46,7 @@
#define RCD_JK_INPUT_PORTNAME_2 "record_2"
#define RCD_WAIT_TIMEOUT_MS 1000
+#define RCD_SIG_CHANGE_COUNT 4
#define RCD_FRAME_SIZE sizeof(float)
#define RCD_RINGBUFFER_FRAMES (64*1024)
@@ -119,7 +120,7 @@ Recorder::Recorder(QString jackName)
setRecording(false);
setShutdown(false);
setSplitMode(false);
- setPauseActivationDelay(2);
+ setPauseActivationDelay(3);
setPauseLevel(-20);
// start the recorder thread
@@ -199,24 +200,11 @@ void Recorder::jackShutdown()
setShutdown(true);
}
-void Recorder::checkJackAutoConnect() {
- while (!jackPortRegQueue.empty()) {
- jack_port_t* port = jack_port_by_id(jackClient, jackPortRegQueue.dequeue());
- if (jack_port_flags(port) & JackPortIsOutput) {
- QString portname = jack_port_name(port);
- if (jack_port_connected(jackInputPort1) == 0)
- jack_connect(jackClient, portname.toAscii().constData(), jack_port_name(jackInputPort1) );
- else if (jack_port_connected(jackInputPort2) == 0)
- jack_connect(jackClient, portname.toAscii().constData(), jack_port_name(jackInputPort2) );
- // printf("%s\n", portname.toAscii().constData());
- }
- }
-}
-
//=============================================================================
// Recorder public methods
//=============================================================================
+
//=============================================================================
// Recorder internal methods
//=============================================================================
@@ -296,7 +284,7 @@ void Recorder::run()
// update disk space compute
computeDiskSpace();
- if (loopCounter > 4) {
+ if (loopCounter >= RCD_SIG_CHANGE_COUNT) {
// notify listeners
emit statusChanged();
loopCounter = 0;
@@ -430,3 +418,37 @@ void Recorder::processFile()
}
}
+QString Recorder::getJackConnections(jack_port_t* jackPort) {
+ const char** connections = NULL;
+ QString result = "";
+ if ((connections = jack_port_get_all_connections (jackClient, jackPort)) != NULL) {
+ for (int i = 0; connections[i]; i++) {
+ result += QString(connections[i]) + ";";
+ //printf ("%s\n", connections[i]);
+ }
+ jack_free ((void*)connections);
+ }
+ return result;
+}
+
+void Recorder::setJackConnections(QString cnxLine, jack_port_t* jackPort) {
+ QStringList strList = cnxLine.split(';', QString::SkipEmptyParts);
+ for (int i = 0; i < strList.count() ; i++) {
+ jack_connect(jackClient, strList.at(i).toAscii().constData(), jack_port_name(jackPort) );
+ }
+}
+
+
+void Recorder::checkJackAutoConnect() {
+ while (!jackPortRegQueue.empty()) {
+ jack_port_t* port = jack_port_by_id(jackClient, jackPortRegQueue.dequeue());
+ if (jack_port_flags(port) & JackPortIsOutput) {
+ QString portName = jack_port_name(port);
+ if (jack_port_connected(jackInputPort1) == 0)
+ jack_connect(jackClient, portName.toAscii().constData(), jack_port_name(jackInputPort1) );
+ else if (jack_port_connected(jackInputPort2) == 0)
+ jack_connect(jackClient, portName.toAscii().constData(), jack_port_name(jackInputPort2) );
+ }
+ }
+}
+
diff --git a/recorder.h b/recorder.h
index bb54e2c..092a353 100644
--- a/recorder.h
+++ b/recorder.h
@@ -19,8 +19,8 @@
/**
* @file recorder.h
* $Author: orouits $
-* $Date: 2011-12-29 18:09:21 +0100 (jeu. 29 déc. 2011) $
-* $Revision: 51 $
+* $Date: 2012-01-17 23:57:44 +0100 (mar. 17 janv. 2012) $
+* $Revision: 70 $
* @brief Header for Recorder class
*/
@@ -100,6 +100,8 @@ class Recorder: public QThread
void fadeinAlternateBuffer();
void checkJackAutoConnect();
+ QString getJackConnections(jack_port_t* jackPort);
+ void setJackConnections(QString cnxLine, jack_port_t* jackPort);
protected:
@@ -118,6 +120,11 @@ public:
void jackPortReg(jack_port_id_t port_id, int reg);
void jackShutdown();
+ QString getJackConnections1() {return getJackConnections(jackInputPort1);}
+ QString getJackConnections2() {return getJackConnections(jackInputPort2);}
+ void setJackConnections1(QString cnxLine) {setJackConnections(cnxLine, jackInputPort1);}
+ void setJackConnections2(QString cnxLine) {setJackConnections(cnxLine, jackInputPort2);}
+
QString getJackName() {return jackName; }
bool isShutdown() { return shutdown; }
void setRecording(bool value) { recording = value; }
--
qjackrcd packaging
More information about the pkg-multimedia-commits
mailing list