OpenShot Library | libopenshot  0.3.3
VideoRenderer.cpp
Go to the documentation of this file.
1 
9 // Copyright (c) 2008-2019 OpenShot Studios, LLC
10 //
11 // SPDX-License-Identifier: LGPL-3.0-or-later
12 
13 #include "VideoRenderer.h"
14 
15 
17  : QObject(parent)
18 {
19 }
20 
22 {
23 }
24 
26 void VideoRenderer::OverrideWidget(int64_t qwidget_address)
27 {
28  // re-cast QWidget pointer (long) as an actual QWidget
29  override_widget = reinterpret_cast<QWidget*>(qwidget_address);
30 
31 }
32 
33 void VideoRenderer::render(std::shared_ptr<QImage> image)
34 {
35  if (image)
36  emit present(*image);
37 }
VideoRenderer::VideoRenderer
VideoRenderer(QObject *parent=0)
Definition: VideoRenderer.cpp:16
VideoRenderer.h
Header file for Video Renderer class.
VideoRenderer::render
void render(std::shared_ptr< QImage > image)
Definition: VideoRenderer.cpp:33
VideoRenderer::present
void present(const QImage &image)
VideoRenderer::~VideoRenderer
~VideoRenderer()
Definition: VideoRenderer.cpp:21
VideoRenderer::OverrideWidget
void OverrideWidget(int64_t qwidget_address)
Override QWidget which needs to be painted.
Definition: VideoRenderer.cpp:26