Commit 2080066f authored by Jean-Paul Saman's avatar Jean-Paul Saman

VAAPI-XCB: Move VASubpicture code into a vasub.{c,h} file.

Split up vaapi_x11.c to easy adding a vaapi_glx.c. All common functionality wrt to
VASubpictures have been moved to a new file vasub.{c,h}.
parent 62ba8127
......@@ -20,6 +20,8 @@ libavcodec_plugin_la_SOURCES = \
if HAVE_XCB
libavcodec_plugin_la_SOURCES += \
vasub.h \
vasub.c \
vaapi_x11.c \
../../video_output/xcb/events.c \
../../video_output/xcb/xcb_events_vlc.h \
......
......@@ -24,8 +24,6 @@
#ifndef _VLC_VA_H
#define _VLC_VA_H 1
typedef struct vlc_va_conn_t vlc_va_conn_t;
typedef struct vlc_va_ops_t vlc_va_ops_t;
typedef struct vlc_va_t vlc_va_t;
struct vlc_va_t {
......
......@@ -25,6 +25,7 @@
* the created surfaces for use with decoding
* context.
*/
typedef struct vlc_va_conn_t vlc_va_conn_t;
struct vlc_va_conn_t
{
VADisplay p_display;
......
This diff is collapsed.
This diff is collapsed.
/*****************************************************************************
* Copyright © 2012, 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
****************************************************************************/
#ifndef VLC_VAAPI_VASUB_H
#define VLC_VAAPI_VASUB_H 1
/* Check if subtitle format is supported by VA API */
int VASubtitleFourCC(vlc_va_conn_t *vaconn, const unsigned int vafourcc, VAImageFormat *sub_fmt, int *flags);
/* */
typedef struct vasubpicture_cache_t vasubpicture_cache_t;
typedef struct subpicture_cache_t subpicture_cache_t;
/* Get Cache id */
unsigned int cache_GetCacheID(const subpicture_cache_t *cache);
/* Create new VASubpicture */
vasubpicture_cache_t *cache_SubpictureCreate(vlc_object_t *obj, vlc_va_conn_t *vaconn, VAImageFormat *sub_fmt,
const subpicture_t *subpicture, const subpicture_region_t *region, const int flags);
/* Destory VASubpicture and cached subpicture */
void cache_SubpictureDestroy(vlc_object_t *obj, vlc_va_conn_t *conn, subpicture_cache_t *cache, const bool b_force);
/* Hold reference to subpicture cache object */
void cache_SubpictureHold(vlc_object_t *obj, vlc_array_t *cache_array, const int cache_id);
/* Release reference to subpicture cache object */
void cache_SubpictureRelease(vlc_object_t *obj, vlc_va_conn_t *vaconn, vlc_array_t *cache_array, const int cache_id);
/* Link VASubpicture to VASurface */
int SubpictureRegionsLink(vlc_object_t *obj, vlc_va_conn_t *vaconn, vlc_array_t *cache_array,
const picture_t *picture, const int flags);
/* Unlink VASubpicture from VASurface */
int SubpictureRegionsUnlink(vlc_object_t *obj, vlc_va_conn_t *vaconn, vlc_array_t *cache_array,
const picture_t *picture);
/* Render VLC subpictures as VASubpictures and put them into a subpicture cache */
subpicture_cache_t *RenderDirectSubpicture(vlc_object_t *obj, vlc_va_conn_t *vaconn, VAImageFormat *fmt,
picture_t *picture, subpicture_t *subpicture, int flags);
/* Check if cached subpicture can be reused for the next Subpicture Render cycle */
int RenderCachedSubpictures(vlc_object_t *obj, vlc_va_conn_t *vaconn, vlc_array_t *cache_array, const int cache_id,
picture_t *picture, subpicture_t *subpicture);
#endif
......@@ -53,6 +53,7 @@
#include "avcodec.h"
#include "va.h"
typedef struct vlc_va_conn_t vlc_va_conn_t;
#if defined(HAVE_AVCODEC_VAAPI) || defined(HAVE_AVCODEC_DXVA2)
# define HAVE_AVCODEC_VA
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment