[MPlayer-dev-eng] XvMC simplify

Diego Biurrun diego at biurrun.de
Tue Apr 26 00:23:44 CEST 2011


On Mon, Apr 25, 2011 at 11:33:29PM +0300, Ivan Kalvachev wrote:
> 
> I prefer a different approach, that I find simpler. Resurrect the
> xvmc_render struct

You are resurrecting a bad name along with the struct.  "render" is
not an English noun, it is a verb.  The name makes no sense, please
try to come up with something more meaningful.

> --- vo_xvmc.c	(revision 33317)
> +++ vo_xvmc.c	(working copy)
> @@ -90,21 +90,22 @@
>  #define MAX_SURFACES 8
>  static int number_of_surfaces=0;
>  static XvMCSurface surface_array[MAX_SURFACES];
> -static struct render_info {
> +struct xvmc_render{
> +    struct xvmc_pix_fmt shared;
>  #define STATE_DISPLAY_PENDING 1  /**  the surface should be shown, the video driver manipulates this */
>  #define STATE_PREDICTION      2  /**  the surface is needed for prediction, the codec manipulates this */
>  #define STATE_OSD_SOURCE      4  /**  the surface is needed for subpicture rendering */
>      int state;
>      void *p_osd_target_surface_render;
>      mp_image_t *mpi;
> -} surface_render_info[MAX_SURFACES];
> -static struct xvmc_pix_fmt *surface_render;
> +};
> +static struct xvmc_render *surface_render;

What are those #defines doing in the middle of the struct?

Diego


More information about the MPlayer-dev-eng mailing list