gstquery.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  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. #ifndef __GST_QUERY_H__
  25. #define __GST_QUERY_H__
  26. #include <glib.h>
  27. #include <gst/gstiterator.h>
  28. #include <gst/gstminiobject.h>
  29. #include <gst/gststructure.h>
  30. #include <gst/gstformat.h>
  31. #include <gst/gstpad.h>
  32. #include <gst/gstallocator.h>
  33. #include <gst/gsttoc.h>
  34. #include <gst/gstcontext.h>
  35. G_BEGIN_DECLS
  36. typedef struct _GstQuery GstQuery;
  37. /**
  38. * GstQueryTypeFlags:
  39. * @GST_QUERY_TYPE_UPSTREAM: Set if the query can travel upstream.
  40. * @GST_QUERY_TYPE_DOWNSTREAM: Set if the query can travel downstream.
  41. * @GST_QUERY_TYPE_SERIALIZED: Set if the query should be serialized with data
  42. * flow.
  43. *
  44. * #GstQueryTypeFlags indicate the aspects of the different #GstQueryType
  45. * values. You can get the type flags of a #GstQueryType with the
  46. * gst_query_type_get_flags() function.
  47. */
  48. typedef enum {
  49. GST_QUERY_TYPE_UPSTREAM = 1 << 0,
  50. GST_QUERY_TYPE_DOWNSTREAM = 1 << 1,
  51. GST_QUERY_TYPE_SERIALIZED = 1 << 2
  52. } GstQueryTypeFlags;
  53. /**
  54. * GST_QUERY_TYPE_BOTH:
  55. *
  56. * The same thing as #GST_QUERY_TYPE_UPSTREAM | #GST_QUERY_TYPE_DOWNSTREAM.
  57. */
  58. #define GST_QUERY_TYPE_BOTH \
  59. (GST_QUERY_TYPE_UPSTREAM | GST_QUERY_TYPE_DOWNSTREAM)
  60. #define GST_QUERY_NUM_SHIFT (8)
  61. /**
  62. * GST_QUERY_MAKE_TYPE:
  63. * @num: the query number to create
  64. * @flags: the query flags
  65. *
  66. * when making custom query types, use this macro with the num and
  67. * the given flags
  68. */
  69. #define GST_QUERY_MAKE_TYPE(num,flags) \
  70. (((num) << GST_QUERY_NUM_SHIFT) | (flags))
  71. #define FLAG(name) GST_QUERY_TYPE_##name
  72. /**
  73. * GstQueryType:
  74. * @GST_QUERY_UNKNOWN: unknown query type
  75. * @GST_QUERY_POSITION: current position in stream
  76. * @GST_QUERY_DURATION: total duration of the stream
  77. * @GST_QUERY_LATENCY: latency of stream
  78. * @GST_QUERY_JITTER: current jitter of stream
  79. * @GST_QUERY_RATE: current rate of the stream
  80. * @GST_QUERY_SEEKING: seeking capabilities
  81. * @GST_QUERY_SEGMENT: segment start/stop positions
  82. * @GST_QUERY_CONVERT: convert values between formats
  83. * @GST_QUERY_FORMATS: query supported formats for convert
  84. * @GST_QUERY_BUFFERING: query available media for efficient seeking.
  85. * @GST_QUERY_CUSTOM: a custom application or element defined query.
  86. * @GST_QUERY_URI: query the URI of the source or sink.
  87. * @GST_QUERY_ALLOCATION: the buffer allocation properties
  88. * @GST_QUERY_SCHEDULING: the scheduling properties
  89. * @GST_QUERY_ACCEPT_CAPS: the accept caps query
  90. * @GST_QUERY_CAPS: the caps query
  91. * @GST_QUERY_DRAIN: wait till all serialized data is consumed downstream
  92. * @GST_QUERY_CONTEXT: query the pipeline-local context from
  93. * downstream or upstream (since 1.2)
  94. *
  95. * Standard predefined Query types
  96. */
  97. /* NOTE: don't forget to update the table in gstquery.c when changing
  98. * this enum */
  99. typedef enum {
  100. GST_QUERY_UNKNOWN = GST_QUERY_MAKE_TYPE (0, 0),
  101. GST_QUERY_POSITION = GST_QUERY_MAKE_TYPE (10, FLAG(BOTH)),
  102. GST_QUERY_DURATION = GST_QUERY_MAKE_TYPE (20, FLAG(BOTH)),
  103. GST_QUERY_LATENCY = GST_QUERY_MAKE_TYPE (30, FLAG(BOTH)),
  104. GST_QUERY_JITTER = GST_QUERY_MAKE_TYPE (40, FLAG(BOTH)),
  105. GST_QUERY_RATE = GST_QUERY_MAKE_TYPE (50, FLAG(BOTH)),
  106. GST_QUERY_SEEKING = GST_QUERY_MAKE_TYPE (60, FLAG(BOTH)),
  107. GST_QUERY_SEGMENT = GST_QUERY_MAKE_TYPE (70, FLAG(BOTH)),
  108. GST_QUERY_CONVERT = GST_QUERY_MAKE_TYPE (80, FLAG(BOTH)),
  109. GST_QUERY_FORMATS = GST_QUERY_MAKE_TYPE (90, FLAG(BOTH)),
  110. GST_QUERY_BUFFERING = GST_QUERY_MAKE_TYPE (110, FLAG(BOTH)),
  111. GST_QUERY_CUSTOM = GST_QUERY_MAKE_TYPE (120, FLAG(BOTH)),
  112. GST_QUERY_URI = GST_QUERY_MAKE_TYPE (130, FLAG(BOTH)),
  113. GST_QUERY_ALLOCATION = GST_QUERY_MAKE_TYPE (140, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
  114. GST_QUERY_SCHEDULING = GST_QUERY_MAKE_TYPE (150, FLAG(UPSTREAM)),
  115. GST_QUERY_ACCEPT_CAPS = GST_QUERY_MAKE_TYPE (160, FLAG(BOTH)),
  116. GST_QUERY_CAPS = GST_QUERY_MAKE_TYPE (170, FLAG(BOTH)),
  117. GST_QUERY_DRAIN = GST_QUERY_MAKE_TYPE (180, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
  118. GST_QUERY_CONTEXT = GST_QUERY_MAKE_TYPE (190, FLAG(BOTH))
  119. } GstQueryType;
  120. #undef FLAG
  121. GST_EXPORT GType _gst_query_type;
  122. #define GST_TYPE_QUERY (_gst_query_type)
  123. #define GST_IS_QUERY(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_QUERY))
  124. #define GST_QUERY_CAST(obj) ((GstQuery*)(obj))
  125. #define GST_QUERY(obj) (GST_QUERY_CAST(obj))
  126. /**
  127. * GST_QUERY_TYPE:
  128. * @query: the query to query
  129. *
  130. * Get the #GstQueryType of the query.
  131. */
  132. #define GST_QUERY_TYPE(query) (((GstQuery*)(query))->type)
  133. /**
  134. * GST_QUERY_TYPE_NAME:
  135. * @query: the query to query
  136. *
  137. * Get a constant string representation of the #GstQueryType of the query.
  138. */
  139. #define GST_QUERY_TYPE_NAME(query) (gst_query_type_get_name(GST_QUERY_TYPE(query)))
  140. /**
  141. * GST_QUERY_IS_UPSTREAM:
  142. * @ev: the query to query
  143. *
  144. * Check if an query can travel upstream.
  145. */
  146. #define GST_QUERY_IS_UPSTREAM(ev) !!(GST_QUERY_TYPE (ev) & GST_QUERY_TYPE_UPSTREAM)
  147. /**
  148. * GST_QUERY_IS_DOWNSTREAM:
  149. * @ev: the query to query
  150. *
  151. * Check if an query can travel downstream.
  152. */
  153. #define GST_QUERY_IS_DOWNSTREAM(ev) !!(GST_QUERY_TYPE (ev) & GST_QUERY_TYPE_DOWNSTREAM)
  154. /**
  155. * GST_QUERY_IS_SERIALIZED:
  156. * @ev: the query to query
  157. *
  158. * Check if an query is serialized with the data stream.
  159. */
  160. #define GST_QUERY_IS_SERIALIZED(ev) !!(GST_QUERY_TYPE (ev) & GST_QUERY_TYPE_SERIALIZED)
  161. /**
  162. * GstQuery:
  163. * @mini_object: The parent #GstMiniObject type
  164. * @type: the #GstQueryType
  165. *
  166. * The #GstQuery structure.
  167. */
  168. struct _GstQuery
  169. {
  170. GstMiniObject mini_object;
  171. /*< public > *//* with COW */
  172. GstQueryType type;
  173. };
  174. const gchar* gst_query_type_get_name (GstQueryType type);
  175. GQuark gst_query_type_to_quark (GstQueryType type);
  176. GstQueryTypeFlags
  177. gst_query_type_get_flags (GstQueryType type);
  178. GType gst_query_get_type (void);
  179. /* refcounting */
  180. /**
  181. * gst_query_ref:
  182. * @q: a #GstQuery to increase the refcount of.
  183. *
  184. * Increases the refcount of the given query by one.
  185. *
  186. * Returns: @q
  187. */
  188. static inline GstQuery *
  189. gst_query_ref (GstQuery * q)
  190. {
  191. return GST_QUERY_CAST (gst_mini_object_ref (GST_MINI_OBJECT_CAST (q)));
  192. }
  193. /**
  194. * gst_query_unref:
  195. * @q: a #GstQuery to decrease the refcount of.
  196. *
  197. * Decreases the refcount of the query. If the refcount reaches 0, the query
  198. * will be freed.
  199. */
  200. static inline void
  201. gst_query_unref (GstQuery * q)
  202. {
  203. gst_mini_object_unref (GST_MINI_OBJECT_CAST (q));
  204. }
  205. /* copy query */
  206. /**
  207. * gst_query_copy:
  208. * @q: a #GstQuery to copy.
  209. *
  210. * Copies the given query using the copy function of the parent #GstStructure.
  211. *
  212. * Free-function: gst_query_unref
  213. *
  214. * Returns: (transfer full): a new copy of @q.
  215. */
  216. static inline GstQuery *
  217. gst_query_copy (const GstQuery * q)
  218. {
  219. return GST_QUERY_CAST (gst_mini_object_copy (GST_MINI_OBJECT_CONST_CAST (q)));
  220. }
  221. /**
  222. * gst_query_is_writable:
  223. * @q: a #GstQuery
  224. *
  225. * Tests if you can safely write data into a query's structure.
  226. */
  227. #define gst_query_is_writable(q) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (q))
  228. /**
  229. * gst_query_make_writable:
  230. * @q: (transfer full): a #GstQuery to make writable
  231. *
  232. * Makes a writable query from the given query.
  233. *
  234. * Returns: (transfer full): a new writable query (possibly same as @q)
  235. */
  236. #define gst_query_make_writable(q) GST_QUERY_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (q)))
  237. /**
  238. * gst_query_replace:
  239. * @old_query: (inout) (transfer full) (nullable): pointer to a pointer to a
  240. * #GstQuery to be replaced.
  241. * @new_query: (allow-none) (transfer none): pointer to a #GstQuery that will
  242. * replace the query pointed to by @old_query.
  243. *
  244. * Modifies a pointer to a #GstQuery to point to a different #GstQuery. The
  245. * modification is done atomically (so this is useful for ensuring thread safety
  246. * in some cases), and the reference counts are updated appropriately (the old
  247. * query is unreffed, the new one is reffed).
  248. *
  249. * Either @new_query or the #GstQuery pointed to by @old_query may be %NULL.
  250. *
  251. * Returns: %TRUE if @new_query was different from @old_query
  252. */
  253. static inline gboolean
  254. gst_query_replace (GstQuery **old_query, GstQuery *new_query)
  255. {
  256. return gst_mini_object_replace ((GstMiniObject **) old_query, (GstMiniObject *) new_query);
  257. }
  258. /* application specific query */
  259. GstQuery * gst_query_new_custom (GstQueryType type, GstStructure *structure) G_GNUC_MALLOC;
  260. const GstStructure *
  261. gst_query_get_structure (GstQuery *query);
  262. GstStructure * gst_query_writable_structure (GstQuery *query);
  263. /* position query */
  264. GstQuery* gst_query_new_position (GstFormat format) G_GNUC_MALLOC;
  265. void gst_query_set_position (GstQuery *query, GstFormat format, gint64 cur);
  266. void gst_query_parse_position (GstQuery *query, GstFormat *format, gint64 *cur);
  267. /* duration query */
  268. GstQuery* gst_query_new_duration (GstFormat format) G_GNUC_MALLOC;
  269. void gst_query_set_duration (GstQuery *query, GstFormat format, gint64 duration);
  270. void gst_query_parse_duration (GstQuery *query, GstFormat *format, gint64 *duration);
  271. /* latency query */
  272. GstQuery* gst_query_new_latency (void) G_GNUC_MALLOC;
  273. void gst_query_set_latency (GstQuery *query, gboolean live, GstClockTime min_latency,
  274. GstClockTime max_latency);
  275. void gst_query_parse_latency (GstQuery *query, gboolean *live, GstClockTime *min_latency,
  276. GstClockTime *max_latency);
  277. /* convert query */
  278. GstQuery* gst_query_new_convert (GstFormat src_format, gint64 value, GstFormat dest_format) G_GNUC_MALLOC;
  279. void gst_query_set_convert (GstQuery *query, GstFormat src_format, gint64 src_value,
  280. GstFormat dest_format, gint64 dest_value);
  281. void gst_query_parse_convert (GstQuery *query, GstFormat *src_format, gint64 *src_value,
  282. GstFormat *dest_format, gint64 *dest_value);
  283. /* segment query */
  284. GstQuery* gst_query_new_segment (GstFormat format) G_GNUC_MALLOC;
  285. void gst_query_set_segment (GstQuery *query, gdouble rate, GstFormat format,
  286. gint64 start_value, gint64 stop_value);
  287. void gst_query_parse_segment (GstQuery *query, gdouble *rate, GstFormat *format,
  288. gint64 *start_value, gint64 *stop_value);
  289. /* seeking query */
  290. GstQuery* gst_query_new_seeking (GstFormat format) G_GNUC_MALLOC;
  291. void gst_query_set_seeking (GstQuery *query, GstFormat format,
  292. gboolean seekable,
  293. gint64 segment_start,
  294. gint64 segment_end);
  295. void gst_query_parse_seeking (GstQuery *query, GstFormat *format,
  296. gboolean *seekable,
  297. gint64 *segment_start,
  298. gint64 *segment_end);
  299. /* formats query */
  300. GstQuery* gst_query_new_formats (void) G_GNUC_MALLOC;
  301. void gst_query_set_formats (GstQuery *query, gint n_formats, ...);
  302. void gst_query_set_formatsv (GstQuery *query, gint n_formats, const GstFormat *formats);
  303. void gst_query_parse_n_formats (GstQuery *query, guint *n_formats);
  304. void gst_query_parse_nth_format (GstQuery *query, guint nth, GstFormat *format);
  305. /* buffering query */
  306. /**
  307. * GstBufferingMode:
  308. * @GST_BUFFERING_STREAM: a small amount of data is buffered
  309. * @GST_BUFFERING_DOWNLOAD: the stream is being downloaded
  310. * @GST_BUFFERING_TIMESHIFT: the stream is being downloaded in a ringbuffer
  311. * @GST_BUFFERING_LIVE: the stream is a live stream
  312. *
  313. * The different types of buffering methods.
  314. */
  315. typedef enum {
  316. GST_BUFFERING_STREAM,
  317. GST_BUFFERING_DOWNLOAD,
  318. GST_BUFFERING_TIMESHIFT,
  319. GST_BUFFERING_LIVE
  320. } GstBufferingMode;
  321. GstQuery* gst_query_new_buffering (GstFormat format) G_GNUC_MALLOC;
  322. void gst_query_set_buffering_percent (GstQuery *query, gboolean busy, gint percent);
  323. void gst_query_parse_buffering_percent (GstQuery *query, gboolean *busy, gint *percent);
  324. void gst_query_set_buffering_stats (GstQuery *query, GstBufferingMode mode,
  325. gint avg_in, gint avg_out,
  326. gint64 buffering_left);
  327. void gst_query_parse_buffering_stats (GstQuery *query, GstBufferingMode *mode,
  328. gint *avg_in, gint *avg_out,
  329. gint64 *buffering_left);
  330. void gst_query_set_buffering_range (GstQuery *query, GstFormat format,
  331. gint64 start, gint64 stop,
  332. gint64 estimated_total);
  333. void gst_query_parse_buffering_range (GstQuery *query, GstFormat *format,
  334. gint64 *start, gint64 *stop,
  335. gint64 *estimated_total);
  336. gboolean gst_query_add_buffering_range (GstQuery *query,
  337. gint64 start, gint64 stop);
  338. guint gst_query_get_n_buffering_ranges (GstQuery *query);
  339. gboolean gst_query_parse_nth_buffering_range (GstQuery *query,
  340. guint index, gint64 *start,
  341. gint64 *stop);
  342. /* URI query */
  343. GstQuery * gst_query_new_uri (void) G_GNUC_MALLOC;
  344. void gst_query_parse_uri (GstQuery *query, gchar **uri);
  345. void gst_query_set_uri (GstQuery *query, const gchar *uri);
  346. void gst_query_parse_uri_redirection (GstQuery *query, gchar **uri);
  347. void gst_query_set_uri_redirection (GstQuery *query, const gchar *uri);
  348. void gst_query_parse_uri_redirection_permanent (GstQuery *query, gboolean * permanent);
  349. void gst_query_set_uri_redirection_permanent (GstQuery *query, gboolean permanent);
  350. /* allocation query */
  351. GstQuery * gst_query_new_allocation (GstCaps *caps, gboolean need_pool) G_GNUC_MALLOC;
  352. void gst_query_parse_allocation (GstQuery *query, GstCaps **caps, gboolean *need_pool);
  353. /* pools */
  354. void gst_query_add_allocation_pool (GstQuery *query, GstBufferPool *pool,
  355. guint size, guint min_buffers,
  356. guint max_buffers);
  357. guint gst_query_get_n_allocation_pools (GstQuery *query);
  358. void gst_query_parse_nth_allocation_pool (GstQuery *query, guint index,
  359. GstBufferPool **pool,
  360. guint *size, guint *min_buffers,
  361. guint *max_buffers);
  362. void gst_query_set_nth_allocation_pool (GstQuery *query, guint index,
  363. GstBufferPool *pool,
  364. guint size, guint min_buffers,
  365. guint max_buffers);
  366. void gst_query_remove_nth_allocation_pool (GstQuery *query, guint index);
  367. /* allocators */
  368. void gst_query_add_allocation_param (GstQuery *query, GstAllocator *allocator,
  369. const GstAllocationParams *params);
  370. guint gst_query_get_n_allocation_params (GstQuery *query);
  371. void gst_query_parse_nth_allocation_param (GstQuery *query, guint index,
  372. GstAllocator **allocator,
  373. GstAllocationParams *params);
  374. void gst_query_set_nth_allocation_param (GstQuery *query, guint index,
  375. GstAllocator *allocator,
  376. const GstAllocationParams *params);
  377. void gst_query_remove_nth_allocation_param (GstQuery *query, guint index);
  378. /* metadata */
  379. void gst_query_add_allocation_meta (GstQuery *query, GType api, const GstStructure *params);
  380. guint gst_query_get_n_allocation_metas (GstQuery *query);
  381. GType gst_query_parse_nth_allocation_meta (GstQuery *query, guint index,
  382. const GstStructure **params);
  383. void gst_query_remove_nth_allocation_meta (GstQuery *query, guint index);
  384. gboolean gst_query_find_allocation_meta (GstQuery *query, GType api, guint *index);
  385. /* scheduling query */
  386. /**
  387. * GstSchedulingFlags:
  388. * @GST_SCHEDULING_FLAG_SEEKABLE: if seeking is possible
  389. * @GST_SCHEDULING_FLAG_SEQUENTIAL: if sequential access is recommended
  390. * @GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED: if bandwidth is limited and buffering possible (since 1.2)
  391. *
  392. * The different scheduling flags.
  393. */
  394. typedef enum {
  395. GST_SCHEDULING_FLAG_SEEKABLE = (1 << 0),
  396. GST_SCHEDULING_FLAG_SEQUENTIAL = (1 << 1),
  397. GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED = (1 << 2)
  398. } GstSchedulingFlags;
  399. GstQuery * gst_query_new_scheduling (void) G_GNUC_MALLOC;
  400. void gst_query_set_scheduling (GstQuery *query, GstSchedulingFlags flags,
  401. gint minsize, gint maxsize, gint align);
  402. void gst_query_parse_scheduling (GstQuery *query, GstSchedulingFlags *flags,
  403. gint *minsize, gint *maxsize, gint *align);
  404. void gst_query_add_scheduling_mode (GstQuery *query, GstPadMode mode);
  405. guint gst_query_get_n_scheduling_modes (GstQuery *query);
  406. GstPadMode gst_query_parse_nth_scheduling_mode (GstQuery *query, guint index);
  407. gboolean gst_query_has_scheduling_mode (GstQuery *query, GstPadMode mode);
  408. gboolean gst_query_has_scheduling_mode_with_flags (GstQuery * query, GstPadMode mode,
  409. GstSchedulingFlags flags);
  410. /* accept-caps query */
  411. GstQuery * gst_query_new_accept_caps (GstCaps *caps) G_GNUC_MALLOC;
  412. void gst_query_parse_accept_caps (GstQuery *query, GstCaps **caps);
  413. void gst_query_set_accept_caps_result (GstQuery *query, gboolean result);
  414. void gst_query_parse_accept_caps_result (GstQuery *query, gboolean *result);
  415. /* caps query */
  416. GstQuery * gst_query_new_caps (GstCaps *filter) G_GNUC_MALLOC;
  417. void gst_query_parse_caps (GstQuery *query, GstCaps **filter);
  418. void gst_query_set_caps_result (GstQuery *query, GstCaps *caps);
  419. void gst_query_parse_caps_result (GstQuery *query, GstCaps **caps);
  420. /* drain query */
  421. GstQuery * gst_query_new_drain (void) G_GNUC_MALLOC;
  422. /* context query */
  423. GstQuery * gst_query_new_context (const gchar * context_type) G_GNUC_MALLOC;
  424. gboolean gst_query_parse_context_type (GstQuery * query, const gchar ** context_type);
  425. void gst_query_set_context (GstQuery *query, GstContext *context);
  426. void gst_query_parse_context (GstQuery *query, GstContext **context);
  427. #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
  428. G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstQuery, gst_query_unref)
  429. #endif
  430. G_END_DECLS
  431. #endif /* __GST_QUERY_H__ */