X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Frenderer.h;h=e6548d76d5f0072fe89d81b8e4d83fdad0c36d9f;hb=e83d05274cca3326b7818fe782cad5a5656bd704;hp=1f0edec1120df4e16b35ebd6272269947da7fb21;hpb=45adaf0e93ffa28bfeb3425a099ca95e70fd0d79;p=kdenlive diff --git a/src/renderer.h b/src/renderer.h index 1f0edec1..e6548d76 100644 --- a/src/renderer.h +++ b/src/renderer.h @@ -37,9 +37,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -82,7 +82,13 @@ struct requestClipInfo { class MltErrorEvent : public QEvent { public: - MltErrorEvent(const QString &message) : QEvent(QEvent::User), m_message(message) {} + MltErrorEvent(const QString &message) + : QEvent(QEvent::User), + m_message(message) + { + + } + QString message() const { return m_message; } @@ -109,16 +115,16 @@ class Render: public AbstractRender virtual ~Render(); /** @brief Seeks the renderer clip to the given time. */ - void seek(GenTime time); + void seek(const GenTime &time); void seek(int time); void seekToFrameDiff(int diff); - QPixmap getImageThumbnail(KUrl url, int width, int height); + QPixmap getImageThumbnail(const KUrl &url, int width, int height); /** @brief Sets the current MLT producer playlist. * @param list The xml describing the playlist * @param position (optional) time to seek to */ - int setSceneList(QDomDocument list, int position = 0); + int setSceneList(const QDomDocument &list, int position = 0); /** @brief Sets the current MLT producer playlist. * @param list new playlist @@ -148,7 +154,7 @@ class Render: public AbstractRender void stop(const GenTime &startTime); int volume() const; - QImage extractFrame(int frame_position, QString path = QString(), int width = -1, int height = -1); + QImage extractFrame(int frame_position, const QString &path = QString(), int width = -1, int height = -1); /** @brief Plays the scene starting from a specific time. * @param startTime time to start playing the scene from */ @@ -244,25 +250,25 @@ class Render: public AbstractRender * @param position The start position of the clip * @param effectIndexes The list of effect indexes to enable / disable * @param disable True if effects should be disabled, false otherwise */ - bool mltEnableEffects(int track, GenTime position, QList effectIndexes, bool disable); + bool mltEnableEffects(int track, const GenTime &position, const QList &effectIndexes, bool disable); /** @brief Enable / disable track effects. * @param track The track where the effect is * @param effectIndexes The list of effect indexes to enable / disable * @param disable True if effects should be disabled, false otherwise */ - bool mltEnableTrackEffects(int track, QList effectIndexes, bool disable); + bool mltEnableTrackEffects(int track, const QList &effectIndexes, bool disable); /** @brief Edits an effect parameters in MLT's playlist. */ - bool mltEditEffect(int track, GenTime position, EffectsParameterList params); + bool mltEditEffect(int track, const GenTime &position, EffectsParameterList params); bool mltEditTrackEffect(int track, EffectsParameterList params); /** @brief Updates the "kdenlive_ix" (index) value of an effect. */ - void mltUpdateEffectPosition(int track, GenTime position, int oldPos, int newPos); + void mltUpdateEffectPosition(int track, const GenTime &position, int oldPos, int newPos); /** @brief Changes the order of effects in MLT's playlist. * * It switches effects from oldPos and newPos, updating the "kdenlive_ix" * (index) value. */ - void mltMoveEffect(int track, GenTime position, int oldPos, int newPos); + void mltMoveEffect(int track, const GenTime &position, int oldPos, int newPos); void mltMoveTrackEffect(int track, int oldPos, int newPos); /** @brief Enables/disables audio/video in a track. */ @@ -297,7 +303,7 @@ class Render: public AbstractRender 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); + QString updateSceneListFps(double current_fps, double new_fps, const QString &scene); void showAudio(Mlt::Frame&); @@ -397,7 +403,7 @@ private: void closeMlt(); void mltCheckLength(Mlt::Tractor *tractor); void mltPasteEffects(Mlt::Producer *source, Mlt::Producer *dest); - QMap mltGetTransitionParamsFromXml(QDomElement xml); + QMap mltGetTransitionParamsFromXml(const QDomElement &xml); QMap m_slowmotionProducers; /** @brief The ids of the clips that are currently being loaded for info query */ QStringList m_processingClipId; @@ -426,7 +432,7 @@ private slots: /** @brief Process the clip info requests (in a separate thread). */ void processFileProperties(); /** @brief A clip with multiple video streams was found, ask what to do. */ - void slotMultiStreamProducerFound(const QString path, QList audio_list, QList video_list, stringMap data); + void slotMultiStreamProducerFound(const QString &path, QList audio_list, QList video_list, stringMap data); void showFrame(Mlt::Frame *); void slotCheckSeeking(); @@ -488,7 +494,7 @@ public slots: int getLength(); /** @brief Checks if the file is readable by MLT. */ - bool isValid(KUrl url); + bool isValid(const KUrl &url); void exportFileToFirewire(QString srcFileName, int port, GenTime startTime, GenTime endTime); void mltSavePlaylist();