gsturi.inc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. {
  2. /* GStreamer
  3. * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
  4. * 2000 Wim Taymans <[email protected]>
  5. * 2014 David Waring, British Broadcasting Corporation
  6. * <[email protected]>
  7. *
  8. * gsturi.h: Header for uri to element mappings and URI manipulation.
  9. *
  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.
  14. *
  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.
  19. *
  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., 51 Franklin St, Fifth Floor,
  23. * Boston, MA 02110-1301, USA.
  24. */
  25. }
  26. Type
  27. P_GstUri = ^T_GstUri;
  28. P_GstURIHandlerInterface = ^T_GstURIHandlerInterface;
  29. PGHashTable = ^TGHashTable;
  30. PGstUri = ^TGstUri;
  31. PGstUri_autoptr = ^TGstUri_autoptr;
  32. PGstUri_listautoptr = ^TGstUri_listautoptr;
  33. PGstUri_queueautoptr = ^TGstUri_queueautoptr;
  34. PGstUri_slistautoptr = ^TGstUri_slistautoptr;
  35. PGstURIHandler = ^TGstURIHandler;
  36. TGstURIError = (
  37. GST_URI_ERROR_UNSUPPORTED_PROTOCOL,
  38. GST_URI_ERROR_BAD_URI,
  39. GST_URI_ERROR_BAD_STATE,
  40. GST_URI_ERROR_BAD_REFERENCE
  41. );
  42. TGstURIType = (
  43. GST_URI_UNKNOWN,
  44. GST_URI_SINK,
  45. GST_URI_SRC
  46. );
  47. T_GstURIHandler = record end;
  48. TGstURIHandler = T_GstURIHandler;
  49. T_GstURIHandlerInterface = record
  50. parent : TGTypeInterface;
  51. get_type : function (_type:TGType):TGstURIType;cdecl;
  52. get_protocols : function (_type:TGType):PPgchar;cdecl;
  53. get_uri : function (handler:PGstURIHandler):Pgchar;cdecl;
  54. set_uri : function (handler:PGstURIHandler; uri:Pgchar; error:PPGError):Tgboolean;cdecl;
  55. end;
  56. T_GstUri = record
  57. {undefined structure}
  58. end;
  59. TGstUri = T_GstUri;
  60. TGstUri_autoptr = PGstUri;
  61. TGstUri_listautoptr = PGList;
  62. TGstUri_slistautoptr = PGSList;
  63. TGstUri_queueautoptr = PGQueue;
  64. (* Const before type ignored *)
  65. function gst_uri_protocol_is_valid(protocol:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_protocol_is_valid';
  66. (* Const before type ignored *)
  67. (* Const before type ignored *)
  68. function gst_uri_protocol_is_supported(_type:TGstURIType; protocol:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_protocol_is_supported';
  69. (* Const before type ignored *)
  70. function gst_uri_is_valid(uri:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_is_valid';
  71. (* Const before type ignored *)
  72. function gst_uri_get_protocol(uri:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_protocol';
  73. (* Const before type ignored *)
  74. (* Const before type ignored *)
  75. function gst_uri_has_protocol(uri:Pgchar; protocol:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_has_protocol';
  76. (* Const before type ignored *)
  77. function gst_uri_get_location(uri:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_location';
  78. (* Const before type ignored *)
  79. (* Const before type ignored *)
  80. function gst_uri_construct(protocol:Pgchar; location:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_uri_construct';
  81. (* Const before type ignored *)
  82. function gst_filename_to_uri(filename:Pgchar; error:PPGError):Pgchar;cdecl;external gstreamerlib name 'gst_filename_to_uri';
  83. (* Const before type ignored *)
  84. (* Const before type ignored *)
  85. (* Const before type ignored *)
  86. function gst_element_make_from_uri(_type:TGstURIType; uri:Pgchar; elementname:Pgchar; error:PPGError):PGstElement;cdecl;external gstreamerlib name 'gst_element_make_from_uri';
  87. function gst_uri_handler_get_type:TGType;cdecl;external gstreamerlib name 'gst_uri_handler_get_type';
  88. function gst_uri_handler_get_uri_type(handler:PGstURIHandler):TGstURIType;cdecl;external gstreamerlib name 'gst_uri_handler_get_uri_type';
  89. (* Const before type ignored *)
  90. (* Const before declarator ignored *)
  91. function gst_uri_handler_get_protocols(handler:PGstURIHandler):PPgchar;cdecl;external gstreamerlib name 'gst_uri_handler_get_protocols';
  92. function gst_uri_handler_get_uri(handler:PGstURIHandler):Pgchar;cdecl;external gstreamerlib name 'gst_uri_handler_get_uri';
  93. (* Const before type ignored *)
  94. function gst_uri_handler_set_uri(handler:PGstURIHandler; uri:Pgchar; error:PPGError):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_handler_set_uri';
  95. function gst_uri_get_type:TGType;cdecl;external gstreamerlib name 'gst_uri_get_type';
  96. (* Const before type ignored *)
  97. (* Const before type ignored *)
  98. (* Const before type ignored *)
  99. (* Const before type ignored *)
  100. (* Const before type ignored *)
  101. (* Const before type ignored *)
  102. function gst_uri_new(scheme:Pgchar; userinfo:Pgchar; host:Pgchar; port:Tguint; path:Pgchar;
  103. query:Pgchar; fragment:Pgchar):PGstUri;cdecl;external gstreamerlib name 'gst_uri_new';
  104. (* Const before type ignored *)
  105. (* Const before type ignored *)
  106. (* Const before type ignored *)
  107. (* Const before type ignored *)
  108. (* Const before type ignored *)
  109. (* Const before type ignored *)
  110. function gst_uri_new_with_base(base:PGstUri; scheme:Pgchar; userinfo:Pgchar; host:Pgchar; port:Tguint;
  111. path:Pgchar; query:Pgchar; fragment:Pgchar):PGstUri;cdecl;external gstreamerlib name 'gst_uri_new_with_base';
  112. (* Const before type ignored *)
  113. function gst_uri_from_string(uri:Pgchar):PGstUri;cdecl;external gstreamerlib name 'gst_uri_from_string';
  114. (* Const before type ignored *)
  115. function gst_uri_from_string_with_base(base:PGstUri; uri:Pgchar):PGstUri;cdecl;external gstreamerlib name 'gst_uri_from_string_with_base';
  116. (* Const before type ignored *)
  117. (* Const before type ignored *)
  118. function gst_uri_equal(first:PGstUri; second:PGstUri):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_equal';
  119. function gst_uri_join(base_uri:PGstUri; ref_uri:PGstUri):PGstUri;cdecl;external gstreamerlib name 'gst_uri_join';
  120. (* Const before type ignored *)
  121. (* Const before type ignored *)
  122. function gst_uri_join_strings(base_uri:Pgchar; ref_uri:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_uri_join_strings';
  123. (* Const before type ignored *)
  124. function gst_uri_is_writable(uri:PGstUri):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_is_writable';
  125. function gst_uri_make_writable(uri:PGstUri):PGstUri;cdecl;external gstreamerlib name 'gst_uri_make_writable';
  126. (* Const before type ignored *)
  127. function gst_uri_to_string(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_to_string';
  128. (* Const before type ignored *)
  129. function gst_uri_is_normalized(uri:PGstUri):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_is_normalized';
  130. function gst_uri_normalize(uri:PGstUri):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_normalize';
  131. (* Const before type ignored *)
  132. (* Const before type ignored *)
  133. function gst_uri_get_scheme(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_scheme';
  134. (* Const before type ignored *)
  135. function gst_uri_set_scheme(uri:PGstUri; scheme:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_scheme';
  136. (* Const before type ignored *)
  137. (* Const before type ignored *)
  138. function gst_uri_get_userinfo(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_userinfo';
  139. (* Const before type ignored *)
  140. function gst_uri_set_userinfo(uri:PGstUri; userinfo:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_userinfo';
  141. (* Const before type ignored *)
  142. (* Const before type ignored *)
  143. function gst_uri_get_host(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_host';
  144. (* Const before type ignored *)
  145. function gst_uri_set_host(uri:PGstUri; host:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_host';
  146. (* Const before type ignored *)
  147. function gst_uri_get_port(uri:PGstUri):Tguint;cdecl;external gstreamerlib name 'gst_uri_get_port';
  148. function gst_uri_set_port(uri:PGstUri; port:Tguint):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_port';
  149. (* Const before type ignored *)
  150. function gst_uri_get_path(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_path';
  151. (* Const before type ignored *)
  152. function gst_uri_set_path(uri:PGstUri; path:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_path';
  153. (* Const before type ignored *)
  154. function gst_uri_get_path_string(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_path_string';
  155. (* Const before type ignored *)
  156. function gst_uri_set_path_string(uri:PGstUri; path:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_path_string';
  157. (* Const before type ignored *)
  158. function gst_uri_get_path_segments(uri:PGstUri):PGList;cdecl;external gstreamerlib name 'gst_uri_get_path_segments';
  159. function gst_uri_set_path_segments(uri:PGstUri; path_segments:PGList):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_path_segments';
  160. (* Const before type ignored *)
  161. function gst_uri_append_path(uri:PGstUri; relative_path:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_append_path';
  162. (* Const before type ignored *)
  163. function gst_uri_append_path_segment(uri:PGstUri; path_segment:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_append_path_segment';
  164. (* Const before type ignored *)
  165. function gst_uri_get_query_string(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_query_string';
  166. (* Const before type ignored *)
  167. function gst_uri_set_query_string(uri:PGstUri; query:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_query_string';
  168. (* Const before type ignored *)
  169. function gst_uri_get_query_table(uri:PGstUri):PGHashTable;cdecl;external gstreamerlib name 'gst_uri_get_query_table';
  170. function gst_uri_set_query_table(uri:PGstUri; query_table:PGHashTable):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_query_table';
  171. (* Const before type ignored *)
  172. (* Const before type ignored *)
  173. function gst_uri_set_query_value(uri:PGstUri; query_key:Pgchar; query_value:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_query_value';
  174. (* Const before type ignored *)
  175. function gst_uri_remove_query_key(uri:PGstUri; query_key:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_remove_query_key';
  176. (* Const before type ignored *)
  177. (* Const before type ignored *)
  178. function gst_uri_query_has_key(uri:PGstUri; query_key:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_query_has_key';
  179. (* Const before type ignored *)
  180. (* Const before type ignored *)
  181. (* Const before type ignored *)
  182. function gst_uri_get_query_value(uri:PGstUri; query_key:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_query_value';
  183. (* Const before type ignored *)
  184. function gst_uri_get_query_keys(uri:PGstUri):PGList;cdecl;external gstreamerlib name 'gst_uri_get_query_keys';
  185. (* Const before type ignored *)
  186. (* Const before type ignored *)
  187. function gst_uri_get_fragment(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_fragment';
  188. (* Const before type ignored *)
  189. function gst_uri_set_fragment(uri:PGstUri; fragment:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_fragment';
  190. (* Const before type ignored *)
  191. function gst_uri_get_media_fragment_table(uri:PGstUri):PGHashTable;cdecl;external gstreamerlib name 'gst_uri_get_media_fragment_table';
  192. {
  193. static inline GstUri *
  194. gst_uri_copy (const GstUri * uri)
  195. return ((GstUri *)(gst_mini_object_copy (((const GstMiniObject*)(uri)))));
  196. # 373 "gsturi.h"
  197. static inline GstUri *
  198. gst_uri_ref (GstUri * uri)
  199. return ((GstUri *)(gst_mini_object_ref (((GstMiniObject*)(uri)))));
  200. # 389 "gsturi.h"
  201. static inline void
  202. gst_uri_unref (GstUri * uri)
  203. gst_mini_object_unref (((GstMiniObject*)(uri)));
  204. }