vlc | branch: master | Steve Lhomme <[email protected]> | Wed Feb 5 09:57:37 2020 +0100| [6ef168ee847035b2088b450b2a7808601174bab2] | committer: Steve Lhomme
d3d11_fmt: allocate D3D11 pictures without passing the d3d11_device_t It's already part of the vctx that will be set on the picture. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6ef168ee847035b2088b450b2a7808601174bab2 --- modules/hw/d3d11/d3d11_deinterlace.c | 2 +- modules/hw/d3d11/d3d11_filters.c | 2 +- modules/video_chroma/d3d11_fmt.c | 7 ++++--- modules/video_chroma/d3d11_fmt.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/hw/d3d11/d3d11_deinterlace.c b/modules/hw/d3d11/d3d11_deinterlace.c index f1af9d8fce..c05977aa2c 100644 --- a/modules/hw/d3d11/d3d11_deinterlace.c +++ b/modules/hw/d3d11/d3d11_deinterlace.c @@ -229,7 +229,7 @@ picture_t *AllocPicture( filter_t *p_filter ) if (unlikely(cfg == NULL)) return NULL; - picture_t *pic = D3D11_AllocPicture(VLC_OBJECT(p_filter), &p_sys->d3d_dev, &p_filter->fmt_out.video, p_filter->vctx_out, cfg); + picture_t *pic = D3D11_AllocPicture(VLC_OBJECT(p_filter), &p_filter->fmt_out.video, p_filter->vctx_out, cfg); if (unlikely(pic == NULL)) return NULL; diff --git a/modules/hw/d3d11/d3d11_filters.c b/modules/hw/d3d11/d3d11_filters.c index a109f7aa5f..2a6bda7fc6 100644 --- a/modules/hw/d3d11/d3d11_filters.c +++ b/modules/hw/d3d11/d3d11_filters.c @@ -209,7 +209,7 @@ static picture_t *AllocPicture( filter_t *p_filter ) if (unlikely(cfg == NULL)) return NULL; - picture_t *pic = D3D11_AllocPicture(VLC_OBJECT(p_filter), &p_sys->d3d_dev, &p_filter->fmt_out.video, p_filter->vctx_out, cfg); + picture_t *pic = D3D11_AllocPicture(VLC_OBJECT(p_filter), &p_filter->fmt_out.video, p_filter->vctx_out, cfg); if (unlikely(pic == NULL)) return NULL; diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c index ee9312b3a5..4607d51434 100644 --- a/modules/video_chroma/d3d11_fmt.c +++ b/modules/video_chroma/d3d11_fmt.c @@ -800,7 +800,7 @@ picture_context_t *d3d11_pic_context_copy(picture_context_t *ctx) return &pic_ctx->s; } -picture_t *D3D11_AllocPicture(vlc_object_t *obj, d3d11_device_t *d3d_dev, +picture_t *D3D11_AllocPicture(vlc_object_t *obj, const video_format_t *fmt, vlc_video_context *vctx_out, const d3d_format_t *cfg) { if (unlikely(cfg == NULL)) @@ -817,7 +817,8 @@ picture_t *D3D11_AllocPicture(vlc_object_t *obj, d3d11_device_t *d3d_dev, return NULL; } - if (AllocateTextures(obj, d3d_dev, cfg, + d3d11_video_context_t *vctx_sys = GetD3D11ContextPrivate(vctx_out); + if (AllocateTextures(obj, &vctx_sys->d3d_dev, cfg, fmt, 1, pic_ctx->picsys.texture, NULL) != VLC_SUCCESS) { picture_Release(pic); @@ -825,7 +826,7 @@ picture_t *D3D11_AllocPicture(vlc_object_t *obj, d3d11_device_t *d3d_dev, return NULL; } - D3D11_AllocateResourceView(obj, d3d_dev->d3ddevice, cfg, pic_ctx->picsys.texture, 0, pic_ctx->picsys.renderSrc); + D3D11_AllocateResourceView(obj, vctx_sys->d3d_dev.d3ddevice, cfg, pic_ctx->picsys.texture, 0, pic_ctx->picsys.renderSrc); pic_ctx->s = (picture_context_t) { d3d11_pic_context_destroy, d3d11_pic_context_copy, diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h index 0c6bb518b7..d359b6d425 100644 --- a/modules/video_chroma/d3d11_fmt.h +++ b/modules/video_chroma/d3d11_fmt.h @@ -219,7 +219,7 @@ static inline void d3d11_device_unlock(d3d11_device_t *d3d_dev) void d3d11_pic_context_destroy(picture_context_t *); picture_context_t *d3d11_pic_context_copy(picture_context_t *); -picture_t *D3D11_AllocPicture(vlc_object_t *, d3d11_device_t *, +picture_t *D3D11_AllocPicture(vlc_object_t *, const video_format_t *, vlc_video_context *, const d3d_format_t *); #endif /* include-guard */ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
