xine-lib 1.2.13-20230125hg15249
vaapi_util.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2012 Edgar Hucek <gimli|@dark-green.com>
3 * Copyright (C) 2012-2022 xine developers
4 *
5 * This file is part of xine, a free video player.
6 *
7 * xine is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * xine is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
20 *
21 * vaapi_util.c, VAAPI video extension interface for xine
22 *
23 */
24
25#ifndef XINE_VAAPI_UTIL_H
26#define XINE_VAAPI_UTIL_H
27
28#include <xine/video_out.h>
29#include "accel_vaapi.h"
30
31#include <sys/types.h>
32
33#include <va/va.h>
34
35/*
36 *
37 */
38
39const char *_x_va_profile_to_string(VAProfile profile);
40const char *_x_va_entrypoint_to_string(VAEntrypoint entrypoint);
41
43
44/*
45 *
46 */
47
49
51
52#define RENDER_SURFACES 50
53
72
73vaapi_context_impl_t *_x_va_new(xine_t *xine, int visual_type, const void *visual, unsigned va_display_flags);
74void _x_va_free(vaapi_context_impl_t **va_context);
75
76int _x_va_check_status(vaapi_context_impl_t *va_context, VAStatus vaStatus, const char *msg);
77
78void _x_va_destroy_image(vaapi_context_impl_t *va_context, VAImage *va_image);
79VAStatus _x_va_create_image(vaapi_context_impl_t *va_context, VASurfaceID va_surface_id, VAImage *va_image, int width, int height, int clear, int *is_bound);
80
81int _x_va_profile_from_imgfmt(vaapi_context_impl_t *va_context, unsigned format);
82
83/*
84 * surface pool
85 */
86
87void _x_va_close(vaapi_context_impl_t *va_context);
88VAStatus _x_va_init(vaapi_context_impl_t *va_context, int va_profile, int width, int height);
89
94
95#endif /* XINE_VAAPI_UTIL_H */
unsigned int height
Definition gfontrle.c:5
unsigned int width
Definition gfontrle.c:4
Definition accel_vaapi.h:52
Definition accel_vaapi.h:72
Definition vaapi_util.h:54
int query_va_status
Definition vaapi_util.h:60
ff_vaapi_surface_t va_render_surfaces_storage[50+1]
Definition vaapi_util.h:69
struct xine_va_display_t * va_display_plugin
Definition vaapi_util.h:59
unsigned int num_frames
Definition vaapi_util.h:64
ff_vaapi_context_t c
Definition vaapi_util.h:55
vo_frame_t * frames[50]
Definition vaapi_util.h:65
xine_t * xine
Definition vaapi_util.h:57
pthread_mutex_t ctx_lock
Definition vaapi_util.h:62
pthread_mutex_t surfaces_lock
Definition vaapi_util.h:67
unsigned va_head
Definition vaapi_util.h:68
VASurfaceID va_surface_ids_storage[50+1]
Definition vaapi_util.h:70
Definition video_out.h:70
Definition xine_internal.h:80
Definition xine_va_display.h:32
void _x_va_reset_va_context(ff_vaapi_context_t *va_context)
Definition vaapi_util.c:108
void _x_va_destroy_image(vaapi_context_impl_t *va_context, VAImage *va_image)
Definition vaapi_util.c:210
const char * _x_va_entrypoint_to_string(VAEntrypoint entrypoint)
Definition vaapi_util.c:81
VAStatus _x_va_init(vaapi_context_impl_t *va_context, int va_profile, int width, int height)
Definition vaapi_util.c:338
void _x_va_close(vaapi_context_impl_t *va_context)
Definition vaapi_util.c:313
ff_vaapi_surface_t * _x_va_alloc_surface(vaapi_context_impl_t *va_context)
Definition vaapi_util.c:543
const char * _x_va_profile_to_string(VAProfile profile)
Definition vaapi_util.c:56
int _x_va_profile_from_imgfmt(vaapi_context_impl_t *va_context, unsigned format)
Definition vaapi_util.c:444
vaapi_context_impl_t * _x_va_new(xine_t *xine, int visual_type, const void *visual, unsigned va_display_flags)
Definition vaapi_util.c:146
void _x_va_free(vaapi_context_impl_t **va_context)
Definition vaapi_util.c:127
void _x_va_release_surface(vaapi_context_impl_t *va_context, ff_vaapi_surface_t *va_surface)
Definition vaapi_util.c:593
void _x_va_surface_displayed(vaapi_context_impl_t *va_context, ff_vaapi_surface_t *va_surface)
Definition vaapi_util.c:612
void _x_va_render_surface(vaapi_context_impl_t *va_context, ff_vaapi_surface_t *va_surface)
Definition vaapi_util.c:583
int _x_va_check_status(vaapi_context_impl_t *va_context, VAStatus vaStatus, const char *msg)
Definition vaapi_util.c:98
#define RENDER_SURFACES
Definition vaapi_util.h:52
VAStatus _x_va_create_image(vaapi_context_impl_t *va_context, VASurfaceID va_surface_id, VAImage *va_image, int width, int height, int clear, int *is_bound)
Definition vaapi_util.c:224