[MPlayer-dev-eng] [PATCH]VO_VDPAU, round 5

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Jan 24 11:27:49 CET 2009

On Thu, Jan 22, 2009 at 03:34:27AM +0100, Carl Eugen Hoyos wrote:
> +    vdp_st = vdp_device_create_x11(mDisplay, mScreen, &vdp_device, &vdp_get_proc_address);
> +    if (vdp_st != VDP_STATUS_OK)
> +        mp_msg(MSGT_VO, MSGL_ERR, "Error %d at %s:%d\n",
> +               vdp_st, __FILE__, __LINE__);

I just noticed: you can and should also translate those error number
into something human-readable (or more importantly, google-able) since
in a release-quality version most error should be user errors, and then
it is important that the users can search for and fix the problems
themselves (and at this point I want to also add that I did not mean to
imply that the original error-checking macro was bad style, it is just
one of these cases where what is most suitable for in-development code
is unsuitable for mostly "finished" code).
For an example how you can easily make a table to map error code numbers
to the names the headers use (which IMO is human-readable enough for
this purpose), see the gl_name_map array and glValName function in

Reimar Döffinger

More information about the MPlayer-dev-eng mailing list