X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmltdevicecapture.h;h=032de2ceda90534d49f57c1c58c86f6fc3f35bfe;hb=58c5d98d7ea0cbe8745a52a0d55414cf56938d97;hp=69ad361e696c55451ad60d552b7e82e569b6aa2c;hpb=5146194bfa083fab7fdd93f48ca4f44280a7a03a;p=kdenlive diff --git a/src/mltdevicecapture.h b/src/mltdevicecapture.h index 69ad361e..032de2ce 100644 --- a/src/mltdevicecapture.h +++ b/src/mltdevicecapture.h @@ -1,4 +1,4 @@ -/*************************************************************************** + /*************************************************************************** mltdevicecapture.h - description ------------------- begin : Sun May 21 2011 @@ -30,7 +30,8 @@ #include #include - +#include + namespace Mlt { class Consumer; @@ -50,7 +51,7 @@ Q_OBJECT public: /** @brief Build a MLT Renderer * @param winid The parent widget identifier (required for SDL display). Set to 0 for OpenGL rendering * @param profile The MLT profile used for the capture (default one will be used if empty). */ - MltDeviceCapture(QString profile, VideoPreviewContainer *surface, QWidget *parent = 0); + explicit MltDeviceCapture(QString profile, VideoSurface *surface, QWidget *parent = 0); /** @brief Destroy the MLT Renderer. */ ~MltDeviceCapture(); @@ -61,7 +62,7 @@ Q_OBJECT public: bool sendFrameForAnalysis; /** @brief Someone needs us to send again a frame. */ - void sendFrameUpdate() {}; + void sendFrameUpdate() {} void emitFrameUpdated(Mlt::Frame&); void emitFrameNumber(double position); @@ -80,7 +81,7 @@ Q_OBJECT public: void gotCapturedFrame(Mlt::Frame& frame); /** @brief Save current frame to file. */ void captureFrame(const QString &path); - void doRefresh(); + /** @brief This will add the video clip from path and add it in the overlay track. */ void setOverlay(const QString &path); @@ -89,12 +90,11 @@ Q_OBJECT public: /** @brief This will add a horizontal flip effect, easier to work when filming yourself. */ void mirror(bool activate); - - /** @brief This property is used to decide if the renderer should send audio data for monitoring. */ - bool analyseAudio; /** @brief True if we are processing an image (yuv > rgb) when recording. */ bool processingImage; + + void pause(); private: Mlt::Consumer * m_mltConsumer; @@ -109,7 +109,7 @@ private: int m_frameCount; /** @brief The surface onto which the captured frames should be painted. */ - VideoPreviewContainer *m_captureDisplayWidget; + VideoSurface *m_captureDisplayWidget; /** @brief A human-readable description of this renderer. */ int m_winid; @@ -119,6 +119,8 @@ private: QString m_capturePath; QTimer m_droppedFramesTimer; + + QMutex m_mutex; /** @brief Build the MLT Consumer object with initial settings. * @param profileName The MLT profile to use for the consumer */ @@ -149,6 +151,7 @@ public slots: /** @brief Stops the consumer. */ void stop(); + void slotDoRefresh(); }; #endif