gstbin.inc 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. {
  2. /* GStreamer
  3. * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
  4. * 2000 Wim Taymans <[email protected]>
  5. *
  6. * gstbin.h: Header for GstBin container object
  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. Const
  25. GST_ELEMENT_FLAG_LAST_BIN = (GST_OBJECT_FLAG_LAST shl 10);
  26. Type
  27. P_GstBin = ^T_GstBin;
  28. P_GstBinClass = ^T_GstBinClass;
  29. PGstBin = ^TGstBin;
  30. PGstBin_autoptr = ^TGstBin_autoptr;
  31. PGstBin_listautoptr = ^TGstBin_listautoptr;
  32. PGstBin_queueautoptr = ^TGstBin_queueautoptr;
  33. PGstBin_slistautoptr = ^TGstBin_slistautoptr;
  34. PGstBinFlags = ^TGstBinFlags;
  35. PGstBinPrivate = ^TGstBinPrivate;
  36. {$IFDEF FPC}
  37. {$PACKRECORDS C}
  38. {$ENDIF}
  39. TGstBinPrivate = record end;
  40. TGstBinFlags = (
  41. GST_BIN_FLAG_NO_RESYNC := GST_ELEMENT_FLAG_LAST_BIN shl 0,
  42. GST_BIN_FLAG_STREAMS_AWARE := GST_ELEMENT_FLAG_LAST_BIN shl 1,
  43. GST_BIN_FLAG_LAST := GST_ELEMENT_FLAG_LAST_BIN shl 5);
  44. T_GstBin = record
  45. element : TGstElement;
  46. numchildren : Tgint;
  47. children : PGList;
  48. children_cookie : Tguint32;
  49. child_bus : PGstBus;
  50. messages : PGList;
  51. polling : Tgboolean;
  52. state_dirty : Tgboolean;
  53. clock_dirty : Tgboolean;
  54. provided_clock : PGstClock;
  55. clock_provider : PGstElement;
  56. priv : PGstBinPrivate;
  57. _gst_reserved : array[0..3] of Tgpointer;
  58. end;
  59. TGstBin = T_GstBin;
  60. T_GstBinClass = record
  61. parent_class : TGstElementClass;
  62. pool : PGThreadPool;
  63. element_added : procedure (bin:PGstBin; child:PGstElement);cdecl;
  64. element_removed : procedure (bin:PGstBin; child:PGstElement);cdecl;
  65. add_element : function (bin:PGstBin; element:PGstElement):Tgboolean;cdecl;
  66. remove_element : function (bin:PGstBin; element:PGstElement):Tgboolean;cdecl;
  67. handle_message : procedure (bin:PGstBin; message:PGstMessage);cdecl;
  68. do_latency : function (bin:PGstBin):Tgboolean;cdecl;
  69. deep_element_added : procedure (bin:PGstBin; sub_bin:PGstBin; child:PGstElement);cdecl;
  70. deep_element_removed : procedure (bin:PGstBin; sub_bin:PGstBin; child:PGstElement);cdecl;
  71. _gst_reserved : array[0..(4-2)-1] of Tgpointer;
  72. end;
  73. TGstBinClass = T_GstBinClass;
  74. PGstBinClass = ^TGstBinClass;
  75. TGstBin_autoptr = PGstBin;
  76. TGstBin_listautoptr = PGList;
  77. TGstBin_slistautoptr = PGSList;
  78. TGstBin_queueautoptr = PGQueue;
  79. function gst_bin_get_type:TGType;cdecl;external gstreamerlib name 'gst_bin_get_type';
  80. function gst_bin_new(name:Pgchar):PGstElement;cdecl;external gstreamerlib name 'gst_bin_new';
  81. function gst_bin_add(bin:PGstBin; element:PGstElement):Tgboolean;cdecl;external gstreamerlib name 'gst_bin_add';
  82. function gst_bin_remove(bin:PGstBin; element:PGstElement):Tgboolean;cdecl;external gstreamerlib name 'gst_bin_remove';
  83. function gst_bin_get_by_name(bin:PGstBin; name:Pgchar):PGstElement;cdecl;external gstreamerlib name 'gst_bin_get_by_name';
  84. function gst_bin_get_by_name_recurse_up(bin:PGstBin; name:Pgchar):PGstElement;cdecl;external gstreamerlib name 'gst_bin_get_by_name_recurse_up';
  85. function gst_bin_get_by_interface(bin:PGstBin; iface:TGType):PGstElement;cdecl;external gstreamerlib name 'gst_bin_get_by_interface';
  86. function gst_bin_iterate_elements(bin:PGstBin):PGstIterator;cdecl;external gstreamerlib name 'gst_bin_iterate_elements';
  87. function gst_bin_iterate_sorted(bin:PGstBin):PGstIterator;cdecl;external gstreamerlib name 'gst_bin_iterate_sorted';
  88. function gst_bin_iterate_recurse(bin:PGstBin):PGstIterator;cdecl;external gstreamerlib name 'gst_bin_iterate_recurse';
  89. function gst_bin_iterate_sinks(bin:PGstBin):PGstIterator;cdecl;external gstreamerlib name 'gst_bin_iterate_sinks';
  90. function gst_bin_iterate_sources(bin:PGstBin):PGstIterator;cdecl;external gstreamerlib name 'gst_bin_iterate_sources';
  91. function gst_bin_iterate_all_by_interface(bin:PGstBin; iface:TGType):PGstIterator;cdecl;external gstreamerlib name 'gst_bin_iterate_all_by_interface';
  92. function gst_bin_recalculate_latency(bin:PGstBin):Tgboolean;cdecl;external gstreamerlib name 'gst_bin_recalculate_latency';
  93. procedure gst_bin_set_suppressed_flags(bin:PGstBin; flags:TGstElementFlags);cdecl;external gstreamerlib name 'gst_bin_set_suppressed_flags';
  94. function gst_bin_get_suppressed_flags(bin:PGstBin):TGstElementFlags;cdecl;external gstreamerlib name 'gst_bin_get_suppressed_flags';
  95. { macros }
  96. Function GST_TYPE_BIN : TGType;
  97. function GST_IS_BIN(obj : pointer) : boolean;
  98. Function GST_BIN(obj : Pointer) : PgstBin;
  99. Function GST_BIN_CAST(obj : Pointer) : PGstBin;
  100. Function GST_IS_BIN_CLASS(klass: pointer) : Boolean;
  101. Function GST_BIN_GET_CLASS(obj : Pointer) : PGstBinClass;
  102. Function GST_BIN_CLASS(klass : Pointer) : PGstBinClass;