1/* GStreamer
2 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3 * 2000 Wim Taymans <wim.taymans@chello.be>
4 * 2005 Wim Taymans <wim@fluendo.com>
5 * 2011 Wim Taymans <wim.taymans@gmail.com>
6 *
7 * gstquery.h: GstQuery API declaration
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details.
18 *
19 * You should have received a copy of the GNU Library General Public
20 * License along with this library; if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
23 */
24
25
26#ifndef __GST_QUERY_H__
27#define __GST_QUERY_H__
28
29#include <glib.h>
30#include <glib-object.h>
31#include <gst/gstconfig.h>
32
33G_BEGIN_DECLS
34
35typedef struct _GstQuery GstQuery;
36
37#include <gst/gstminiobject.h>
38
39/**
40 * GstQueryTypeFlags:
41 * @GST_QUERY_TYPE_UPSTREAM: Set if the query can travel upstream.
42 * @GST_QUERY_TYPE_DOWNSTREAM: Set if the query can travel downstream.
43 * @GST_QUERY_TYPE_SERIALIZED: Set if the query should be serialized with data
44 * flow.
45 *
46 * #GstQueryTypeFlags indicate the aspects of the different #GstQueryType
47 * values. You can get the type flags of a #GstQueryType with the
48 * gst_query_type_get_flags() function.
49 */
50typedef enum {
51 GST_QUERY_TYPE_UPSTREAM = 1 << 0,
52 GST_QUERY_TYPE_DOWNSTREAM = 1 << 1,
53 GST_QUERY_TYPE_SERIALIZED = 1 << 2
54} GstQueryTypeFlags;
55
56/**
57 * GST_QUERY_TYPE_BOTH: (value 3) (type GstQueryTypeFlags)
58 *
59 * The same thing as #GST_QUERY_TYPE_UPSTREAM | #GST_QUERY_TYPE_DOWNSTREAM.
60 */
61#define GST_QUERY_TYPE_BOTH \
62 ((GstQueryTypeFlags)(GST_QUERY_TYPE_UPSTREAM | GST_QUERY_TYPE_DOWNSTREAM))
63
64#define GST_QUERY_NUM_SHIFT (8)
65
66/**
67 * GST_QUERY_MAKE_TYPE:
68 * @num: the query number to create
69 * @flags: the query flags
70 *
71 * when making custom query types, use this macro with the num and
72 * the given flags
73 */
74#define GST_QUERY_MAKE_TYPE(num,flags) \
75 (((num) << GST_QUERY_NUM_SHIFT) | (flags))
76
77#define _FLAG(name) GST_QUERY_TYPE_##name
78
79
80/**
81 * GstQueryType:
82 * @GST_QUERY_UNKNOWN: unknown query type
83 * @GST_QUERY_POSITION: current position in stream
84 * @GST_QUERY_DURATION: total duration of the stream
85 * @GST_QUERY_LATENCY: latency of stream
86 * @GST_QUERY_JITTER: current jitter of stream
87 * @GST_QUERY_RATE: current rate of the stream
88 * @GST_QUERY_SEEKING: seeking capabilities
89 * @GST_QUERY_SEGMENT: segment start/stop positions
90 * @GST_QUERY_CONVERT: convert values between formats
91 * @GST_QUERY_FORMATS: query supported formats for convert
92 * @GST_QUERY_BUFFERING: query available media for efficient seeking.
93 * @GST_QUERY_CUSTOM: a custom application or element defined query.
94 * @GST_QUERY_URI: query the URI of the source or sink.
95 * @GST_QUERY_ALLOCATION: the buffer allocation properties
96 * @GST_QUERY_SCHEDULING: the scheduling properties
97 * @GST_QUERY_ACCEPT_CAPS: the accept caps query
98 * @GST_QUERY_CAPS: the caps query
99 * @GST_QUERY_DRAIN: wait till all serialized data is consumed downstream
100 * @GST_QUERY_CONTEXT: query the pipeline-local context from
101 * downstream or upstream (since 1.2)
102 * @GST_QUERY_BITRATE: the bitrate query (since 1.16)
103 *
104 * Standard predefined Query types
105 */
106/* NOTE: don't forget to update the table in gstquery.c when changing
107 * this enum */
108typedef enum {
109 GST_QUERY_UNKNOWN = GST_QUERY_MAKE_TYPE (0, 0),
110 GST_QUERY_POSITION = GST_QUERY_MAKE_TYPE (10, _FLAG(BOTH)),
111 GST_QUERY_DURATION = GST_QUERY_MAKE_TYPE (20, _FLAG(BOTH)),
112 GST_QUERY_LATENCY = GST_QUERY_MAKE_TYPE (30, _FLAG(BOTH)),
113 GST_QUERY_JITTER = GST_QUERY_MAKE_TYPE (40, _FLAG(BOTH)),
114 GST_QUERY_RATE = GST_QUERY_MAKE_TYPE (50, _FLAG(BOTH)),
115 GST_QUERY_SEEKING = GST_QUERY_MAKE_TYPE (60, _FLAG(BOTH)),
116 GST_QUERY_SEGMENT = GST_QUERY_MAKE_TYPE (70, _FLAG(BOTH)),
117 GST_QUERY_CONVERT = GST_QUERY_MAKE_TYPE (80, _FLAG(BOTH)),
118 GST_QUERY_FORMATS = GST_QUERY_MAKE_TYPE (90, _FLAG(BOTH)),
119 GST_QUERY_BUFFERING = GST_QUERY_MAKE_TYPE (110, _FLAG(BOTH)),
120 GST_QUERY_CUSTOM = GST_QUERY_MAKE_TYPE (120, _FLAG(BOTH)),
121 GST_QUERY_URI = GST_QUERY_MAKE_TYPE (130, _FLAG(BOTH)),
122 GST_QUERY_ALLOCATION = GST_QUERY_MAKE_TYPE (140, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED)),
123 GST_QUERY_SCHEDULING = GST_QUERY_MAKE_TYPE (150, _FLAG(UPSTREAM)),
124 GST_QUERY_ACCEPT_CAPS = GST_QUERY_MAKE_TYPE (160, _FLAG(BOTH)),
125 GST_QUERY_CAPS = GST_QUERY_MAKE_TYPE (170, _FLAG(BOTH)),
126 GST_QUERY_DRAIN = GST_QUERY_MAKE_TYPE (180, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED)),
127 GST_QUERY_CONTEXT = GST_QUERY_MAKE_TYPE (190, _FLAG(BOTH)),
128 GST_QUERY_BITRATE = GST_QUERY_MAKE_TYPE (200, _FLAG(DOWNSTREAM)),
129} GstQueryType;
130#undef _FLAG
131
132GST_API GType _gst_query_type;
133
134#define GST_TYPE_QUERY (_gst_query_type)
135#define GST_IS_QUERY(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_QUERY))
136#define GST_QUERY_CAST(obj) ((GstQuery*)(obj))
137#define GST_QUERY(obj) (GST_QUERY_CAST(obj))
138
139/**
140 * GST_QUERY_TYPE:
141 * @query: the query to query
142 *
143 * Get the #GstQueryType of the query.
144 */
145#define GST_QUERY_TYPE(query) (((GstQuery*)(query))->type)
146
147/**
148 * GST_QUERY_TYPE_NAME:
149 * @query: the query to query
150 *
151 * Get a constant string representation of the #GstQueryType of the query.
152 */
153#define GST_QUERY_TYPE_NAME(query) (gst_query_type_get_name(GST_QUERY_TYPE(query)))
154
155/**
156 * GST_QUERY_IS_UPSTREAM:
157 * @ev: the query to query
158 *
159 * Check if an query can travel upstream.
160 */
161#define GST_QUERY_IS_UPSTREAM(ev) !!(GST_QUERY_TYPE (ev) & GST_QUERY_TYPE_UPSTREAM)
162/**
163 * GST_QUERY_IS_DOWNSTREAM:
164 * @ev: the query to query
165 *
166 * Check if an query can travel downstream.
167 */
168#define GST_QUERY_IS_DOWNSTREAM(ev) !!(GST_QUERY_TYPE (ev) & GST_QUERY_TYPE_DOWNSTREAM)
169/**
170 * GST_QUERY_IS_SERIALIZED:
171 * @ev: the query to query
172 *
173 * Check if an query is serialized with the data stream.
174 */
175#define GST_QUERY_IS_SERIALIZED(ev) !!(GST_QUERY_TYPE (ev) & GST_QUERY_TYPE_SERIALIZED)
176
177
178/**
179 * GstQuery:
180 * @mini_object: The parent #GstMiniObject type
181 * @type: the #GstQueryType
182 *
183 * The #GstQuery structure.
184 */
185struct _GstQuery
186{
187 GstMiniObject mini_object;
188
189 /*< public > *//* with COW */
190 GstQueryType type;
191};
192
193/**
194 * GstBufferingMode:
195 * @GST_BUFFERING_STREAM: a small amount of data is buffered
196 * @GST_BUFFERING_DOWNLOAD: the stream is being downloaded
197 * @GST_BUFFERING_TIMESHIFT: the stream is being downloaded in a ringbuffer
198 * @GST_BUFFERING_LIVE: the stream is a live stream
199 *
200 * The different types of buffering methods.
201 */
202typedef enum {
203 GST_BUFFERING_STREAM,
204 GST_BUFFERING_DOWNLOAD,
205 GST_BUFFERING_TIMESHIFT,
206 GST_BUFFERING_LIVE
207} GstBufferingMode;
208
209#include <gst/gstiterator.h>
210#include <gst/gststructure.h>
211#include <gst/gstformat.h>
212#include <gst/gstpad.h>
213#include <gst/gstallocator.h>
214#include <gst/gsttoc.h>
215#include <gst/gstcontext.h>
216
217GST_API
218const gchar* gst_query_type_get_name (GstQueryType type);
219
220GST_API
221GQuark gst_query_type_to_quark (GstQueryType type);
222
223GST_API
224GstQueryTypeFlags
225 gst_query_type_get_flags (GstQueryType type);
226
227
228GST_API
229GType gst_query_get_type (void);
230
231#ifndef GST_DISABLE_MINIOBJECT_INLINE_FUNCTIONS
232/* refcounting */
233static inline GstQuery *
234gst_query_ref (GstQuery * q)
235{
236 return GST_QUERY_CAST (gst_mini_object_ref (GST_MINI_OBJECT_CAST (q)));
237}
238
239static inline void
240gst_query_unref (GstQuery * q)
241{
242 gst_mini_object_unref (GST_MINI_OBJECT_CAST (q));
243}
244
245static inline void
246gst_clear_query (GstQuery ** query_ptr)
247{
248 gst_clear_mini_object ((GstMiniObject **) query_ptr);
249}
250
251/* copy query */
252static inline GstQuery *
253gst_query_copy (const GstQuery * q)
254{
255 return GST_QUERY_CAST (gst_mini_object_copy (GST_MINI_OBJECT_CONST_CAST (q)));
256}
257#else /* GST_DISABLE_MINIOBJECT_INLINE_FUNCTIONS */
258GST_API
259GstQuery * gst_query_ref (GstQuery * q);
260
261GST_API
262void gst_query_unref (GstQuery * q);
263
264GST_API
265void gst_clear_query (GstQuery ** query_ptr);
266
267GST_API
268GstQuery * gst_query_copy (const GstQuery * q);
269#endif /* GST_DISABLE_MINIOBJECT_INLINE_FUNCTIONS */
270
271/**
272 * gst_query_is_writable:
273 * @q: a #GstQuery
274 *
275 * Tests if you can safely write data into a query's structure.
276 */
277#define gst_query_is_writable(q) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (q))
278/**
279 * gst_query_make_writable:
280 * @q: (transfer full): a #GstQuery to make writable
281 *
282 * Makes a writable query from the given query.
283 *
284 * Returns: (transfer full): a new writable query (possibly same as @q)
285 */
286#define gst_query_make_writable(q) GST_QUERY_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (q)))
287
288#ifndef GST_DISABLE_MINIOBJECT_INLINE_FUNCTIONS
289static inline gboolean
290gst_query_replace (GstQuery **old_query, GstQuery *new_query)
291{
292 return gst_mini_object_replace (olddata: (GstMiniObject **) old_query, newdata: (GstMiniObject *) new_query);
293}
294
295static inline gboolean
296gst_query_take (GstQuery **old_query, GstQuery *new_query)
297{
298 return gst_mini_object_take (olddata: (GstMiniObject **) old_query,
299 newdata: (GstMiniObject *) new_query);
300}
301#else /* GST_DISABLE_MINIOBJECT_INLINE_FUNCTIONS */
302GST_API
303gboolean gst_query_replace (GstQuery ** old_query,
304 GstQuery * new_query);
305
306GST_API
307gboolean gst_query_take (GstQuery ** old_query,
308 GstQuery * new_query);
309#endif /* GST_DISABLE_MINIOBJECT_INLINE_FUNCTIONS */
310
311/* application specific query */
312
313GST_API
314GstQuery * gst_query_new_custom (GstQueryType type, GstStructure *structure) G_GNUC_MALLOC;
315
316GST_API
317const GstStructure *
318 gst_query_get_structure (GstQuery *query);
319
320GST_API
321GstStructure * gst_query_writable_structure (GstQuery *query);
322
323/* position query */
324
325GST_API
326GstQuery* gst_query_new_position (GstFormat format) G_GNUC_MALLOC;
327
328GST_API
329void gst_query_set_position (GstQuery *query, GstFormat format, gint64 cur);
330
331GST_API
332void gst_query_parse_position (GstQuery *query, GstFormat *format, gint64 *cur);
333
334/* duration query */
335
336GST_API
337GstQuery* gst_query_new_duration (GstFormat format) G_GNUC_MALLOC;
338
339GST_API
340void gst_query_set_duration (GstQuery *query, GstFormat format, gint64 duration);
341
342GST_API
343void gst_query_parse_duration (GstQuery *query, GstFormat *format, gint64 *duration);
344
345/* latency query */
346
347GST_API
348GstQuery* gst_query_new_latency (void) G_GNUC_MALLOC;
349
350GST_API
351void gst_query_set_latency (GstQuery *query, gboolean live, GstClockTime min_latency,
352 GstClockTime max_latency);
353
354GST_API
355void gst_query_parse_latency (GstQuery *query, gboolean *live, GstClockTime *min_latency,
356 GstClockTime *max_latency);
357
358/* convert query */
359
360GST_API
361GstQuery* gst_query_new_convert (GstFormat src_format, gint64 value, GstFormat dest_format) G_GNUC_MALLOC;
362
363GST_API
364void gst_query_set_convert (GstQuery *query, GstFormat src_format, gint64 src_value,
365 GstFormat dest_format, gint64 dest_value);
366
367GST_API
368void gst_query_parse_convert (GstQuery *query, GstFormat *src_format, gint64 *src_value,
369 GstFormat *dest_format, gint64 *dest_value);
370/* segment query */
371
372GST_API
373GstQuery* gst_query_new_segment (GstFormat format) G_GNUC_MALLOC;
374
375GST_API
376void gst_query_set_segment (GstQuery *query, gdouble rate, GstFormat format,
377 gint64 start_value, gint64 stop_value);
378
379GST_API
380void gst_query_parse_segment (GstQuery *query, gdouble *rate, GstFormat *format,
381 gint64 *start_value, gint64 *stop_value);
382
383/* seeking query */
384
385GST_API
386GstQuery* gst_query_new_seeking (GstFormat format) G_GNUC_MALLOC;
387
388GST_API
389void gst_query_set_seeking (GstQuery *query, GstFormat format,
390 gboolean seekable,
391 gint64 segment_start,
392 gint64 segment_end);
393
394GST_API
395void gst_query_parse_seeking (GstQuery *query, GstFormat *format,
396 gboolean *seekable,
397 gint64 *segment_start,
398 gint64 *segment_end);
399/* formats query */
400
401GST_API
402GstQuery* gst_query_new_formats (void) G_GNUC_MALLOC;
403
404GST_API
405void gst_query_set_formats (GstQuery *query, gint n_formats, ...);
406
407GST_API
408void gst_query_set_formatsv (GstQuery *query, gint n_formats, const GstFormat *formats);
409
410GST_API
411void gst_query_parse_n_formats (GstQuery *query, guint *n_formats);
412
413GST_API
414void gst_query_parse_nth_format (GstQuery *query, guint nth, GstFormat *format);
415
416/* buffering query */
417
418GST_API
419GstQuery* gst_query_new_buffering (GstFormat format) G_GNUC_MALLOC;
420
421GST_API
422void gst_query_set_buffering_percent (GstQuery *query, gboolean busy, gint percent);
423
424GST_API
425void gst_query_parse_buffering_percent (GstQuery *query, gboolean *busy, gint *percent);
426
427GST_API
428void gst_query_set_buffering_stats (GstQuery *query, GstBufferingMode mode,
429 gint avg_in, gint avg_out,
430 gint64 buffering_left);
431
432GST_API
433void gst_query_parse_buffering_stats (GstQuery *query, GstBufferingMode *mode,
434 gint *avg_in, gint *avg_out,
435 gint64 *buffering_left);
436
437GST_API
438void gst_query_set_buffering_range (GstQuery *query, GstFormat format,
439 gint64 start, gint64 stop,
440 gint64 estimated_total);
441
442GST_API
443void gst_query_parse_buffering_range (GstQuery *query, GstFormat *format,
444 gint64 *start, gint64 *stop,
445 gint64 *estimated_total);
446
447GST_API
448gboolean gst_query_add_buffering_range (GstQuery *query,
449 gint64 start, gint64 stop);
450
451GST_API
452guint gst_query_get_n_buffering_ranges (GstQuery *query);
453
454GST_API
455gboolean gst_query_parse_nth_buffering_range (GstQuery *query,
456 guint index, gint64 *start,
457 gint64 *stop);
458
459/* URI query */
460
461GST_API
462GstQuery * gst_query_new_uri (void) G_GNUC_MALLOC;
463
464GST_API
465void gst_query_parse_uri (GstQuery *query, gchar **uri);
466
467GST_API
468void gst_query_set_uri (GstQuery *query, const gchar *uri);
469
470GST_API
471void gst_query_parse_uri_redirection (GstQuery *query, gchar **uri);
472
473GST_API
474void gst_query_set_uri_redirection (GstQuery *query, const gchar *uri);
475
476GST_API
477void gst_query_parse_uri_redirection_permanent (GstQuery *query, gboolean * permanent);
478
479GST_API
480void gst_query_set_uri_redirection_permanent (GstQuery *query, gboolean permanent);
481
482/* allocation query */
483
484GST_API
485GstQuery * gst_query_new_allocation (GstCaps *caps, gboolean need_pool) G_GNUC_MALLOC;
486
487GST_API
488void gst_query_parse_allocation (GstQuery *query, GstCaps **caps, gboolean *need_pool);
489
490/* pools */
491
492GST_API
493void gst_query_add_allocation_pool (GstQuery *query, GstBufferPool *pool,
494 guint size, guint min_buffers,
495 guint max_buffers);
496
497GST_API
498guint gst_query_get_n_allocation_pools (GstQuery *query);
499
500GST_API
501void gst_query_parse_nth_allocation_pool (GstQuery *query, guint index,
502 GstBufferPool **pool,
503 guint *size, guint *min_buffers,
504 guint *max_buffers);
505
506GST_API
507void gst_query_set_nth_allocation_pool (GstQuery *query, guint index,
508 GstBufferPool *pool,
509 guint size, guint min_buffers,
510 guint max_buffers);
511
512GST_API
513void gst_query_remove_nth_allocation_pool (GstQuery *query, guint index);
514
515/* allocators */
516
517GST_API
518void gst_query_add_allocation_param (GstQuery *query, GstAllocator *allocator,
519 const GstAllocationParams *params);
520
521GST_API
522guint gst_query_get_n_allocation_params (GstQuery *query);
523
524GST_API
525void gst_query_parse_nth_allocation_param (GstQuery *query, guint index,
526 GstAllocator **allocator,
527 GstAllocationParams *params);
528
529GST_API
530void gst_query_set_nth_allocation_param (GstQuery *query, guint index,
531 GstAllocator *allocator,
532 const GstAllocationParams *params);
533
534GST_API
535void gst_query_remove_nth_allocation_param (GstQuery *query, guint index);
536
537/* metadata */
538
539GST_API
540void gst_query_add_allocation_meta (GstQuery *query, GType api, const GstStructure *params);
541
542GST_API
543guint gst_query_get_n_allocation_metas (GstQuery *query);
544
545GST_API
546GType gst_query_parse_nth_allocation_meta (GstQuery *query, guint index,
547 const GstStructure **params);
548
549GST_API
550void gst_query_remove_nth_allocation_meta (GstQuery *query, guint index);
551
552GST_API
553gboolean gst_query_find_allocation_meta (GstQuery *query, GType api, guint *index);
554
555
556/* scheduling query */
557/**
558 * GstSchedulingFlags:
559 * @GST_SCHEDULING_FLAG_SEEKABLE: if seeking is possible
560 * @GST_SCHEDULING_FLAG_SEQUENTIAL: if sequential access is recommended
561 * @GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED: if bandwidth is limited and buffering possible (since 1.2)
562 *
563 * The different scheduling flags.
564 */
565typedef enum {
566 GST_SCHEDULING_FLAG_SEEKABLE = (1 << 0),
567 GST_SCHEDULING_FLAG_SEQUENTIAL = (1 << 1),
568 GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED = (1 << 2)
569} GstSchedulingFlags;
570
571GST_API
572GstQuery * gst_query_new_scheduling (void) G_GNUC_MALLOC;
573
574GST_API
575void gst_query_set_scheduling (GstQuery *query, GstSchedulingFlags flags,
576 gint minsize, gint maxsize, gint align);
577
578GST_API
579void gst_query_parse_scheduling (GstQuery *query, GstSchedulingFlags *flags,
580 gint *minsize, gint *maxsize, gint *align);
581
582GST_API
583void gst_query_add_scheduling_mode (GstQuery *query, GstPadMode mode);
584
585GST_API
586guint gst_query_get_n_scheduling_modes (GstQuery *query);
587
588GST_API
589GstPadMode gst_query_parse_nth_scheduling_mode (GstQuery *query, guint index);
590
591GST_API
592gboolean gst_query_has_scheduling_mode (GstQuery *query, GstPadMode mode);
593
594GST_API
595gboolean gst_query_has_scheduling_mode_with_flags (GstQuery * query, GstPadMode mode,
596 GstSchedulingFlags flags);
597
598/* accept-caps query */
599
600GST_API
601GstQuery * gst_query_new_accept_caps (GstCaps *caps) G_GNUC_MALLOC;
602
603GST_API
604void gst_query_parse_accept_caps (GstQuery *query, GstCaps **caps);
605
606GST_API
607void gst_query_set_accept_caps_result (GstQuery *query, gboolean result);
608
609GST_API
610void gst_query_parse_accept_caps_result (GstQuery *query, gboolean *result);
611
612/* caps query */
613
614GST_API
615GstQuery * gst_query_new_caps (GstCaps *filter) G_GNUC_MALLOC;
616
617GST_API
618void gst_query_parse_caps (GstQuery *query, GstCaps **filter);
619
620GST_API
621void gst_query_set_caps_result (GstQuery *query, GstCaps *caps);
622
623GST_API
624void gst_query_parse_caps_result (GstQuery *query, GstCaps **caps);
625
626/* drain query */
627
628GST_API
629GstQuery * gst_query_new_drain (void) G_GNUC_MALLOC;
630
631/* context query */
632
633GST_API
634GstQuery * gst_query_new_context (const gchar * context_type) G_GNUC_MALLOC;
635
636GST_API
637gboolean gst_query_parse_context_type (GstQuery * query, const gchar ** context_type);
638
639GST_API
640void gst_query_set_context (GstQuery *query, GstContext *context);
641
642GST_API
643void gst_query_parse_context (GstQuery *query, GstContext **context);
644
645/* bitrate query */
646
647GST_API
648GstQuery * gst_query_new_bitrate (void) G_GNUC_MALLOC;
649
650GST_API
651void gst_query_set_bitrate (GstQuery * query, guint nominal_bitrate);
652
653GST_API
654void gst_query_parse_bitrate (GstQuery * query, guint * nominal_bitrate);
655
656G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstQuery, gst_query_unref)
657
658G_END_DECLS
659
660#endif /* __GST_QUERY_H__ */
661
662

source code of include/gstreamer-1.0/gst/gstquery.h