[vlc-commits] dxa9: implement the hold_device callback for the CPU to GPU filter
Steve Lhomme
git at videolan.org
Mon Dec 2 13:42:37 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Nov 12 08:47:29 2019 +0100| [9df2aa3160b6f8395a10013bf338ba10bb4853b5] | committer: Steve Lhomme
dxa9: implement the hold_device callback for the CPU to GPU filter
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9df2aa3160b6f8395a10013bf338ba10bb4853b5
---
modules/hw/d3d9/dxa9.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/modules/hw/d3d9/dxa9.c b/modules/hw/d3d9/dxa9.c
index 9c9c07a660..cd1619be40 100644
--- a/modules/hw/d3d9/dxa9.c
+++ b/modules/hw/d3d9/dxa9.c
@@ -194,7 +194,14 @@ static picture_t *NewBuffer(filter_t *p_filter)
return p_sys->staging;
}
-static filter_t *CreateFilter( vlc_object_t *p_this, const es_format_t *p_fmt_in,
+static vlc_decoder_device * HoldD3D9DecoderDevice(vlc_object_t *o, void *sys)
+{
+ VLC_UNUSED(o);
+ filter_t *p_this = sys;
+ return filter_HoldDecoderDevice(p_this);
+}
+
+static filter_t *CreateFilter( filter_t *p_this, const es_format_t *p_fmt_in,
vlc_fourcc_t dst_chroma )
{
filter_t *p_filter;
@@ -203,7 +210,7 @@ static filter_t *CreateFilter( vlc_object_t *p_this, const es_format_t *p_fmt_in
if (unlikely(p_filter == NULL))
return NULL;
- static const struct filter_video_callbacks cbs = { NewBuffer, NULL/*TODO*/ };
+ static const struct filter_video_callbacks cbs = { NewBuffer, HoldD3D9DecoderDevice };
p_filter->b_allow_fmt_out_change = false;
p_filter->owner.video = &cbs;
p_filter->owner.sys = p_this;
@@ -426,7 +433,7 @@ int D3D9OpenCPUConverter( vlc_object_t *obj )
res_sys->surface = texture;
IDirect3DSurface9_AddRef(texture);
- p_cpu_filter = CreateFilter(VLC_OBJECT(p_filter), &p_filter->fmt_in, p_dst->format.i_chroma);
+ p_cpu_filter = CreateFilter(p_filter, &p_filter->fmt_in, p_dst->format.i_chroma);
if (!p_cpu_filter)
goto done;
}
More information about the vlc-commits
mailing list