21 :
VideoVisual(audio, render), m_buffer(nullptr), m_surface(0), m_hd(hd)
23 int max_width =
m_hd ? 1200 : 600;
24 int max_height =
m_hd ? 800 : 400;
27 int width = (sz.width() > max_width) ? max_width : sz.width();
28 int height = (sz.height() > max_height) ? max_height : sz.height();
29 m_area = QRect(0, 0, width, height);
31 LOG(VB_GENERAL, LOG_INFO, QString(
"Initialised Goom (%1x%2)")
32 .arg(width).arg(height));
44 static_cast<MythRenderOpenGL*>(
m_render);
56 static_cast<MythRenderVDPAU*>(
m_render);
72 QMutexLocker lock(
mutex());
81 signed short int data[2][512];
83 for (; i < numSamps; i++)
85 data[0][i] = node->
left[i];
86 data[1][i] = node->
right ? node->
right[i] : data[0][i];
104 static_cast<MythRenderOpenGL*>(
m_render);
110 GL_LINEAR_MIPMAP_LINEAR);
135 static_cast<MythRenderVDPAU*>(
m_render);
145 uint32_t pitch[1] = { static_cast<uint32_t>(
m_area.width() * 4) };
158 const QString &
name(
void)
const override 160 static QString
name(
"Goom");
182 const QString &
name(
void)
const override 184 static QString
name(
"Goom HD");
void Draw(const QRect &area, MythPainter *painter, QPaintDevice *device) override
bool SupportedRenderer(RenderType type) override
bool SupportedRenderer(RenderType type) override
VisualNode * GetNode(void)
void goom_init(guint32 resx, guint32 resy, int cinemascope)
void DeleteTexture(uint tex)
bool DrawBitmap(uint id, uint target, const QRect *src, const QRect *dst, VDPBlendType blendi=kVDPBlendNormal, int alpha=0, int red=0, int blue=0, int green=0)
VideoVisualGoomHDFactory VideoVisualGoomHDFactory
RenderType Type(void) const
VideoVisual * Create(AudioPlayer *audio, MythRender *render) const override
void DestroyBitmapSurface(uint id)
guint32 * goom_update(gint16 data[2][512], int forceMode)
long long copy(QFile &dst, QFile &src, uint block_size)
Copies src file to dst file.
uint CreateBitmapSurface(const QSize &size, VdpRGBAFormat fmt=VDP_RGBA_FORMAT_B8G8R8A8, uint existing=0)
void DrawBitmap(uint tex, uint target, const QRect *src, const QRect *dst, uint prog, int alpha=255, int red=255, int green=255, int blue=255)
VideoVisualGoom(AudioPlayer *audio, MythRender *render, bool hd)
const QString & name(void) const override
void UpdateTexture(uint tex, void *buf)
MythMainWindow * GetMythMainWindow(void)
virtual ~VideoVisualGoom()
void * GetTextureBuffer(uint tex, bool create_buffer=true)
#define LOG(_MASK_, _LEVEL_, _STRING_)
VideoVisual * Create(AudioPlayer *audio, MythRender *render) const override
VideoVisualGoomFactory VideoVisualGoomFactory
uint CreateTexture(QSize act_size, bool use_pbo, uint type, uint data_type=GL_UNSIGNED_BYTE, uint data_fmt=GL_RGBA, uint internal_fmt=GL_RGBA8, uint filter=GL_LINEAR, uint wrap=GL_CLAMP_TO_EDGE)
bool UploadBitmap(uint id, void *const plane[1], uint32_t pitch[1])
const QString & name(void) const override