*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
#include <gst/gststructure.h>
#include <gst/gstformat.h>
#include <gst/gstpad.h>
+#include <gst/gstallocator.h>
+#include <gst/gsttoc.h>
+#include <gst/gstcontext.h>
G_BEGIN_DECLS
/**
* GST_QUERY_MAKE_TYPE:
* @num: the query number to create
- * @idx: the index in the sticky array
* @flags: the query flags
*
* when making custom query types, use this macro with the num and
* @GST_QUERY_SEGMENT: segment start/stop positions
* @GST_QUERY_CONVERT: convert values between formats
* @GST_QUERY_FORMATS: query supported formats for convert
- * @GST_QUERY_BUFFERING: query available media for efficient seeking. Since
- * 0.10.20.
- * @GST_QUERY_CUSTOM: a custom application or element defined query. Since
- * 0.10.22.
- * @GST_QUERY_URI: query the URI of the source or sink. Since 0.10.22.
+ * @GST_QUERY_BUFFERING: query available media for efficient seeking.
+ * @GST_QUERY_CUSTOM: a custom application or element defined query.
+ * @GST_QUERY_URI: query the URI of the source or sink.
* @GST_QUERY_ALLOCATION: the buffer allocation properties
* @GST_QUERY_SCHEDULING: the scheduling properties
* @GST_QUERY_ACCEPT_CAPS: the accept caps query
* @GST_QUERY_CAPS: the caps query
* @GST_QUERY_DRAIN: wait till all serialized data is consumed downstream
+ * @GST_QUERY_CONTEXT: query the pipeline-local context from
+ * downstream or upstream (since 1.2)
*
* Standard predefined Query types
*/
GST_QUERY_SCHEDULING = GST_QUERY_MAKE_TYPE (150, FLAG(UPSTREAM)),
GST_QUERY_ACCEPT_CAPS = GST_QUERY_MAKE_TYPE (160, FLAG(BOTH)),
GST_QUERY_CAPS = GST_QUERY_MAKE_TYPE (170, FLAG(BOTH)),
- GST_QUERY_DRAIN = GST_QUERY_MAKE_TYPE (180, FLAG(DOWNSTREAM) | FLAG(SERIALIZED))
+ GST_QUERY_DRAIN = GST_QUERY_MAKE_TYPE (180, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
+ GST_QUERY_CONTEXT = GST_QUERY_MAKE_TYPE (190, FLAG(BOTH))
} GstQueryType;
#undef FLAG
* @query: the query to query
*
* Get a constant string representation of the #GstQueryType of the query.
- *
- * Since: 0.10.4
*/
#define GST_QUERY_TYPE_NAME(query) (gst_query_type_get_name(GST_QUERY_TYPE(query)))
* in some cases), and the reference counts are updated appropriately (the old
* query is unreffed, the new one is reffed).
*
- * Either @new_query or the #GstQuery pointed to by @old_query may be NULL.
+ * Either @new_query or the #GstQuery pointed to by @old_query may be %NULL.
*
- * Returns: TRUE if @new_query was different from @old_query
+ * Returns: %TRUE if @new_query was different from @old_query
*/
#ifdef _FOOL_GTK_DOC_
G_INLINE_FUNC gboolean gst_query_replace (GstQuery **old_query, GstQuery *new_query);
gint64 *stop);
/* URI query */
-GstQuery * gst_query_new_uri (void) G_GNUC_MALLOC;
-void gst_query_parse_uri (GstQuery *query, gchar **uri);
-void gst_query_set_uri (GstQuery *query, const gchar *uri);
+GstQuery * gst_query_new_uri (void) G_GNUC_MALLOC;
+void gst_query_parse_uri (GstQuery *query, gchar **uri);
+void gst_query_set_uri (GstQuery *query, const gchar *uri);
+void gst_query_parse_uri_redirection (GstQuery *query, gchar **uri);
+void gst_query_set_uri_redirection (GstQuery *query, const gchar *uri);
+void gst_query_parse_uri_redirection_permanent (GstQuery *query, gboolean * permanent);
+void gst_query_set_uri_redirection_permanent (GstQuery *query, gboolean permanent);
/* allocation query */
-GstQuery * gst_query_new_allocation (GstCaps *caps, gboolean need_pool) G_GNUC_MALLOC;
-void gst_query_parse_allocation (GstQuery *query, GstCaps **caps, gboolean *need_pool);
-
-void gst_query_set_allocation_params (GstQuery *query, guint size, guint min_buffers,
- guint max_buffers, guint prefix, guint padding,
- guint alignment, GstBufferPool *pool);
-void gst_query_parse_allocation_params (GstQuery *query, guint *size, guint *min_buffers,
- guint *max_buffers, guint *prefix, guint *padding,
- guint *alignment, GstBufferPool **pool);
-
-void gst_query_add_allocation_meta (GstQuery *query, GType api);
+GstQuery * gst_query_new_allocation (GstCaps *caps, gboolean need_pool) G_GNUC_MALLOC;
+void gst_query_parse_allocation (GstQuery *query, GstCaps **caps, gboolean *need_pool);
+
+/* pools */
+void gst_query_add_allocation_pool (GstQuery *query, GstBufferPool *pool,
+ guint size, guint min_buffers,
+ guint max_buffers);
+guint gst_query_get_n_allocation_pools (GstQuery *query);
+void gst_query_parse_nth_allocation_pool (GstQuery *query, guint index,
+ GstBufferPool **pool,
+ guint *size, guint *min_buffers,
+ guint *max_buffers);
+void gst_query_set_nth_allocation_pool (GstQuery *query, guint index,
+ GstBufferPool *pool,
+ guint size, guint min_buffers,
+ guint max_buffers);
+void gst_query_remove_nth_allocation_pool (GstQuery *query, guint index);
+
+/* allocators */
+void gst_query_add_allocation_param (GstQuery *query, GstAllocator *allocator,
+ const GstAllocationParams *params);
+guint gst_query_get_n_allocation_params (GstQuery *query);
+void gst_query_parse_nth_allocation_param (GstQuery *query, guint index,
+ GstAllocator **allocator,
+ GstAllocationParams *params);
+void gst_query_set_nth_allocation_param (GstQuery *query, guint index,
+ GstAllocator *allocator,
+ const GstAllocationParams *params);
+void gst_query_remove_nth_allocation_param (GstQuery *query, guint index);
+
+/* metadata */
+void gst_query_add_allocation_meta (GstQuery *query, GType api, const GstStructure *params);
guint gst_query_get_n_allocation_metas (GstQuery *query);
-GType gst_query_parse_nth_allocation_meta (GstQuery *query, guint index);
+GType gst_query_parse_nth_allocation_meta (GstQuery *query, guint index,
+ const GstStructure **params);
void gst_query_remove_nth_allocation_meta (GstQuery *query, guint index);
-gboolean gst_query_has_allocation_meta (GstQuery *query, GType api);
+gboolean gst_query_find_allocation_meta (GstQuery *query, GType api, guint *index);
-void gst_query_add_allocation_memory (GstQuery *query, GstAllocator *allocator);
-guint gst_query_get_n_allocation_memories (GstQuery *query);
-GstAllocator * gst_query_parse_nth_allocation_memory (GstQuery *query, guint index);
/* scheduling query */
/**
* GstSchedulingFlags:
* @GST_SCHEDULING_FLAG_SEEKABLE: if seeking is possible
* @GST_SCHEDULING_FLAG_SEQUENTIAL: if sequential access is recommended
+ * @GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED: if bandwidth is limited and buffering possible (since 1.2)
*
* The different scheduling flags.
*/
typedef enum {
- GST_SCHEDULING_FLAG_SEEKABLE = (1 << 0),
- GST_SCHEDULING_FLAG_SEQUENTIAL = (1 << 1)
+ GST_SCHEDULING_FLAG_SEEKABLE = (1 << 0),
+ GST_SCHEDULING_FLAG_SEQUENTIAL = (1 << 1),
+ GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED = (1 << 2)
} GstSchedulingFlags;
GstQuery * gst_query_new_scheduling (void) G_GNUC_MALLOC;
guint gst_query_get_n_scheduling_modes (GstQuery *query);
GstPadMode gst_query_parse_nth_scheduling_mode (GstQuery *query, guint index);
gboolean gst_query_has_scheduling_mode (GstQuery *query, GstPadMode mode);
+gboolean gst_query_has_scheduling_mode_with_flags (GstQuery * query, GstPadMode mode,
+ GstSchedulingFlags flags);
/* accept-caps query */
GstQuery * gst_query_new_accept_caps (GstCaps *caps) G_GNUC_MALLOC;
void gst_query_set_caps_result (GstQuery *query, GstCaps *caps);
void gst_query_parse_caps_result (GstQuery *query, GstCaps **caps);
-void gst_query_intersect_caps_result (GstQuery *query, GstCaps *filter,
- GstCapsIntersectMode mode);
/* drain query */
GstQuery * gst_query_new_drain (void) G_GNUC_MALLOC;
+/* context query */
+GstQuery * gst_query_new_context (const gchar * context_type) G_GNUC_MALLOC;
+gboolean gst_query_parse_context_type (GstQuery * query, const gchar ** context_type);
+void gst_query_set_context (GstQuery *query, GstContext *context);
+void gst_query_parse_context (GstQuery *query, GstContext **context);
+
G_END_DECLS
#endif /* __GST_QUERY_H__ */