[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeextragear-2/kmplayer/src
From: Koos Vriezen <koos.vriezen () xs4all ! nl>
Date: 2003-06-30 20:32:35
[Download RAW message or body]
CVS commit by vriezen:
Give mencoder some more time to exit. Still a mencoder process can remain by
KProcess falsely emiting processExited (maybe only one of its threads exits)
M +10 -9 kmplayer_part.cpp 1.61
M +13 -2 kmplayerprocess.cpp 1.16
M +1 -0 kmplayerprocess.h 1.10
--- kdeextragear-2/kmplayer/src/kmplayer_part.cpp #1.60:1.61
@@ -461,8 +461,8 @@ void KMPlayer::forward () {
void KMPlayer::record () {
+ if (m_view) m_view->setCursor (QCursor (Qt::WaitCursor));
if (m_mencoder->playing ()) {
m_mencoder->stop ();
- return;
- }
+ } else {
m_process->stop ();
m_mencoder->setSource (m_process->source ());
@@ -472,4 +472,6 @@ void KMPlayer::record () {
} else if (m_view->recordButton ()->isOn ())
m_view->recordButton ()->toggle ();
+ }
+ if (m_view) m_view->setCursor (QCursor (Qt::ArrowCursor));
}
@@ -1201,5 +1203,4 @@ void KMPlayerHRefSource::setURL (const K
void KMPlayerHRefSource::play () {
kdDebug () << "KMPlayerHRefSource::play " << m_url.url() << endl;
- KMPlayerView * view = static_cast <KMPlayerView*> (m_player->view ());
m_player->setSource (m_player->urlSource ());
}
--- kdeextragear-2/kmplayer/src/kmplayerprocess.cpp #1.15:1.16
@@ -150,5 +150,4 @@ bool MPlayerBase::sendCommand (const QSt
bool MPlayerBase::stop () {
- kdDebug () << "MPlayerBase::stop ()" << endl;
if (!source () || !m_process || !m_process->isRunning ()) return true;
if (!m_use_slave) {
@@ -157,5 +156,9 @@ bool MPlayerBase::stop () {
signal(SIGTERM, oldhandler);
}
- KProcessController::theKProcessController->waitForProcessExit (1);
+ QTime t;
+ t.start ();
+ do {
+ KProcessController::theKProcessController->waitForProcessExit (2);
+ } while (t.elapsed () < 2000 && m_process->isRunning ());
if (m_process->isRunning () && !KMPlayerProcess::stop ())
processStopped (0L); // give up
@@ -482,4 +485,12 @@ bool MEncoder::play () {
delete dlg;
return success;
+}
+
+bool MEncoder::stop () {
+ kdDebug () << "MEncoder::stop ()" << endl;
+ if (!source () || !m_process || !m_process->isRunning ()) return true;
+ if (m_use_slave)
+ m_process->kill (SIGINT);
+ return MPlayerBase::stop ();
}
--- kdeextragear-2/kmplayer/src/kmplayerprocess.h #1.9:1.10
@@ -129,4 +129,5 @@ public:
public slots:
virtual bool play ();
+ virtual bool stop ();
private:
KURL m_recordurl;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic