OpenShot Library | libopenshot
0.2.2
src
Qt
VideoRenderer.cpp
Go to the documentation of this file.
1
/**
2
* @file
3
* @brief Source file for VideoRenderer 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
#include "../../include/Qt/VideoRenderer.h"
29
30
31
VideoRenderer::VideoRenderer
(QObject *parent)
32
: QObject(parent)
33
{
34
}
35
36
VideoRenderer::~VideoRenderer
()
37
{
38
}
39
40
/// Override QWidget which needs to be painted
41
void
VideoRenderer::OverrideWidget
(int64_t qwidget_address)
42
{
43
// re-cast QWidget pointer (long) as an actual QWidget
44
override_widget = reinterpret_cast<QWidget*>(qwidget_address);
45
46
}
47
48
void
VideoRenderer::render
(std::shared_ptr<QImage> image)
49
{
50
if
(image)
51
emit
present
(*image);
52
}
VideoRenderer::VideoRenderer
VideoRenderer(QObject *parent=0)
Definition:
VideoRenderer.cpp:31
VideoRenderer::render
void render(std::shared_ptr< QImage > image)
Definition:
VideoRenderer.cpp:48
VideoRenderer::present
void present(const QImage &image)
VideoRenderer::~VideoRenderer
~VideoRenderer()
Definition:
VideoRenderer.cpp:36
VideoRenderer::OverrideWidget
void OverrideWidget(int64_t qwidget_address)
Override QWidget which needs to be painted.
Definition:
VideoRenderer.cpp:41
Generated on Sat Jan 25 2020 04:33:41 for OpenShot Library | libopenshot by
1.8.16