1 /*****************************************************************************
2 * va.h: Video Acceleration API for avcodec
3 *****************************************************************************
4 * Copyright (C) 2009 Laurent Aimar
7 * Authors: Laurent Aimar <fenrir_AT_ videolan _DOT_ org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
27 typedef struct vlc_va_t vlc_va_t;
28 typedef struct vlc_va_sys_t vlc_va_sys_t;
37 int (*setup)(vlc_va_t *, void **hw, vlc_fourcc_t *output,
38 int width, int height);
39 int (*get)(vlc_va_t *, AVFrame *frame);
40 void (*release)(vlc_va_t *, AVFrame *frame);
41 int (*extract)(vlc_va_t *, picture_t *dst, AVFrame *src);
44 static inline int vlc_va_Setup(vlc_va_t *va, void **hw, vlc_fourcc_t *output,
45 int width, int height)
47 return va->setup(va, hw, output, width, height);
49 static inline int vlc_va_Get(vlc_va_t *va, AVFrame *frame)
51 return va->get(va, frame);
53 static inline void vlc_va_Release(vlc_va_t *va, AVFrame *frame)
55 va->release(va, frame);
57 static inline int vlc_va_Extract(vlc_va_t *va, picture_t *dst, AVFrame *src)
59 return va->extract(va, dst, src);
62 static vlc_va_t *vlc_va_New(vlc_object_t *, int, int, const es_format_t *);
63 static void vlc_va_Delete(vlc_va_t *va);