X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Frenderer.h;h=ecbf6bc3f376d95ffa5d71dc99e0350f9cec8566;hb=6e140f856eeee8a9fd21797b711e93c0846d88fe;hp=d10b5d3445217c005c426b19b9ff2da8bb750e69;hpb=2a83d7796f5b322ea0f5587c0417db41c9a4800d;p=kdenlive diff --git a/src/renderer.h b/src/renderer.h index d10b5d34..ecbf6bc3 100644 --- a/src/renderer.h +++ b/src/renderer.h @@ -15,8 +15,8 @@ * * ***************************************************************************/ -#ifndef KRENDER_H -#define KRENDER_H +#ifndef RENDERER_H +#define RENDERER_H #include #include @@ -31,16 +31,18 @@ /**Render encapsulates the client side of the interface to a renderer. From Kdenlive's point of view, you treat the Render object as the renderer, and simply use it as if it was local. Calls are asyncrhonous - -you send a call out, and then recieve the return value through the +you send a call out, and then receive the return value through the relevant signal that get's emitted once the call completes. *@author Jason Wood */ class Render; -//class EffectParamDesc; + +class QTimer; class QPixmap; -namespace Mlt { +namespace Mlt +{ class Consumer; class Playlist; class Tractor; @@ -53,7 +55,8 @@ class Multitrack; -class Render: public QObject { +class Render: public QObject +{ Q_OBJECT public: enum FailStates { OK = 0, @@ -66,7 +69,7 @@ Q_OBJECT public: /** Seeks the renderer clip to the given time. */ void seek(GenTime time); void seekToFrame(int pos); - bool m_isBlocked; + int m_isBlocked; //static QPixmap getVideoThumbnail(char *profile, QString file, int frame, int width, int height); QPixmap getImageThumbnail(KUrl url, int width, int height); @@ -91,8 +94,8 @@ Q_OBJECT public: void setSceneList(QDomDocument list, int position = 0); void setSceneList(QString playlist, int position = 0); void setProducer(Mlt::Producer *producer, int position); - QString sceneList(); - void saveSceneList(QString path, QDomElement kdenliveData = QDomElement()); + const QString sceneList(); + bool saveSceneList(QString path, QDomElement kdenliveData = QDomElement()); /** Wraps the VEML command of the same name. Tells the renderer to play the current scene at the speed specified, relative to normal @@ -140,11 +143,11 @@ Q_OBJECT public: /** Turn on or off on screen display */ void refreshDisplay(); int resetProfile(); - const double fps() const; - const int renderWidth() const; - const int renderHeight() const; + double fps() const; + int renderWidth() const; + int renderHeight() const; /** get display aspect ratio */ - const double dar() const; + double dar() const; /** Playlist manipulation */ void mltInsertClip(ItemInfo info, QDomElement element, Mlt::Producer *prod); @@ -152,6 +155,7 @@ Q_OBJECT public: void mltCutClip(int track, GenTime position); void mltInsertSpace(QMap trackClipStartList, QMap trackTransitionStartList, int track, const GenTime duration, const GenTime timeOffset); int mltGetSpaceLength(const GenTime pos, int track, bool fromBlankStart); + int mltTrackDuration(int track); bool mltResizeClipEnd(ItemInfo info, GenTime clipDuration); bool mltResizeClipStart(ItemInfo info, GenTime diff); bool mltResizeClipCrop(ItemInfo info, GenTime diff); @@ -185,14 +189,13 @@ Q_OBJECT public: QList producersList(); void updatePreviewSettings(); + void setDropFrames(bool show); private: // Private attributes & methods /** The name of this renderer - useful to identify the renderes by what they do - e.g. background rendering, workspace monitor, etc... */ QString m_name; Mlt::Consumer * m_mltConsumer; Mlt::Producer * m_mltProducer; - Mlt::Producer *m_mltTextProducer; - Mlt::Filter *m_osdInfo; Mlt::Profile *m_mltProfile; double m_framePosition; double m_fps; @@ -207,17 +210,13 @@ private: // Private attributes & methods bool m_isSplitView; Mlt::Producer *m_blackClip; - /** Holds the path to on screen display profile */ - QString m_osdProfile; QString m_activeProfile; - QTimer *refreshTimer; - QTimer *osdTimer; - KUrl m_exportedFile; + QTimer *m_refreshTimer; + QTimer *m_osdTimer; /** A human-readable description of this renderer. */ int m_winid; - int m_externalwinid; /** Sets the description of this renderer to desc. */ void closeMlt(); @@ -257,7 +256,8 @@ signals: // Signals void durationChanged(int); void rendererPosition(int); void rendererStopped(int); - void removeInvalidClip(const QString &); + void removeInvalidClip(const QString &, bool replaceProducer); + void refreshDocumentProducers(); public slots: // Public slots /** Start Consumer */