tests: image: fix string representation for GstVideoFormat.
[platform/upstream/gstreamer-vaapi.git] / tests / output.h
1 /*
2  *  output.h - Video output helpers
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 OUTPUT_H
23 #define OUTPUT_H
24
25 #include <glib.h>
26 #include <gst/vaapi/gstvaapidisplay.h>
27 #include <gst/vaapi/gstvaapiwindow.h>
28 #include <gst/vaapi/gstvaapipixmap.h>
29
30 typedef GstVaapiDisplay *(*CreateDisplayFunc)(const gchar *display_name);
31 typedef GstVaapiWindow *(*CreateWindowFunc)(GstVaapiDisplay *display,
32                                             guint width, guint height);
33 typedef GstVaapiPixmap *(*CreatePixmapFunc)(GstVaapiDisplay *display,
34     GstVideoFormat format, guint width, guint height);
35
36
37 typedef struct _VideoOutputInfo VideoOutputInfo;
38 struct _VideoOutputInfo {
39     const gchar        *name;
40     CreateDisplayFunc   create_display;
41     CreateWindowFunc    create_window;
42     CreatePixmapFunc    create_pixmap;
43 };
44
45 gboolean
46 video_output_init(int *argc, char *argv[], GOptionEntry *options);
47
48 void
49 video_output_exit(void);
50
51 const VideoOutputInfo *
52 video_output_lookup(const gchar *output_name);
53
54 GstVaapiDisplay *
55 video_output_create_display(const gchar *display_name);
56
57 GstVaapiWindow *
58 video_output_create_window(GstVaapiDisplay *display, guint width, guint height);
59
60 GstVaapiPixmap *
61 video_output_create_pixmap(GstVaapiDisplay *display, GstVideoFormat format,
62     guint width, guint height);
63
64 #endif /* OUTPUT_H */