]> git.sesse.net Git - kdenlive/blobdiff - src/renderer.h
Fix some crashes on proxy operations
[kdenlive] / src / renderer.h
index b20afea559e09d92264e583824bed2cc51ade133..93e69f35c3f5bf478cf49b474b19ad4adbd40b56 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "gentime.h"
 #include "definitions.h"
+#include "abstractmonitor.h"
 #include "mlt/framework/mlt_types.h"
 
 #include <kurl.h>
@@ -42,8 +43,6 @@
 #include <QEvent>
 
 
-class Render;
-
 class QTimer;
 class QPixmap;
 
@@ -73,7 +72,8 @@ private:
     QString m_message;
 };
 
-class Render: public QObject
+
+class Render: public AbstractRender
 {
 Q_OBJECT public:
 
@@ -87,7 +87,7 @@ Q_OBJECT public:
     Render(const QString & rendererName, int winid, QString profile = QString(), QWidget *parent = 0);
 
     /** @brief Destroy the MLT Renderer. */
-    ~Render();
+    virtual ~Render();
 
     /** @brief Seeks the renderer clip to the given time. */
     void seek(GenTime time);
@@ -122,7 +122,7 @@ Q_OBJECT public:
      * The speed is relative to normal playback, e.g. 1.0 is normal speed, 0.0
      * is paused, -1.0 means play backwards. It does not specify start/stop */
     void play(double speed);
-    void switchPlay();
+    void switchPlay(bool play);
     void pause();
 
     /** @brief Stops playing.
@@ -166,7 +166,11 @@ Q_OBJECT public:
 
     /** @brief Turns on or off on screen display. */
     void refreshDisplay();
-    int resetProfile(const QString profileName);
+    /** @brief Change the Mlt PROFILE
+     * @param profileName The MLT profile name
+     * @param dropSceneList If true, the current playlist will be deleted
+     * . */
+    int resetProfile(const QString profileName, bool dropSceneList = false);
     double fps() const;
 
     /** @brief Returns the width of a frame for this profile. */
@@ -260,8 +264,7 @@ Q_OBJECT public:
     void showAudio(Mlt::Frame&);
     /** @brief This property is used to decide if the renderer should send audio data for monitoring. */
     bool analyseAudio;
-    /** @brief This property is used to decide if the renderer should convert it's frames to QImage for use in other Kdenlive widgets. */
-    bool sendFrameForAnalysis;
+    
     QList <int> checkTrackSequence(int);
     void sendFrameUpdate();
 
@@ -357,17 +360,16 @@ signals:
      *  @param durationError Should be set to true if the proxy failed because it has not same length as original clip
      */
     void removeInvalidProxy(const QString &id, bool durationError);
-    void refreshDocumentProducers();
+    void refreshDocumentProducers(bool displayRatioChanged, bool fpsChanged);
+    
+    /** @brief If we will delete the producer, make sure to oause the monitor */
+    void blockClipMonitor(const QString);
 
     /** @brief A frame's image has to be shown.
      *
      * Used in Mac OS X. */
     void showImageSignal(QImage);
     void showAudioSignal(const QByteArray);
-    /** @brief The renderer refreshed the current frame, but no seeking was done. */
-    void frameUpdated(QImage);
-    /** @brief This signal contains the audio of the current frame. */
-    void audioSamplesSignal(const QVector<int16_t>&, int freq, int num_channels, int num_samples);
 
 public slots: