3 * Copyright (C) 2011 Intel
4 * Copyright (C) 2011 Collabora Ltd.
5 * Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
7 * video-context.h: Video Context interface and helpers
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Library General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Library General Public License for more details.
20 * You should have received a copy of the GNU Library General Public
21 * License along with this library; if not, write to the
22 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 * Boston, MA 02111-1307, USA.
26 #ifndef __GST_VIDEO_CONTEXT_H__
27 #define __GST_VIDEO_CONTEXT_H__
29 #ifndef GST_USE_UNSTABLE_API
30 #warning "The GstVideoContext interface is unstable API and may change in future."
31 #warning "You can define GST_USE_UNSTABLE_API to avoid this warning."
38 #define GST_TYPE_VIDEO_CONTEXT (gst_video_context_iface_get_type ())
39 #define GST_VIDEO_CONTEXT(obj) (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VIDEO_CONTEXT, GstVideoContext))
40 #define GST_IS_VIDEO_CONTEXT(obj) (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VIDEO_CONTEXT))
41 #define GST_VIDEO_CONTEXT_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_VIDEO_CONTEXT, GstVideoContextInterface))
46 * Opaque #GstVideoContext data structure.
48 typedef struct _GstVideoContext GstVideoContext;
49 typedef struct _GstVideoContextInterface GstVideoContextInterface;
52 * GstVideoContextInterface:
53 * @parent: parent interface type.
54 * @set_context: vmethod to set video context.
56 * #GstVideoContextInterface interface.
58 struct _GstVideoContextInterface
60 GTypeInterface parent;
62 /* virtual functions */
63 void (*set_context) (GstVideoContext * context,
65 const GValue * value);
69 GType gst_video_context_iface_get_type (void);
71 /* virtual class method and associated helpers */
72 void gst_video_context_set_context (GstVideoContext * context,
74 const GValue * value);
75 void gst_video_context_set_context_string (GstVideoContext * context,
78 void gst_video_context_set_context_pointer (GstVideoContext * context,
81 void gst_video_context_set_context_object (GstVideoContext * context,
87 void gst_video_context_prepare (GstVideoContext *context,
88 const gchar ** types);
90 gboolean gst_video_context_message_parse_prepare (GstMessage * message,
91 const gchar *** types,
92 GstVideoContext ** ctx);
95 GstQuery * gst_video_context_query_new (const gchar ** types);
96 gboolean gst_video_context_run_query (GstElement *element,
98 const gchar ** gst_video_context_query_get_supported_types (GstQuery * query);
99 void gst_video_context_query_parse_value (GstQuery * query,
101 const GValue ** value);
102 void gst_video_context_query_set_value (GstQuery * query,
105 void gst_video_context_query_set_string (GstQuery * query,
107 const gchar * value);
108 void gst_video_context_query_set_pointer (GstQuery * query,
111 void gst_video_context_query_set_object (GstQuery * query,
117 #endif /* __GST_VIDEO_CONTEXT_H__ */