gstquery.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  1. /* GStreamer
  2. * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
  3. * 2000 Wim Taymans <[email protected]>
  4. * 2005 Wim Taymans <[email protected]>
  5. * 2011 Wim Taymans <[email protected]>
  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. #ifdef _FOOL_GTK_DOC_
  189. G_INLINE_FUNC GstQuery * gst_query_ref (GstQuery * q);
  190. #endif
  191. static inline GstQuery *
  192. gst_query_ref (GstQuery * q)
  193. {
  194. return GST_QUERY_CAST (gst_mini_object_ref (GST_MINI_OBJECT_CAST (q)));
  195. }
  196. /**
  197. * gst_query_unref:
  198. * @q: a #GstQuery to decrease the refcount of.
  199. *
  200. * Decreases the refcount of the query. If the refcount reaches 0, the query
  201. * will be freed.
  202. */
  203. #ifdef _FOOL_GTK_DOC_
  204. G_INLINE_FUNC void gst_query_unref (GstQuery * q);
  205. #endif
  206. static inline void
  207. gst_query_unref (GstQuery * q)
  208. {
  209. gst_mini_object_unref (GST_MINI_OBJECT_CAST (q));
  210. }
  211. /* copy query */
  212. /**
  213. * gst_query_copy:
  214. * @q: a #GstQuery to copy.
  215. *
  216. * Copies the given query using the copy function of the parent #GstStructure.
  217. *
  218. * Free-function: gst_query_unref
  219. *
  220. * Returns: (transfer full): a new copy of @q.
  221. */
  222. #ifdef _FOOL_GTK_DOC_
  223. G_INLINE_FUNC GstQuery * gst_query_copy (const GstQuery * q);
  224. #endif
  225. static inline GstQuery *
  226. gst_query_copy (const GstQuery * q)
  227. {
  228. return GST_QUERY_CAST (gst_mini_object_copy (GST_MINI_OBJECT_CONST_CAST (q)));
  229. }
  230. /**
  231. * gst_query_is_writable:
  232. * @q: a #GstQuery
  233. *
  234. * Tests if you can safely write data into a query's structure.
  235. */
  236. #define gst_query_is_writable(q) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (q))
  237. /**
  238. * gst_query_make_writable:
  239. * @q: (transfer full): a #GstQuery to make writable
  240. *
  241. * Makes a writable query from the given query.
  242. *
  243. * Returns: (transfer full): a new writable query (possibly same as @q)
  244. */
  245. #define gst_query_make_writable(q) GST_QUERY_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (q)))
  246. /**
  247. * gst_query_replace:
  248. * @old_query: (inout) (transfer full) (nullable): pointer to a pointer to a
  249. * #GstQuery to be replaced.
  250. * @new_query: (allow-none) (transfer none): pointer to a #GstQuery that will
  251. * replace the query pointed to by @old_query.
  252. *
  253. * Modifies a pointer to a #GstQuery to point to a different #GstQuery. The
  254. * modification is done atomically (so this is useful for ensuring thread safety
  255. * in some cases), and the reference counts are updated appropriately (the old
  256. * query is unreffed, the new one is reffed).
  257. *
  258. * Either @new_query or the #GstQuery pointed to by @old_query may be %NULL.
  259. *
  260. * Returns: %TRUE if @new_query was different from @old_query
  261. */
  262. #ifdef _FOOL_GTK_DOC_
  263. G_INLINE_FUNC gboolean gst_query_replace (GstQuery **old_query, GstQuery *new_query);
  264. #endif
  265. static inline gboolean
  266. gst_query_replace (GstQuery **old_query, GstQuery *new_query)
  267. {
  268. return gst_mini_object_replace ((GstMiniObject **) old_query, (GstMiniObject *) new_query);
  269. }
  270. /* application specific query */
  271. GstQuery * gst_query_new_custom (GstQueryType type, GstStructure *structure) G_GNUC_MALLOC;
  272. const GstStructure *
  273. gst_query_get_structure (GstQuery *query);
  274. GstStructure * gst_query_writable_structure (GstQuery *query);
  275. /* position query */
  276. GstQuery* gst_query_new_position (GstFormat format) G_GNUC_MALLOC;
  277. void gst_query_set_position (GstQuery *query, GstFormat format, gint64 cur);
  278. void gst_query_parse_position (GstQuery *query, GstFormat *format, gint64 *cur);
  279. /* duration query */
  280. GstQuery* gst_query_new_duration (GstFormat format) G_GNUC_MALLOC;
  281. void gst_query_set_duration (GstQuery *query, GstFormat format, gint64 duration);
  282. void gst_query_parse_duration (GstQuery *query, GstFormat *format, gint64 *duration);
  283. /* latency query */
  284. GstQuery* gst_query_new_latency (void) G_GNUC_MALLOC;
  285. void gst_query_set_latency (GstQuery *query, gboolean live, GstClockTime min_latency,
  286. GstClockTime max_latency);
  287. void gst_query_parse_latency (GstQuery *query, gboolean *live, GstClockTime *min_latency,
  288. GstClockTime *max_latency);
  289. /* convert query */
  290. GstQuery* gst_query_new_convert (GstFormat src_format, gint64 value, GstFormat dest_format) G_GNUC_MALLOC;
  291. void gst_query_set_convert (GstQuery *query, GstFormat src_format, gint64 src_value,
  292. GstFormat dest_format, gint64 dest_value);
  293. void gst_query_parse_convert (GstQuery *query, GstFormat *src_format, gint64 *src_value,
  294. GstFormat *dest_format, gint64 *dest_value);
  295. /* segment query */
  296. GstQuery* gst_query_new_segment (GstFormat format) G_GNUC_MALLOC;
  297. void gst_query_set_segment (GstQuery *query, gdouble rate, GstFormat format,
  298. gint64 start_value, gint64 stop_value);
  299. void gst_query_parse_segment (GstQuery *query, gdouble *rate, GstFormat *format,
  300. gint64 *start_value, gint64 *stop_value);
  301. /* seeking query */
  302. GstQuery* gst_query_new_seeking (GstFormat format) G_GNUC_MALLOC;
  303. void gst_query_set_seeking (GstQuery *query, GstFormat format,
  304. gboolean seekable,
  305. gint64 segment_start,
  306. gint64 segment_end);
  307. void gst_query_parse_seeking (GstQuery *query, GstFormat *format,
  308. gboolean *seekable,
  309. gint64 *segment_start,
  310. gint64 *segment_end);
  311. /* formats query */
  312. GstQuery* gst_query_new_formats (void) G_GNUC_MALLOC;
  313. void gst_query_set_formats (GstQuery *query, gint n_formats, ...);
  314. void gst_query_set_formatsv (GstQuery *query, gint n_formats, const GstFormat *formats);
  315. void gst_query_parse_n_formats (GstQuery *query, guint *n_formats);
  316. void gst_query_parse_nth_format (GstQuery *query, guint nth, GstFormat *format);
  317. /* buffering query */
  318. /**
  319. * GstBufferingMode:
  320. * @GST_BUFFERING_STREAM: a small amount of data is buffered
  321. * @GST_BUFFERING_DOWNLOAD: the stream is being downloaded
  322. * @GST_BUFFERING_TIMESHIFT: the stream is being downloaded in a ringbuffer
  323. * @GST_BUFFERING_LIVE: the stream is a live stream
  324. *
  325. * The different types of buffering methods.
  326. */
  327. typedef enum {
  328. GST_BUFFERING_STREAM,
  329. GST_BUFFERING_DOWNLOAD,
  330. GST_BUFFERING_TIMESHIFT,
  331. GST_BUFFERING_LIVE
  332. } GstBufferingMode;
  333. GstQuery* gst_query_new_buffering (GstFormat format) G_GNUC_MALLOC;
  334. void gst_query_set_buffering_percent (GstQuery *query, gboolean busy, gint percent);
  335. void gst_query_parse_buffering_percent (GstQuery *query, gboolean *busy, gint *percent);
  336. void gst_query_set_buffering_stats (GstQuery *query, GstBufferingMode mode,
  337. gint avg_in, gint avg_out,
  338. gint64 buffering_left);
  339. void gst_query_parse_buffering_stats (GstQuery *query, GstBufferingMode *mode,
  340. gint *avg_in, gint *avg_out,
  341. gint64 *buffering_left);
  342. void gst_query_set_buffering_range (GstQuery *query, GstFormat format,
  343. gint64 start, gint64 stop,
  344. gint64 estimated_total);
  345. void gst_query_parse_buffering_range (GstQuery *query, GstFormat *format,
  346. gint64 *start, gint64 *stop,
  347. gint64 *estimated_total);
  348. gboolean gst_query_add_buffering_range (GstQuery *query,
  349. gint64 start, gint64 stop);
  350. guint gst_query_get_n_buffering_ranges (GstQuery *query);
  351. gboolean gst_query_parse_nth_buffering_range (GstQuery *query,
  352. guint index, gint64 *start,
  353. gint64 *stop);
  354. /* URI query */
  355. GstQuery * gst_query_new_uri (void) G_GNUC_MALLOC;
  356. void gst_query_parse_uri (GstQuery *query, gchar **uri);
  357. void gst_query_set_uri (GstQuery *query, const gchar *uri);
  358. void gst_query_parse_uri_redirection (GstQuery *query, gchar **uri);
  359. void gst_query_set_uri_redirection (GstQuery *query, const gchar *uri);
  360. void gst_query_parse_uri_redirection_permanent (GstQuery *query, gboolean * permanent);
  361. void gst_query_set_uri_redirection_permanent (GstQuery *query, gboolean permanent);
  362. /* allocation query */
  363. GstQuery * gst_query_new_allocation (GstCaps *caps, gboolean need_pool) G_GNUC_MALLOC;
  364. void gst_query_parse_allocation (GstQuery *query, GstCaps **caps, gboolean *need_pool);
  365. /* pools */
  366. void gst_query_add_allocation_pool (GstQuery *query, GstBufferPool *pool,
  367. guint size, guint min_buffers,
  368. guint max_buffers);
  369. guint gst_query_get_n_allocation_pools (GstQuery *query);
  370. void gst_query_parse_nth_allocation_pool (GstQuery *query, guint index,
  371. GstBufferPool **pool,
  372. guint *size, guint *min_buffers,
  373. guint *max_buffers);
  374. void gst_query_set_nth_allocation_pool (GstQuery *query, guint index,
  375. GstBufferPool *pool,
  376. guint size, guint min_buffers,
  377. guint max_buffers);
  378. void gst_query_remove_nth_allocation_pool (GstQuery *query, guint index);
  379. /* allocators */
  380. void gst_query_add_allocation_param (GstQuery *query, GstAllocator *allocator,
  381. const GstAllocationParams *params);
  382. guint gst_query_get_n_allocation_params (GstQuery *query);
  383. void gst_query_parse_nth_allocation_param (GstQuery *query, guint index,
  384. GstAllocator **allocator,
  385. GstAllocationParams *params);
  386. void gst_query_set_nth_allocation_param (GstQuery *query, guint index,
  387. GstAllocator *allocator,
  388. const GstAllocationParams *params);
  389. void gst_query_remove_nth_allocation_param (GstQuery *query, guint index);
  390. /* metadata */
  391. void gst_query_add_allocation_meta (GstQuery *query, GType api, const GstStructure *params);
  392. guint gst_query_get_n_allocation_metas (GstQuery *query);
  393. GType gst_query_parse_nth_allocation_meta (GstQuery *query, guint index,
  394. const GstStructure **params);
  395. void gst_query_remove_nth_allocation_meta (GstQuery *query, guint index);
  396. gboolean gst_query_find_allocation_meta (GstQuery *query, GType api, guint *index);
  397. /* scheduling query */
  398. /**
  399. * GstSchedulingFlags:
  400. * @GST_SCHEDULING_FLAG_SEEKABLE: if seeking is possible
  401. * @GST_SCHEDULING_FLAG_SEQUENTIAL: if sequential access is recommended
  402. * @GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED: if bandwidth is limited and buffering possible (since 1.2)
  403. *
  404. * The different scheduling flags.
  405. */
  406. typedef enum {
  407. GST_SCHEDULING_FLAG_SEEKABLE = (1 << 0),
  408. GST_SCHEDULING_FLAG_SEQUENTIAL = (1 << 1),
  409. GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED = (1 << 2)
  410. } GstSchedulingFlags;
  411. GstQuery * gst_query_new_scheduling (void) G_GNUC_MALLOC;
  412. void gst_query_set_scheduling (GstQuery *query, GstSchedulingFlags flags,
  413. gint minsize, gint maxsize, gint align);
  414. void gst_query_parse_scheduling (GstQuery *query, GstSchedulingFlags *flags,
  415. gint *minsize, gint *maxsize, gint *align);
  416. void gst_query_add_scheduling_mode (GstQuery *query, GstPadMode mode);
  417. guint gst_query_get_n_scheduling_modes (GstQuery *query);
  418. GstPadMode gst_query_parse_nth_scheduling_mode (GstQuery *query, guint index);
  419. gboolean gst_query_has_scheduling_mode (GstQuery *query, GstPadMode mode);
  420. gboolean gst_query_has_scheduling_mode_with_flags (GstQuery * query, GstPadMode mode,
  421. GstSchedulingFlags flags);
  422. /* accept-caps query */
  423. GstQuery * gst_query_new_accept_caps (GstCaps *caps) G_GNUC_MALLOC;
  424. void gst_query_parse_accept_caps (GstQuery *query, GstCaps **caps);
  425. void gst_query_set_accept_caps_result (GstQuery *query, gboolean result);
  426. void gst_query_parse_accept_caps_result (GstQuery *query, gboolean *result);
  427. /* caps query */
  428. GstQuery * gst_query_new_caps (GstCaps *filter) G_GNUC_MALLOC;
  429. void gst_query_parse_caps (GstQuery *query, GstCaps **filter);
  430. void gst_query_set_caps_result (GstQuery *query, GstCaps *caps);
  431. void gst_query_parse_caps_result (GstQuery *query, GstCaps **caps);
  432. /* drain query */
  433. GstQuery * gst_query_new_drain (void) G_GNUC_MALLOC;
  434. /* context query */
  435. GstQuery * gst_query_new_context (const gchar * context_type) G_GNUC_MALLOC;
  436. gboolean gst_query_parse_context_type (GstQuery * query, const gchar ** context_type);
  437. void gst_query_set_context (GstQuery *query, GstContext *context);
  438. void gst_query_parse_context (GstQuery *query, GstContext **context);
  439. G_END_DECLS
  440. #endif /* __GST_QUERY_H__ */