summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2011-03-08 09:26:05 (GMT)
committer Jaromil <jaromil@dyne.org>2011-03-08 09:26:05 (GMT)
commit7be65f6fdd37c8f64a64bc5ca9f1ea5d42791244 (patch)
tree66b3102afa00dd92572d21d8ea667b3fc4d9f7a2
parentc265373f2e629aeb25b7d785a4237732b8b1e29c (diff)
parent4800f14b92ce59e27452862b2b46f9e0f43d974b (diff)
Merge branch 'sound'
-rw-r--r--qt/.gitignore1
-rw-r--r--qt/Qfreej.pro8
-rw-r--r--qt/QqWidget.cpp14
-rw-r--r--qt/TODO6
-rw-r--r--qt/qLogging.cpp10
-rw-r--r--qt/qLogging.h19
-rw-r--r--qt/qfreej.cpp29
-rw-r--r--qt/qfreej.h4
8 files changed, 67 insertions, 24 deletions
diff --git a/qt/.gitignore b/qt/.gitignore
index 62470b0..c41e71a 100644
--- a/qt/.gitignore
+++ b/qt/.gitignore
@@ -1,3 +1,4 @@
+tmp/*
toto*
thedaytrip_512kb.*
time_pages
diff --git a/qt/Qfreej.pro b/qt/Qfreej.pro
index e38d823..cc22062 100644
--- a/qt/Qfreej.pro
+++ b/qt/Qfreej.pro
@@ -19,7 +19,8 @@ SOURCES += main.cpp \
Sound.cpp \
qJackClient.cpp \
qOpacity.cpp \
- qEncoder.cpp
+ qEncoder.cpp \
+ qLogging.cpp
HEADERS += qfreej.h \
QqComboBlit.h \
@@ -32,8 +33,9 @@ SOURCES += main.cpp \
Sound.h \
qJackClient.h \
qOpacity.h \
- qEncoder.h
-FORMS += qfreej.ui
+ qEncoder.h \
+ qLogging.h
+#FORMS += qfreej.ui
CONFIG += qt debug
LIBS += -lfreej
INCLUDEPATH += ../ \
diff --git a/qt/QqWidget.cpp b/qt/QqWidget.cpp
index bd56457..51712d4 100644
--- a/qt/QqWidget.cpp
+++ b/qt/QqWidget.cpp
@@ -40,6 +40,7 @@ QqWidget::QqWidget(Context *freej, QqTabWidget* tabWidget, Qfreej* qfreej, QStri
{
m_tabWidg = NULL;
qTextLayer = NULL;
+ m_qGeneLayer = NULL;
fakeView = NULL;
fakeLay = NULL;
qLayer = freej->open((char*)fichier.toStdString().c_str(), 0, 0); // hey, this already init and open the layer !!
@@ -75,18 +76,6 @@ QqWidget::QqWidget(Context *freej, QqTabWidget* tabWidget, Qfreej* qfreej, QStri
qjack->setNoutputs(((VideoLayer *)qLayer)->audio_channels);
}
}
-/* if (qfreej->IsAudioOn() && (((VideoLayer*)qLayer)->audio_channels > 0))
- {
- if (!freej->screen->add_audio(qfreej->getQjack()->getJack()))
- {
- QMessageBox::information(this, "Jack Output port","Can't create the Jack audio output ports");
- }
- else
- qDebug() << "creates :" << ((VideoLayer*)qLayer)->audio_channels \
- << " Jack Output Ports";
- }*/
-// qfreej->openSoundDevice();
- //freej->screen->fullscreen(); //figure out how to exit from this state
}
else
{
@@ -178,6 +167,7 @@ QqWidget::QqWidget(Context *freej, QqTabWidget* tabWidget, Qfreej* qfreej, QStri
QqWidget::QqWidget(Context *freej, QqTabWidget *tabWidget, Qfreej* qfreej) : QWidget(qfreej)
{
qLayer = NULL;
+ m_qGeneLayer = NULL;
fakeView = NULL;
fakeLay = NULL;
QString filename = "textouille.txt";
diff --git a/qt/TODO b/qt/TODO
index 7da4d7f..5b44dbe 100644
--- a/qt/TODO
+++ b/qt/TODO
@@ -8,13 +8,19 @@
//devide the fake size window by two .... not sure :)
//insert STRING filters parameters
//add a x:x ratio button, resizing to the closest width and lenght to obtain this ratio
+//create a console for messages comming from func() warning() notice() act(). see Logger class
+//see to integrate ogg skeleton config on the graphic interface
//fix the streaming speed of a mono audio VideoLayer which is double the normal speed
//there is the amount of delay between audio and video if you open a video before creating
the QJackClient of the time you waited to open the QJackClient .... see if a fix needed.
+//since Qfreej destructor change, see why it blocks while exited by the cross
//fix the streaming audio parameters changes to be taken into account
//there is a bug if we first create QEncoder then delete it, creates it again and then dump in a file
//try to fix sound mono VideoLayer issue if it is open at the same time as a stereo one
//verify how it works with different fps values
//add the capability to have a config file..... important :)
+//fixing the quit SEGFAULT is done almost done. See to delete layers before quit when closing while playing.
+no SEGFAULT if we close all layers before quit.
+//I have to do some tests around WA_DeleteOnClose in QEncoder
- copier la méthode utilisée dans /home/fred/system/video/snd/dhoerl/avcodec_sample.0.5.0.c
qui recupère le FPS, car semble retourner une bonne valeur pour film.mp4 (pas 240)
diff --git a/qt/qLogging.cpp b/qt/qLogging.cpp
new file mode 100644
index 0000000..f210241
--- /dev/null
+++ b/qt/qLogging.cpp
@@ -0,0 +1,10 @@
+#include <qLogging.h>
+#include <QDebug>
+
+QLogger::QLogger(QWidget *parent) : QWidget(parent)
+{
+}
+
+QLogger::~QLogger()
+{
+} \ No newline at end of file
diff --git a/qt/qLogging.h b/qt/qLogging.h
new file mode 100644
index 0000000..98a619a
--- /dev/null
+++ b/qt/qLogging.h
@@ -0,0 +1,19 @@
+#ifndef QLOG_H
+#define QLOG_H
+#include <QtGui>
+#include <logging.h>
+
+class QLogger : public QWidget, public Logger
+{
+ Q_OBJECT
+public:
+ QLogger(QWidget *);
+ ~QLogger();
+
+public slots:
+
+private:
+
+};
+
+#endif // QLOG_H
diff --git a/qt/qfreej.cpp b/qt/qfreej.cpp
index f641a5c..d835f9c 100644
--- a/qt/qfreej.cpp
+++ b/qt/qfreej.cpp
@@ -39,6 +39,7 @@ Qfreej::Qfreej(QWidget *parent) :
QWidget(parent)
{
m_snd = NULL;
+ m_Logs = NULL;
m_Opacity = NULL;
m_QJack = NULL;
m_JackIsOn = false;
@@ -54,7 +55,7 @@ Qfreej::Qfreej(QWidget *parent) :
QAction *actionPen = menuFichier->addAction("&Open");
connect(actionPen, SIGNAL(triggered()), this, SLOT(addLayer()));
- QAction *actionAddTextLayer = menuFichier->addAction("&Text layer");
+ QAction *actionAddTextLayer = menuFichier->addAction("&Add Text layer");
connect(actionAddTextLayer, SIGNAL(triggered()), this, SLOT(addTextLayer()));
QAction *actionStream = menuFichier->addAction("&Run js");
@@ -69,9 +70,14 @@ Qfreej::Qfreej(QWidget *parent) :
QAction *actionOpa = menuOpacity->addAction("&Opacity");
connect(actionOpa, SIGNAL(triggered()), this, SLOT(changeOpacity()));
-
menuGenerator = menuFichier->addMenu("&Generators");
+ QAction *actionLog = menuFichier->addAction("&Logs");
+ connect(actionLog, SIGNAL(triggered()), this, SLOT(showLogs()));
+
+ QAction *actionClose = menuFichier->addAction("&Exit");
+ connect(actionClose, SIGNAL(triggered()), this, SLOT(close()));
+
m_Opacity = new QOpacity(this);
m_Opacity->hide();
@@ -82,18 +88,22 @@ Qfreej::Qfreej(QWidget *parent) :
freej = new Context();
init();
number = 0;
- setAttribute(Qt::WA_DeleteOnClose);
+// setAttribute(Qt::WA_DeleteOnClose);
}
Qfreej::~Qfreej()
{
if (m_snd) delete m_snd;
- poller->stop();
- if (m_QJack) delete m_QJack;
if (m_Enc) delete m_Enc;
-// delete freej; //to be investigate :)
-// delete layoutH;
- delete grid;
+ if (m_QJack) delete m_QJack;
+ delete freej; //to be investigate :)
+ poller->stop();
+}
+
+void Qfreej::showLogs()
+{
+ if (m_Logs)
+ m_Logs->show();
}
QJackClient *Qfreej::getQjack()
@@ -109,11 +119,12 @@ void Qfreej::changeOpacity()
void Qfreej::closeEvent(QCloseEvent *event)
{
event->accept();
- delete freej;
}
void Qfreej::init()
{
+// m_Logs = new QLogger(this);
+
tabWidget = new QqTabWidget(this);
grid->addWidget(tabWidget, 1, 0);
setLayout(grid);//new
diff --git a/qt/qfreej.h b/qt/qfreej.h
index 974e7de..d0c5737 100644
--- a/qt/qfreej.h
+++ b/qt/qfreej.h
@@ -13,6 +13,7 @@
#include "qOpacity.h"
#include "qJackClient.h"
#include "qEncoder.h"
+#include "qLogging.h"
class QTimer;
class QqTabWidget;
@@ -50,6 +51,8 @@ public slots:
void changeOpacity();
void jackConnect();
void encConnect();
+// void close();
+ void showLogs();
protected:
void closeEvent(QCloseEvent*);
@@ -72,6 +75,7 @@ private:
bool m_JackIsOn;
QEncoder *m_Enc;
QJackClient *m_QJack;
+ QLogger *m_Logs;
};