Skip to content

Commit

Permalink
VideoVisualGoom: Drop VDPAU support
Browse files Browse the repository at this point in the history
- as it will soon be OpenGL all the way...
  • Loading branch information
mark-kendall committed Apr 3, 2019
1 parent 17903c4 commit a035233
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 47 deletions.
48 changes: 6 additions & 42 deletions mythtv/libs/libmythtv/visualisations/videovisualgoom.cpp
Expand Up @@ -6,10 +6,6 @@
#include "mythrender_opengl.h"
#endif

#ifdef USING_VDPAU
#include "mythrender_vdpau.h"
#endif

extern "C" {
#include "goom/goom_tools.h"
#include "goom/goom_core.h"
Expand All @@ -18,7 +14,10 @@ extern "C" {
#include "videovisualgoom.h"

VideoVisualGoom::VideoVisualGoom(AudioPlayer *audio, MythRender *render, bool hd)
: VideoVisual(audio, render), m_buffer(nullptr), m_vdpauSurface(0), m_glSurface(nullptr), m_hd(hd)
: VideoVisual(audio, render),
m_buffer(nullptr),
m_glSurface(nullptr),
m_hd(hd)
{
int max_width = m_hd ? 1200 : 600;
int max_height = m_hd ? 800 : 400;
Expand All @@ -44,17 +43,6 @@ VideoVisualGoom::~VideoVisualGoom()
}
#endif

#ifdef USING_VDPAU
if (m_vdpauSurface && m_render &&
(m_render->Type() == kRenderVDPAU))
{
MythRenderVDPAU *render = static_cast<MythRenderVDPAU*>(m_render);
if (render)
render->DestroyBitmapSurface(m_vdpauSurface);
m_vdpauSurface = 0;
}
#endif

goom_close();
}

Expand Down Expand Up @@ -120,28 +108,6 @@ void VideoVisualGoom::Draw(const QRect &area, MythPainter */*painter*/,
return;
}
#endif

#ifdef USING_VDPAU
if (m_render->Type() == kRenderVDPAU)
{
MythRenderVDPAU *render = static_cast<MythRenderVDPAU*>(m_render);

if (!m_vdpauSurface && render)
m_vdpauSurface = render->CreateBitmapSurface(m_area.size());

if (m_vdpauSurface && render && m_buffer)
{
if (m_buffer != last)
{
void *plane[1] = { m_buffer };
uint32_t pitch[1] = { static_cast<uint32_t>(m_area.width() * 4) };
render->UploadBitmap(m_vdpauSurface, plane, pitch);
}
render->DrawBitmap(m_vdpauSurface, 0, nullptr, nullptr, kVDPBlendNull, 255, 255, 255, 255);
}
return;
}
#endif
}

static class VideoVisualGoomFactory : public VideoVisualFactory
Expand All @@ -161,8 +127,7 @@ static class VideoVisualGoomFactory : public VideoVisualFactory

bool SupportedRenderer(RenderType type) override // VideoVisualFactory
{
return (type == kRenderVDPAU ||
type == kRenderOpenGL);
return (type == kRenderOpenGL);
}
} VideoVisualGoomFactory;

Expand All @@ -183,7 +148,6 @@ static class VideoVisualGoomHDFactory : public VideoVisualFactory

bool SupportedRenderer(RenderType type) override // VideoVisualFactory
{
return (type == kRenderVDPAU ||
type == kRenderOpenGL);
return (type == kRenderOpenGL);
}
} VideoVisualGoomHDFactory;
8 changes: 3 additions & 5 deletions mythtv/libs/libmythtv/visualisations/videovisualgoom.h
Expand Up @@ -10,14 +10,12 @@ class VideoVisualGoom : public VideoVisual
VideoVisualGoom(AudioPlayer *audio, MythRender *render, bool hd);
virtual ~VideoVisualGoom() override;

void Draw(const QRect &area, MythPainter *painter,
QPaintDevice* device) override; // VideoVisual
QString Name(void) override // VideoVisual
{ return m_hd ? "Goom HD" : "Goom"; }
// VideoVisual
void Draw(const QRect &area, MythPainter *painter, QPaintDevice* device) override;
QString Name(void) override { return m_hd ? "Goom HD" : "Goom"; }

private:
unsigned int *m_buffer;
uint m_vdpauSurface;
MythGLTexture *m_glSurface;
bool m_hd;
};
Expand Down

0 comments on commit a035233

Please sign in to comment.