]> git.sesse.net Git - kdenlive/blobdiff - src/renderer.h
Do not switch monitor when not necessary, make sure we refresh monitor when adding...
[kdenlive] / src / renderer.h
index b2ca2676c4e6446a16be89802a6b8befd7382320..9813d6270c9e9892d24e7f6d072ddba3bbe6c204 100644 (file)
@@ -48,6 +48,8 @@
 class QTimer;
 class QPixmap;
 
+class KComboBox;
+
 namespace Mlt
 {
 class Consumer;
@@ -153,6 +155,9 @@ Q_OBJECT public:
     void loopZone(const GenTime & startTime, const GenTime & stopTime);
 
     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());
 
     /** @brief Returns the speed at which the renderer is currently playing.
      *
@@ -194,6 +199,10 @@ Q_OBJECT public:
     double dar() const;
     /** @brief Returns sample aspect ratio. */
     double sar() const;
+    /** @brief If monitor is active, refresh it. */
+    void refreshIfActive();
+    /** @brief Start the MLT monitor consumer. */
+    void startConsumer();
 
     /*
      * Playlist manipulation.
@@ -201,7 +210,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);
-    void mltCutClip(int track, GenTime position);
+    bool mltCutClip(int track, GenTime position);
     void mltInsertSpace(QMap <int, int> trackClipStartList, QMap <int, int> trackTransitionStartList, int track, const GenTime &duration, const GenTime &timeOffset);
     int mltGetSpaceLength(const GenTime &pos, int track, bool fromBlankStart);
 
@@ -210,7 +219,7 @@ Q_OBJECT public:
 
     bool mltResizeClipEnd(ItemInfo info, GenTime clipDuration);
     bool mltResizeClipStart(ItemInfo info, GenTime diff);
-    bool mltResizeClipCrop(ItemInfo info, GenTime diff);
+    bool mltResizeClipCrop(ItemInfo info, GenTime newCropStart);
     bool mltMoveClip(int startTrack, int endTrack, GenTime pos, GenTime moveStart, Mlt::Producer *prod, bool overwrite = false, bool insert = false);
     bool mltMoveClip(int startTrack, int endTrack, int pos, int moveStart, Mlt::Producer *prod, bool overwrite = false, bool insert = false);
     bool mltRemoveClip(int track, GenTime position);
@@ -221,8 +230,21 @@ Q_OBJECT public:
 
     /** @brief Adds an effect to a clip in MLT's playlist. */
     bool mltAddEffect(int track, GenTime position, EffectsParameterList params, bool doRefresh = true);
+    bool addFilterToService(Mlt::Service service, EffectsParameterList params, int duration);
     bool mltAddEffect(Mlt::Service service, EffectsParameterList params, int duration, bool doRefresh);
     bool mltAddTrackEffect(int track, EffectsParameterList params);
+    
+    /** @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
+     * @param disable True if effects should be disabled, false otherwise */
+    bool mltEnableEffects(int track, GenTime position, 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);
 
     /** @brief Edits an effect parameters in MLT's playlist. */
     bool mltEditEffect(int track, GenTime position, EffectsParameterList params);
@@ -249,7 +271,7 @@ Q_OBJECT public:
     void mltMoveTransparency(int startTime, int endTime, int startTrack, int endTrack, int id);
     void mltDeleteTransparency(int pos, int track, int id);
     void mltResizeTransparency(int oldStart, int newStart, int newEnd, int track, int id);
-    void mltInsertTrack(int ix, bool videoTrack);
+    QList <TransitionInfo> mltInsertTrack(int ix, bool videoTrack);
     void mltDeleteTrack(int ix);
     bool mltUpdateClipProducer(Mlt::Tractor *tractor, int track, int pos, Mlt::Producer *prod);
     void mltPlantTransition(Mlt::Field *field, Mlt::Transition &tr, int a_track, int b_track);
@@ -297,6 +319,12 @@ Q_OBJECT public:
     /** @brief Unlock the MLT service */
     void unlockService(Mlt::Tractor *tractor);
     const QString activeClipId();
+    /** @brief Fill a combobox with the found blackmagic devices */
+    static bool getBlackMagicDeviceList(KComboBox *devicelist);
+    static bool getBlackMagicOutputDeviceList(KComboBox *devicelist);
+    /** @brief Frame rendering is handeled by Kdenlive, don't show video through SDL display */
+    void disablePreview(bool disable);
+    int requestedSeekPosition;
 
 private:
 
@@ -369,6 +397,10 @@ private slots:
     void slotOsdTimeout();
     /** @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 slotCheckSeeking();
 
 signals:
 
@@ -403,6 +435,8 @@ signals:
     void refreshDocumentProducers(bool displayRatioChanged, bool fpsChanged);
     /** @brief A proxy clip is missing, ask for creation. */
     void requestProxy(QString);
+    /** @brief A multiple stream clip was found. */
+    void multiStreamFound(const QString &,QList<int>,QList<int>,stringMap data);
 
 
     /** @brief A frame's image has to be shown.
@@ -410,6 +444,8 @@ signals:
      * Used in Mac OS X. */
     void showImageSignal(QImage);
     void showAudioSignal(const QByteArray &);
+    void addClip(const KUrl &, stringMap);
+    void checkSeeking();
 
 public slots: