72b6fac038fbb2a2bb933ac4fdae29cd7cc04e6e
[platform/upstream/gstreamer-vaapi.git] / gst-libs / gst / vaapi / gstvaapidisplaycache.h
1 /*
2  *  gstvaapidisplaycache.h - VA display cache
3  *
4  *  Copyright (C) 2012 Intel Corporation
5  *
6  *  This library is free software; you can redistribute it and/or
7  *  modify it under the terms of the GNU Lesser General Public License
8  *  as published by the Free Software Foundation; either version 2.1
9  *  of the License, or (at your option) any later version.
10  *
11  *  This library is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  *  Lesser General Public License for more details.
15  *
16  *  You should have received a copy of the GNU Lesser General Public
17  *  License along with this library; if not, write to the Free
18  *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  *  Boston, MA 02110-1301 USA
20  */
21
22 #ifndef GSTVAAPIDISPLAYCACHE_H
23 #define GSTVAAPIDISPLAYCACHE_H
24
25 #include <gst/vaapi/gstvaapidisplay.h>
26
27 typedef struct _GstVaapiDisplayCache    GstVaapiDisplayCache;
28
29 GstVaapiDisplayCache *
30 gst_vaapi_display_cache_new(void);
31
32 void
33 gst_vaapi_display_cache_free(GstVaapiDisplayCache *cache);
34
35 guint
36 gst_vaapi_display_cache_get_size(GstVaapiDisplayCache *cache);
37
38 gboolean
39 gst_vaapi_display_cache_add(
40     GstVaapiDisplayCache       *cache,
41     GstVaapiDisplayInfo        *info
42 );
43
44 void
45 gst_vaapi_display_cache_remove(
46     GstVaapiDisplayCache       *cache,
47     GstVaapiDisplay            *display
48 );
49
50 const GstVaapiDisplayInfo *
51 gst_vaapi_display_cache_lookup(
52     GstVaapiDisplayCache       *cache,
53     GstVaapiDisplay            *display
54 );
55
56 const GstVaapiDisplayInfo *
57 gst_vaapi_display_cache_lookup_custom(
58     GstVaapiDisplayCache       *cache,
59     GCompareFunc                func,
60     gconstpointer               data,
61     guint                       display_types
62 );
63
64 const GstVaapiDisplayInfo *
65 gst_vaapi_display_cache_lookup_by_va_display(
66     GstVaapiDisplayCache       *cache,
67     VADisplay                   va_display
68 );
69
70 const GstVaapiDisplayInfo *
71 gst_vaapi_display_cache_lookup_by_native_display(
72     GstVaapiDisplayCache       *cache,
73     gpointer                    native_display,
74     guint                       display_types
75 );
76
77 const GstVaapiDisplayInfo *
78 gst_vaapi_display_cache_lookup_by_name(
79     GstVaapiDisplayCache       *cache,
80     const gchar                *display_name,
81     guint                       display_types
82 );
83
84 #endif /* GSTVAAPIDISPLAYCACHE_H */