1 /***************************************************************************
2 * Copyright (C) 2011 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
20 #ifndef ABSTRACTMONITOR_H
21 #define ABSTRACTMONITOR_H
30 class VideoPreviewContainer : public QFrame
34 VideoPreviewContainer(QWidget *parent = 0);
36 void setImage(QImage img);
39 virtual void paintEvent(QPaintEvent */*event*/);
47 class AbstractRender: public QObject
51 /** @brief Build an abstract MLT Renderer
52 * @param rendererName A unique identifier for this renderer
53 * @param winid The parent widget identifier (required for SDL display). Set to 0 for OpenGL rendering
54 * @param profile The MLT profile used for the renderer (default one will be used if empty). */
55 AbstractRender(QWidget *parent = 0):QObject(parent),sendFrameForAnalysis(false) {};
57 /** @brief Destroy the MLT Renderer. */
58 virtual ~AbstractRender() {};
60 /** @brief This property is used to decide if the renderer should convert it's frames to QImage for use in other Kdenlive widgets. */
61 bool sendFrameForAnalysis;
63 /** @brief Someone needs us to send again a frame. */
64 virtual void sendFrameUpdate() = 0;
67 /** @brief The renderer refreshed the current frame. */
68 void frameUpdated(QImage);
70 /** @brief This signal contains the audio of the current frame. */
71 void audioSamplesSignal(QVector<int16_t>, int, int, int);
74 class AbstractMonitor : public QWidget
78 AbstractMonitor(QWidget *parent = 0): QWidget(parent) {};
79 virtual ~AbstractMonitor() {};
80 virtual AbstractRender *abstractRender() = 0;
81 virtual const QString name() const = 0;
84 virtual void stop() = 0;
85 virtual void start() = 0;