- Added -log option to command line
- Added COPYRIGHT VERSION LICENSE marocs in libremediaserver.h
This commit is contained in:
parent
b877185c0d
commit
794552bdea
6 changed files with 54 additions and 25 deletions
|
@ -105,17 +105,29 @@ libreMediaServer::libreMediaServer(QStringList args, QWidget *parent)
|
|||
m_tcpsocket_audio(NULL),
|
||||
m_gui(FALSE)
|
||||
{
|
||||
qDebug() << "******************************************************************************************************";
|
||||
qDebug() << "********************************************************************************";
|
||||
qDebug() << QDate::currentDate() << QTime::currentTime();
|
||||
qDebug() << "Parsing the command line";
|
||||
// Iniciamos el User Interface
|
||||
ui.setupUi(this);
|
||||
// Parse the command line options
|
||||
if (args.contains("-gui"))
|
||||
{
|
||||
qDebug()<< "libremediaserver Constructor option GUI detected";
|
||||
m_gui = true;
|
||||
ui.textEdit->appendPlainText("Pure Data GUI's will be shown");
|
||||
}
|
||||
// Iniciamos el User Interface
|
||||
ui.setupUi(this);
|
||||
// Unix Local Sockets
|
||||
//Print the version
|
||||
QString ver;
|
||||
ver = VERSION;
|
||||
ui.textEdit->appendPlainText(ver);
|
||||
ver = COPYRIGHT;
|
||||
ui.textEdit->appendPlainText(ver);
|
||||
ver = LICENSE;
|
||||
ui.textEdit->appendPlainText(ver);
|
||||
qDebug() << VERSION;
|
||||
qDebug() << COPYRIGHT;
|
||||
qDebug() << LICENSE;
|
||||
// Init Unix Local Sockets
|
||||
QFile socket(SOCKET);
|
||||
if (socket.exists())
|
||||
{
|
||||
|
@ -125,7 +137,7 @@ libreMediaServer::libreMediaServer(QStringList args, QWidget *parent)
|
|||
Q_CHECK_PTR(m_server_vid);
|
||||
if (!m_server_vid->listen(SOCKET))
|
||||
{
|
||||
qErrnoWarning("Init: Can not listen on unix local server");
|
||||
qErrnoWarning("libremediaserver::constructor L132: Can not listen on unix local server");
|
||||
}
|
||||
connect(m_server_vid, SIGNAL(newConnection()),this, SLOT(newPeer()));
|
||||
// Start preview Timer
|
||||
|
@ -199,9 +211,9 @@ libreMediaServer::~libreMediaServer()
|
|||
delete m_pd_read_audio;
|
||||
}
|
||||
socket.remove();
|
||||
qDebug() << "PD Video starts: " << m_startvideo << " PD Audio starts: " << m_startaudio;
|
||||
qDebug() << "PD Video restarts: " << m_startvideo << " PD Audio restarts: " << m_startaudio;
|
||||
qDebug() << QDate::currentDate() << QTime::currentTime();
|
||||
qDebug() << "******************************************************************************************************";
|
||||
qDebug() << "********************************************************************************";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -879,7 +891,7 @@ void libreMediaServer::pdrestart()
|
|||
return;
|
||||
}
|
||||
save_finish();
|
||||
qDebug()<<"**************************************************************************";
|
||||
qDebug()<<"********************************************************************************";
|
||||
qDebug()<<"PD Video Restarts:" << ++m_startvideo;
|
||||
ui.textEdit->appendPlainText("PD Video Restarting.");
|
||||
disconnect(m_pd_video, SIGNAL(finished(int)), this, SLOT(pdrestart()));
|
||||
|
|
|
@ -37,6 +37,10 @@
|
|||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
|
||||
#define VERSION "LibreMediaServer Version 0.03-1"
|
||||
#define COPYRIGHT "(C) 2012-2013 Santi Norena libremediaserver@gmail.com"
|
||||
#define LICENSE "GPL 3 License. See LICENSE.txt and credits.txt for details"
|
||||
|
||||
class msex;
|
||||
class QMenu;
|
||||
class QProcess;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by Qt Creator 2.5.0, 2013-03-01T20:59:13. -->
|
||||
<!-- Written by Qt Creator 2.5.0, 2013-03-02T13:18:40. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
|
|
|
@ -1135,10 +1135,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>LibreMediaServer 0.03-1
|
||||
(C) 2012-2013 Santiago Noreña libremediaserver@gmail.com
|
||||
GPL 3 license. See LICENSE.txt and credits.txt for details
|
||||
This program comes with ABSOLUTELY NO WARRANTY</string>
|
||||
<string>This program comes with ABSOLUTELY NO WARRANTY</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
|
|
36
src/main.cpp
36
src/main.cpp
|
@ -19,8 +19,6 @@
|
|||
#include <QApplication>
|
||||
#include "libremediaserver.h"
|
||||
|
||||
#define VERSION "0.03-1";
|
||||
|
||||
// Handler for pipe the stderr to a log file
|
||||
|
||||
bool initMessageHandler = 0;
|
||||
|
@ -43,6 +41,7 @@ void MessageHandler(QtMsgType type, const char *msg)
|
|||
txt = QString("Fatal: %1").arg(msg);
|
||||
abort();
|
||||
}
|
||||
// Create the log dir and log file
|
||||
if (!initMessageHandler)
|
||||
{
|
||||
QDir dir;
|
||||
|
@ -76,25 +75,42 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
QApplication app(argc, argv);
|
||||
QStringList args = app.arguments();
|
||||
// parse the command line
|
||||
if (args.size() > 1)
|
||||
{
|
||||
if (args.contains("-v") > 0)
|
||||
{
|
||||
qDebug() << "LibreMediaServer Version" << VERSION;
|
||||
app.exit();
|
||||
qDebug() << VERSION;
|
||||
qDebug() << COPYRIGHT;
|
||||
qDebug() << LICENSE;
|
||||
return 0;
|
||||
}
|
||||
if (args.contains("-h") > 0)
|
||||
{
|
||||
qDebug() << "LibreMediaServer Version" << VERSION;
|
||||
qDebug() << "Help";
|
||||
qDebug() << "-v Show the version and exits";
|
||||
qDebug() << "-gui show the Pure Data GUI's.";
|
||||
app.exit();
|
||||
qDebug() << VERSION;
|
||||
qDebug() << COPYRIGHT;
|
||||
qDebug() << LICENSE;
|
||||
qDebug() << "Help for command line options:";
|
||||
qDebug() << "-v show the version and exits";
|
||||
qDebug() << "-gui show the Pure Data GUI's";
|
||||
qDebug() << "-log write the debug information to a log file instead stderr";
|
||||
qDebug() << "-h this help";
|
||||
return 0;
|
||||
}
|
||||
if (args.contains("-log"))
|
||||
{
|
||||
qInstallMsgHandler(MessageHandler);
|
||||
}
|
||||
if (!args.contains("-gui"))
|
||||
{
|
||||
for (int i=1; i<args.size();i++)
|
||||
{
|
||||
qDebug() << "Option not known: " << args.at(i);
|
||||
}
|
||||
qDebug() <<"Write ./libremediaserver -h for help in command line arguments";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
qInstallMsgHandler(MessageHandler);
|
||||
libreMediaServer libreMediaServer(args);
|
||||
libreMediaServer.show();
|
||||
return app.exec();
|
||||
|
|
2
todo.txt
2
todo.txt
|
@ -22,6 +22,7 @@ v 0.03:
|
|||
+ Pure Data: Carpetas para imágenes
|
||||
+ Text: Diferentes ficheros de texto
|
||||
+ GUI: Configuración para anular los previews y salvar tiempo de proceso
|
||||
+ Opción en la línea de comandos para mostrar las guis de Pure Data --> Optimización de patches y resolver errores
|
||||
|
||||
Próximas versiones:
|
||||
|
||||
|
@ -49,7 +50,6 @@ Próximas versiones:
|
|||
- Audio: Tarjetas con varias salidas y varias mezclas
|
||||
- Video: Live input
|
||||
- Empaquetar en .deb
|
||||
- Opción en el arranque para mostrar las guis de Pure Data --> Optimización de patches y resolver errores
|
||||
- Scripts: nuevo script para numerar los media
|
||||
- Text: Alphas high y low. Mirar si se puede
|
||||
- Video: Generación de fractales visuales
|
||||
|
|
Loading…
Add table
Reference in a new issue