gstsegment.inc 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. {
  2. /* GStreamer
  3. * Copyright (C) 2005 Wim Taymans <[email protected]>
  4. *
  5. * gstsegment.h: Header for GstSegment subsystem
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Library General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Library General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Library General Public
  18. * License along with this library; if not, write to the
  19. * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  20. * Boston, MA 02110-1301, USA.
  21. */
  22. }
  23. Type
  24. P_GstSegment = ^T_GstSegment;
  25. PGstSeekFlags = ^TGstSeekFlags;
  26. PGstSeekType = ^TGstSeekType;
  27. PGstSegment = ^TGstSegment;
  28. PPGstSegment = ^PGstSegment;
  29. PGstSegment_autoptr = ^TGstSegment_autoptr;
  30. PGstSegment_listautoptr = ^TGstSegment_listautoptr;
  31. PGstSegment_queueautoptr = ^TGstSegment_queueautoptr;
  32. PGstSegment_slistautoptr = ^TGstSegment_slistautoptr;
  33. PGstSegmentFlags = ^TGstSegmentFlags;
  34. {$IFDEF FPC}
  35. {$PACKRECORDS C}
  36. {$ENDIF}
  37. TGstSeekType = (
  38. GST_SEEK_TYPE_NONE := 0,
  39. GST_SEEK_TYPE_SET := 1,
  40. GST_SEEK_TYPE_END := 2
  41. );
  42. TGstSeekFlags = (
  43. GST_SEEK_FLAG_NONE := 0,
  44. GST_SEEK_FLAG_FLUSH := 1 shl 0,
  45. GST_SEEK_FLAG_ACCURATE := 1 shl 1,
  46. GST_SEEK_FLAG_KEY_UNIT := 1 shl 2,
  47. GST_SEEK_FLAG_SEGMENT := 1 shl 3,
  48. GST_SEEK_FLAG_TRICKMODE := 1 shl 4,
  49. GST_SEEK_FLAG_SKIP := 1 shl 4,
  50. GST_SEEK_FLAG_SNAP_BEFORE := 1 shl 5,
  51. GST_SEEK_FLAG_SNAP_AFTER := 1 shl 6,
  52. GST_SEEK_FLAG_SNAP_NEAREST := Ord(GST_SEEK_FLAG_SNAP_BEFORE) or ord(GST_SEEK_FLAG_SNAP_AFTER),
  53. GST_SEEK_FLAG_TRICKMODE_KEY_UNITS := 1 shl 7,
  54. GST_SEEK_FLAG_TRICKMODE_NO_AUDIO := 1 shl 8
  55. );
  56. TGstSegmentFlags = (
  57. GST_SEGMENT_FLAG_NONE := Ord(GST_SEEK_FLAG_NONE),
  58. GST_SEGMENT_FLAG_RESET := Ord(GST_SEEK_FLAG_FLUSH),
  59. GST_SEGMENT_FLAG_TRICKMODE := Ord(GST_SEEK_FLAG_TRICKMODE),
  60. GST_SEGMENT_FLAG_SKIP := Ord(GST_SEEK_FLAG_TRICKMODE),
  61. GST_SEGMENT_FLAG_SEGMENT := Ord(GST_SEEK_FLAG_SEGMENT),
  62. GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS := Ord(GST_SEEK_FLAG_TRICKMODE_KEY_UNITS),
  63. GST_SEGMENT_FLAG_TRICKMODE_NO_AUDIO := Ord(GST_SEEK_FLAG_TRICKMODE_NO_AUDIO)
  64. );
  65. T_GstSegment = record
  66. flags : TGstSegmentFlags;
  67. rate : Tgdouble;
  68. applied_rate : Tgdouble;
  69. format : TGstFormat;
  70. base : Tguint64;
  71. offset : Tguint64;
  72. start : Tguint64;
  73. stop : Tguint64;
  74. time : Tguint64;
  75. position : Tguint64;
  76. duration : Tguint64;
  77. _gst_reserved : array[0..3] of Tgpointer;
  78. end;
  79. TGstSegment = T_GstSegment;
  80. TGstSegment_autoptr = PGstSegment;
  81. TGstSegment_listautoptr = PGList;
  82. TGstSegment_slistautoptr = PGSList;
  83. TGstSegment_queueautoptr = PGQueue;
  84. function gst_segment_get_type:TGType;cdecl;external gstreamerlib name 'gst_segment_get_type';
  85. function gst_segment_new:PGstSegment;cdecl;external gstreamerlib name 'gst_segment_new';
  86. (* Const before type ignored *)
  87. function gst_segment_copy(segment:PGstSegment):PGstSegment;cdecl;external gstreamerlib name 'gst_segment_copy';
  88. (* Const before type ignored *)
  89. procedure gst_segment_copy_into(src:PGstSegment; dest:PGstSegment);cdecl;external gstreamerlib name 'gst_segment_copy_into';
  90. procedure gst_segment_free(segment:PGstSegment);cdecl;external gstreamerlib name 'gst_segment_free';
  91. procedure gst_segment_init(segment:PGstSegment; format:TGstFormat);cdecl;external gstreamerlib name 'gst_segment_init';
  92. (* Const before type ignored *)
  93. function gst_segment_to_stream_time_full(segment:PGstSegment; format:TGstFormat; position:Tguint64; stream_time:Pguint64):Tgint;cdecl;external gstreamerlib name 'gst_segment_to_stream_time_full';
  94. (* Const before type ignored *)
  95. function gst_segment_to_stream_time(segment:PGstSegment; format:TGstFormat; position:Tguint64):Tguint64;cdecl;external gstreamerlib name 'gst_segment_to_stream_time';
  96. (* Const before type ignored *)
  97. function gst_segment_position_from_stream_time_full(segment:PGstSegment; format:TGstFormat; stream_time:Tguint64; position:Pguint64):Tgint;cdecl;external gstreamerlib name 'gst_segment_position_from_stream_time_full';
  98. (* Const before type ignored *)
  99. function gst_segment_position_from_stream_time(segment:PGstSegment; format:TGstFormat; stream_time:Tguint64):Tguint64;cdecl;external gstreamerlib name 'gst_segment_position_from_stream_time';
  100. (* Const before type ignored *)
  101. function gst_segment_to_running_time(segment:PGstSegment; format:TGstFormat; position:Tguint64):Tguint64;cdecl;external gstreamerlib name 'gst_segment_to_running_time';
  102. (* Const before type ignored *)
  103. function gst_segment_to_running_time_full(segment:PGstSegment; format:TGstFormat; position:Tguint64; running_time:Pguint64):Tgint;cdecl;external gstreamerlib name 'gst_segment_to_running_time_full';
  104. (* Const before type ignored *)
  105. function gst_segment_to_position(segment:PGstSegment; format:TGstFormat; running_time:Tguint64):Tguint64;cdecl;external gstreamerlib name 'gst_segment_to_position';
  106. (* Const before type ignored *)
  107. function gst_segment_position_from_running_time_full(segment:PGstSegment; format:TGstFormat; running_time:Tguint64; position:Pguint64):Tgint;cdecl;external gstreamerlib name 'gst_segment_position_from_running_time_full';
  108. (* Const before type ignored *)
  109. function gst_segment_position_from_running_time(segment:PGstSegment; format:TGstFormat; running_time:Tguint64):Tguint64;cdecl;external gstreamerlib name 'gst_segment_position_from_running_time';
  110. function gst_segment_set_running_time(segment:PGstSegment; format:TGstFormat; running_time:Tguint64):Tgboolean;cdecl;external gstreamerlib name 'gst_segment_set_running_time';
  111. function gst_segment_offset_running_time(segment:PGstSegment; format:TGstFormat; offset:Tgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_segment_offset_running_time';
  112. (* Const before type ignored *)
  113. function gst_segment_clip(segment:PGstSegment; format:TGstFormat; start:Tguint64; stop:Tguint64; clip_start:Pguint64;
  114. clip_stop:Pguint64):Tgboolean;cdecl;external gstreamerlib name 'gst_segment_clip';
  115. function gst_segment_do_seek(segment:PGstSegment; rate:Tgdouble; format:TGstFormat; flags:TGstSeekFlags; start_type:TGstSeekType;
  116. start:Tguint64; stop_type:TGstSeekType; stop:Tguint64; update:Pgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_segment_do_seek';
  117. (* Const before type ignored *)
  118. (* Const before type ignored *)
  119. function gst_segment_is_equal(s0:PGstSegment; s1:PGstSegment):Tgboolean;cdecl;external gstreamerlib name 'gst_segment_is_equal';