/*****************************************************************************
 * Copyright © 2011, M2X BV
 * Author: Jean-Paul Saman
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 ****************************************************************************/

#ifdef HAVE_AVCODEC_VAAPI
struct vlc_va_conn_t
{
    Display      *p_display_x11;
    VADisplay     p_display;
    int           i_version_major;
    int           i_version_minor;
    int           i_ref_count; /* for internal use only */
};

typedef struct
{
    VASubpictureID  i_id;  /* VASubpictureIDs */
    VASurfaceID     i_surface;
    VAImage         image;
} vlc_va_subpicture_t;

typedef struct
{
    VASurfaceID  i_id;
    int          i_refcount;
    unsigned int i_order;
} vlc_va_surface_t;

struct picture_sys_t
{
    /* surface */
    vlc_va_surface_t *surface;

    /* subpicture */
    vlc_va_subpicture_t *subpicture;
    unsigned int         i_sub; /* number of vlc_va_subpicures_t */

    bool b_own_vout; /* surface owned by vout? */
};
#endif
