[MPlayer-dev-eng] [PATCH] Add "hwaccel" codecs attribute (Was: Add -va for video acceleration)
Diego Biurrun
diego at biurrun.de
Wed Feb 17 11:59:24 CET 2010
On Wed, Feb 17, 2010 at 11:47:03AM +0100, Gwenole Beauchesne wrote:
>
> Here is a patch. As a side effect, aliasing -vc HWACCEL to all HWACCELs
> is rather trivial since we now have an codecs_t.hwaccel member. Though,
> this is not implemented yet.
>
> --- /dev/null
> +++ b/libmpcodecs/mp_hwaccel.c
> @@ -0,0 +1,62 @@
> +
> +#include "mp_hwaccel.h"
> +#include <string.h>
nit: Please place system headers before local headers.
> +typedef struct {
> + mp_hwaccel_t hwaccel;
> + const char *name;
> + const char *long_name;
> +} mp_hwaccel_map_t;
> +
> --- /dev/null
> +++ b/libmpcodecs/mp_hwaccel.h
> @@ -0,0 +1,32 @@
> +
> +typedef enum {
> + MP_HWACCEL_NONE,
> + MP_HWACCEL_VAAPI,
> + MP_HWACCEL_VDPAU
> +} mp_hwaccel_t;
The _t namespace is reserved for POSIX. I know that MPlayer pollutes
it left and right already, but I think we should try to avoid making
it worse.
Also, I dislike typedeffed structs, but that appears to be a point of
contention...
Diego
More information about the MPlayer-dev-eng
mailing list