QString clipId;
int imageHeight;
bool replaceProducer;
+
+bool operator==(const requestClipInfo &a)
+{
+ return clipId == a.clipId;
+}
};
class MltErrorEvent : public QEvent
int seekFramePosition() const;
void emitFrameUpdated(Mlt::Frame&);
- void emitFrameNumber(double position);
+ void emitFrameNumber();
void emitConsumerStopped();
/** @brief Returns the aspect ratio of the consumer. */
/** @brief Saves current producer frame as an image. */
void exportCurrentFrame(KUrl url, bool notify);
- /** @brief Turns on or off on screen display. */
- void refreshDisplay();
/** @brief Change the Mlt PROFILE
* @param profileName The MLT profile name
* @param dropSceneList If true, the current playlist will be deleted
*/
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(ItemInfo info, QDomElement element, Mlt::Producer *prod);
+ bool mltUpdateClip(Mlt::Tractor *tractor, ItemInfo info, QDomElement element, Mlt::Producer *prod);
void 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);
void mltResizeTransparency(int oldStart, int newStart, int newEnd, int track, int id);
void mltInsertTrack(int ix, bool videoTrack);
void mltDeleteTrack(int ix);
- bool mltUpdateClipProducer(int track, int pos, Mlt::Producer *prod);
+ 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);
Mlt::Producer *invalidProducer(const QString &id);
/** @brief Force processing of clip with selected id. */
void forceProcessing(const QString &id);
+ /** @brief Requests the file properties for the specified URL (will be put in a queue list)
+ @param xml The xml parameters for the clip
+ @param clipId The clip Id string
+ @param imageHeight The height (in pixels) of the returned thumbnail (height of a treewidgetitem in projectlist)
+ @param replaceProducer If true, the MLT producer will be recreated */
+ void getFileProperties(const QDomElement &xml, const QString &clipId, int imageHeight, bool replaceProducer = true);
+
+ /** @brief Lock the MLT service */
+ Mlt::Tractor *lockService();
+ /** @brief Unlock the MLT service */
+ void unlockService(Mlt::Tractor *tractor);
+
private:
/** @brief The name of this renderer.
Mlt::Consumer * m_mltConsumer;
Mlt::Producer * m_mltProducer;
Mlt::Profile *m_mltProfile;
- double m_framePosition;
double m_fps;
bool m_externalConsumer;
void refresh();
void slotOsdTimeout();
int connectPlaylist();
- //void initSceneList();
+ /** @brief Process the clip info requests (in a separate thread). */
+ void processFileProperties();
signals:
/** @brief Checks if the file is readable by MLT. */
bool isValid(KUrl url);
- /** @brief Requests the file properties for the specified URL.
- @param xml The xml parameters for the clip
- @param clipId The clip Id string
- @param imageHeight The height (in pixels) of the returned thumbnail (height of a treewidgetitem in projectlist)
- @param replaceProducer If true, the MLT producer will be recreated
- @param selectClip If true, clip item will be selected in project view
- * Upon return, the result will be emitted via replyGetFileProperties().
- * Wraps the VEML command of the same name. */
- void getFileProperties(const QDomElement &xml, const QString &clipId, int imageHeight, bool replaceProducer = true);
-
- void getFileProperties2();
-
void exportFileToFirewire(QString srcFileName, int port, GenTime startTime, GenTime endTime);
void mltSavePlaylist();
void slotSplitView(bool doit);