diff options
Diffstat (limited to 'video/vdpau.c')
-rw-r--r-- | video/vdpau.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/video/vdpau.c b/video/vdpau.c index 20fbf2566f..0cf91ffe86 100644 --- a/video/vdpau.c +++ b/video/vdpau.c @@ -426,3 +426,13 @@ struct mp_image *mp_vdpau_upload_video_surface(struct mp_vdpau_ctx *ctx, mp_image_copy_attributes(hwmpi, mpi); return hwmpi; } + +bool mp_vdpau_guess_if_emulated(struct mp_vdpau_ctx *ctx) +{ + struct vdp_functions *vdp = &ctx->vdp; + VdpStatus vdp_st; + char const* info = NULL; + vdp_st = vdp->get_information_string(&info); + CHECK_VDP_WARNING(ctx, "Error when calling vdp_get_information_string"); + return vdp_st == VDP_STATUS_OK && info && strstr(info, "VAAPI"); +} |