]> git.sesse.net Git - kdenlive/blobdiff - src/renderer.h
const'ref. Fix coding style. Minor optimization
[kdenlive] / src / renderer.h
index 1f0edec1120df4e16b35ebd6272269947da7fb21..805d2086c7958ee39ae21418ec3b06eb26e3ae19 100644 (file)
@@ -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 <int> effectIndexes, bool disable);
+    bool mltEnableEffects(int track, const GenTime &position, const QList<int> &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 <int> effectIndexes, bool disable);
+    bool mltEnableTrackEffects(int track, const QList<int> &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<QString, QString> mltGetTransitionParamsFromXml(QDomElement xml);
+    QMap<QString, QString> mltGetTransitionParamsFromXml(const QDomElement &xml);
     QMap<QString, Mlt::Producer *> 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<int> audio_list, QList<int> video_list, stringMap data);
+    void slotMultiStreamProducerFound(const QString &path, QList<int> audio_list, QList<int> 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();