diff options
author | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2012-07-23 15:17:03 +0200 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2012-07-24 15:57:57 +0200 |
commit | 9e0c97a3d3318322c9f1cd54c1a6af9468bf8b0f (patch) | |
tree | 359b122e2bea8e0ba25cbf2783337c37ae693440 /tests/output.h | |
parent | 0c8dc604cb3e0e803f83e16a3d30e943cb24ebe9 (diff) |
tests: use common display and window creation routines.
Add new --output option to select the renderer. Use --list-outputs to
print a list of supported renderers.
Diffstat (limited to 'tests/output.h')
-rw-r--r-- | tests/output.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/tests/output.h b/tests/output.h new file mode 100644 index 00000000..33779154 --- /dev/null +++ b/tests/output.h @@ -0,0 +1,55 @@ +/* + * output.h - Video output helpers + * + * Copyright (C) 2012 Intel Corporation + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + */ + +#ifndef OUTPUT_H +#define OUTPUT_H + +#include <glib.h> +#include <gst/vaapi/gstvaapidisplay.h> +#include <gst/vaapi/gstvaapiwindow.h> + +typedef GstVaapiDisplay *(*CreateDisplayFunc)(const gchar *display_name); +typedef GstVaapiWindow *(*CreateWindowFunc)(GstVaapiDisplay *display, + guint width, guint height); + +typedef struct _VideoOutputInfo VideoOutputInfo; +struct _VideoOutputInfo { + const gchar *name; + CreateDisplayFunc create_display; + CreateWindowFunc create_window; +}; + +gboolean +video_output_init(int *argc, char *argv[], GOptionEntry *options); + +void +video_output_exit(void); + +const VideoOutputInfo * +video_output_lookup(const gchar *output_name); + +GstVaapiDisplay * +video_output_create_display(const gchar *display_name); + +GstVaapiWindow * +video_output_create_window(GstVaapiDisplay *display, guint width, guint height); + +#endif /* OUTPUT_H */ |