X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Frenderer.h;h=1f0edec1120df4e16b35ebd6272269947da7fb21;hb=45adaf0e93ffa28bfeb3425a099ca95e70fd0d79;hp=c65d2cb67201a01875ec2448e8722e92c9b6d2a6;hpb=764e734c9f3737c076c1a272c8641e0c59add698;p=kdenlive diff --git a/src/renderer.h b/src/renderer.h index c65d2cb6..1f0edec1 100644 --- a/src/renderer.h +++ b/src/renderer.h @@ -45,8 +45,8 @@ #include #include #include +#include -class QTimer; class QPixmap; class KComboBox; @@ -55,6 +55,7 @@ namespace Mlt { class Consumer; class Playlist; +class Properties; class Tractor; class Transition; class Frame; @@ -64,7 +65,7 @@ class Filter; class Profile; class Service; class Event; -}; +} struct requestClipInfo { QDomElement xml; @@ -72,16 +73,16 @@ struct requestClipInfo { int imageHeight; bool replaceProducer; -bool operator==(const requestClipInfo &a) -{ - return clipId == a.clipId; -} + bool operator==(const requestClipInfo &a) + { + return clipId == a.clipId; + } }; class MltErrorEvent : public QEvent { public: - MltErrorEvent(QString message) : QEvent(QEvent::User), m_message(message) {} + MltErrorEvent(const QString &message) : QEvent(QEvent::User), m_message(message) {} QString message() const { return m_message; } @@ -93,7 +94,7 @@ private: class Render: public AbstractRender { -Q_OBJECT public: + Q_OBJECT public: enum FailStates { OK = 0, APP_NOEXIST @@ -158,7 +159,7 @@ Q_OBJECT public: void saveZone(KUrl url, QString desc, QPoint zone); /** @brief Save a clip in timeline to an xml playlist. */ - bool saveClip(int track, GenTime position, KUrl url, QString desc = QString()); + bool saveClip(int track, const GenTime &position, const KUrl &url, const QString &desc = QString()); /** @brief Return true if we are currently playing */ bool isPlaying() const; @@ -180,7 +181,7 @@ Q_OBJECT public: double consumerRatio() const; /** @brief Saves current producer frame as an image. */ - void exportCurrentFrame(KUrl url, bool notify); + void exportCurrentFrame(const KUrl &url, bool notify); /** @brief Change the Mlt PROFILE * @param profileName The MLT profile name @@ -214,7 +215,7 @@ Q_OBJECT public: Mlt::Producer *checkSlowMotionProducer(Mlt::Producer *prod, QDomElement element); int mltInsertClip(ItemInfo info, QDomElement element, Mlt::Producer *prod, bool overwrite = false, bool push = false); bool mltUpdateClip(Mlt::Tractor *tractor, ItemInfo info, QDomElement element, Mlt::Producer *prod); - bool mltCutClip(int track, GenTime position); + bool mltCutClip(int track, const 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); @@ -238,7 +239,7 @@ Q_OBJECT public: bool mltAddEffect(Mlt::Service service, EffectsParameterList params, int duration, bool doRefresh); bool mltAddTrackEffect(int track, EffectsParameterList params); - /** @brief Enable / disable clip effects. + /** @brief Enable / disable clip effects. * @param track The track where the clip is * @param position The start position of the clip * @param effectIndexes The list of effect indexes to enable / disable @@ -294,6 +295,8 @@ Q_OBJECT public: const QList producersList(); void updatePreviewSettings(); void setDropFrames(bool show); + /** @brief Sets an MLT consumer property. */ + void setConsumerProperty(const QString &name, const QString &value); QString updateSceneListFps(double current_fps, double new_fps, QString scene); void showAudio(Mlt::Frame&); @@ -412,6 +415,8 @@ private: void fixAudioMixing(Mlt::Tractor tractor); /** @brief Make sure we inform MLT if we need a lot of threads for avformat producer */ void checkMaxThreads(); + /** @brief Clone serialisable properties only */ + void cloneProperties(Mlt::Properties &dest, Mlt::Properties &source); private slots: