Skip to content

Commit

Permalink
win d3d: Migrate d3d9 from MythVideoOutput to MythVideoOutputGPU.
Browse files Browse the repository at this point in the history
This is an attempt to extend 663d142 ti the windows d3d driver.
  • Loading branch information
linuxdude42 committed Nov 24, 2023
1 parent 07ccb5c commit 63de1f9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
12 changes: 10 additions & 2 deletions mythtv/libs/libmythtv/mythvideooutgpu.cpp
Expand Up @@ -7,6 +7,10 @@
#include "mythvideogpu.h"
#include "mythvideooutgpu.h"

#ifdef _WIN32
#include "libmythui/mythpainter_d3d9.h"
#include "videoout_d3d.h"
#endif
#ifdef USING_OPENGL
#include "libmythui/opengl/mythpainteropengl.h"
#include "opengl/mythvideooutopengl.h"
Expand Down Expand Up @@ -55,7 +59,9 @@ MythVideoOutputGPU *MythVideoOutputGPU::Create(MythMainWindow* MainWindow, MythR
QStringList renderers;

#ifdef _WIN32
// if (render->Type() == kRenderDirect3D9)
// auto * d3drender = dynamic_cast<MythRenderD3D9*>(Render);
// auto * d3dpainter = dynamic_cast<MythD3D9Painter*>(Painter);
// if (Render->Type() == kRenderDirect3D9)
// renderers += VideoOutputD3D::GetAllowedRenderers(CodecID, VideoDispDim);
#endif

Expand Down Expand Up @@ -134,7 +140,9 @@ MythVideoOutputGPU *MythVideoOutputGPU::Create(MythMainWindow* MainWindow, MythR

#ifdef _WIN32
// if (renderer == "direct3d")
// video = new VideoOutputD3D();
// video = new VideoOutputD3D(MainWindow, d3drender,
// d3dpainter, Display,
// videoprofile, renderer);
#endif
#ifdef USING_OPENGL
// cppcheck-suppress knownConditionTrueFalse
Expand Down
6 changes: 4 additions & 2 deletions mythtv/libs/libmythtv/videoout_d3d.cpp
Expand Up @@ -46,8 +46,10 @@ void VideoOutputD3D::GetRenderOptions(RenderOptions &Options)
#endif
}

VideoOutputD3D::VideoOutputD3D(void)
: MythVideoOutput()
VideoOutputD3D::VideoOutputD3D(MythMainWindow* MainWindow, MythRenderD3D9* Render,
MythD3D9Painter* Painter, MythDisplay* Display,
const MythVideoProfilePtr& VideoProfile, QString& Profile)
: MythVideoOutputGPU(MainWindow, Render, Painter, Display, VideoProfile, Profile)
{
m_pauseFrame.m_buffer = nullptr;
}
Expand Down
8 changes: 5 additions & 3 deletions mythtv/libs/libmythtv/videoout_d3d.h
Expand Up @@ -4,19 +4,21 @@
#define VIDEOOUT_D3D_H_

// MythTV headers
#include "mythvideoout.h"
#include "mythvideooutgpu.h"
#include "libmythui/mythrender_d3d9.h"
#include "libmythui/mythpainter_d3d9.h"

#ifdef USING_DXVA2
#include "dxva2decoder.h"
#endif

class VideoOutputD3D : public MythVideoOutput
class VideoOutputD3D : public MythVideoOutputGPU
{
public:
static void GetRenderOptions(RenderOptions &Options);
VideoOutputD3D();
VideoOutputD3D(MythMainWindow* MainWindow, MythRenderD3D9* Render,
MythD3D9Painter* Painter, MythDisplay* Display,
const MythVideoProfilePtr& VideoProfile, QString& Profile);
~VideoOutputD3D();

bool Init(QSize video_dim_buf, QSize video_dim_disp, float video_aspect,
Expand Down

0 comments on commit 63de1f9

Please sign in to comment.