OpenShot Library | libopenshot  0.1.9
VideoRenderer.h
Go to the documentation of this file.
1 /**
2  * @file
3  * @brief Header file for Video Renderer class
4  * @author Jonathan Thomas <jonathan@openshot.org>
5  *
6  * @section LICENSE
7  *
8  * Copyright (c) 2008-2014 OpenShot Studios, LLC
9  * <http://www.openshotstudios.com/>. This file is part of
10  * OpenShot Library (libopenshot), an open-source project dedicated to
11  * delivering high quality video editing and animation solutions to the
12  * world. For more information visit <http://www.openshot.org/>.
13  *
14  * OpenShot Library (libopenshot) is free software: you can redistribute it
15  * and/or modify it under the terms of the GNU Lesser General Public License
16  * as published by the Free Software Foundation, either version 3 of the
17  * License, or (at your option) any later version.
18  *
19  * OpenShot Library (libopenshot) is distributed in the hope that it will be
20  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public License
25  * along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
26  */
27 
28 #ifndef OPENSHOT_VIDEO_RENDERER_H
29 #define OPENSHOT_VIDEO_RENDERER_H
30 
31 #include "../RendererBase.h"
32 #include <QtCore/QObject>
33 #include <QtGui/QImage>
34 #include <memory>
35 
36 
37 class QPainter;
38 
39 class VideoRenderer : public QObject, public openshot::RendererBase
40 {
41  Q_OBJECT
42 
43 public:
44  VideoRenderer(QObject *parent = 0);
46 
47  /// Override QWidget which needs to be painted
48  void OverrideWidget(int64_t qwidget_address);
49 
50 signals:
51  void present(const QImage &image);
52 
53 protected:
54  //void render(openshot::OSPixelFormat format, int width, int height, int bytesPerLine, unsigned char *data);
55  void render(std::shared_ptr<QImage> image);
56 
57 private slots:
58 
59 private:
60  QWidget* override_widget;
61 };
62 
63 #endif //OPENSHOT_VIDEO_RENDERER_H
void present(const QImage &image)
void OverrideWidget(int64_t qwidget_address)
Override QWidget which needs to be painted.
VideoRenderer(QObject *parent=0)
void render(std::shared_ptr< QImage > image)
This is the base class of all Renderers in libopenshot.
Definition: RendererBase.h:45