gsttask.inc 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. {
  2. /* GStreamer
  3. * Copyright (C) <1999> Erik Walthinsen <[email protected]>
  4. * <2005> Wim Taymans <[email protected]>
  5. *
  6. * gsttask.h: Streaming tasks
  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_GstTask = ^T_GstTask;
  26. P_GstTaskClass = ^T_GstTaskClass;
  27. PGRecMutex = ^TGRecMutex;
  28. PGstTask = ^TGstTask;
  29. PGstTask_autoptr = ^TGstTask_autoptr;
  30. PGstTask_listautoptr = ^TGstTask_listautoptr;
  31. PGstTask_queueautoptr = ^TGstTask_queueautoptr;
  32. PGstTask_slistautoptr = ^TGstTask_slistautoptr;
  33. PGstTaskPrivate = ^TGstTaskPrivate;
  34. PGstTaskState = ^TGstTaskState;
  35. PGThread = ^TGThread;
  36. TGstTaskFunction = procedure (user_data:Tgpointer);cdecl;
  37. TGstTaskPrivate = record end;
  38. T_GstTaskPrivate = TGstTaskPrivate;
  39. TGstTaskState = (GST_TASK_STARTED,GST_TASK_STOPPED,GST_TASK_PAUSED
  40. );
  41. TGstTaskThreadFunc = procedure (task:PGstTask; thread:PGThread; user_data:Tgpointer);cdecl;
  42. T_GstTask = record
  43. object_ : TGstObject;
  44. state : TGstTaskState;
  45. cond : TGCond;
  46. lock : PGRecMutex;
  47. func : TGstTaskFunction;
  48. user_data : Tgpointer;
  49. notify : TGDestroyNotify;
  50. running : Tgboolean;
  51. thread : PGThread;
  52. priv : PGstTaskPrivate;
  53. _gst_reserved : array[0..3] of Tgpointer;
  54. end;
  55. TGstTask = T_GstTask;
  56. T_GstTaskClass = record
  57. parent_class : TGstObjectClass;
  58. pool : PGstTaskPool;
  59. _gst_reserved : array[0..3] of Tgpointer;
  60. end;
  61. TGstTaskClass = T_GstTaskClass;
  62. TGstTask_autoptr = PGstTask;
  63. TGstTask_listautoptr = PGList;
  64. TGstTask_slistautoptr = PGSList;
  65. TGstTask_queueautoptr = PGQueue;
  66. procedure gst_task_cleanup_all;cdecl;external gstreamerlib name 'gst_task_cleanup_all';
  67. function gst_task_get_type:TGType;cdecl;external gstreamerlib name 'gst_task_get_type';
  68. function gst_task_new(func:TGstTaskFunction; user_data:Tgpointer; notify:TGDestroyNotify):PGstTask;cdecl;external gstreamerlib name 'gst_task_new';
  69. procedure gst_task_set_lock(task:PGstTask; mutex:PGRecMutex);cdecl;external gstreamerlib name 'gst_task_set_lock';
  70. function gst_task_get_pool(task:PGstTask):PGstTaskPool;cdecl;external gstreamerlib name 'gst_task_get_pool';
  71. procedure gst_task_set_pool(task:PGstTask; pool:PGstTaskPool);cdecl;external gstreamerlib name 'gst_task_set_pool';
  72. procedure gst_task_set_enter_callback(task:PGstTask; enter_func:TGstTaskThreadFunc; user_data:Tgpointer; notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_task_set_enter_callback';
  73. procedure gst_task_set_leave_callback(task:PGstTask; leave_func:TGstTaskThreadFunc; user_data:Tgpointer; notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_task_set_leave_callback';
  74. function gst_task_get_state(task:PGstTask):TGstTaskState;cdecl;external gstreamerlib name 'gst_task_get_state';
  75. function gst_task_set_state(task:PGstTask; state:TGstTaskState):Tgboolean;cdecl;external gstreamerlib name 'gst_task_set_state';
  76. function gst_task_start(task:PGstTask):Tgboolean;cdecl;external gstreamerlib name 'gst_task_start';
  77. function gst_task_stop(task:PGstTask):Tgboolean;cdecl;external gstreamerlib name 'gst_task_stop';
  78. function gst_task_pause(task:PGstTask):Tgboolean;cdecl;external gstreamerlib name 'gst_task_pause';
  79. function gst_task_join(task:PGstTask):Tgboolean;cdecl;external gstreamerlib name 'gst_task_join';