Compare commits

...

4 Commits

Author SHA1 Message Date
Jason Wood
90e40d478c Prevent KRender from continually trying to open a process if the url does not point to a file.
svn path=/branches/release-0_2_0/kdenlive/; revision=168
2003-01-20 20:27:53 +00:00
Jason Wood
63136a843f Fixed port number on launchin piave process - should specify the correct port number now rather than some random character!
svn path=/branches/release-0_2_0/kdenlive/; revision=161
2003-01-18 20:38:13 +00:00
Jason Wood
9a6a010aeb Added #include <stdlib.h> for abs() function.
svn path=/branches/release-0_2_0/kdenlive/; revision=160
2003-01-18 20:36:59 +00:00
nobody
c350474400 This commit was manufactured by cvs2svn to create branch
'release-0_2_0'.

svn path=/branches/release-0_2_0/kdenlive/; revision=159
2003-01-14 02:22:00 +00:00
3 changed files with 20 additions and 7 deletions

View File

@@ -16,6 +16,7 @@
***************************************************************************/
#include <cmath>
#include <stdlib.h>
#include <klocale.h>
#include <qscrollbar.h>

View File

@@ -15,13 +15,15 @@
* *
***************************************************************************/
#include <kio/netaccess.h>
#include "krender.h"
#include <kdebug.h>
KRender::KRender(KURL appPath, unsigned int port, QObject *parent, const char *name ) :
QObject(parent, name),
QXmlDefaultHandler()
QObject(parent, name),
QXmlDefaultHandler(),
m_appPathInvalid(false)
{
startTimer(200);
m_parsing = false;
@@ -150,12 +152,19 @@ void KRender::processExited()
/** Launches a renderer process. */
void KRender::launchProcess()
{
if(m_appPathInvalid) return;
if(!KIO::NetAccess::exists(m_appPath)) {
kdError() << "Application '" << m_appPath.path() << "' does not exist" << endl;
m_appPathInvalid = true;
return;
}
m_process.clearArguments();
m_process.setExecutable("artsdsp");
m_process << m_appPath.path();
m_process << "-d";
m_process << "-p " << m_portNum;
m_process << m_appPath.path();
m_process << "-d";
m_process << "-p" << QString::number(m_portNum);
kdDebug() << "Launching process " << m_appPath.path() << " as server on port " << m_portNum << endl;
if(m_process.start(KProcess::NotifyOnExit, KProcess::AllOutput)) {

View File

@@ -96,7 +96,7 @@ private: // Private attributes
/** The socket that will connect to the server */
QSocket m_socket;
/** If we have started our own renderer, this is it's process */
KProcess m_process;
KProcess m_process;
/** The port number used to connect to the renderer */
unsigned int m_portNum;
/** The XML reader */
@@ -113,6 +113,9 @@ private: // Private attributes
QDomDocument m_sceneList;
/** Holds the buffered communication from the socket, ready for processing. */
QString m_buffer;
/** Becomes true if it is known that the application path does not point to a valid file, false if
this is unknown, or if a valid executable is known to exist */
bool m_appPathInvalid;
/** A function pointer to the relevant method that should parse tagOpen events */
bool (KRender::*m_funcStartElement)(const QString & namespaceURI, const QString & localName,