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