mirror of
https://invent.kde.org/multimedia/kdenlive
synced 2025-12-06 08:20:01 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90e40d478c | ||
|
|
63136a843f | ||
|
|
9a6a010aeb | ||
|
|
c350474400 |
@@ -16,6 +16,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include <cmath>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <klocale.h>
|
||||
#include <qscrollbar.h>
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user