summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfred <fred@home.lan>2011-04-06 15:21:31 (GMT)
committer fred <fred@home.lan>2011-04-06 15:21:31 (GMT)
commit3f4f5f1f2e2f216f978aafc5dc3098fad6bf93c6 (patch)
tree97ee96fe3b4cf453e0c45d839508d591f11580b8
parent1135374cf905d03f84471681ccc96fd8259e2197 (diff)
Now stops encoder when closing the QJackClient
- In Qfreej:: added the getQEnc() method. - In QJackClient destructor, now deletes the QEncoder if there is one when deleting QJackClient.
-rw-r--r--qt/qJackClient.cpp1
-rw-r--r--qt/qfreej.cpp5
-rw-r--r--qt/qfreej.h1
3 files changed, 7 insertions, 0 deletions
diff --git a/qt/qJackClient.cpp b/qt/qJackClient.cpp
index 901e385..1ff8d5f 100644
--- a/qt/qJackClient.cpp
+++ b/qt/qJackClient.cpp
@@ -29,6 +29,7 @@ QJackClient::QJackClient(Qfreej *qfreej) : QWidget()
QJackClient::~QJackClient()
{
+ if (m_Qfreej->getQEnc()) delete (m_Qfreej->getQEnc());
if (m_JackIsOn && m_Jack) m_Jack->Detach();
m_Jack = NULL;
m_Qfreej->resetQJack();
diff --git a/qt/qfreej.cpp b/qt/qfreej.cpp
index 0275142..160bb7a 100644
--- a/qt/qfreej.cpp
+++ b/qt/qfreej.cpp
@@ -241,6 +241,11 @@ OggTheoraEncoder *Qfreej::getEnc()
return (NULL);
}
+QEncoder *Qfreej::getQEnc()
+{
+ return(m_Enc);
+}
+
void Qfreej::addTextLayer()
{
QqWidget *aWidget = new QqWidget(freej, tabWidget, this);
diff --git a/qt/qfreej.h b/qt/qfreej.h
index 9f747ae..cc726f6 100644
--- a/qt/qfreej.h
+++ b/qt/qfreej.h
@@ -39,6 +39,7 @@ public:
QJackClient *getQjack();
Context *getFreej();
OggTheoraEncoder *getEnc();
+ QEncoder *getQEnc();
void resetEnc();
void resetQJack();