gstformat.pp 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. unit gstformat;
  2. interface
  3. {
  4. Automatically converted by H2Pas 1.0.0 from gstformat.h
  5. The following command line parameters were used:
  6. gstformat.h
  7. }
  8. {$IFDEF FPC}
  9. {$PACKRECORDS C}
  10. {$ENDIF}
  11. { GStreamer
  12. * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
  13. * 2000 Wim Taymans <[email protected]>
  14. *
  15. * gstformat.h: Header for GstFormat types used in queries and
  16. * seeking.
  17. *
  18. * This library is free software; you can redistribute it and/or
  19. * modify it under the terms of the GNU Library General Public
  20. * License as published by the Free Software Foundation; either
  21. * version 2 of the License, or (at your option) any later version.
  22. *
  23. * This library is distributed in the hope that it will be useful,
  24. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  25. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  26. * Library General Public License for more details.
  27. *
  28. * You should have received a copy of the GNU Library General Public
  29. * License along with this library; if not, write to the
  30. * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  31. * Boston, MA 02110-1301, USA.
  32. }
  33. {$ifndef __GST_FORMAT_H__}
  34. {$define __GST_FORMAT_H__}
  35. {$include <glib.h>}
  36. {$include <gst/gstiterator.h>}
  37. {*
  38. * GstFormat:
  39. * @GST_FORMAT_UNDEFINED: undefined format
  40. * @GST_FORMAT_DEFAULT: the default format of the pad/element. This can be
  41. * samples for raw audio, frames/fields for raw video (some, but not all,
  42. * elements support this; use @GST_FORMAT_TIME if you don't have a good
  43. * reason to query for samples/frames)
  44. * @GST_FORMAT_BYTES: bytes
  45. * @GST_FORMAT_TIME: time in nanoseconds
  46. * @GST_FORMAT_BUFFERS: buffers (few, if any, elements implement this as of
  47. * May 2009)
  48. * @GST_FORMAT_PERCENT: percentage of stream (few, if any, elements implement
  49. * this as of May 2009)
  50. *
  51. * Standard predefined formats
  52. }
  53. { NOTE: don't forget to update the table in gstformat.c when changing
  54. * this enum }
  55. (* error
  56. typedef enum {
  57. { must be first in list }
  58. in declaration at line 59 *)
  59. { a percentage is always relative to 1000000 }
  60. {*
  61. * GST_FORMAT_PERCENT_MAX:
  62. *
  63. * The PERCENT format is between 0 and this value
  64. }
  65. { was #define dname def_expr }
  66. function GST_FORMAT_PERCENT_MAX : longint; { return type might be wrong }
  67. {*
  68. * GST_FORMAT_PERCENT_SCALE:
  69. *
  70. * The value used to scale down the reported PERCENT format value to
  71. * its real value.
  72. }
  73. { was #define dname def_expr }
  74. function GST_FORMAT_PERCENT_SCALE : longint; { return type might be wrong }
  75. type
  76. _GstFormatDefinition = GstFormatDefinition;
  77. {*
  78. * GstFormatDefinition:
  79. * @value: The unique id of this format
  80. * @nick: A short nick of the format
  81. * @description: A longer description of the format
  82. * @quark: A quark for the nick
  83. *
  84. * A format definition
  85. }
  86. (* Const before type ignored *)
  87. (* Const before type ignored *)
  88. _GstFormatDefinition = record
  89. value : GstFormat;
  90. nick : ^gchar;
  91. description : ^gchar;
  92. quark : GQuark;
  93. end;
  94. (* error
  95. const gchar* gst_format_get_name (GstFormat format);
  96. in declarator_list *)
  97. (* error
  98. GQuark gst_format_to_quark (GstFormat format);
  99. in declarator_list *)
  100. { register a new format }
  101. (* error
  102. GstFormat gst_format_register (const gchar *nick,
  103. (* error
  104. const gchar *description);
  105. in declarator_list *)
  106. in declarator_list *)
  107. (* error
  108. GstFormat gst_format_get_by_nick (const gchar *nick);
  109. in declarator_list *)
  110. { check if a format is in an array of formats }
  111. (* error
  112. gboolean gst_formats_contains (const GstFormat *formats, GstFormat format);
  113. (* error
  114. gboolean gst_formats_contains (const GstFormat *formats, GstFormat format);
  115. in declarator_list *)
  116. in declarator_list *)
  117. { query for format details }
  118. (* error
  119. const GstFormatDefinition*
  120. in declarator_list *)
  121. (* error
  122. GstIterator* gst_format_iterate_definitions (void);
  123. in declarator_list *)
  124. {$endif}
  125. { __GST_FORMAT_H__ }
  126. (* error
  127. #endif /* __GST_FORMAT_H__ */
  128. implementation
  129. { was #define dname def_expr }
  130. function GST_FORMAT_PERCENT_MAX : longint; { return type might be wrong }
  131. begin
  132. GST_FORMAT_PERCENT_MAX:=G_GINT64_CONSTANT(1000000);
  133. end;
  134. { was #define dname def_expr }
  135. function GST_FORMAT_PERCENT_SCALE : longint; { return type might be wrong }
  136. begin
  137. GST_FORMAT_PERCENT_SCALE:=G_GINT64_CONSTANT(10000);
  138. end;
  139. end.