2 * gstvaapicontext.h - VA context abstraction
4 * Copyright (C) 2010-2011 Splitted-Desktop Systems
5 * Copyright (C) 2011-2012 Intel Corporation
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * as published by the Free Software Foundation; either version 2.1
10 * of the License, or (at your option) any later version.
12 * This library 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 GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301 USA
23 #ifndef GST_VAAPI_CONTEXT_H
24 #define GST_VAAPI_CONTEXT_H
26 #include <gst/vaapi/gstvaapiobject.h>
27 #include <gst/vaapi/gstvaapiprofile.h>
28 #include <gst/vaapi/gstvaapidisplay.h>
29 #include <gst/vaapi/gstvaapisurface.h>
30 #include <gst/video/video-overlay-composition.h>
34 #define GST_VAAPI_CONTEXT(obj) \
35 ((GstVaapiContext *)(obj))
37 typedef struct _GstVaapiContext GstVaapiContext;
38 typedef struct _GstVaapiContextInfo GstVaapiContextInfo;
41 * GstVaapiContextInfo:
43 * Structure holding VA context info like encoded size, decoder
44 * profile and entry-point to use, and maximum number of reference
45 * frames reported by the bitstream.
47 struct _GstVaapiContextInfo {
48 GstVaapiProfile profile;
49 GstVaapiEntrypoint entrypoint;
56 gst_vaapi_context_new(
57 GstVaapiDisplay *display,
58 GstVaapiProfile profile,
59 GstVaapiEntrypoint entrypoint,
65 gst_vaapi_context_new_full(GstVaapiDisplay *display,
66 const GstVaapiContextInfo *cip);
69 gst_vaapi_context_reset(
70 GstVaapiContext *context,
71 GstVaapiProfile profile,
72 GstVaapiEntrypoint entrypoint,
78 gst_vaapi_context_reset_full(GstVaapiContext *context,
79 const GstVaapiContextInfo *new_cip);
82 gst_vaapi_context_get_id(GstVaapiContext *context);
85 gst_vaapi_context_get_profile(GstVaapiContext *context);
88 gst_vaapi_context_set_profile(GstVaapiContext *context, GstVaapiProfile profile);
91 gst_vaapi_context_get_entrypoint(GstVaapiContext *context);
94 gst_vaapi_context_get_size(
95 GstVaapiContext *context,
100 GstVaapiSurfaceProxy *
101 gst_vaapi_context_get_surface_proxy(GstVaapiContext *context);
104 gst_vaapi_context_get_surface_count(GstVaapiContext *context);
107 gst_vaapi_context_apply_composition(
108 GstVaapiContext *context,
109 GstVideoOverlayComposition *composition
114 #endif /* GST_VAAPI_CONTEXT_H */