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

Stephen Warren swarren at nvidia.com
Mon Jan 26 17:56:18 CET 2009


Reimar Döffinger wrote:
> 
> 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)
> ...
> For an example how you can easily make a table to map error code
> numbers to the names the headers use

FYI, there is also this, for a human-readable string:

/**
 * \brief Retrieve a string describing an error code.
 * \param[in] status The error code.
 * \return A pointer to the string. Note that this is a 
 *       statically allocated read-only string. As such, the
 *       application must not free the returned pointer. The
 *       pointer is valid as long as the VDPAU implementation is
 *       present within the application's address space.
 */
typedef char const * VdpGetErrorString(
    VdpStatus status
);

-- 
nvpublic




More information about the MPlayer-dev-eng mailing list