mirror of https://github.com/mpv-player/mpv
vo_direct3d: remove passing device to decoder
This was never really used anyway. Removing it for the sake of the following commit.
This commit is contained in:
parent
f99e48ae6a
commit
ee4c00698f
|
@ -34,7 +34,6 @@
|
||||||
#include "video/csputils.h"
|
#include "video/csputils.h"
|
||||||
#include "video/mp_image.h"
|
#include "video/mp_image.h"
|
||||||
#include "video/img_format.h"
|
#include "video/img_format.h"
|
||||||
#include "video/d3d.h"
|
|
||||||
#include "common/msg.h"
|
#include "common/msg.h"
|
||||||
#include "common/common.h"
|
#include "common/common.h"
|
||||||
#include "w32_common.h"
|
#include "w32_common.h"
|
||||||
|
@ -192,10 +191,6 @@ typedef struct d3d_priv {
|
||||||
struct mp_csp_equalizer video_eq;
|
struct mp_csp_equalizer video_eq;
|
||||||
|
|
||||||
struct osdpart *osd[MAX_OSD_PARTS];
|
struct osdpart *osd[MAX_OSD_PARTS];
|
||||||
|
|
||||||
struct mp_hwdec_info hwdec_info;
|
|
||||||
struct mp_hwdec_ctx hwdec_ctx;
|
|
||||||
struct mp_d3d_ctx hwdec_d3d;
|
|
||||||
} d3d_priv;
|
} d3d_priv;
|
||||||
|
|
||||||
struct fmt_entry {
|
struct fmt_entry {
|
||||||
|
@ -743,9 +738,6 @@ static bool change_d3d_backbuffer(d3d_priv *priv)
|
||||||
MP_VERBOSE(priv, "Creating Direct3D device failed.\n");
|
MP_VERBOSE(priv, "Creating Direct3D device failed.\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// (race condition if this is called when recovering from a "lost" device)
|
|
||||||
priv->hwdec_d3d.d3d9_device = priv->d3d_device;
|
|
||||||
} else {
|
} else {
|
||||||
if (FAILED(IDirect3DDevice9_Reset(priv->d3d_device, &present_params))) {
|
if (FAILED(IDirect3DDevice9_Reset(priv->d3d_device, &present_params))) {
|
||||||
MP_ERR(priv, "Reseting Direct3D device failed.\n");
|
MP_ERR(priv, "Reseting Direct3D device failed.\n");
|
||||||
|
@ -779,8 +771,6 @@ static bool change_d3d_backbuffer(d3d_priv *priv)
|
||||||
|
|
||||||
static void destroy_d3d(d3d_priv *priv)
|
static void destroy_d3d(d3d_priv *priv)
|
||||||
{
|
{
|
||||||
priv->hwdec_d3d.d3d9_device = NULL;
|
|
||||||
|
|
||||||
destroy_d3d_surfaces(priv);
|
destroy_d3d_surfaces(priv);
|
||||||
|
|
||||||
for (int n = 0; n < NUM_SHADERS; n++) {
|
for (int n = 0; n < NUM_SHADERS; n++) {
|
||||||
|
@ -1225,9 +1215,6 @@ static int preinit(struct vo *vo)
|
||||||
priv->vo = vo;
|
priv->vo = vo;
|
||||||
priv->log = vo->log;
|
priv->log = vo->log;
|
||||||
|
|
||||||
priv->hwdec_info.hwctx = &priv->hwdec_ctx;
|
|
||||||
priv->hwdec_ctx.d3d_ctx = &priv->hwdec_d3d;
|
|
||||||
|
|
||||||
for (int n = 0; n < MAX_OSD_PARTS; n++) {
|
for (int n = 0; n < MAX_OSD_PARTS; n++) {
|
||||||
struct osdpart *osd = talloc_ptrtype(priv, osd);
|
struct osdpart *osd = talloc_ptrtype(priv, osd);
|
||||||
*osd = (struct osdpart) {
|
*osd = (struct osdpart) {
|
||||||
|
@ -1275,11 +1262,6 @@ static int control(struct vo *vo, uint32_t request, void *data)
|
||||||
d3d_priv *priv = vo->priv;
|
d3d_priv *priv = vo->priv;
|
||||||
|
|
||||||
switch (request) {
|
switch (request) {
|
||||||
case VOCTRL_GET_HWDEC_INFO: {
|
|
||||||
struct mp_hwdec_info **arg = data;
|
|
||||||
*arg = &priv->hwdec_info;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
case VOCTRL_REDRAW_FRAME:
|
case VOCTRL_REDRAW_FRAME:
|
||||||
d3d_draw_frame(priv);
|
d3d_draw_frame(priv);
|
||||||
return VO_TRUE;
|
return VO_TRUE;
|
||||||
|
|
Loading…
Reference in New Issue