2#include "libmythbase/mythconfig.h"
18 int max_width =
m_hd ? 1200 : 600;
19 int max_height =
m_hd ? 800 : 400;
22 int width = (sz.width() > max_width) ? max_width : sz.width();
23 int height = (sz.height() > max_height) ? max_height : sz.height();
24 m_area = QRect(0, 0, width, height);
25 goom_init(
static_cast<uint32_t
>(width),
static_cast<uint32_t
>(height), 0);
26 LOG(VB_GENERAL, LOG_INFO, QString(
"Initialised Goom (%1x%2)").arg(width).arg(height));
37 m_glSurface =
nullptr;
49 QMutexLocker lock(
mutex());
53 size_t numSamps = 512;
55 numSamps =
static_cast<size_t>(node->
m_length);
58 for (
size_t i = 0; i < numSamps; i++)
60 data[0][i] = node->
m_left[i];
78 QImage image(
m_area.size(), QImage::Format_ARGB32);
79 m_glSurface = glrender->CreateTextureFromQImage(&image);
84 m_glSurface->m_crop =
false;
86 m_glSurface->m_texture->setData(m_glSurface->m_pixelFormat, m_glSurface->m_pixelType,
87 reinterpret_cast<const uint8_t *
>(
m_buffer));
90 glrender->SetBlend(
false);
91 std::vector<MythGLTexture*> surfaces {m_glSurface};
92 glrender->DrawBitmap(surfaces,
nullptr,
m_area, Area,
nullptr, 0);
93 glrender->SetBlend(
true);
95 glrender->doneCurrent();
105 const QString&
name(
void)
const override
127 const QString&
name(
void)
const override
void DeleteTexture(MythGLTexture *Texture)
RenderType Type(void) const
VideoVisual * Create(AudioPlayer *Audio, MythRender *Render) const override
const QString & name(void) const override
bool SupportedRenderer(RenderType Type) override
const QString & name(void) const override
VideoVisual * Create(AudioPlayer *Audio, MythRender *Render) const override
bool SupportedRenderer(RenderType Type) override
VideoVisualGoom(AudioPlayer *Audio, MythRender *Render, bool HD)
void Draw(QRect Area, MythPainter *Painter, QPaintDevice *Device) override
~VideoVisualGoom() override
VisualNode * GetNode(void)
uint32_t * goom_update(GoomDualData &data, int forceMode)
void goom_init(uint32_t resx, uint32_t resy, int cinemascope)
std::array< GoomSingleData, 2 > GoomDualData
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
MythMainWindow * GetMythMainWindow(void)
VideoVisualGoomHDFactory VideoVisualGoomHDFactory
VideoVisualGoomFactory VideoVisualGoomFactory