gstiterator.inc 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. {
  2. /* GStreamer
  3. * Copyright (C) 2004 Wim Taymans <[email protected]>
  4. * Copyright (C) 2011 Sebastian Dröge <[email protected]>
  5. *
  6. * gstiterator.h: Header for GstIterator
  7. *
  8. * This library is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU Library General Public
  10. * License as published by the Free Software Foundation; either
  11. * version 2 of the License, or (at your option) any later version.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * Library General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Library General Public
  19. * License along with this library; if not, write to the
  20. * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  21. * Boston, MA 02110-1301, USA.
  22. */
  23. }
  24. Type
  25. P_GstIterator = ^T_GstIterator;
  26. PGObject = ^TGObject;
  27. PGstIterator = ^TGstIterator;
  28. PGstIterator_autoptr = ^TGstIterator_autoptr;
  29. PGstIterator_listautoptr = ^TGstIterator_listautoptr;
  30. PGstIterator_queueautoptr = ^TGstIterator_queueautoptr;
  31. PGstIterator_slistautoptr = ^TGstIterator_slistautoptr;
  32. PGstIteratorItem = ^TGstIteratorItem;
  33. PGstIteratorResult = ^TGstIteratorResult;
  34. Pguint32 = ^Tguint32;
  35. {$IFDEF FPC}
  36. {$PACKRECORDS C}
  37. {$ENDIF}
  38. TGstIteratorResult = (
  39. GST_ITERATOR_DONE := 0,
  40. GST_ITERATOR_OK := 1,
  41. GST_ITERATOR_RESYNC_ := 2,
  42. GST_ITERATOR_ERROR := 3
  43. );
  44. TGstIteratorItem = (GST_ITERATOR_ITEM_SKIP := 0,GST_ITERATOR_ITEM_PASS := 1,
  45. GST_ITERATOR_ITEM_END := 2);
  46. (* Const before type ignored *)
  47. TGstIteratorCopyFunction = procedure (it:PGstIterator; copy:PGstIterator);cdecl;
  48. (* Const before type ignored *)
  49. TGstIteratorItemFunction = function (it:PGstIterator; item:PGValue):TGstIteratorItem;cdecl;
  50. TGstIteratorNextFunction = function (it:PGstIterator; result:PGValue):TGstIteratorResult;cdecl;
  51. TGstIteratorResyncFunction = procedure (it:PGstIterator);cdecl;
  52. TGstIteratorFreeFunction = procedure (it:PGstIterator);cdecl;
  53. (* Const before type ignored *)
  54. TGstIteratorForeachFunction = procedure (item:PGValue; user_data:Tgpointer);cdecl;
  55. (* Const before type ignored *)
  56. TGstIteratorFoldFunction = function (item:PGValue; ret:PGValue; user_data:Tgpointer):Tgboolean;cdecl;
  57. T_GstIterator = record
  58. copy : TGstIteratorCopyFunction;
  59. next : TGstIteratorNextFunction;
  60. item : TGstIteratorItemFunction;
  61. resync : TGstIteratorResyncFunction;
  62. free : TGstIteratorFreeFunction;
  63. pushed : PGstIterator;
  64. _type : TGType;
  65. lock : PGMutex;
  66. cookie : Tguint32;
  67. master_cookie : Pguint32;
  68. size : Tguint;
  69. _gst_reserved : array[0..3] of Tgpointer;
  70. end;
  71. TGstIterator = T_GstIterator;
  72. TGstIterator_autoptr = PGstIterator;
  73. TGstIterator_listautoptr = PGList;
  74. TGstIterator_slistautoptr = PGSList;
  75. TGstIterator_queueautoptr = PGQueue;
  76. function gst_iterator_get_type:TGType;cdecl;external gstreamerlib name 'gst_iterator_get_type';
  77. function gst_iterator_new(size:Tguint; _type:TGType; lock:PGMutex; master_cookie:Pguint32; copy:TGstIteratorCopyFunction;
  78. next:TGstIteratorNextFunction; item:TGstIteratorItemFunction; resync:TGstIteratorResyncFunction; free:TGstIteratorFreeFunction):PGstIterator;cdecl;external gstreamerlib name 'gst_iterator_new';
  79. function gst_iterator_new_list(_type:TGType; lock:PGMutex; master_cookie:Pguint32; list:PPGList; owner:PGObject;
  80. item:TGstIteratorItemFunction):PGstIterator;cdecl;external gstreamerlib name 'gst_iterator_new_list';
  81. (* Const before type ignored *)
  82. function gst_iterator_new_single(_type:TGType; object_:PGValue):PGstIterator;cdecl;external gstreamerlib name 'gst_iterator_new_single';
  83. (* Const before type ignored *)
  84. function gst_iterator_copy(it:PGstIterator):PGstIterator;cdecl;external gstreamerlib name 'gst_iterator_copy';
  85. function gst_iterator_next(it:PGstIterator; elem:PGValue):TGstIteratorResult;cdecl;external gstreamerlib name 'gst_iterator_next';
  86. procedure gst_iterator_resync(it:PGstIterator);cdecl;external gstreamerlib name 'gst_iterator_resync';
  87. procedure gst_iterator_free(it:PGstIterator);cdecl;external gstreamerlib name 'gst_iterator_free';
  88. procedure gst_iterator_push(it:PGstIterator; other:PGstIterator);cdecl;external gstreamerlib name 'gst_iterator_push';
  89. (* Const before type ignored *)
  90. function gst_iterator_filter(it:PGstIterator; func:TGCompareFunc; user_data:PGValue):PGstIterator;cdecl;external gstreamerlib name 'gst_iterator_filter';
  91. function gst_iterator_fold(it:PGstIterator; func:TGstIteratorFoldFunction; ret:PGValue; user_data:Tgpointer):TGstIteratorResult;cdecl;external gstreamerlib name 'gst_iterator_fold';
  92. function gst_iterator_foreach(it:PGstIterator; func:TGstIteratorForeachFunction; user_data:Tgpointer):TGstIteratorResult;cdecl;external gstreamerlib name 'gst_iterator_foreach';
  93. function gst_iterator_find_custom(it:PGstIterator; func:TGCompareFunc; elem:PGValue; user_data:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_iterator_find_custom';