Browse Source

* Add gstreamer library import unit (gst)

Michaël Van Canneyt 2 years ago
parent
commit
36073c1b65
87 changed files with 13873 additions and 0 deletions
  1. 1 0
      packages/fpmake_add.inc
  2. 6 0
      packages/fpmake_proc.inc
  3. 2995 0
      packages/gstreamer/Makefile
  4. 102 0
      packages/gstreamer/Makefile.fpc
  5. 57 0
      packages/gstreamer/example/playmp3.lpi
  6. 79 0
      packages/gstreamer/example/playmp3.pp
  7. 122 0
      packages/gstreamer/fpmake.pp
  8. 0 0
      packages/gstreamer/src/.inc.h.prep
  9. 0 0
      packages/gstreamer/src/.inc.h.raw
  10. 21 0
      packages/gstreamer/src/elementfactory.inc
  11. 194 0
      packages/gstreamer/src/gst.pp
  12. 82 0
      packages/gstreamer/src/gstaliases.inc
  13. 101 0
      packages/gstreamer/src/gstallocator.inc
  14. 61 0
      packages/gstreamer/src/gstatomicqueue.inc
  15. 138 0
      packages/gstreamer/src/gstbin.inc
  16. 41 0
      packages/gstreamer/src/gstbin_impl.inc
  17. 286 0
      packages/gstreamer/src/gstbuffer.inc
  18. 116 0
      packages/gstreamer/src/gstbufferlist.inc
  19. 99 0
      packages/gstreamer/src/gstbufferpool.inc
  20. 116 0
      packages/gstreamer/src/gstbus.inc
  21. 248 0
      packages/gstreamer/src/gstcaps.inc
  22. 120 0
      packages/gstreamer/src/gstcapsfeatures.inc
  23. 82 0
      packages/gstreamer/src/gstchildproxy.inc
  24. 180 0
      packages/gstreamer/src/gstclock.inc
  25. 99 0
      packages/gstreamer/src/gstcontext.inc
  26. 86 0
      packages/gstreamer/src/gstcontrolbinding.inc
  27. 92 0
      packages/gstreamer/src/gstcontrolsource.inc
  28. 123 0
      packages/gstreamer/src/gstdatetime.inc
  29. 41 0
      packages/gstreamer/src/gstdebugutils.inc
  30. 81 0
      packages/gstreamer/src/gstdevice.inc
  31. 85 0
      packages/gstreamer/src/gstdevicemonitor.inc
  32. 128 0
      packages/gstreamer/src/gstdeviceprovider.inc
  33. 68 0
      packages/gstreamer/src/gstdeviceproviderfactory.inc
  34. 34 0
      packages/gstreamer/src/gstdynamictypefactory.inc
  35. 230 0
      packages/gstreamer/src/gstelement.inc
  36. 82 0
      packages/gstreamer/src/gstelementfactory.inc
  37. 76 0
      packages/gstreamer/src/gstelementmetadata.inc
  38. 208 0
      packages/gstreamer/src/gstenum.inc
  39. 173 0
      packages/gstreamer/src/gstenumtypes.inc
  40. 90 0
      packages/gstreamer/src/gsterror.inc
  41. 324 0
      packages/gstreamer/src/gstevent.inc
  42. 61 0
      packages/gstreamer/src/gstformat.inc
  43. 154 0
      packages/gstreamer/src/gstformat.pp
  44. 133 0
      packages/gstreamer/src/gstghostpad.inc
  45. 234 0
      packages/gstreamer/src/gstinfo.inc
  46. 124 0
      packages/gstreamer/src/gstiterator.inc
  47. 175 0
      packages/gstreamer/src/gstmemory.inc
  48. 308 0
      packages/gstreamer/src/gstmessage.inc
  49. 113 0
      packages/gstreamer/src/gstmessage_impl.inc
  50. 106 0
      packages/gstreamer/src/gstmeta.inc
  51. 87 0
      packages/gstreamer/src/gstminiobject.inc
  52. 124 0
      packages/gstreamer/src/gstobject.inc
  53. 275 0
      packages/gstreamer/src/gstpad.inc
  54. 187 0
      packages/gstreamer/src/gstpadtemplate.inc
  55. 57 0
      packages/gstreamer/src/gstparamspecs.inc
  56. 87 0
      packages/gstreamer/src/gstparse.inc
  57. 99 0
      packages/gstreamer/src/gstpipeline.inc
  58. 179 0
      packages/gstreamer/src/gstplugin.inc
  59. 80 0
      packages/gstreamer/src/gstpluginfeature.inc
  60. 88 0
      packages/gstreamer/src/gstpoll.inc
  61. 82 0
      packages/gstreamer/src/gstpreset.inc
  62. 87 0
      packages/gstreamer/src/gstpromise.inc
  63. 52 0
      packages/gstreamer/src/gstprotection.inc
  64. 326 0
      packages/gstreamer/src/gstquery.inc
  65. 175 0
      packages/gstreamer/src/gstrec.inc
  66. 105 0
      packages/gstreamer/src/gstregistry.inc
  67. 97 0
      packages/gstreamer/src/gstsample.inc
  68. 152 0
      packages/gstreamer/src/gstsegment.inc
  69. 77 0
      packages/gstreamer/src/gststreamcollection.inc
  70. 107 0
      packages/gstreamer/src/gststreams.inc
  71. 327 0
      packages/gstreamer/src/gststructure.inc
  72. 69 0
      packages/gstreamer/src/gstsystemclock.inc
  73. 436 0
      packages/gstreamer/src/gsttaglist.inc
  74. 70 0
      packages/gstreamer/src/gsttagsetter.inc
  75. 113 0
      packages/gstreamer/src/gsttask.inc
  76. 80 0
      packages/gstreamer/src/gsttaskpool.inc
  77. 172 0
      packages/gstreamer/src/gsttoc.inc
  78. 46 0
      packages/gstreamer/src/gsttocsetter.inc
  79. 61 0
      packages/gstreamer/src/gsttracer.inc
  80. 56 0
      packages/gstreamer/src/gsttracerfactory.inc
  81. 67 0
      packages/gstreamer/src/gsttracerrecord.inc
  82. 71 0
      packages/gstreamer/src/gsttypefind.inc
  83. 59 0
      packages/gstreamer/src/gsttypefindfactory.inc
  84. 282 0
      packages/gstreamer/src/gsturi.inc
  85. 423 0
      packages/gstreamer/src/gstutils.inc
  86. 272 0
      packages/gstreamer/src/gstvalue.inc
  87. 71 0
      packages/gstreamer/src/gstversion.inc

+ 1 - 0
packages/fpmake_add.inc

@@ -151,4 +151,5 @@
   add_wasmtime(ADirectory+IncludeTrailingPathDelimiter('wasmtime'));
   add_gitlab(ADirectory+IncludeTrailingPathDelimiter('gitlab'));
   add_fcl_css(ADirectory+IncludeTrailingPathDelimiter('fcl-css'));
+  add_gstreamer(ADirectory+IncludeTrailingPathDelimiter('gstreamer'));
   

+ 6 - 0
packages/fpmake_proc.inc

@@ -851,5 +851,11 @@ begin
 {$include wasmtime/fpmake.pp}
 end;
 
+procedure add_gstreamer(const ADirectory: string);
+begin
+  with Installer do
+{$include gstreamer/fpmake.pp}
+end;
+
 {$include ide/fpmake.pp}
 {$include gitlab/fpmake.pp}

+ 2995 - 0
packages/gstreamer/Makefile

@@ -0,0 +1,2995 @@
+#
+# Don't edit, this file is generated by FPCMake Version 2.0.0
+#
+default: all
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim i386-android i386-aros m68k-linux m68k-netbsd m68k-amiga m68k-atari m68k-palmos m68k-macosclassic m68k-embedded m68k-sinclairql powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macosclassic powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-haiku x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded x86_64-iphonesim x86_64-android x86_64-aros x86_64-dragonfly arm-linux arm-netbsd arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android arm-aros arm-freertos arm-ios powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux mipsel-embedded mipsel-android mips64-linux mips64el-linux jvm-java jvm-android i8086-embedded i8086-msdos i8086-win16 aarch64-linux aarch64-freebsd aarch64-darwin aarch64-win64 aarch64-embedded aarch64-android aarch64-ios wasm32-embedded wasm32-wasi sparc64-linux riscv32-linux riscv32-embedded riscv64-linux riscv64-embedded xtensa-linux xtensa-embedded xtensa-freertos z80-embedded z80-zxspectrum z80-msxdos z80-amstradcpc
+BSDs = freebsd netbsd openbsd darwin dragonfly
+UNIXs = linux $(BSDs) solaris qnx haiku aix
+LIMIT83fs = go32v2 os2 emx watcom msdos win16 atari
+OSNeedsComspecToRunBatch = go32v2 watcom
+FORCE:
+.PHONY: FORCE
+override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
+ifneq ($(findstring darwin,$(OSTYPE)),)
+inUnix=1 #darwin
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+ifeq ($(findstring ;,$(PATH)),)
+inUnix=1
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+SEARCHPATH:=$(subst ;, ,$(PATH))
+endif
+endif
+SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
+ifeq ($(PWD),)
+$(error You need the GNU utils package to use this Makefile)
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=
+endif
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=.exe
+endif
+ifndef inUnix
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+else
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+else
+ifneq ($(findstring cygdrive,$(PATH)),)
+inCygWin=1
+endif
+endif
+ifdef inUnix
+SRCBATCHEXT=.sh
+else
+ifdef inOS2
+SRCBATCHEXT=.cmd
+else
+SRCBATCHEXT=.bat
+endif
+endif
+ifdef COMSPEC
+ifneq ($(filter $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
+ifndef RUNBATCH
+RUNBATCH=$(COMSPEC) /C
+endif
+endif
+endif
+ifdef inUnix
+PATHSEP=/
+else
+PATHSEP:=$(subst /,\,/)
+ifdef inCygWin
+PATHSEP=/
+endif
+endif
+ifdef PWD
+BASEDIR:=$(subst \,/,$(shell $(PWD)))
+ifdef inCygWin
+ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
+BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
+BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
+BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
+endif
+endif
+else
+BASEDIR=.
+endif
+ifdef inOS2
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO=echo
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+endif
+override DEFAULT_FPCDIR=../..
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+ifneq ($(CPU_TARGET),)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+else
+FPC:=$(shell $(FPCPROG) -PB)
+endif
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+else
+ifeq ($(strip $(wildcard $(FPC))),)
+FPC:=$(firstword $(FPCPROG))
+endif
+endif
+else
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+FOUNDFPC:=$(strip $(wildcard $(FPC)))
+ifeq ($(FOUNDFPC),)
+FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
+ifeq ($(FOUNDFPC),)
+$(error Compiler $(FPC) not found)
+endif
+endif
+ifndef FPC_COMPILERINFO
+FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
+endif
+ifndef FPC_VERSION
+FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
+endif
+export FPC FPC_VERSION FPC_COMPILERINFO
+unexport CHECKDEPEND ALLDEPENDENCIES
+ifndef CPU_TARGET
+ifdef CPU_TARGET_DEFAULT
+CPU_TARGET=$(CPU_TARGET_DEFAULT)
+endif
+endif
+ifndef OS_TARGET
+ifdef OS_TARGET_DEFAULT
+OS_TARGET=$(OS_TARGET_DEFAULT)
+endif
+endif
+ifndef CPU_SOURCE
+CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
+endif
+ifndef CPU_TARGET
+CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
+endif
+ifndef OS_SOURCE
+OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
+endif
+ifndef OS_TARGET
+OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
+endif
+FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifeq ($(CPU_TARGET),armeb)
+ARCH=arm
+override FPCOPT+=-Cb
+else
+ifeq ($(CPU_TARGET),armel)
+ARCH=arm
+override FPCOPT+=-CaEABI
+else
+ARCH=$(CPU_TARGET)
+endif
+endif
+ifeq ($(FULL_TARGET),aarch64-embedded)
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for arm-embedded, a sub-architecture (e.g. SUBARCH=armv4t or SUBARCH=armv7m) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
+ifeq ($(FULL_TARGET),avr-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for avr-embedded, a sub-architecture (e.g. SUBARCH=avr25 or SUBARCH=avr35) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
+ifeq ($(FULL_TARGET),mipsel-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic32mx) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
+ifeq ($(FULL_TARGET),xtensa-freertos)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-freertos, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
+ifeq ($(FULL_TARGET),arm-freertos)
+ifeq ($(SUBARCH),)
+$(error When compiling for arm-freertos, a sub-architecture (e.g. SUBARCH=armv6m or SUBARCH=armv7em) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
+ifneq ($(filter $(OS_SOURCE),$(LIMIT83fs)),)
+TARGETSUFFIX=$(OS_TARGET)
+SOURCESUFFIX=$(OS_SOURCE)
+else
+ifneq ($(filter $(OS_TARGET),$(LIMIT83fs)),)
+TARGETSUFFIX=$(OS_TARGET)
+else
+TARGETSUFFIX=$(FULL_TARGET)
+endif
+SOURCESUFFIX=$(FULL_SOURCE)
+endif
+ifneq ($(FULL_TARGET),$(FULL_SOURCE))
+CROSSCOMPILE=1
+endif
+ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
+ifeq ($(filter $(FULL_TARGET),$(MAKEFILETARGETS)),)
+$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
+endif
+endif
+ifneq ($(filter $(OS_TARGET),$(BSDs)),)
+BSDhier=1
+endif
+ifeq ($(OS_TARGET),linux)
+linuxHier=1
+endif
+ifndef CROSSCOMPILE
+BUILDFULLNATIVE=1
+export BUILDFULLNATIVE
+endif
+ifdef BUILDFULLNATIVE
+BUILDNATIVE=1
+export BUILDNATIVE
+endif
+export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
+ifdef FPCDIR
+override FPCDIR:=$(subst \,/,$(FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
+override FPCDIR=wrong
+endif
+else
+override FPCDIR=wrong
+endif
+ifdef DEFAULT_FPCDIR
+ifeq ($(FPCDIR),wrong)
+override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
+override FPCDIR=wrong
+endif
+endif
+endif
+ifeq ($(FPCDIR),wrong)
+ifdef inUnix
+override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
+ifeq ($(wildcard $(FPCDIR)/units),)
+override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
+endif
+else
+override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
+override FPCDIR:=$(BASEDIR)
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
+override FPCDIR=c:/pp
+endif
+endif
+endif
+endif
+endif
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
+endif
+ifneq ($(filter $(OS_TARGET),darwin iphonesim ios),)
+ifneq ($(filter $(OS_SOURCE),darwin ios),)
+DARWIN2DARWIN=1
+endif
+endif
+ifndef BINUTILSPREFIX
+ifndef CROSSBINDIR
+ifdef CROSSCOMPILE
+ifneq ($(OS_TARGET),msdos)
+ifndef DARWIN2DARWIN
+ifneq ($(CPU_TARGET),jvm)
+BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
+ifeq ($(OS_TARGET),android)
+ifeq ($(CPU_TARGET),arm)
+BINUTILSPREFIX=arm-linux-androideabi-
+else
+ifeq ($(CPU_TARGET),i386)
+BINUTILSPREFIX=i686-linux-android-
+else
+BINUTILSPREFIX=$(CPU_TARGET)-linux-android-
+endif
+endif
+endif
+endif
+endif
+else
+BINUTILSPREFIX=$(OS_TARGET)-
+endif
+endif
+endif
+endif
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
+ifeq ($(UNITSDIR),)
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
+endif
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages)
+ifndef FPCFPMAKE
+ifdef CROSSCOMPILE
+ifeq ($(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR)))),)
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPCFPMAKE:=$(shell $(FPCPROG) -PB)
+ifeq ($(strip $(wildcard $(FPCFPMAKE))),)
+FPCFPMAKE:=$(firstword $(FPCPROG))
+endif
+else
+override FPCFPMAKE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+else
+FPCFPMAKE=$(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR))))
+FPMAKE_SKIP_CONFIG=-n
+export FPCFPMAKE
+export FPMAKE_SKIP_CONFIG
+endif
+else
+FPMAKE_SKIP_CONFIG=-n
+FPCFPMAKE=$(FPC)
+endif
+endif
+override PACKAGE_NAME=gtk2
+override PACKAGE_VERSION=3.3.1
+FPMAKE_BIN_CLEAN=$(wildcard ./fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=./fpmake$(SRCEXEEXT)
+override INSTALL_FPCPACKAGE=y
+ifdef REQUIRE_UNITSDIR
+override UNITSDIR+=$(REQUIRE_UNITSDIR)
+endif
+ifdef REQUIRE_PACKAGESDIR
+override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
+endif
+ifdef ZIPINSTALL
+ifneq ($(filter $(OS_TARGET),$(UNIXs)),)
+UNIXHier=1
+endif
+else
+ifneq ($(filter $(OS_SOURCE),$(UNIXs)),)
+UNIXHier=1
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef PREFIX
+INSTALL_PREFIX=$(PREFIX)
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef UNIXHier
+INSTALL_PREFIX=/usr/local
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=/pp
+else
+INSTALL_BASEDIR:=/$(PACKAGE_NAME)
+endif
+endif
+endif
+export INSTALL_PREFIX
+ifdef INSTALL_FPCSUBDIR
+export INSTALL_FPCSUBDIR
+endif
+ifndef DIST_DESTDIR
+DIST_DESTDIR:=$(BASEDIR)
+endif
+export DIST_DESTDIR
+ifndef COMPILER_UNITTARGETDIR
+ifdef PACKAGEDIR_MAIN
+COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
+else
+COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
+endif
+endif
+ifndef COMPILER_TARGETDIR
+COMPILER_TARGETDIR=.
+endif
+ifndef INSTALL_BASEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
+endif
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)
+endif
+endif
+ifndef INSTALL_BINDIR
+ifdef UNIXHier
+INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
+else
+INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
+ifdef INSTALL_FPCPACKAGE
+ifdef CROSSCOMPILE
+ifdef CROSSINSTALL
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+endif
+endif
+endif
+ifndef INSTALL_UNITDIR
+INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
+ifdef INSTALL_FPCPACKAGE
+ifdef PACKAGE_NAME
+INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
+endif
+endif
+endif
+ifndef INSTALL_LIBDIR
+ifdef UNIXHier
+INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
+else
+INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
+endif
+endif
+ifndef INSTALL_SOURCEDIR
+ifdef UNIXHier
+ifdef BSDhier
+SRCPREFIXDIR=share/src
+else
+ifdef linuxHier
+SRCPREFIXDIR=share/src
+else
+SRCPREFIXDIR=src
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
+endif
+endif
+endif
+ifndef INSTALL_DOCDIR
+ifdef UNIXHier
+ifdef BSDhier
+DOCPREFIXDIR=share/doc
+else
+ifdef linuxHier
+DOCPREFIXDIR=share/doc
+else
+DOCPREFIXDIR=doc
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
+endif
+endif
+endif
+ifndef INSTALL_EXAMPLEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
+endif
+endif
+else
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+endif
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
+endif
+endif
+endif
+ifndef INSTALL_DATADIR
+INSTALL_DATADIR=$(INSTALL_BASEDIR)
+endif
+ifndef INSTALL_SHAREDDIR
+INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
+endif
+ifdef CROSSCOMPILE
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
+ifeq ($(CROSSBINDIR),)
+CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
+endif
+endif
+else
+CROSSBINDIR=
+endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(filter x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+else
+CROSSGCCOPT=-m32
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+else
+CROSSGCCOPT=-m32
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+else
+CROSSGCCOPT=-m64
+endif
+endif
+ifeq ($(CPU_TARGET),sparc)
+ifneq ($(filter sparc64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+else
+CROSSGCCOPT=-m32
+endif
+endif
+endif
+ifneq ($(filter $(CPU_TARGET),mips64 mipsel64),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -mabi=64 -print-libgcc-file-name`)
+else
+CROSSGCCOPT=-mabi=64
+endif
+endif
+ifneq ($(filter $(CPU_TARGET),mips mipsel),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -mabi=32 -print-libgcc-file-name`)
+else
+CROSSGCCOPT=-mabi=32
+endif
+endif
+ifeq ($(BINUTILSPREFIX),)
+ifeq ($(GCCLIBDIR),)
+GCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
+endif
+else
+ifeq ($(CROSSGCCOPT),)
+CROSSGCCOPT=-g
+endif
+endif
+endif
+ifdef FPCFPMAKE
+FPCFPMAKE_CPU_TARGET=$(shell $(FPCFPMAKE) -iTP)
+ifeq ($(CPU_TARGET),$(FPCFPMAKE_CPU_TARGET))
+FPCMAKEGCCLIBDIR:=$(GCCLIBDIR)
+else
+ifneq ($(filter $(FPCFPMAKE_CPU_TARGET),aarch64 powerpc64 riscv64 sparc64 x86_64),)
+FPCMAKE_CROSSGCCOPT=-m64
+else
+ifneq ($(filter $(FPCFPMAKE_CPU_TARGET),mips64 mips64el),)
+FPCMAKE_CROSSGCCOPT=-mabi=64
+else
+ifneq ($(filter $(FPCFPMAKE_CPU_TARGET),mips mipsel),)
+FPCMAKE_CROSSGCCOPT=-mabi=32
+else
+ifeq ($(FPCFPMAKE_CPU_TARGET),riscv64)
+FPCMAKE_CROSSGCCOPT=-mabi=lp64
+else
+ifeq ($(FPCFPMAKE_CPU_TARGET),riscv32)
+FPCMAKE_CROSSGCCOPT=-mabi=ilp32
+else
+FPCMAKE_CROSSGCCOPT=-m32
+endif
+endif
+endif
+endif
+endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc $(FPCMAKE_CROSSGCCOPT) -print-libgcc-file-name`)
+endif
+endif
+ifndef FPCMAKEGCCLIBDIR
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) $(CROSSGCCOPT) -print-libgcc-file-name`)
+endif
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR:=/usr/pkg/lib
+endif
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
+endif
+BATCHEXT=.bat
+LOADEREXT=.as
+EXEEXT=.exe
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+LTOEXT=.bc
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+SHAREDLIBPREFIX=libfp
+STATICLIBPREFIX=libp
+IMPORTLIBPREFIX=libimp
+RSTEXT=.rst
+EXEDBGEXT=.dbg
+ifeq ($(OS_TARGET),go32v1)
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+IMPORTLIBPREFIX=
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+OEXT=.obj
+ASMEXT=.asm
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=wat
+IMPORTLIBPREFIX=
+endif
+ifneq ($(CPU_TARGET),jvm)
+ifeq ($(OS_TARGET),android)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),dragonfly)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=df
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+IMPORTLIBPREFIX=
+endif
+ifeq ($(OS_TARGET),emx)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=emx
+ECHO=echo
+IMPORTLIBPREFIX=
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),aros)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=aros
+endif
+ifeq ($(OS_TARGET),morphos)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=mos
+endif
+ifeq ($(OS_TARGET),atari)
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),haiku)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=hai
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nw
+IMPORTLIBPREFIX=imp
+endif
+ifeq ($(OS_TARGET),netwlibc)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nwl
+IMPORTLIBPREFIX=imp
+endif
+ifeq ($(OS_TARGET),macosclassic)
+BATCHEXT=
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+IMPORTLIBPREFIX=imp
+endif
+ifneq ($(filter $(OS_TARGET),darwin iphonesim ios),)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=dwn
+EXEDBGEXT=.dSYM
+endif
+ifeq ($(OS_TARGET),gba)
+EXEEXT=.gba
+SHAREDLIBEXT=.so
+SHORTSUFFIX=gba
+endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
+ifeq ($(OS_TARGET),NativeNT)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=nativent
+endif
+ifeq ($(OS_TARGET),wii)
+EXEEXT=.dol
+SHAREDLIBEXT=.so
+SHORTSUFFIX=wii
+endif
+ifeq ($(OS_TARGET),aix)
+BATCHEXT=.sh
+EXEEXT=
+SHAREDLIBEXT=.a
+SHORTSUFFIX=aix
+endif
+ifeq ($(OS_TARGET),java)
+OEXT=.class
+ASMEXT=.j
+SHAREDLIBEXT=.jar
+SHORTSUFFIX=java
+endif
+ifeq ($(CPU_TARGET),jvm)
+ifeq ($(OS_TARGET),android)
+OEXT=.class
+ASMEXT=.j
+SHAREDLIBEXT=.jar
+SHORTSUFFIX=android
+endif
+endif
+ifeq ($(OS_TARGET),msdos)
+STATICLIBPREFIX=
+STATICLIBEXT=.a
+SHORTSUFFIX=d16
+endif
+ifeq ($(OS_TARGET),msxdos)
+STATICLIBPREFIX=
+STATICLIBEXT=.a
+SHORTSUFFIX=msd
+endif
+ifeq ($(OS_TARGET),embedded)
+ifeq ($(CPU_TARGET),i8086)
+STATICLIBPREFIX=
+STATICLIBEXT=.a
+else
+EXEEXT=.bin
+endif
+ifeq ($(CPU_TARGET),z80)
+OEXT=.rel
+endif
+SHORTSUFFIX=emb
+endif
+ifeq ($(OS_TARGET),win16)
+STATICLIBPREFIX=
+STATICLIBEXT=.a
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w16
+endif
+ifeq ($(OS_TARGET),zxspectrum)
+OEXT=.rel
+endif
+ifeq ($(OS_TARGET),wasi)
+EXEEXT=.wasm
+endif
+ifneq ($(filter $(OS_SOURCE),$(LIMIT83fs)),)
+FPCMADE=fpcmade.$(SHORTSUFFIX)
+ZIPSUFFIX=$(SHORTSUFFIX)
+ZIPCROSSPREFIX=
+ZIPSOURCESUFFIX=src
+ZIPEXAMPLESUFFIX=exm
+else
+FPCMADE=fpcmade.$(TARGETSUFFIX)
+ZIPSOURCESUFFIX=.source
+ZIPEXAMPLESUFFIX=.examples
+ifdef CROSSCOMPILE
+ZIPSUFFIX=.$(SOURCESUFFIX)
+ZIPCROSSPREFIX=$(TARGETSUFFIX)-
+else
+ZIPSUFFIX=.$(TARGETSUFFIX)
+ZIPCROSSPREFIX=
+endif
+endif
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO= __missing_command_ECHO
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE= __missing_command_DATE
+else
+DATE:=$(firstword $(DATE))
+endif
+else
+DATE:=$(firstword $(DATE))
+endif
+endif
+export DATE
+ifndef GINSTALL
+GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL= __missing_command_GINSTALL
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+endif
+export GINSTALL
+ifndef CPPROG
+CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(CPPROG),)
+CPPROG= __missing_command_CPPROG
+else
+CPPROG:=$(firstword $(CPPROG))
+endif
+endif
+export CPPROG
+ifndef RMPROG
+RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(RMPROG),)
+RMPROG= __missing_command_RMPROG
+else
+RMPROG:=$(firstword $(RMPROG))
+endif
+endif
+export RMPROG
+ifndef MVPROG
+MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MVPROG),)
+MVPROG= __missing_command_MVPROG
+else
+MVPROG:=$(firstword $(MVPROG))
+endif
+endif
+export MVPROG
+ifndef MKDIRPROG
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG= __missing_command_MKDIRPROG
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+endif
+export MKDIRPROG
+ifndef ECHOREDIR
+ifndef inUnix
+ECHOREDIR=echo
+else
+ECHOREDIR=$(ECHO)
+endif
+endif
+ifndef COPY
+COPY:=$(CPPROG) -fp
+endif
+ifndef COPYTREE
+COPYTREE:=$(CPPROG) -Rfp
+endif
+ifndef MKDIRTREE
+MKDIRTREE:=$(MKDIRPROG) -p
+endif
+ifndef MOVE
+MOVE:=$(MVPROG) -f
+endif
+ifndef DEL
+DEL:=$(RMPROG) -f
+endif
+ifndef DELTREE
+DELTREE:=$(RMPROG) -rf
+endif
+ifndef INSTALL
+ifdef inUnix
+INSTALL:=$(GINSTALL) -c -m 644
+else
+INSTALL:=$(COPY)
+endif
+endif
+ifndef INSTALLEXE
+ifdef inUnix
+INSTALLEXE:=$(GINSTALL) -c -m 755
+else
+INSTALLEXE:=$(COPY)
+endif
+endif
+ifndef MKDIR
+MKDIR:=$(GINSTALL) -m 755 -d
+endif
+export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE= __missing_command_PPUMOVE
+else
+PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+export PPUMOVE
+ifndef FPCMAKE
+FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(FPCMAKE),)
+FPCMAKE= __missing_command_FPCMAKE
+else
+FPCMAKE:=$(firstword $(FPCMAKE))
+endif
+endif
+export FPCMAKE
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG= __missing_command_ZIPPROG
+else
+ZIPPROG:=$(firstword $(ZIPPROG))
+endif
+endif
+export ZIPPROG
+ifndef TARPROG
+TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG= __missing_command_TARPROG
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+endif
+export TARPROG
+ASNAME=$(BINUTILSPREFIX)as
+LDNAME=$(BINUTILSPREFIX)ld
+ARNAME=$(BINUTILSPREFIX)ar
+RCNAME=$(BINUTILSPREFIX)rc
+NASMNAME=$(BINUTILSPREFIX)nasm
+ifndef ASPROG
+ifdef CROSSBINDIR
+ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
+else
+ASPROG=$(ASNAME)
+endif
+endif
+ifndef LDPROG
+ifdef CROSSBINDIR
+LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
+else
+LDPROG=$(LDNAME)
+endif
+endif
+ifndef RCPROG
+ifdef CROSSBINDIR
+RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
+else
+RCPROG=$(RCNAME)
+endif
+endif
+ifndef ARPROG
+ifdef CROSSBINDIR
+ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
+else
+ARPROG=$(ARNAME)
+endif
+endif
+ifndef NASMPROG
+ifdef CROSSBINDIR
+NASMPROG=$(CROSSBINDIR)/$(NASMNAME)$(SRCEXEEXT)
+else
+NASMPROG=$(NASMNAME)
+endif
+endif
+AS=$(ASPROG)
+LD=$(LDPROG)
+RC=$(RCPROG)
+AR=$(ARPROG)
+NASM=$(NASMPROG)
+ifdef inUnix
+PPAS=./ppas$(SRCBATCHEXT)
+else
+PPAS=ppas$(SRCBATCHEXT)
+endif
+ifdef inUnix
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+ZIPOPT=-9
+ZIPEXT=.zip
+ifeq ($(USETAR),bz2)
+TAROPT=vj
+TAREXT=.tar.bz2
+else
+TAROPT=vz
+TAREXT=.tar.gz
+endif
+override REQUIRE_PACKAGES=rtl fpmkunit gtk2
+ifeq ($(FULL_TARGET),i386-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-haiku)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-nativent)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-android)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-aros)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-macosclassic)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-sinclairql)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-macosclassic)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-aix)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-haiku)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-iphonesim)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-android)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-aros)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-dragonfly)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-android)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-aros)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-freertos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-ios)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-aix)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),avr-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),armeb-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),armeb-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),mips-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),mipsel-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),mipsel-android)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),mips64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),mips64el-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),jvm-java)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),jvm-android)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i8086-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i8086-msdos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i8086-win16)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),aarch64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),aarch64-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),aarch64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),aarch64-win64)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),aarch64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),aarch64-android)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),aarch64-ios)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),wasm32-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),wasm32-wasi)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),riscv32-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),riscv32-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),riscv64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),riscv64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),xtensa-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),xtensa-freertos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),z80-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),z80-zxspectrum)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),z80-msxdos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),z80-amstradcpc)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifdef REQUIRE_PACKAGES_RTL
+PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_RTL),)
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
+UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
+else
+UNITDIR_RTL=$(PACKAGEDIR_RTL)
+endif
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)
+else
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)
+else
+UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)
+endif
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
+	$(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_RTL=
+UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_RTL),)
+UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
+else
+UNITDIR_RTL=
+endif
+endif
+ifdef UNITDIR_RTL
+override COMPILER_UNITDIR+=$(UNITDIR_RTL)
+endif
+ifdef UNITDIR_FPMAKE_RTL
+override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_RTL)
+endif
+endif
+ifdef REQUIRE_PACKAGES_PASZLIB
+PACKAGEDIR_PASZLIB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_PASZLIB),)
+ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/units/$(TARGETSUFFIX)),)
+UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)/units/$(TARGETSUFFIX)
+else
+UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)
+endif
+ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/units/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_PASZLIB=$(PACKAGEDIR_PASZLIB)/units/$(SOURCESUFFIX)
+else
+ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/units_bs/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_PASZLIB=$(PACKAGEDIR_PASZLIB)/units_bs/$(SOURCESUFFIX)
+else
+UNITDIR_FPMAKE_PASZLIB=$(PACKAGEDIR_PASZLIB)
+endif
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_PASZLIB)/$(FPCMADE):
+	$(MAKE) -C $(PACKAGEDIR_PASZLIB) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_PASZLIB)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_PASZLIB=
+UNITDIR_PASZLIB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_PASZLIB),)
+UNITDIR_PASZLIB:=$(firstword $(UNITDIR_PASZLIB))
+else
+UNITDIR_PASZLIB=
+endif
+endif
+ifdef UNITDIR_PASZLIB
+override COMPILER_UNITDIR+=$(UNITDIR_PASZLIB)
+endif
+ifdef UNITDIR_FPMAKE_PASZLIB
+override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_PASZLIB)
+endif
+endif
+ifdef REQUIRE_PACKAGES_FCL-PROCESS
+PACKAGEDIR_FCL-PROCESS:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl-process/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_FCL-PROCESS),)
+ifneq ($(wildcard $(PACKAGEDIR_FCL-PROCESS)/units/$(TARGETSUFFIX)),)
+UNITDIR_FCL-PROCESS=$(PACKAGEDIR_FCL-PROCESS)/units/$(TARGETSUFFIX)
+else
+UNITDIR_FCL-PROCESS=$(PACKAGEDIR_FCL-PROCESS)
+endif
+ifneq ($(wildcard $(PACKAGEDIR_FCL-PROCESS)/units/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_FCL-PROCESS=$(PACKAGEDIR_FCL-PROCESS)/units/$(SOURCESUFFIX)
+else
+ifneq ($(wildcard $(PACKAGEDIR_FCL-PROCESS)/units_bs/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_FCL-PROCESS=$(PACKAGEDIR_FCL-PROCESS)/units_bs/$(SOURCESUFFIX)
+else
+UNITDIR_FPMAKE_FCL-PROCESS=$(PACKAGEDIR_FCL-PROCESS)
+endif
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_FCL-PROCESS)/$(FPCMADE):
+	$(MAKE) -C $(PACKAGEDIR_FCL-PROCESS) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL-PROCESS)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_FCL-PROCESS=
+UNITDIR_FCL-PROCESS:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl-process/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_FCL-PROCESS),)
+UNITDIR_FCL-PROCESS:=$(firstword $(UNITDIR_FCL-PROCESS))
+else
+UNITDIR_FCL-PROCESS=
+endif
+endif
+ifdef UNITDIR_FCL-PROCESS
+override COMPILER_UNITDIR+=$(UNITDIR_FCL-PROCESS)
+endif
+ifdef UNITDIR_FPMAKE_FCL-PROCESS
+override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_FCL-PROCESS)
+endif
+endif
+ifdef REQUIRE_PACKAGES_HASH
+PACKAGEDIR_HASH:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /hash/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_HASH),)
+ifneq ($(wildcard $(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX)),)
+UNITDIR_HASH=$(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX)
+else
+UNITDIR_HASH=$(PACKAGEDIR_HASH)
+endif
+ifneq ($(wildcard $(PACKAGEDIR_HASH)/units/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_HASH=$(PACKAGEDIR_HASH)/units/$(SOURCESUFFIX)
+else
+ifneq ($(wildcard $(PACKAGEDIR_HASH)/units_bs/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_HASH=$(PACKAGEDIR_HASH)/units_bs/$(SOURCESUFFIX)
+else
+UNITDIR_FPMAKE_HASH=$(PACKAGEDIR_HASH)
+endif
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_HASH)/$(FPCMADE):
+	$(MAKE) -C $(PACKAGEDIR_HASH) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_HASH)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_HASH=
+UNITDIR_HASH:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /hash/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_HASH),)
+UNITDIR_HASH:=$(firstword $(UNITDIR_HASH))
+else
+UNITDIR_HASH=
+endif
+endif
+ifdef UNITDIR_HASH
+override COMPILER_UNITDIR+=$(UNITDIR_HASH)
+endif
+ifdef UNITDIR_FPMAKE_HASH
+override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_HASH)
+endif
+endif
+ifdef REQUIRE_PACKAGES_LIBTAR
+PACKAGEDIR_LIBTAR:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /libtar/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_LIBTAR),)
+ifneq ($(wildcard $(PACKAGEDIR_LIBTAR)/units/$(TARGETSUFFIX)),)
+UNITDIR_LIBTAR=$(PACKAGEDIR_LIBTAR)/units/$(TARGETSUFFIX)
+else
+UNITDIR_LIBTAR=$(PACKAGEDIR_LIBTAR)
+endif
+ifneq ($(wildcard $(PACKAGEDIR_LIBTAR)/units/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_LIBTAR=$(PACKAGEDIR_LIBTAR)/units/$(SOURCESUFFIX)
+else
+ifneq ($(wildcard $(PACKAGEDIR_LIBTAR)/units_bs/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_LIBTAR=$(PACKAGEDIR_LIBTAR)/units_bs/$(SOURCESUFFIX)
+else
+UNITDIR_FPMAKE_LIBTAR=$(PACKAGEDIR_LIBTAR)
+endif
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_LIBTAR)/$(FPCMADE):
+	$(MAKE) -C $(PACKAGEDIR_LIBTAR) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_LIBTAR)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_LIBTAR=
+UNITDIR_LIBTAR:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /libtar/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_LIBTAR),)
+UNITDIR_LIBTAR:=$(firstword $(UNITDIR_LIBTAR))
+else
+UNITDIR_LIBTAR=
+endif
+endif
+ifdef UNITDIR_LIBTAR
+override COMPILER_UNITDIR+=$(UNITDIR_LIBTAR)
+endif
+ifdef UNITDIR_FPMAKE_LIBTAR
+override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_LIBTAR)
+endif
+endif
+ifdef REQUIRE_PACKAGES_FPMKUNIT
+PACKAGEDIR_FPMKUNIT:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_FPMKUNIT),)
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)),)
+UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)
+else
+UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
+endif
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units/$(SOURCESUFFIX)
+else
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)
+else
+UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
+endif
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_FPMKUNIT)/$(FPCMADE):
+	$(MAKE) -C $(PACKAGEDIR_FPMKUNIT) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_FPMKUNIT)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_FPMKUNIT=
+UNITDIR_FPMKUNIT:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_FPMKUNIT),)
+UNITDIR_FPMKUNIT:=$(firstword $(UNITDIR_FPMKUNIT))
+else
+UNITDIR_FPMKUNIT=
+endif
+endif
+ifdef UNITDIR_FPMKUNIT
+override COMPILER_UNITDIR+=$(UNITDIR_FPMKUNIT)
+endif
+ifdef UNITDIR_FPMAKE_FPMKUNIT
+override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_FPMKUNIT)
+endif
+endif
+ifdef REQUIRE_PACKAGES_GTK2
+PACKAGEDIR_GTK2:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_GTK2),)
+ifneq ($(wildcard $(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)),)
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)
+else
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)
+endif
+ifneq ($(wildcard $(PACKAGEDIR_GTK2)/units/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_GTK2=$(PACKAGEDIR_GTK2)/units/$(SOURCESUFFIX)
+else
+ifneq ($(wildcard $(PACKAGEDIR_GTK2)/units_bs/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_GTK2=$(PACKAGEDIR_GTK2)/units_bs/$(SOURCESUFFIX)
+else
+UNITDIR_FPMAKE_GTK2=$(PACKAGEDIR_GTK2)
+endif
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_GTK2)/$(FPCMADE):
+	$(MAKE) -C $(PACKAGEDIR_GTK2) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_GTK2)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_GTK2=
+UNITDIR_GTK2:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_GTK2),)
+UNITDIR_GTK2:=$(firstword $(UNITDIR_GTK2))
+else
+UNITDIR_GTK2=
+endif
+endif
+ifdef UNITDIR_GTK2
+override COMPILER_UNITDIR+=$(UNITDIR_GTK2)
+endif
+ifdef UNITDIR_FPMAKE_GTK2
+override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_GTK2)
+endif
+endif
+ifndef NOCPUDEF
+override FPCOPTDEF=$(ARCH)
+endif
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+ifneq ($(CPU_TARGET),$(CPU_SOURCE))
+override FPCOPT+=-P$(ARCH)
+endif
+ifeq ($(OS_SOURCE),openbsd)
+override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
+override FPCMAKEOPT+=-FD$(NEW_BINUTILS_PATH)
+override FPMAKE_BUILD_OPT+=-FD$(NEW_BINUTILS_PATH)
+endif
+ifndef CROSSBOOTSTRAP
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-XP$(BINUTILSPREFIX)
+ifneq ($(RLINKPATH),)
+override FPCOPT+=-Xr$(RLINKPATH)
+endif
+endif
+endif
+ifndef CROSSCOMPILE
+ifneq ($(BINUTILSPREFIX),)
+override FPCMAKEOPT+=-XP$(BINUTILSPREFIX)
+override FPMAKE_BUILD_OPT+=-XP$(BINUTILSPREFIX)
+endif
+endif
+ifdef UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
+endif
+ifdef LIBDIR
+override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
+endif
+ifdef OBJDIR
+override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
+endif
+ifdef INCDIR
+override FPCOPT+=$(addprefix -Fi,$(INCDIR))
+endif
+ifdef LINKSMART
+override FPCOPT+=-XX
+endif
+ifdef CREATESMART
+override FPCOPT+=-CX
+endif
+ifdef DEBUG
+override FPCOPT+=-gl
+override FPCOPTDEF+=DEBUG
+endif
+ifdef RELEASE
+FPCCPUOPT:=-O2
+override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
+override FPCOPTDEF+=RELEASE
+endif
+ifdef STRIP
+override FPCOPT+=-Xs
+endif
+ifdef OPTIMIZE
+override FPCOPT+=-O2
+endif
+ifdef VERBOSE
+override FPCOPT+=-vwni
+endif
+ifdef COMPILER_OPTIONS
+override FPCOPT+=$(COMPILER_OPTIONS)
+endif
+ifdef COMPILER_UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
+endif
+ifdef COMPILER_LIBRARYDIR
+override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
+endif
+ifdef COMPILER_OBJECTDIR
+override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
+endif
+ifdef COMPILER_INCLUDEDIR
+override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
+endif
+ifdef CROSSBINDIR
+override FPCOPT+=-FD$(CROSSBINDIR)
+endif
+ifdef COMPILER_TARGETDIR
+override FPCOPT+=-FE$(COMPILER_TARGETDIR)
+ifeq ($(COMPILER_TARGETDIR),.)
+override TARGETDIRPREFIX=
+else
+override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
+endif
+endif
+ifdef COMPILER_UNITTARGETDIR
+override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
+ifeq ($(COMPILER_UNITTARGETDIR),.)
+override UNITTARGETDIRPREFIX=
+else
+override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
+endif
+else
+ifdef COMPILER_TARGETDIR
+override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
+override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
+endif
+endif
+ifdef SYSROOTPATH
+override FPCOPT+=-XR$(SYSROOTPATH)
+else
+ifeq ($(OS_TARGET),$(OS_SOURCE))
+ifeq ($(OS_TARGET),darwin)
+ifeq ($(CPU_TARGET),aarch64)
+ifneq ($(wildcard /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk),)
+override FPCOPT+=-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+endif
+endif
+endif
+endif
+endif
+ifdef CREATESHARED
+override FPCOPT+=-Cg
+endif
+ifneq ($(filter $(OS_TARGET),dragonfly freebsd openbsd netbsd linux solaris),)
+ifneq ($(filter $(CPU_TARGET),x86_64 mips mipsel mips64 mips64el riscv64 powerpc64),)
+override FPCOPT+=-Cg
+endif
+endif
+ifdef LINKSHARED
+endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
+override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
+endif
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef FPMAKEBUILDOPT
+override FPMAKE_BUILD_OPT+=$(FPMAKEBUILDOPT)
+endif
+ifdef FPCOPTDEF
+override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
+endif
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+ifdef USEENV
+override FPCEXTCMD:=$(FPCOPT)
+override FPCOPT:=!FPCEXTCMD
+export FPCEXTCMD
+endif
+override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
+override ACROSSCOMPILE=1
+endif
+ifdef ACROSSCOMPILE
+override FPCOPT+=$(CROSSOPT)
+endif
+override COMPILER:=$(strip $(FPC) $(FPCOPT))
+ifneq (,$(filter -sh,$(COMPILER)))
+UseEXECPPAS=1
+endif
+ifneq (,$(filter -s,$(COMPILER)))
+ifeq ($(FULL_SOURCE),$(FULL_TARGET))
+UseEXECPPAS=1
+endif
+endif
+ifneq ($(UseEXECPPAS),1)
+EXECPPAS=
+else
+ifdef RUNBATCH
+EXECPPAS:=@$(RUNBATCH) $(PPAS)
+else
+EXECPPAS:=@$(PPAS)
+endif
+endif
+ifdef TARGET_RSTS
+override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
+override CLEANRSTFILES+=$(RSTFILES)
+endif
+.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
+ifdef INSTALL_UNITS
+override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
+endif
+ifdef INSTALL_BUILDUNIT
+override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
+endif
+ifdef INSTALLPPUFILES
+ifneq ($(IMPORTLIBPREFIX)-$(STATICLIBEXT),$(STATICLIBPREFIX)-$(STATICLIBEXT))
+override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
+else
+override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
+endif
+ifneq ($(UNITTARGETDIRPREFIX),)
+override INSTALLPPUFILENAMES:=$(notdir $(INSTALLPPUFILES))
+override INSTALLPPULINKFILENAMES:=$(notdir $(INSTALLPPULINKFILES))
+override INSTALLPPUFILES=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILENAMES))
+override INSTALLPPULINKFILES=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILENAMES)))
+endif
+override INSTALL_CREATEPACKAGEFPC=1
+endif
+ifdef INSTALLEXEFILES
+ifneq ($(TARGETDIRPREFIX),)
+override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
+endif
+endif
+fpc_install: all $(INSTALLTARGET)
+ifdef INSTALLEXEFILES
+	$(MKDIR) $(INSTALL_BINDIR)
+	$(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
+endif
+ifdef INSTALL_CREATEPACKAGEFPC
+ifdef FPCMAKE
+ifdef PACKAGE_VERSION
+ifneq ($(wildcard Makefile.fpc),)
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
+endif
+endif
+endif
+ifdef INSTALLPPUFILES
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
+ifneq ($(INSTALLPPULINKFILES),)
+	$(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
+endif
+ifneq ($(wildcard $(LIB_FULLNAME)),)
+	$(MKDIR) $(INSTALL_LIBDIR)
+	$(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
+ifdef inUnix
+	ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
+endif
+endif
+endif
+ifdef INSTALL_FILES
+	$(MKDIR) $(INSTALL_DATADIR)
+	$(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
+endif
+fpc_sourceinstall: distclean
+	$(MKDIR) $(INSTALL_SOURCEDIR)
+	$(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
+fpc_exampleinstall: $(EXAMPLEINSTALLTARGET) $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
+ifdef HASEXAMPLES
+	$(MKDIR) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef EXAMPLESOURCEFILES
+	$(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef TARGET_EXAMPLEDIRS
+	$(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
+endif
+.PHONY: fpc_distinstall
+fpc_distinstall: install exampleinstall
+.PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall
+ifndef PACKDIR
+ifndef inUnix
+PACKDIR=$(BASEDIR)/../fpc-pack
+else
+PACKDIR=/tmp/fpc-pack
+endif
+endif
+ifndef ZIPNAME
+ifdef DIST_ZIPNAME
+ZIPNAME=$(DIST_ZIPNAME)
+else
+ZIPNAME=$(PACKAGE_NAME)
+endif
+endif
+ifndef FULLZIPNAME
+FULLZIPNAME=$(ZIPCROSSPREFIX)$(ZIPPREFIX)$(ZIPNAME)$(ZIPSUFFIX)
+endif
+ifndef ZIPTARGET
+ifdef DIST_ZIPTARGET
+ZIPTARGET=DIST_ZIPTARGET
+else
+ZIPTARGET=install
+endif
+endif
+ifndef USEZIP
+ifdef inUnix
+USETAR=1
+endif
+endif
+ifndef inUnix
+USEZIPWRAPPER=1
+endif
+ifdef USEZIPWRAPPER
+ZIPPATHSEP=$(PATHSEP)
+ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(SRCBATCHEXT))
+else
+ZIPPATHSEP=/
+endif
+ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))
+ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))
+ifdef USETAR
+ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT)
+ZIPCMD_ZIP:=$(TARPROG) c$(TAROPT)f $(ZIPDESTFILE) *
+else
+ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT)
+ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
+endif
+fpc_zipinstall:
+	$(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1
+	$(MKDIR) $(DIST_DESTDIR)
+	$(DEL) $(ZIPDESTFILE)
+ifdef USEZIPWRAPPER
+ifneq ($(ECHOREDIR),echo)
+	$(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPER)
+	$(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER)
+	$(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPPER)
+else
+	echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
+	echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
+	echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
+endif
+ifdef inUnix
+	/bin/sh $(ZIPWRAPPER)
+else
+ifdef RUNBATCH
+	$(RUNBATCH) $(ZIPWRAPPER)
+else
+	$(ZIPWRAPPER)
+endif
+endif
+	$(DEL) $(ZIPWRAPPER)
+else
+	$(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
+endif
+	$(DELTREE) $(PACKDIR)
+fpc_zipsourceinstall:
+	$(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=$(ZIPSOURCESUFFIX)
+fpc_zipexampleinstall:
+ifdef HASEXAMPLES
+	$(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=$(ZIPEXAMPLESUFFIX)
+endif
+fpc_zipdistinstall:
+	$(MAKE) fpc_zipinstall ZIPTARGET=distinstall
+.PHONY: fpc_clean fpc_cleanall fpc_distclean
+ifdef EXEFILES
+override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
+override CLEANEXEDBGFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEDBGFILES))
+endif
+ifdef CLEAN_PROGRAMS
+override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
+override CLEANEXEDBGFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEDBGEXT), $(CLEAN_PROGRAMS)))
+endif
+ifdef CLEAN_UNITS
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
+endif
+ifdef CLEANPPUFILES
+override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
+ifdef DEBUGSYMEXT
+override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
+endif
+override CLEANPPUFILENAMES:=$(CLEANPPUFILES)
+override CLEANPPUFILES=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILENAMES))
+override CLEANPPULINKFILENAMES:=$(CLEANPPULINKFILES)
+override CLEANPPULINKFILES=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILENAMES)))
+endif
+fpc_clean: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+	-$(DEL) $(CLEANEXEFILES)
+endif
+ifdef CLEANEXEDBGFILES
+	-$(DELTREE) $(CLEANEXEDBGFILES)
+endif
+ifdef CLEANPPUFILES
+	-$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+	-$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+	-$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+ifdef CLEAN_FILES
+	-$(DEL) $(CLEAN_FILES)
+endif
+ifdef LIB_NAME
+	-$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
+endif
+	-$(DEL) $(FPCMADE) *$(FULL_TARGET).fpm Package.fpc *$(ASMEXT)
+	-$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res
+	-$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
+fpc_cleanall: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+	-$(DEL) $(CLEANEXEFILES)
+endif
+ifdef COMPILER_UNITTARGETDIR
+ifdef CLEANPPUFILES
+	-$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+	-$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+	-$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+endif
+ifdef CLEAN_FILES
+	-$(DEL) $(CLEAN_FILES)
+endif
+	-$(DELTREE) units
+	-$(DELTREE) bin
+	-$(DEL) *$(OEXT) *$(LTOEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+ifneq ($(PPUEXT),.ppu)
+	-$(DEL) *.o *.ppu *.a
+endif
+	-$(DELTREE) *$(SMARTEXT)
+	-$(DEL) fpcmade.* Package.fpc *.fpm
+	-$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res
+	-$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
+ifdef AOUTEXT
+	-$(DEL) *$(AOUTEXT)
+endif
+ifdef DEBUGSYMEXT
+	-$(DEL) *$(DEBUGSYMEXT)
+endif
+ifdef LOCALFPMAKEBIN
+	-$(DEL) $(LOCALFPMAKEBIN)
+	-$(DEL) $(FPMAKEBINOBJ)
+endif
+fpc_distclean: cleanall
+.PHONY: fpc_baseinfo
+override INFORULES+=fpc_baseinfo
+fpc_baseinfo:
+	@$(ECHO)
+	@$(ECHO)  == Package info ==
+	@$(ECHO)  Package Name..... $(PACKAGE_NAME)
+	@$(ECHO)  Package Version.. $(PACKAGE_VERSION)
+	@$(ECHO)
+	@$(ECHO)  == Configuration info ==
+	@$(ECHO)
+	@$(ECHO)  FPC.......... $(FPC)
+	@$(ECHO)  FPC Version.. $(FPC_VERSION)
+	@$(ECHO)  Source CPU... $(CPU_SOURCE)
+	@$(ECHO)  Target CPU... $(CPU_TARGET)
+	@$(ECHO)  Source OS.... $(OS_SOURCE)
+	@$(ECHO)  Target OS.... $(OS_TARGET)
+	@$(ECHO)  Full Source.. $(FULL_SOURCE)
+	@$(ECHO)  Full Target.. $(FULL_TARGET)
+	@$(ECHO)  SourceSuffix. $(SOURCESUFFIX)
+	@$(ECHO)  TargetSuffix. $(TARGETSUFFIX)
+	@$(ECHO)  FPC fpmake... $(FPCFPMAKE)
+	@$(ECHO)
+	@$(ECHO)  == Directory info ==
+	@$(ECHO)
+	@$(ECHO)  Required pkgs... $(REQUIRE_PACKAGES)
+	@$(ECHO)
+	@$(ECHO)  Basedir......... $(BASEDIR)
+	@$(ECHO)  FPCDir.......... $(FPCDIR)
+	@$(ECHO)  CrossBinDir..... $(CROSSBINDIR)
+	@$(ECHO)  UnitsDir........ $(UNITSDIR)
+	@$(ECHO)  PackagesDir..... $(PACKAGESDIR)
+	@$(ECHO)
+	@$(ECHO)  GCC library..... $(GCCLIBDIR)
+	@$(ECHO)  Other library... $(OTHERLIBDIR)
+	@$(ECHO)
+	@$(ECHO)  == Tools info ==
+	@$(ECHO)
+	@$(ECHO)  As........ $(AS)
+	@$(ECHO)  Ld........ $(LD)
+	@$(ECHO)  Ar........ $(AR)
+	@$(ECHO)  Rc........ $(RC)
+	@$(ECHO)
+	@$(ECHO)  Mv........ $(MVPROG)
+	@$(ECHO)  Cp........ $(CPPROG)
+	@$(ECHO)  Rm........ $(RMPROG)
+	@$(ECHO)  GInstall.. $(GINSTALL)
+	@$(ECHO)  Echo...... $(ECHO)
+	@$(ECHO)  Shell..... $(SHELL)
+	@$(ECHO)  Date...... $(DATE)
+	@$(ECHO)  FPCMake... $(FPCMAKE)
+	@$(ECHO)  PPUMove... $(PPUMOVE)
+	@$(ECHO)  Zip....... $(ZIPPROG)
+	@$(ECHO)
+	@$(ECHO)  == Object info ==
+	@$(ECHO)
+	@$(ECHO)  Target Loaders........ $(TARGET_LOADERS)
+	@$(ECHO)  Target Units.......... $(TARGET_UNITS)
+	@$(ECHO)  Target Implicit Units. $(TARGET_IMPLICITUNITS)
+	@$(ECHO)  Target Programs....... $(TARGET_PROGRAMS)
+	@$(ECHO)  Target Dirs........... $(TARGET_DIRS)
+	@$(ECHO)  Target Examples....... $(TARGET_EXAMPLES)
+	@$(ECHO)  Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
+	@$(ECHO)
+	@$(ECHO)  Clean Units......... $(CLEAN_UNITS)
+	@$(ECHO)  Clean Files......... $(CLEAN_FILES)
+	@$(ECHO)
+	@$(ECHO)  Install Units....... $(INSTALL_UNITS)
+	@$(ECHO)  Install Files....... $(INSTALL_FILES)
+	@$(ECHO)
+	@$(ECHO)  == Install info ==
+	@$(ECHO)
+	@$(ECHO)  DateStr.............. $(DATESTR)
+	@$(ECHO)  ZipName.............. $(ZIPNAME)
+	@$(ECHO)  ZipPrefix............ $(ZIPPREFIX)
+	@$(ECHO)  ZipCrossPrefix....... $(ZIPCROSSPREFIX)
+	@$(ECHO)  ZipSuffix............ $(ZIPSUFFIX)
+	@$(ECHO)  FullZipName.......... $(FULLZIPNAME)
+	@$(ECHO)  Install FPC Package.. $(INSTALL_FPCPACKAGE)
+	@$(ECHO)
+	@$(ECHO)  Install base dir..... $(INSTALL_BASEDIR)
+	@$(ECHO)  Install binary dir... $(INSTALL_BINDIR)
+	@$(ECHO)  Install library dir.. $(INSTALL_LIBDIR)
+	@$(ECHO)  Install units dir.... $(INSTALL_UNITDIR)
+	@$(ECHO)  Install source dir... $(INSTALL_SOURCEDIR)
+	@$(ECHO)  Install doc dir...... $(INSTALL_DOCDIR)
+	@$(ECHO)  Install example dir.. $(INSTALL_EXAMPLEDIR)
+	@$(ECHO)  Install data dir..... $(INSTALL_DATADIR)
+	@$(ECHO)
+	@$(ECHO)  Dist destination dir. $(DIST_DESTDIR)
+	@$(ECHO)  Dist zip name........ $(DIST_ZIPNAME)
+	@$(ECHO)
+.PHONY: fpc_info
+fpc_info: $(INFORULES)
+.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
+	fpc_makefile_dirs
+fpc_makefile:
+	$(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
+fpc_makefile_sub1:
+ifdef TARGET_DIRS
+	$(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
+endif
+ifdef TARGET_EXAMPLEDIRS
+	$(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
+endif
+fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
+fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
+fpc_makefiles: fpc_makefile fpc_makefile_dirs
+units:
+examples:
+shared:
+sourceinstall: fpc_sourceinstall
+exampleinstall: fpc_exampleinstall
+zipexampleinstall: fpc_zipexampleinstall
+info: fpc_info
+makefiles: fpc_makefiles
+.PHONY: units examples shared sourceinstall exampleinstall zipexampleinstall info makefiles
+ifneq ($(wildcard fpcmake.loc),)
+include fpcmake.loc
+endif
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+override FPCOPT:=$(filter-out $(addprefix -Fu,$(COMPILER_UNITDIR)),$(FPCOPT))# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=..
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
+.NOTPARALLEL:
+fpmake$(SRCEXEEXT): fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake$(SRCEXEEXT)
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake$(SRCEXEEXT)
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake$(SRCEXEEXT)
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake$(SRCEXEEXT)
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+	{ $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+	$(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake$(SRCEXEEXT)
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --baseinstalldir=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+distinstall:	fpmake$(SRCEXEEXT)
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie -fsp 0
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --baseinstalldir=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR) -ie -fsp 0
+endif
+zipinstall:	fpmake$(SRCEXEEXT)
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake$(SRCEXEEXT)
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie -fsp 0
+zipsourceinstall:	fpmake$(SRCEXEEXT)
+ifdef UNIXHier
+	$(LOCALFPMAKE) archive $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) --prefix=share/src/fpc-\$$\(PACKAGEVERSION\)/$(INSTALL_FPCSUBDIR)/\$$\(PACKAGEDIRECTORY\)
+else
+	$(LOCALFPMAKE) archive $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) --prefix=source\\$(INSTALL_FPCSUBDIR)\\\$$\(PACKAGEDIRECTORY\)
+endif

+ 102 - 0
packages/gstreamer/Makefile.fpc

@@ -0,0 +1,102 @@
+#
+#   Makefile.fpc for running fpmake
+#
+
+[package]
+name=gtk2
+version=3.3.1
+
+[require]
+packages=rtl fpmkunit gtk2
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard ./fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=./fpmake$(SRCEXEEXT)
+
+[rules]
+# Do not pass the Makefile's unit and binary target locations. Fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Do not pass the package-unitdirectories. Fpmake adds those and this way they don't apear in the .fpm
+override FPCOPT:=$(filter-out $(addprefix -Fu,$(COMPILER_UNITDIR)),$(FPCOPT))# Compose general fpmake-parameters
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=..
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
+.NOTPARALLEL:
+
+fpmake$(SRCEXEEXT): fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake$(SRCEXEEXT)
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake$(SRCEXEEXT)
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake$(SRCEXEEXT)
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake$(SRCEXEEXT)
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake$(SRCEXEEXT)
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --baseinstalldir=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources and omits the location of the source-
+# files from the fpunits.cfg files.
+distinstall:	fpmake$(SRCEXEEXT)
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie -fsp 0
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --baseinstalldir=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR) -ie -fsp 0
+endif
+zipinstall:	fpmake$(SRCEXEEXT)
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake$(SRCEXEEXT)
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie -fsp 0
+zipsourceinstall:	fpmake$(SRCEXEEXT)
+ifdef UNIXHier
+	$(LOCALFPMAKE) archive $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) --prefix=share/src/fpc-\$$\(PACKAGEVERSION\)/$(INSTALL_FPCSUBDIR)/\$$\(PACKAGEDIRECTORY\)
+else
+	$(LOCALFPMAKE) archive $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) --prefix=source\\$(INSTALL_FPCSUBDIR)\\\$$\(PACKAGEDIRECTORY\)
+endif

+ 57 - 0
packages/gstreamer/example/playmp3.lpi

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+  <ProjectOptions>
+    <Version Value="12"/>
+    <General>
+      <Flags>
+        <MainUnitHasCreateFormStatements Value="False"/>
+        <MainUnitHasTitleStatement Value="False"/>
+        <MainUnitHasScaledStatement Value="False"/>
+      </Flags>
+      <SessionStorage Value="InProjectDir"/>
+      <Title Value="playmp3"/>
+      <UseAppBundle Value="False"/>
+      <ResourceType Value="res"/>
+    </General>
+    <BuildModes>
+      <Item Name="Default" Default="True"/>
+    </BuildModes>
+    <PublishOptions>
+      <Version Value="2"/>
+      <UseFileFilters Value="True"/>
+    </PublishOptions>
+    <RunParams>
+      <FormatVersion Value="2"/>
+    </RunParams>
+    <Units>
+      <Unit>
+        <Filename Value="playmp3.pp"/>
+        <IsPartOfProject Value="True"/>
+      </Unit>
+    </Units>
+  </ProjectOptions>
+  <CompilerOptions>
+    <Version Value="11"/>
+    <Target>
+      <Filename Value="playmp3"/>
+    </Target>
+    <SearchPaths>
+      <IncludeFiles Value="$(ProjOutDir)"/>
+      <OtherUnitFiles Value="../src"/>
+      <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
+    </SearchPaths>
+  </CompilerOptions>
+  <Debugging>
+    <Exceptions>
+      <Item>
+        <Name Value="EAbort"/>
+      </Item>
+      <Item>
+        <Name Value="ECodetoolError"/>
+      </Item>
+      <Item>
+        <Name Value="EFOpenError"/>
+      </Item>
+    </Exceptions>
+  </Debugging>
+</CONFIG>

+ 79 - 0
packages/gstreamer/example/playmp3.pp

@@ -0,0 +1,79 @@
+program playmp3;
+{$mode objfpc}
+{$h+}
+
+uses sysutils, glib2, gst;
+
+Var
+  pipeline : PGstElement = Nil;
+  filesrc : PGstElement = Nil;
+  msg: PGstMessage = Nil;
+  bus : PGstBus = Nil;
+  msgError : PGError = Nil;
+  error : PGError = Nil;
+  dbg : PChar;
+  FN : String;
+
+
+begin
+  if (ParamCount<>1) then
+    begin
+    Writeln ('usage: ',ExtractFileName(ParamSTr(0)),' <filename>');
+    Halt(1);
+    end;
+  gst_init (@argc, @argv);
+
+
+  pipeline:=gst_parse_launch ('filesrc name=my_filesrc !  mpegaudioparse ! mpg123audiodec ! audioconvert ! audioresample ! pulsesink', @error);
+  if (pipeline=nil) then
+    begin
+    Writeln('Parse error: ', error^.message);
+    Halt(2);
+    end;
+
+  filesrc := gst_bin_get_by_name (GST_BIN (pipeline), 'my_filesrc');
+  FN:=ParamStr(1);
+  g_object_set (filesrc, 'location', PChar(FN), NULL);
+  g_object_unref (filesrc);
+
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+  bus := gst_element_get_bus (pipeline);
+
+  {* wait until we either get an EOS or an ERROR message. Note that in a real
+   * program you would probably not use gst_bus_poll(), but rather set up an
+   * async signal watch on the bus and run a main loop and connect to the
+   * bus's signals to catch certain messages or all messages }
+
+  msg:=gst_bus_poll (bus, TGstMessageType(Ord(GST_MESSAGE_EOS) or Ord (GST_MESSAGE_ERROR)), -1);
+
+  case GST_MESSAGE_TYPE (msg) of
+    GST_MESSAGE_EOS:
+      Writeln('EOS');
+    GST_MESSAGE_ERROR:
+      begin
+      gst_message_parse_error (msg, @msgError, @dbg);
+      if (MsgError<>Nil) then
+        begin
+        Writeln('ERROR: ', MsgError^.message);
+        g_error_free (MsgError);
+        end;
+      if (dbg<>Nil) then
+        begin
+        writeln('[Debug details: [', dbg,']');
+        g_free (dbg);
+        end;
+      end;
+  else
+    Writeln('Unexpected message of type', GST_MESSAGE_TYPE (msg));
+  end;
+
+  gst_message_unref (msg);
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (pipeline);
+  gst_object_unref (bus);
+
+
+end.
+

+ 122 - 0
packages/gstreamer/fpmake.pp

@@ -0,0 +1,122 @@
+{$ifndef ALLPACKAGES}
+{$mode objfpc}{$H+}
+program fpmake;
+
+uses fpmkunit;
+
+Var
+  P : TPackage;
+  T : TTarget;
+begin
+  With Installer do
+    begin
+{$endif ALLPACKAGES}
+
+    P:=AddPackage('gst');
+{$ifdef ALLPACKAGES}
+    P.Directory:=ADirectory;
+{$endif ALLPACKAGES}
+    P.Version:='3.3.1';
+    P.SupportBuildModes := [bmOneByOne];
+    P.OSes:=AllUnixOSes+[Win32,Win64]-[darwin,iphonesim,ios,Android];
+    if Defaults.CPU<>arm then
+      P.OSes := P.OSes + [darwin];
+
+    P.Author := 'Library: Wim Waytack, header: Michael Van Canneyt';
+    P.License := 'Library: LGPL2.1, header: LGPL with modification, ';
+    P.HomepageURL := 'www.freepascal.org';
+    P.Email := '';
+    P.Description := 'Header to the GStreamer libgstreamer-1.0 library.';
+    P.NeedLibC:= true;  // true for headers that indirectly link to libc?
+
+    P.Dependencies.Add('gtk2');
+
+    P.SourcePath.Add('src');
+    P.IncludePath.Add('src');
+    T:=P.Targets.AddUnit('gst.pp');
+    With T.Dependencies do
+      begin
+      AddInclude('elementfactory.inc');
+      AddInclude('gstaliases.inc');
+      AddInclude('gstallocator.inc');
+      AddInclude('gstatomicqueue.inc');
+      AddInclude('gstbin.inc');
+      AddInclude('gstbuffer.inc');
+      AddInclude('gstbufferlist.inc');
+      AddInclude('gstbufferpool.inc');
+      AddInclude('gstbus.inc');
+      AddInclude('gstcapsfeatures.inc');
+      AddInclude('gstcaps.inc');
+      AddInclude('gstchildproxy.inc');
+      AddInclude('gstclock.inc');
+      AddInclude('gstcontext.inc');
+      AddInclude('gstcontrolbinding.inc');
+      AddInclude('gstcontrolsource.inc');
+      AddInclude('gstdatetime.inc');
+      AddInclude('gstdebugutils.inc');
+      AddInclude('gstdevice.inc');
+      AddInclude('gstdevicemonitor.inc');
+      AddInclude('gstdeviceproviderfactory.inc');
+      AddInclude('gstdeviceprovider.inc');
+      AddInclude('gstdynamictypefactory.inc');
+      AddInclude('gstelementfactory.inc');
+      AddInclude('gstelement.inc');
+      AddInclude('gstelementmetadata.inc');
+      AddInclude('gstenum.inc');
+      AddInclude('gstenumtypes.inc');
+      AddInclude('gsterror.inc');
+      AddInclude('gstevent.inc');
+      AddInclude('gstformat.inc');
+      AddInclude('gstghostpad.inc');
+      AddInclude('gstinfo.inc');
+      AddInclude('gstiterator.inc');
+      AddInclude('gstmemory.inc');
+      AddInclude('gstmessage.inc');
+      AddInclude('gstmeta.inc');
+      AddInclude('gstminiobject.inc');
+      AddInclude('gstobject.inc');
+      AddInclude('gstpad.inc');
+      AddInclude('gstpadtemplate.inc');
+      AddInclude('gstparamspecs.inc');
+      AddInclude('gstparse.inc');
+      AddInclude('gstpipeline.inc');
+      AddInclude('gstpluginfeature.inc');
+      AddInclude('gstplugin.inc');
+      AddInclude('gstpoll.inc');
+      AddInclude('gstpreset.inc');
+      AddInclude('gstpromise.inc');
+      AddInclude('gstprotection.inc');
+      AddInclude('gstquery.inc');
+      AddInclude('gstrec.inc');
+      AddInclude('gstregistry.inc');
+      AddInclude('gstsample.inc');
+      AddInclude('gstsegment.inc');
+      AddInclude('gststreamcollection.inc');
+      AddInclude('gststreams.inc');
+      AddInclude('gststructure.inc');
+      AddInclude('gstsystemclock.inc');
+      AddInclude('gsttaglist.inc');
+      AddInclude('gsttagsetter.inc');
+      AddInclude('gsttask.inc');
+      AddInclude('gsttaskpool.inc');
+      AddInclude('gsttoc.inc');
+      AddInclude('gsttocsetter.inc');
+      AddInclude('gsttracerfactory.inc');
+      AddInclude('gsttracer.inc');
+      AddInclude('gsttracerrecord.inc');
+      AddInclude('gsttypefindfactory.inc');
+      AddInclude('gsttypefind.inc');
+      AddInclude('gsturi.inc');
+      AddInclude('gstutils.inc');
+      AddInclude('gstvalue.inc');
+      AddInclude('gstversion.inc');
+      // Implementations
+      AddInclude('gstmessage_impl.inc');
+      AddInclude('gstbin_impl.inc');
+      end;
+    P.Sources.AddExampleFiles('examples/camrecord.lpr',P.Directory,false,'.');
+{$ifndef ALLPACKAGES}
+    Run;
+    end;
+end.
+{$endif ALLPACKAGES}

+ 0 - 0
packages/gstreamer/src/.inc.h.prep


+ 0 - 0
packages/gstreamer/src/.inc.h.raw


+ 21 - 0
packages/gstreamer/src/elementfactory.inc

@@ -0,0 +1,21 @@
+
+  const
+    gstreamerlib='libgstreamer-1.0'; {Setup as you need}
+
+  { Pointers to basic pascal types, inserted by h2pas conversion program.}
+  Type
+    PLongint  = ^Longint;
+    PSmallInt = ^SmallInt;
+    PByte     = ^Byte;
+    PWord     = ^Word;
+    PDWord    = ^DWord;
+    PDouble   = ^Double;
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+(* error 
+
+

+ 194 - 0
packages/gstreamer/src/gst.pp

@@ -0,0 +1,194 @@
+
+{* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *
+ * gst.h: Main header for GStreamer, apps should include this
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+unit gst;
+
+{$mode objfpc}
+{$h+}
+
+interface
+
+uses sqldbrestbridge, glib2;
+
+const
+  gstreamerlib = 'libgstreamer-1.0'; {Setup as you need}
+
+Const
+  GST_PADDING	=	4;
+  GST_OBJECT_FLAG_LAST = (1 shl 4);
+
+
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+  PLongint  = ^Longint;
+  PSmallInt = ^SmallInt;
+  PByte     = ^Byte;
+  PWord     = ^Word;
+  PDWord    = ^DWord;
+  PDouble   = ^Double;
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+// {$i glib-compat.h>
+
+{$i gstaliases.inc}
+{$i gstenum.inc}
+{$i gstrec.inc}
+
+{$i gstenumtypes.inc}
+{$i gstversion.inc}
+// needed in gstcaps
+{$i gstminiobject.inc}
+// needed in gstcaps.inc
+{$i gstcapsfeatures.inc}
+// needed in gststructure
+{$i gstclock.inc}
+// needed in gststructure
+{$i gstdatetime.inc}
+// needed in gstcaps.inc
+{$i gststructure.inc}
+// needed in gstvalue
+{$i gstcaps.inc}
+// needed in gstminiobject
+{$i gstvalue.inc}
+// needed in gstbuffer
+{$i gstmeta.inc}
+// Needed in format.inc
+{$i gstiterator.inc}
+// needed in gstbufferpool.inc
+{$i gstformat.inc}
+// needed in gstmessage.inc
+{$i gstcontext.inc}
+// needed in gstelement.inc
+{$i gstbus.inc}
+// needed in gstevent.inc
+{$i gstsegment.inc}
+// needed in gstsample
+{$i gstbufferlist.inc}
+// needed in gsttaglist.inc
+{$i gstsample.inc}
+// needed in gststreams.inc
+{$i gsttaglist.inc}
+// needed in gstevent.inc
+{$i gststreams.inc}
+// needed in gstevent.inc
+{$i gststreamcollection.inc}
+// needed in gstevent.inc
+{$i gsttoc.inc}
+// needed in gstpad.inc
+{$i gstevent.inc}
+// needed in gstelementfactory.inc
+{$i gstplugin.inc}
+// needed in gstelementfactory.inc
+{$i gsturi.inc}
+// needed in gstelementfactory.inc
+{$i gstpluginfeature.inc}
+// needed in gstelement.inc
+{$i gstelementfactory.inc}
+// needed in gstallocator.inc
+{$i gstmemory.inc}
+// needed in gstquery.inc
+{$i gstallocator.inc}
+// needed in gstquery.inc
+{$i gstquery.inc}
+// needed in gsttask.inc
+{$i gsttaskpool.inc}
+// needed in gstpad.inc
+{$i gsttask.inc}
+// needed in gstpad.inc
+{$i gstpadtemplate.inc}
+// needed in gstelement.inc
+{$i gstpad.inc}
+// needed in gstdevice.inc
+{$i gstelement.inc}
+// needed in gstmessage.inc
+{$i gstdevice.inc}
+// needed in gstevent
+{$i gstmessage.inc}
+// needed in gstutils
+{$i gstbufferpool.inc}
+{$i gstbuffer.inc}
+// needed in gstutils.h
+{$i gstbin.inc}
+// needed in gstutils.h
+{$i gstparse.inc}
+// needed in gstprotection
+{$i gstutils.inc}
+// needed in gstobject
+{$i gstprotection.inc}
+// needed in gstobject.inc
+{$i gstcontrolbinding.inc}
+{$i gstobject.inc}
+
+{$i gstatomicqueue.inc}
+{$i gstchildproxy.inc}
+{$i gstcontrolsource.inc}
+{$i gstdebugutils.inc}
+{$i gstdevicemonitor.inc}
+{$i gstdeviceprovider.inc}
+{$i gstdeviceproviderfactory.inc}
+{$i gstdynamictypefactory.inc}
+{$i gstelementmetadata.inc}
+{$i gsterror.inc}
+{$i gstghostpad.inc}
+{$i gstinfo.inc}
+{$i gstparamspecs.inc}
+{$i gstpipeline.inc}
+{$i gstpoll.inc}
+{$i gstpreset.inc}
+{$i gstregistry.inc}
+{$i gstpromise.inc}
+{$i gstsystemclock.inc}
+{$i gsttagsetter.inc}
+{$i gsttocsetter.inc}
+{$i gsttracer.inc}
+{$i gsttracerfactory.inc}
+{$i gsttracerrecord.inc}
+{$i gsttypefind.inc}
+
+{$i gsttypefindfactory.inc}
+
+
+procedure gst_init(argc:Plongint; argv:PPPchar);cdecl;external gstreamerlib name 'gst_init';
+function gst_init_check(argc:Plongint; argv:PPPchar; err:PPGError):Tgboolean;cdecl;external gstreamerlib name 'gst_init_check';
+function gst_is_initialized:Tgboolean;cdecl;external gstreamerlib name 'gst_is_initialized';
+function gst_init_get_option_group:PGOptionGroup;cdecl;external gstreamerlib name 'gst_init_get_option_group';
+procedure gst_deinit;cdecl;external gstreamerlib name 'gst_deinit';
+procedure gst_version(major:Pguint; minor:Pguint; micro:Pguint; nano:Pguint);cdecl;external gstreamerlib name 'gst_version';
+function gst_version_string:Pgchar;cdecl;external gstreamerlib name 'gst_version_string';
+function gst_segtrap_is_enabled:Tgboolean;cdecl;external gstreamerlib name 'gst_segtrap_is_enabled';
+procedure gst_segtrap_set_enabled(enabled:Tgboolean);cdecl;external gstreamerlib name 'gst_segtrap_set_enabled';
+function gst_registry_fork_is_enabled:Tgboolean;cdecl;external gstreamerlib name 'gst_registry_fork_is_enabled';
+procedure gst_registry_fork_set_enabled(enabled:Tgboolean);cdecl;external gstreamerlib name 'gst_registry_fork_set_enabled';
+function gst_update_registry:Tgboolean;cdecl;external gstreamerlib name 'gst_update_registry';
+function gst_get_main_executable_path:Pgchar;cdecl;external gstreamerlib name 'gst_get_main_executable_path';
+
+implementation
+
+{$i gstbin_impl.inc}
+{$i gstmessage_impl.inc}
+
+end. 
+

+ 82 - 0
packages/gstreamer/src/gstaliases.inc

@@ -0,0 +1,82 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2022 by Michael Van Canneyt ([email protected]) member of the Free Pascal development team
+
+    compatibility types
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+
+
+
+Type
+  Tguint16 = guint16;
+  TGType = GType;
+  TGUINT = guint;
+  TGpointer = gpointer;
+  Tgchar = gchar;
+  Tgdouble = gdouble;
+  Tgssize = gssize;
+//  TGError = GError;
+  Tgint = gint;
+  Tguint8 = guint8;
+  Tgint64 = gint64;
+//  TGObject = GObject;
+//  TGBytes = GBytes;
+
+  TGboolean = gboolean;
+  Tguint64 = guint64;
+  Tgulong = gulong;
+  Tgconstpointer = gconstpointer;
+  TGHashTable = record end;
+  Tva_list = pointer;
+  PPGDate = ^PGDate;
+  PPGValue = PGValue;
+  Tgfloat = gfloat;
+  Tgsize = gsize;
+  Tguint32 = guint32;
+  Tgint32 = gint32;
+  T_GBytes = record end;
+  TGBytes = T_GBytes;
+  PPGObject = ^PGObject;
+
+  _GMutex = record
+    case integer of
+      0 : ( p : gpointer );
+      1 : ( i : array [0..1] of guint);
+  end;
+  TGMutex = _gmutex;
+
+  T_GRWLock = Record
+    p : gpointer ;
+    i : array[0..1] of guint;
+  end;
+  TGRWLock = T_GRWLock;
+  GRWLock = T_GRWLock;
+
+T_GCond = record
+  p : gpointer ;
+  i : array[0..1] of guint;
+end;
+GCond = T_GCond;
+TGCond = GCond;
+
+  T_GRecMutex = record
+   p: gpointer ;
+   i : Array [0..1] of guint;
+  end;
+  TGRecMutex = T_GRecMutex;
+
+
+  PPGList = ^PGList;
+
+  // GDateTime is opaque
+  TGdateTime = record
+
+  end;

+ 101 - 0
packages/gstreamer/src/gstallocator.inc

@@ -0,0 +1,101 @@
+{* GStreamer
+ * Copyright (C) 2009 Wim Taymans <[email protected]>
+ *
+ * gstallocator.h: Header for memory allocation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+
+  Type
+    P_GstAllocationParams  = ^T_GstAllocationParams;
+    P_GstAllocator  = ^T_GstAllocator;
+    PPGstAllocator = ^P_GstAllocator;
+    P_GstAllocatorClass  = ^T_GstAllocatorClass;
+    PGstAllocationParams  = ^TGstAllocationParams;
+    PGstAllocationParams_autoptr  = ^TGstAllocationParams_autoptr;
+    PGstAllocationParams_listautoptr  = ^TGstAllocationParams_listautoptr;
+    PGstAllocationParams_queueautoptr  = ^TGstAllocationParams_queueautoptr;
+    PGstAllocationParams_slistautoptr  = ^TGstAllocationParams_slistautoptr;
+
+    PGstAllocatorFlags  = ^TGstAllocatorFlags;
+
+
+
+    T_GstAllocationParams = record
+        flags : TGstMemoryFlags;
+        align : Tgsize;
+        prefix : Tgsize;
+        padding : Tgsize;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstAllocationParams = T_GstAllocationParams;
+
+    TGstAllocatorFlags = (
+      GST_ALLOCATOR_FLAG_CUSTOM_ALLOC := GST_OBJECT_FLAG_LAST shl 0,
+      GST_ALLOCATOR_FLAG_LAST := GST_OBJECT_FLAG_LAST shl 16
+    );
+(* Const before type ignored *)
+
+
+
+    T_GstAllocatorClass = record
+        object_class : TGstObjectClass;
+        alloc : function (allocator:PGstAllocator; size:Tgsize; params:PGstAllocationParams):PGstMemory;cdecl;
+        free : procedure (allocator:PGstAllocator; memory:PGstMemory);cdecl;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstAllocatorClass = T_GstAllocatorClass;
+
+    TGstAllocationParams_autoptr = PGstAllocationParams;
+
+    TGstAllocationParams_listautoptr = PGList;
+
+    TGstAllocationParams_slistautoptr = PGSList;
+
+    TGstAllocationParams_queueautoptr = PGQueue;
+
+    function gst_allocation_params_get_type:TGType;cdecl;external gstreamerlib name 'gst_allocation_params_get_type';
+
+  function gst_allocator_get_type:TGType;cdecl;external gstreamerlib name 'gst_allocator_get_type';
+
+(* Const before type ignored *)
+  procedure gst_allocator_register(name:Pgchar; allocator:PGstAllocator);cdecl;external gstreamerlib name 'gst_allocator_register';
+
+(* Const before type ignored *)
+  function gst_allocator_find(name:Pgchar):PGstAllocator;cdecl;external gstreamerlib name 'gst_allocator_find';
+
+  procedure gst_allocator_set_default(allocator:PGstAllocator);cdecl;external gstreamerlib name 'gst_allocator_set_default';
+
+  procedure gst_allocation_params_init(params:PGstAllocationParams);cdecl;external gstreamerlib name 'gst_allocation_params_init';
+
+(* Const before type ignored *)
+  function gst_allocation_params_copy(params:PGstAllocationParams):PGstAllocationParams;cdecl;external gstreamerlib name 'gst_allocation_params_copy';
+
+  procedure gst_allocation_params_free(params:PGstAllocationParams);cdecl;external gstreamerlib name 'gst_allocation_params_free';
+
+  function gst_allocator_alloc(allocator:PGstAllocator; size:Tgsize; params:PGstAllocationParams):PGstMemory;cdecl;external gstreamerlib name 'gst_allocator_alloc';
+
+  procedure gst_allocator_free(allocator:PGstAllocator; memory:PGstMemory);cdecl;external gstreamerlib name 'gst_allocator_free';
+
+  function gst_memory_new_wrapped(flags:TGstMemoryFlags; data:Tgpointer; maxsize:Tgsize; offset:Tgsize; size:Tgsize; 
+             user_data:Tgpointer; notify:TGDestroyNotify):PGstMemory;cdecl;external gstreamerlib name 'gst_memory_new_wrapped';
+
+
+
+    var
+      gst_memory_alignment : Tgsize;cvar;external;
+

+ 61 - 0
packages/gstreamer/src/gstatomicqueue.inc

@@ -0,0 +1,61 @@
+{
+/* GStreamer
+ * Copyright (C) 2009-2010 Edward Hervey <[email protected]>
+ *           (C) 2011 Wim Taymans <[email protected]>
+ *
+ * gstatomicqueue.h:
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    PGstAtomicQueue  = ^TGstAtomicQueue;
+    PGstAtomicQueue_autoptr  = ^TGstAtomicQueue_autoptr;
+    PGstAtomicQueue_listautoptr  = ^TGstAtomicQueue_listautoptr;
+    PGstAtomicQueue_queueautoptr  = ^TGstAtomicQueue_queueautoptr;
+    PGstAtomicQueue_slistautoptr  = ^TGstAtomicQueue_slistautoptr;
+
+
+
+    TGstAtomicQueue = record end;
+    T_GstAtomicQueue = TGstAtomicQueue;
+
+  TGstAtomicQueue_autoptr = PGstAtomicQueue;
+
+  TGstAtomicQueue_listautoptr = PGList;
+
+  TGstAtomicQueue_slistautoptr = PGSList;
+
+  TGstAtomicQueue_queueautoptr = PGQueue;
+
+  function gst_atomic_queue_get_type:TGType;cdecl;external gstreamerlib name 'gst_atomic_queue_get_type';
+
+  function gst_atomic_queue_new(initial_size:Tguint):PGstAtomicQueue;cdecl;external gstreamerlib name 'gst_atomic_queue_new';
+
+  procedure gst_atomic_queue_ref(queue:PGstAtomicQueue);cdecl;external gstreamerlib name 'gst_atomic_queue_ref';
+
+  procedure gst_atomic_queue_unref(queue:PGstAtomicQueue);cdecl;external gstreamerlib name 'gst_atomic_queue_unref';
+
+  procedure gst_atomic_queue_push(queue:PGstAtomicQueue; data:Tgpointer);cdecl;external gstreamerlib name 'gst_atomic_queue_push';
+
+  function gst_atomic_queue_pop(queue:PGstAtomicQueue):Tgpointer;cdecl;external gstreamerlib name 'gst_atomic_queue_pop';
+
+  function gst_atomic_queue_peek(queue:PGstAtomicQueue):Tgpointer;cdecl;external gstreamerlib name 'gst_atomic_queue_peek';
+
+  function gst_atomic_queue_length(queue:PGstAtomicQueue):Tguint;cdecl;external gstreamerlib name 'gst_atomic_queue_length';
+
+

+ 138 - 0
packages/gstreamer/src/gstbin.inc

@@ -0,0 +1,138 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *
+ * gstbin.h: Header for GstBin container object
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+
+
+Const
+    GST_ELEMENT_FLAG_LAST_BIN = (GST_OBJECT_FLAG_LAST shl 10);
+
+  Type
+    P_GstBin  = ^T_GstBin;
+    P_GstBinClass  = ^T_GstBinClass;
+    PGstBin  = ^TGstBin;
+    PGstBin_autoptr  = ^TGstBin_autoptr;
+    PGstBin_listautoptr  = ^TGstBin_listautoptr;
+    PGstBin_queueautoptr  = ^TGstBin_queueautoptr;
+    PGstBin_slistautoptr  = ^TGstBin_slistautoptr;
+    PGstBinFlags  = ^TGstBinFlags;
+    PGstBinPrivate  = ^TGstBinPrivate;
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+    TGstBinPrivate = record end;
+
+    TGstBinFlags = (
+      GST_BIN_FLAG_NO_RESYNC := GST_ELEMENT_FLAG_LAST_BIN shl 0,
+      GST_BIN_FLAG_STREAMS_AWARE := GST_ELEMENT_FLAG_LAST_BIN shl 1,
+      GST_BIN_FLAG_LAST := GST_ELEMENT_FLAG_LAST_BIN shl 5);
+    T_GstBin = record
+        element : TGstElement;
+        numchildren : Tgint;
+        children : PGList;
+        children_cookie : Tguint32;
+        child_bus : PGstBus;
+        messages : PGList;
+        polling : Tgboolean;
+        state_dirty : Tgboolean;
+        clock_dirty : Tgboolean;
+        provided_clock : PGstClock;
+        clock_provider : PGstElement;
+        priv : PGstBinPrivate;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstBin = T_GstBin;
+
+
+
+    T_GstBinClass = record
+        parent_class : TGstElementClass;
+        pool : PGThreadPool;
+        element_added : procedure (bin:PGstBin; child:PGstElement);cdecl;
+        element_removed : procedure (bin:PGstBin; child:PGstElement);cdecl;
+        add_element : function (bin:PGstBin; element:PGstElement):Tgboolean;cdecl;
+        remove_element : function (bin:PGstBin; element:PGstElement):Tgboolean;cdecl;
+        handle_message : procedure (bin:PGstBin; message:PGstMessage);cdecl;
+        do_latency : function (bin:PGstBin):Tgboolean;cdecl;
+        deep_element_added : procedure (bin:PGstBin; sub_bin:PGstBin; child:PGstElement);cdecl;
+        deep_element_removed : procedure (bin:PGstBin; sub_bin:PGstBin; child:PGstElement);cdecl;
+        _gst_reserved : array[0..(4-2)-1] of Tgpointer;
+      end;
+    TGstBinClass = T_GstBinClass;
+    PGstBinClass = ^TGstBinClass;
+
+  TGstBin_autoptr = PGstBin;
+
+  TGstBin_listautoptr = PGList;
+
+  TGstBin_slistautoptr = PGSList;
+
+  TGstBin_queueautoptr = PGQueue;
+
+  function gst_bin_get_type:TGType;cdecl;external gstreamerlib name 'gst_bin_get_type';
+
+
+  function gst_bin_new(name:Pgchar):PGstElement;cdecl;external gstreamerlib name 'gst_bin_new';
+
+  function gst_bin_add(bin:PGstBin; element:PGstElement):Tgboolean;cdecl;external gstreamerlib name 'gst_bin_add';
+
+  function gst_bin_remove(bin:PGstBin; element:PGstElement):Tgboolean;cdecl;external gstreamerlib name 'gst_bin_remove';
+
+
+  function gst_bin_get_by_name(bin:PGstBin; name:Pgchar):PGstElement;cdecl;external gstreamerlib name 'gst_bin_get_by_name';
+
+  function gst_bin_get_by_name_recurse_up(bin:PGstBin; name:Pgchar):PGstElement;cdecl;external gstreamerlib name 'gst_bin_get_by_name_recurse_up';
+
+  function gst_bin_get_by_interface(bin:PGstBin; iface:TGType):PGstElement;cdecl;external gstreamerlib name 'gst_bin_get_by_interface';
+
+  function gst_bin_iterate_elements(bin:PGstBin):PGstIterator;cdecl;external gstreamerlib name 'gst_bin_iterate_elements';
+
+  function gst_bin_iterate_sorted(bin:PGstBin):PGstIterator;cdecl;external gstreamerlib name 'gst_bin_iterate_sorted';
+
+  function gst_bin_iterate_recurse(bin:PGstBin):PGstIterator;cdecl;external gstreamerlib name 'gst_bin_iterate_recurse';
+
+  function gst_bin_iterate_sinks(bin:PGstBin):PGstIterator;cdecl;external gstreamerlib name 'gst_bin_iterate_sinks';
+
+  function gst_bin_iterate_sources(bin:PGstBin):PGstIterator;cdecl;external gstreamerlib name 'gst_bin_iterate_sources';
+
+  function gst_bin_iterate_all_by_interface(bin:PGstBin; iface:TGType):PGstIterator;cdecl;external gstreamerlib name 'gst_bin_iterate_all_by_interface';
+
+  function gst_bin_recalculate_latency(bin:PGstBin):Tgboolean;cdecl;external gstreamerlib name 'gst_bin_recalculate_latency';
+
+  procedure gst_bin_set_suppressed_flags(bin:PGstBin; flags:TGstElementFlags);cdecl;external gstreamerlib name 'gst_bin_set_suppressed_flags';
+
+  function gst_bin_get_suppressed_flags(bin:PGstBin):TGstElementFlags;cdecl;external gstreamerlib name 'gst_bin_get_suppressed_flags';
+
+{ macros }
+
+Function GST_TYPE_BIN : TGType;
+function GST_IS_BIN(obj : pointer) : boolean;
+Function GST_BIN(obj : Pointer) : PgstBin;
+Function GST_BIN_CAST(obj : Pointer) : PGstBin;
+
+Function GST_IS_BIN_CLASS(klass: pointer) : Boolean;
+Function GST_BIN_GET_CLASS(obj : Pointer) : PGstBinClass;
+Function GST_BIN_CLASS(klass : Pointer) : PGstBinClass;
+

+ 41 - 0
packages/gstreamer/src/gstbin_impl.inc

@@ -0,0 +1,41 @@
+
+Function GST_TYPE_BIN : TGType;
+
+begin
+  Result:=gst_bin_get_type ();
+end;
+
+
+function GST_IS_BIN(obj : Pointer) : boolean;
+begin
+  Result:=G_TYPE_CHECK_INSTANCE_TYPE (obj, GST_TYPE_BIN);
+end;
+
+Function GST_IS_BIN_CLASS(klass: Pointer) : Boolean;
+
+begin
+  Result:=G_TYPE_CHECK_CLASS_TYPE(klass, GST_TYPE_BIN);
+end;
+
+Function GST_BIN_GET_CLASS(obj : Pointer) : PGstBinClass;
+begin
+  Result:=PGstBinClass(G_TYPE_INSTANCE_GET_CLASS(obj, GST_TYPE_BIN))
+end;
+
+Function GST_BIN(Obj : Pointer) : PGstBin;
+
+begin
+  Result:=PGstBin(G_TYPE_CHECK_INSTANCE_CAST(obj, GST_TYPE_BIN))
+end;
+
+Function GST_BIN_CAST(obj : Pointer) : PGstBin;
+
+begin
+  Result:=PGstBin(obj)
+end;
+
+Function GST_BIN_CLASS(klass : Pointer) : PGstBinClass;
+
+begin
+   Result:=PGstBinClass(G_TYPE_CHECK_CLASS_CAST(klass,GST_TYPE_BIN));
+end;

+ 286 - 0
packages/gstreamer/src/gstbuffer.inc

@@ -0,0 +1,286 @@
+{* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *
+ * gstbuffer.h: Header for GstBuffer object
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+
+  Type
+    P_GstBuffer  = ^T_GstBuffer;
+    P_GstParentBufferMeta  = ^T_GstParentBufferMeta;
+    P_GstReferenceTimestampMeta  = ^T_GstReferenceTimestampMeta;
+    PGBytes  = ^TGBytes;
+    Pgpointer  = ^Tgpointer;
+    Pgsize  = ^Tgsize;
+    PGstBuffer_autoptr  = ^TGstBuffer_autoptr;
+    PGstBuffer_listautoptr  = ^TGstBuffer_listautoptr;
+    PGstBuffer_queueautoptr  = ^TGstBuffer_queueautoptr;
+    PGstBuffer_slistautoptr  = ^TGstBuffer_slistautoptr;
+    PGstBufferCopyFlags  = ^TGstBufferCopyFlags;
+    PGstBufferFlags  = ^TGstBufferFlags;
+    PGstBufferPool_autoptr  = ^TGstBufferPool_autoptr;
+    PGstBufferPool_listautoptr  = ^TGstBufferPool_listautoptr;
+    PGstBufferPool_queueautoptr  = ^TGstBufferPool_queueautoptr;
+    PGstBufferPool_slistautoptr  = ^TGstBufferPool_slistautoptr;
+    PGstParentBufferMeta  = ^TGstParentBufferMeta;
+    PGstReferenceTimestampMeta  = ^TGstReferenceTimestampMeta;
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+
+  TGstBufferCopyFlags = (
+    GST_BUFFER_COPY_NONE := 0,
+    GST_BUFFER_COPY_FLAGS := 1 shl 0,
+    GST_BUFFER_COPY_TIMESTAMPS := 1 shl 1,
+    GST_BUFFER_COPY_META := 1 shl 2,
+    GST_BUFFER_COPY_MEMORY := 1 shl 3,
+    GST_BUFFER_COPY_MERGE := 1 shl 4,
+    GST_BUFFER_COPY_DEEP_ := 1 shl 5
+  );
+
+    TGstBufferFlags = (
+      GST_BUFFER_FLAG_LIVE := ord(GST_MINI_OBJECT_FLAG_LAST ) shl 0,
+      GST_BUFFER_FLAG_DECODE_ONLY := ord(GST_MINI_OBJECT_FLAG_LAST ) shl 1,
+      GST_BUFFER_FLAG_DISCONT := ord(GST_MINI_OBJECT_FLAG_LAST ) shl 2,
+      GST_BUFFER_FLAG_RESYNC := ord(GST_MINI_OBJECT_FLAG_LAST ) shl 3,
+      GST_BUFFER_FLAG_CORRUPTED := ord(GST_MINI_OBJECT_FLAG_LAST ) shl 4,
+      GST_BUFFER_FLAG_MARKER := ord(GST_MINI_OBJECT_FLAG_LAST ) shl 5,
+      GST_BUFFER_FLAG_HEADER := ord(GST_MINI_OBJECT_FLAG_LAST ) shl 6,
+      GST_BUFFER_FLAG_GAP := ord(GST_MINI_OBJECT_FLAG_LAST ) shl 7,
+      GST_BUFFER_FLAG_DROPPABLE := ord(GST_MINI_OBJECT_FLAG_LAST ) shl 8,
+      GST_BUFFER_FLAG_DELTA_UNIT := ord(GST_MINI_OBJECT_FLAG_LAST ) shl 9,
+      GST_BUFFER_FLAG_TAG_MEMORY := ord(GST_MINI_OBJECT_FLAG_LAST ) shl 10,
+      GST_BUFFER_FLAG_SYNC_AFTER := ord(GST_MINI_OBJECT_FLAG_LAST ) shl 11,
+      GST_BUFFER_FLAG_NON_DROPPABLE := ord(GST_MINI_OBJECT_FLAG_LAST ) shl 12,
+      GST_BUFFER_FLAG_LAST := ord(GST_MINI_OBJECT_FLAG_LAST ) shl 16
+    );
+
+  // T_GstBuffer moved to gstrec.inc
+
+    T_GstParentBufferMeta = record
+        parent : TGstMeta;
+        buffer : PGstBuffer;
+      end;
+    TGstParentBufferMeta = T_GstParentBufferMeta;
+
+
+    T_GstReferenceTimestampMeta = record
+        parent : TGstMeta;
+        reference : PGstCaps;
+        timestamp : TGstClockTime;
+        duration : TGstClockTime;
+      end;
+    TGstReferenceTimestampMeta = T_GstReferenceTimestampMeta;
+
+    TGstBuffer_autoptr = PGstBuffer;
+
+    TGstBuffer_listautoptr = PGList;
+
+    TGstBuffer_slistautoptr = PGSList;
+
+    TGstBuffer_queueautoptr = PGQueue;
+    TGstBufferPool_autoptr = PGstBufferPool;
+
+    TGstBufferPool_listautoptr = PGList;
+
+    TGstBufferPool_slistautoptr = PGSList;
+
+    TGstBufferPool_queueautoptr = PGQueue;
+
+  function gst_buffer_get_type:TGType;cdecl;external gstreamerlib name 'gst_buffer_get_type';
+
+  function gst_buffer_get_max_memory:Tguint;cdecl;external gstreamerlib name 'gst_buffer_get_max_memory';
+
+  function gst_buffer_new:PGstBuffer;cdecl;external gstreamerlib name 'gst_buffer_new';
+
+  function gst_buffer_new_allocate(allocator:PGstAllocator; size:Tgsize; params:PGstAllocationParams):PGstBuffer;cdecl;external gstreamerlib name 'gst_buffer_new_allocate';
+
+  function gst_buffer_new_wrapped_full(flags:TGstMemoryFlags; data:Tgpointer; maxsize:Tgsize; offset:Tgsize; size:Tgsize; 
+             user_data:Tgpointer; notify:TGDestroyNotify):PGstBuffer;cdecl;external gstreamerlib name 'gst_buffer_new_wrapped_full';
+
+  function gst_buffer_new_wrapped(data:Tgpointer; size:Tgsize):PGstBuffer;cdecl;external gstreamerlib name 'gst_buffer_new_wrapped';
+
+  function gst_buffer_new_wrapped_bytes(bytes:PGBytes):PGstBuffer;cdecl;external gstreamerlib name 'gst_buffer_new_wrapped_bytes';
+
+  function gst_buffer_n_memory(buffer:PGstBuffer):Tguint;cdecl;external gstreamerlib name 'gst_buffer_n_memory';
+
+  procedure gst_buffer_insert_memory(buffer:PGstBuffer; idx:Tgint; mem:PGstMemory);cdecl;external gstreamerlib name 'gst_buffer_insert_memory';
+
+  procedure gst_buffer_replace_memory_range(buffer:PGstBuffer; idx:Tguint; length:Tgint; mem:PGstMemory);cdecl;external gstreamerlib name 'gst_buffer_replace_memory_range';
+
+  function gst_buffer_peek_memory(buffer:PGstBuffer; idx:Tguint):PGstMemory;cdecl;external gstreamerlib name 'gst_buffer_peek_memory';
+
+  function gst_buffer_get_memory_range(buffer:PGstBuffer; idx:Tguint; length:Tgint):PGstMemory;cdecl;external gstreamerlib name 'gst_buffer_get_memory_range';
+
+  procedure gst_buffer_remove_memory_range(buffer:PGstBuffer; idx:Tguint; length:Tgint);cdecl;external gstreamerlib name 'gst_buffer_remove_memory_range';
+
+  procedure gst_buffer_prepend_memory(buffer:PGstBuffer; mem:PGstMemory);cdecl;external gstreamerlib name 'gst_buffer_prepend_memory';
+
+  procedure gst_buffer_append_memory(buffer:PGstBuffer; mem:PGstMemory);cdecl;external gstreamerlib name 'gst_buffer_append_memory';
+
+  procedure gst_buffer_replace_memory(buffer:PGstBuffer; idx:Tguint; mem:PGstMemory);cdecl;external gstreamerlib name 'gst_buffer_replace_memory';
+
+  procedure gst_buffer_replace_all_memory(buffer:PGstBuffer; mem:PGstMemory);cdecl;external gstreamerlib name 'gst_buffer_replace_all_memory';
+
+  function gst_buffer_get_memory(buffer:PGstBuffer; idx:Tguint):PGstMemory;cdecl;external gstreamerlib name 'gst_buffer_get_memory';
+
+  function gst_buffer_get_all_memory(buffer:PGstBuffer):PGstMemory;cdecl;external gstreamerlib name 'gst_buffer_get_all_memory';
+
+  procedure gst_buffer_remove_memory(buffer:PGstBuffer; idx:Tguint);cdecl;external gstreamerlib name 'gst_buffer_remove_memory';
+
+  procedure gst_buffer_remove_all_memory(buffer:PGstBuffer);cdecl;external gstreamerlib name 'gst_buffer_remove_all_memory';
+
+  function gst_buffer_find_memory(buffer:PGstBuffer; offset:Tgsize; size:Tgsize; idx:Pguint; length:Pguint; 
+             skip:Pgsize):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_find_memory';
+
+  function gst_buffer_is_memory_range_writable(buffer:PGstBuffer; idx:Tguint; length:Tgint):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_is_memory_range_writable';
+
+  function gst_buffer_is_all_memory_writable(buffer:PGstBuffer):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_is_all_memory_writable';
+
+  function gst_buffer_fill(buffer:PGstBuffer; offset:Tgsize; src:Tgconstpointer; size:Tgsize):Tgsize;cdecl;external gstreamerlib name 'gst_buffer_fill';
+
+  function gst_buffer_extract(buffer:PGstBuffer; offset:Tgsize; dest:Tgpointer; size:Tgsize):Tgsize;cdecl;external gstreamerlib name 'gst_buffer_extract';
+
+  function gst_buffer_memcmp(buffer:PGstBuffer; offset:Tgsize; mem:Tgconstpointer; size:Tgsize):Tgint;cdecl;external gstreamerlib name 'gst_buffer_memcmp';
+
+  function gst_buffer_memset(buffer:PGstBuffer; offset:Tgsize; val:Tguint8; size:Tgsize):Tgsize;cdecl;external gstreamerlib name 'gst_buffer_memset';
+
+  function gst_buffer_get_sizes_range(buffer:PGstBuffer; idx:Tguint; length:Tgint; offset:Pgsize; maxsize:Pgsize):Tgsize;cdecl;external gstreamerlib name 'gst_buffer_get_sizes_range';
+
+  function gst_buffer_resize_range(buffer:PGstBuffer; idx:Tguint; length:Tgint; offset:Tgssize; size:Tgssize):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_resize_range';
+
+  function gst_buffer_get_sizes(buffer:PGstBuffer; offset:Pgsize; maxsize:Pgsize):Tgsize;cdecl;external gstreamerlib name 'gst_buffer_get_sizes';
+
+  function gst_buffer_get_size(buffer:PGstBuffer):Tgsize;cdecl;external gstreamerlib name 'gst_buffer_get_size';
+
+  procedure gst_buffer_resize(buffer:PGstBuffer; offset:Tgssize; size:Tgssize);cdecl;external gstreamerlib name 'gst_buffer_resize';
+
+  procedure gst_buffer_set_size(buffer:PGstBuffer; size:Tgssize);cdecl;external gstreamerlib name 'gst_buffer_set_size';
+
+  function gst_buffer_map_range(buffer:PGstBuffer; idx:Tguint; length:Tgint; info:PGstMapInfo; flags:TGstMapFlags):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_map_range';
+
+  function gst_buffer_map(buffer:PGstBuffer; info:PGstMapInfo; flags:TGstMapFlags):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_map';
+
+  procedure gst_buffer_unmap(buffer:PGstBuffer; info:PGstMapInfo);cdecl;external gstreamerlib name 'gst_buffer_unmap';
+
+  procedure gst_buffer_extract_dup(buffer:PGstBuffer; offset:Tgsize; size:Tgsize; dest:Pgpointer; dest_size:Pgsize);cdecl;external gstreamerlib name 'gst_buffer_extract_dup';
+
+  function gst_buffer_get_flags(buffer:PGstBuffer):TGstBufferFlags;cdecl;external gstreamerlib name 'gst_buffer_get_flags';
+
+  function gst_buffer_has_flags(buffer:PGstBuffer; flags:TGstBufferFlags):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_has_flags';
+
+  function gst_buffer_set_flags(buffer:PGstBuffer; flags:TGstBufferFlags):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_set_flags';
+
+  function gst_buffer_unset_flags(buffer:PGstBuffer; flags:TGstBufferFlags):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_unset_flags';
+
+  {
+  
+  static inline GstBuffer *
+  gst_buffer_ref (GstBuffer * buf)
+  
+    return (GstBuffer *) gst_mini_object_ref (((GstMiniObject*)(buf)));
+  
+  # 441 "gstbuffer.h"
+  static inline void
+  gst_buffer_unref (GstBuffer * buf)
+  
+    gst_mini_object_unref (((GstMiniObject*)(buf)));
+  
+  # 460 "gstbuffer.h"
+  static inline void
+  gst_clear_buffer (GstBuffer ** buf_ptr)
+  
+    do  _Static_assert (sizeof *(((GstMiniObject **) buf_ptr)) == sizeof (gpointer), "Expression evaluates to false"); __typeof__((((GstMiniObject **) buf_ptr))) _pp = (((GstMiniObject **) buf_ptr)); __typeof__(*(((GstMiniObject **) buf_ptr))) _ptr = *_pp; *_pp = 
+  # 463 "gstbuffer.h" 3 4
+   ((void *)0)
+  # 463 "gstbuffer.h"
+   ; if (_ptr) (gst_mini_object_unref) (_ptr);  while (0) ;
+  
+  # 479 "gstbuffer.h"
+  static inline GstBuffer *
+  gst_buffer_copy (const GstBuffer * buf)
+  
+    return (((GstBuffer *)(gst_mini_object_copy (((const GstMiniObject*)(buf))))));
+  
+  
+   }
+(* Const before type ignored *)
+  function gst_buffer_copy_deep(buf:PGstBuffer):PGstBuffer;cdecl;external gstreamerlib name 'gst_buffer_copy_deep';
+
+
+
+  function gst_buffer_copy_into(dest:PGstBuffer; src:PGstBuffer; flags:TGstBufferCopyFlags; offset:Tgsize; size:Tgsize):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_copy_into';
+
+  {
+  static inline gboolean
+  gst_buffer_replace (GstBuffer **obuf, GstBuffer *nbuf)
+  
+    return gst_mini_object_replace ((GstMiniObject **) obuf, (GstMiniObject *) nbuf);
+  
+  
+   }
+  function gst_buffer_copy_region(parent:PGstBuffer; flags:TGstBufferCopyFlags; offset:Tgsize; size:Tgsize):PGstBuffer;cdecl;external gstreamerlib name 'gst_buffer_copy_region';
+
+  function gst_buffer_append_region(buf1:PGstBuffer; buf2:PGstBuffer; offset:Tgssize; size:Tgssize):PGstBuffer;cdecl;external gstreamerlib name 'gst_buffer_append_region';
+
+  function gst_buffer_append(buf1:PGstBuffer; buf2:PGstBuffer):PGstBuffer;cdecl;external gstreamerlib name 'gst_buffer_append';
+
+
+  type
+
+    TGstBufferForeachMetaFunc = function (buffer:PGstBuffer; meta:PPGstMeta; user_data:Tgpointer):Tgboolean;cdecl;
+
+  function gst_buffer_get_meta(buffer:PGstBuffer; api:TGType):PGstMeta;cdecl;external gstreamerlib name 'gst_buffer_get_meta';
+
+  function gst_buffer_get_n_meta(buffer:PGstBuffer; api_type:TGType):Tguint;cdecl;external gstreamerlib name 'gst_buffer_get_n_meta';
+
+(* Const before type ignored *)
+  function gst_buffer_add_meta(buffer:PGstBuffer; info:PGstMetaInfo; params:Tgpointer):PGstMeta;cdecl;external gstreamerlib name 'gst_buffer_add_meta';
+
+  function gst_buffer_remove_meta(buffer:PGstBuffer; meta:PGstMeta):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_remove_meta';
+
+  function gst_buffer_iterate_meta(buffer:PGstBuffer; state:Pgpointer):PGstMeta;cdecl;external gstreamerlib name 'gst_buffer_iterate_meta';
+
+  function gst_buffer_iterate_meta_filtered(buffer:PGstBuffer; state:Pgpointer; meta_api_type:TGType):PGstMeta;cdecl;external gstreamerlib name 'gst_buffer_iterate_meta_filtered';
+
+  function gst_buffer_foreach_meta(buffer:PGstBuffer; func:TGstBufferForeachMetaFunc; user_data:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_foreach_meta';
+
+
+  function gst_parent_buffer_meta_api_get_type:TGType;cdecl;external gstreamerlib name 'gst_parent_buffer_meta_api_get_type';
+
+(* Const before type ignored *)
+  function gst_parent_buffer_meta_get_info:PGstMetaInfo;cdecl;external gstreamerlib name 'gst_parent_buffer_meta_get_info';
+
+  function gst_buffer_add_parent_buffer_meta(buffer:PGstBuffer; ref:PGstBuffer):PGstParentBufferMeta;cdecl;external gstreamerlib name 'gst_buffer_add_parent_buffer_meta';
+
+
+
+  function gst_reference_timestamp_meta_api_get_type:TGType;cdecl;external gstreamerlib name 'gst_reference_timestamp_meta_api_get_type';
+
+(* Const before type ignored *)
+  function gst_reference_timestamp_meta_get_info:PGstMetaInfo;cdecl;external gstreamerlib name 'gst_reference_timestamp_meta_get_info';
+
+  function gst_buffer_add_reference_timestamp_meta(buffer:PGstBuffer; reference:PGstCaps; timestamp:TGstClockTime; duration:TGstClockTime):PGstReferenceTimestampMeta;cdecl;external gstreamerlib name 'gst_buffer_add_reference_timestamp_meta';
+
+  function gst_buffer_get_reference_timestamp_meta(buffer:PGstBuffer; reference:PGstCaps):PGstReferenceTimestampMeta;cdecl;external gstreamerlib name 'gst_buffer_get_reference_timestamp_meta';
+
+
+

+ 116 - 0
packages/gstreamer/src/gstbufferlist.inc

@@ -0,0 +1,116 @@
+{* GStreamer
+ * Copyright (C) 2009 Axis Communications <dev-gstreamer at axis dot com>
+ * @author Jonas Holmberg <jonas dot holmberg at axis dot com>
+ *
+ * gstbufferlist.h: Header for GstBufferList object
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+  Type
+    PGstBufferList  = ^TGstBufferList;
+    PGstBufferList_autoptr  = ^TGstBufferList_autoptr;
+    PGstBufferList_listautoptr  = ^TGstBufferList_listautoptr;
+    PGstBufferList_queueautoptr  = ^TGstBufferList_queueautoptr;
+    PGstBufferList_slistautoptr  = ^TGstBufferList_slistautoptr;
+
+
+    TGstBufferList = record end;
+    T_GstBufferList = TGstBufferList;
+
+    TGstBufferListFunc = function (buffer:PPGstBuffer; idx:Tguint; user_data:Tgpointer):Tgboolean;cdecl;
+
+  TGstBufferList_autoptr = PGstBufferList;
+
+  TGstBufferList_listautoptr = PGList;
+
+  TGstBufferList_slistautoptr = PGSList;
+
+  TGstBufferList_queueautoptr = PGQueue;
+
+  {
+  
+  static inline GstBufferList *
+  gst_buffer_list_ref (GstBufferList * list)
+  
+    return ((GstBufferList *)gst_mini_object_ref (((GstMiniObject*)(list))))
+               ;
+  
+  # 90 "gstbufferlist.h"
+  static inline void
+  gst_buffer_list_unref (GstBufferList * list)
+  
+    gst_mini_object_unref (((GstMiniObject*)(list)));
+  
+  # 109 "gstbufferlist.h"
+  static inline void
+  gst_clear_buffer_list (GstBufferList ** list_ptr)
+  
+    do  _Static_assert (sizeof *(((GstMiniObject **) list_ptr)) == sizeof (gpointer), "Expression evaluates to false"); __typeof__((((GstMiniObject **) list_ptr))) _pp = (((GstMiniObject **) list_ptr)); __typeof__(*(((GstMiniObject **) list_ptr))) _ptr = *_pp; *_pp = 
+  # 112 "gstbufferlist.h" 3 4
+   ((void *)0)
+  # 112 "gstbufferlist.h"
+   ; if (_ptr) (gst_mini_object_unref) (_ptr);  while (0) ;
+  
+  # 126 "gstbufferlist.h"
+  static inline GstBufferList *
+  gst_buffer_list_copy (const GstBufferList * list)
+  
+    return ((GstBufferList *)gst_mini_object_copy (((const GstMiniObject*)(list))));
+  
+  # 150 "gstbufferlist.h"
+  static inline gboolean
+  gst_buffer_list_replace (GstBufferList **old_list, GstBufferList *new_list)
+  
+    return gst_mini_object_replace ((GstMiniObject **) old_list,
+        (GstMiniObject *) new_list);
+  
+  # 172 "gstbufferlist.h"
+  static inline gboolean
+  gst_buffer_list_take (GstBufferList **old_list, GstBufferList *new_list)
+  
+    return gst_mini_object_take ((GstMiniObject **) old_list,
+        (GstMiniObject *) new_list);
+  
+   }
+
+  function gst_buffer_list_get_type:TGType;cdecl;external gstreamerlib name 'gst_buffer_list_get_type';
+
+  function gst_buffer_list_new:PGstBufferList;cdecl;external gstreamerlib name 'gst_buffer_list_new';
+
+  function gst_buffer_list_new_sized(size:Tguint):PGstBufferList;cdecl;external gstreamerlib name 'gst_buffer_list_new_sized';
+
+  function gst_buffer_list_length(list:PGstBufferList):Tguint;cdecl;external gstreamerlib name 'gst_buffer_list_length';
+
+  function gst_buffer_list_get(list:PGstBufferList; idx:Tguint):PGstBuffer;cdecl;external gstreamerlib name 'gst_buffer_list_get';
+
+  function gst_buffer_list_get_writable(list:PGstBufferList; idx:Tguint):PGstBuffer;cdecl;external gstreamerlib name 'gst_buffer_list_get_writable';
+
+  procedure gst_buffer_list_insert(list:PGstBufferList; idx:Tgint; buffer:PGstBuffer);cdecl;external gstreamerlib name 'gst_buffer_list_insert';
+
+  procedure gst_buffer_list_remove(list:PGstBufferList; idx:Tguint; length:Tguint);cdecl;external gstreamerlib name 'gst_buffer_list_remove';
+
+  function gst_buffer_list_foreach(list:PGstBufferList; func:TGstBufferListFunc; user_data:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_list_foreach';
+
+(* Const before type ignored *)
+  function gst_buffer_list_copy_deep(list:PGstBufferList):PGstBufferList;cdecl;external gstreamerlib name 'gst_buffer_list_copy_deep';
+
+  function gst_buffer_list_calculate_size(list:PGstBufferList):Tgsize;cdecl;external gstreamerlib name 'gst_buffer_list_calculate_size';
+
+
+  var
+    _gst_buffer_list_type : TGType;cvar;external;
+

+ 99 - 0
packages/gstreamer/src/gstbufferpool.inc

@@ -0,0 +1,99 @@
+{* GStreamer
+ * Copyright (C) 2010 Wim Taymans <[email protected]>
+ *
+ * gstbufferpool.h: Header for GstBufferPool object
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+  Type
+    P_GstBufferPoolClass  = ^T_GstBufferPoolClass;
+
+    PGstBufferPoolAcquireParams  = ^TGstBufferPoolAcquireParams;
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+
+
+
+(* Const before type ignored *)
+    T_GstBufferPoolClass = record
+        object_class : TGstObjectClass;
+        get_options : function (pool:PGstBufferPool):PPgchar;cdecl;
+        set_config : function (pool:PGstBufferPool; config:PGstStructure):Tgboolean;cdecl;
+        start : function (pool:PGstBufferPool):Tgboolean;cdecl;
+        stop : function (pool:PGstBufferPool):Tgboolean;cdecl;
+        acquire_buffer : function (pool:PGstBufferPool; buffer:PPGstBuffer; params:PGstBufferPoolAcquireParams):TGstFlowReturn;cdecl;
+        alloc_buffer : function (pool:PGstBufferPool; buffer:PPGstBuffer; params:PGstBufferPoolAcquireParams):TGstFlowReturn;cdecl;
+        reset_buffer : procedure (pool:PGstBufferPool; buffer:PGstBuffer);cdecl;
+        release_buffer : procedure (pool:PGstBufferPool; buffer:PGstBuffer);cdecl;
+        free_buffer : procedure (pool:PGstBufferPool; buffer:PGstBuffer);cdecl;
+        flush_start : procedure (pool:PGstBufferPool);cdecl;
+        flush_stop : procedure (pool:PGstBufferPool);cdecl;
+        _gst_reserved : array[0..(4-2)-1] of Tgpointer;
+      end;
+    TGstBufferPoolClass = T_GstBufferPoolClass;
+
+
+  function gst_buffer_pool_get_type:TGType;cdecl;external gstreamerlib name 'gst_buffer_pool_get_type';
+
+  function gst_buffer_pool_new:PGstBufferPool;cdecl;external gstreamerlib name 'gst_buffer_pool_new';
+
+  function gst_buffer_pool_set_active(pool:PGstBufferPool; active:Tgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_pool_set_active';
+
+  function gst_buffer_pool_is_active(pool:PGstBufferPool):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_pool_is_active';
+
+  function gst_buffer_pool_set_config(pool:PGstBufferPool; config:PGstStructure):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_pool_set_config';
+
+  function gst_buffer_pool_get_config(pool:PGstBufferPool):PGstStructure;cdecl;external gstreamerlib name 'gst_buffer_pool_get_config';
+
+(* Const before type ignored *)
+  function gst_buffer_pool_get_options(pool:PGstBufferPool):PPgchar;cdecl;external gstreamerlib name 'gst_buffer_pool_get_options';
+
+(* Const before type ignored *)
+  function gst_buffer_pool_has_option(pool:PGstBufferPool; option:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_pool_has_option';
+
+  procedure gst_buffer_pool_set_flushing(pool:PGstBufferPool; flushing:Tgboolean);cdecl;external gstreamerlib name 'gst_buffer_pool_set_flushing';
+
+  procedure gst_buffer_pool_config_set_params(config:PGstStructure; caps:PGstCaps; size:Tguint; min_buffers:Tguint; max_buffers:Tguint);cdecl;external gstreamerlib name 'gst_buffer_pool_config_set_params';
+
+  function gst_buffer_pool_config_get_params(config:PGstStructure; caps:PPGstCaps; size:Pguint; min_buffers:Pguint; max_buffers:Pguint):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_pool_config_get_params';
+
+(* Const before type ignored *)
+  procedure gst_buffer_pool_config_set_allocator(config:PGstStructure; allocator:PGstAllocator; params:PGstAllocationParams);cdecl;external gstreamerlib name 'gst_buffer_pool_config_set_allocator';
+
+  function gst_buffer_pool_config_get_allocator(config:PGstStructure; allocator:PPGstAllocator; params:PGstAllocationParams):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_pool_config_get_allocator';
+
+  function gst_buffer_pool_config_n_options(config:PGstStructure):Tguint;cdecl;external gstreamerlib name 'gst_buffer_pool_config_n_options';
+
+(* Const before type ignored *)
+  procedure gst_buffer_pool_config_add_option(config:PGstStructure; option:Pgchar);cdecl;external gstreamerlib name 'gst_buffer_pool_config_add_option';
+
+(* Const before type ignored *)
+  function gst_buffer_pool_config_get_option(config:PGstStructure; index:Tguint):Pgchar;cdecl;external gstreamerlib name 'gst_buffer_pool_config_get_option';
+
+(* Const before type ignored *)
+  function gst_buffer_pool_config_has_option(config:PGstStructure; option:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_pool_config_has_option';
+
+  function gst_buffer_pool_config_validate_params(config:PGstStructure; caps:PGstCaps; size:Tguint; min_buffers:Tguint; max_buffers:Tguint):Tgboolean;cdecl;external gstreamerlib name 'gst_buffer_pool_config_validate_params';
+
+  function gst_buffer_pool_acquire_buffer(pool:PGstBufferPool; buffer:PPGstBuffer; params:PGstBufferPoolAcquireParams):TGstFlowReturn;cdecl;external gstreamerlib name 'gst_buffer_pool_acquire_buffer';
+
+  procedure gst_buffer_pool_release_buffer(pool:PGstBufferPool; buffer:PGstBuffer);cdecl;external gstreamerlib name 'gst_buffer_pool_release_buffer';
+
+

+ 116 - 0
packages/gstreamer/src/gstbus.inc

@@ -0,0 +1,116 @@
+{* GStreamer
+ * Copyright (C) 2004 Wim Taymans <[email protected]>
+ *
+ * gstbus.h: Header for GstBus subsystem
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+  Type
+    P_GstBus  = ^T_GstBus;
+    P_GstBusClass  = ^T_GstBusClass;
+    PGPollFD  = ^TGPollFD;
+    PGSource  = ^TGSource;
+    PGstBus_autoptr  = ^TGstBus_autoptr;
+    PGstBus_listautoptr  = ^TGstBus_listautoptr;
+    PGstBus_queueautoptr  = ^TGstBus_queueautoptr;
+    PGstBus_slistautoptr  = ^TGstBus_slistautoptr;
+    PGstBusFlags  = ^TGstBusFlags;
+    PGstBusSyncReply  = ^TGstBusSyncReply;
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+    TGstBusFlags = (GST_BUS_FLUSHING := GST_OBJECT_FLAG_LAST shl 0,GST_BUS_FLAG_LAST := GST_OBJECT_FLAG_LAST shl 1
+      );
+
+    TGstBusSyncReply = (GST_BUS_DROP := 0,GST_BUS_PASS := 1,
+      GST_BUS_ASYNC := 2);
+
+    TGstBusSyncHandler = function (bus:PGstBus; message:PGstMessage; user_data:Tgpointer):TGstBusSyncReply;cdecl;
+
+    TGstBusFunc = function (bus:PGstBus; message:PGstMessage; user_data:Tgpointer):Tgboolean;cdecl;
+
+    T_GstBusClass = record
+        parent_class : TGstObjectClass;
+        message : procedure (bus:PGstBus; message:PGstMessage);cdecl;
+        sync_message : procedure (bus:PGstBus; message:PGstMessage);cdecl;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstBusClass = T_GstBusClass;
+
+
+  TGstBus_autoptr = PGstBus;
+
+  TGstBus_listautoptr = PGList;
+
+  TGstBus_slistautoptr = PGSList;
+
+  TGstBus_queueautoptr = PGQueue;
+
+
+  function gst_bus_get_type:TGType;cdecl;external gstreamerlib name 'gst_bus_get_type';
+
+  function gst_bus_new:PGstBus;cdecl;external gstreamerlib name 'gst_bus_new';
+
+  function gst_bus_post(bus:PGstBus; message:PGstMessage):Tgboolean;cdecl;external gstreamerlib name 'gst_bus_post';
+
+  function gst_bus_have_pending(bus:PGstBus):Tgboolean;cdecl;external gstreamerlib name 'gst_bus_have_pending';
+
+  function gst_bus_peek(bus:PGstBus):PGstMessage;cdecl;external gstreamerlib name 'gst_bus_peek';
+
+  function gst_bus_pop(bus:PGstBus):PGstMessage;cdecl;external gstreamerlib name 'gst_bus_pop';
+
+  function gst_bus_pop_filtered(bus:PGstBus; types:TGstMessageType):PGstMessage;cdecl;external gstreamerlib name 'gst_bus_pop_filtered';
+
+  function gst_bus_timed_pop(bus:PGstBus; timeout:TGstClockTime):PGstMessage;cdecl;external gstreamerlib name 'gst_bus_timed_pop';
+
+  function gst_bus_timed_pop_filtered(bus:PGstBus; timeout:TGstClockTime; types:TGstMessageType):PGstMessage;cdecl;external gstreamerlib name 'gst_bus_timed_pop_filtered';
+
+  procedure gst_bus_set_flushing(bus:PGstBus; flushing:Tgboolean);cdecl;external gstreamerlib name 'gst_bus_set_flushing';
+
+  procedure gst_bus_set_sync_handler(bus:PGstBus; func:TGstBusSyncHandler; user_data:Tgpointer; notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_bus_set_sync_handler';
+
+  procedure gst_bus_get_pollfd(bus:PGstBus; fd:PGPollFD);cdecl;external gstreamerlib name 'gst_bus_get_pollfd';
+
+  function gst_bus_create_watch(bus:PGstBus):PGSource;cdecl;external gstreamerlib name 'gst_bus_create_watch';
+
+  function gst_bus_add_watch_full(bus:PGstBus; priority:Tgint; func:TGstBusFunc; user_data:Tgpointer; notify:TGDestroyNotify):Tguint;cdecl;external gstreamerlib name 'gst_bus_add_watch_full';
+
+  function gst_bus_add_watch(bus:PGstBus; func:TGstBusFunc; user_data:Tgpointer):Tguint;cdecl;external gstreamerlib name 'gst_bus_add_watch';
+
+  function gst_bus_remove_watch(bus:PGstBus):Tgboolean;cdecl;external gstreamerlib name 'gst_bus_remove_watch';
+
+  function gst_bus_poll(bus:PGstBus; events:TGstMessageType; timeout:TGstClockTime):PGstMessage;cdecl;external gstreamerlib name 'gst_bus_poll';
+
+  function gst_bus_async_signal_func(bus:PGstBus; message:PGstMessage; data:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_bus_async_signal_func';
+
+  function gst_bus_sync_signal_handler(bus:PGstBus; message:PGstMessage; data:Tgpointer):TGstBusSyncReply;cdecl;external gstreamerlib name 'gst_bus_sync_signal_handler';
+
+  procedure gst_bus_add_signal_watch(bus:PGstBus);cdecl;external gstreamerlib name 'gst_bus_add_signal_watch';
+
+  procedure gst_bus_add_signal_watch_full(bus:PGstBus; priority:Tgint);cdecl;external gstreamerlib name 'gst_bus_add_signal_watch_full';
+
+  procedure gst_bus_remove_signal_watch(bus:PGstBus);cdecl;external gstreamerlib name 'gst_bus_remove_signal_watch';
+
+  procedure gst_bus_enable_sync_message_emission(bus:PGstBus);cdecl;external gstreamerlib name 'gst_bus_enable_sync_message_emission';
+
+  procedure gst_bus_disable_sync_message_emission(bus:PGstBus);cdecl;external gstreamerlib name 'gst_bus_disable_sync_message_emission';
+
+
+

+ 248 - 0
packages/gstreamer/src/gstcaps.inc

@@ -0,0 +1,248 @@
+{* GStreamer
+ * Copyright (C) 2003 David A. Schleef <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+  Type
+    P_GstCaps  = ^T_GstCaps;
+    P_GstStaticCaps  = ^T_GstStaticCaps;
+    PGstCaps_autoptr  = ^TGstCaps_autoptr;
+    PGstCaps_listautoptr  = ^TGstCaps_listautoptr;
+    PGstCaps_queueautoptr  = ^TGstCaps_queueautoptr;
+    PGstCaps_slistautoptr  = ^TGstCaps_slistautoptr;
+    PGstCapsFlags  = ^TGstCapsFlags;
+    PGstCapsIntersectMode  = ^TGstCapsIntersectMode;
+    PGstStaticCaps  = ^TGstStaticCaps;
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+  T_GstCaps = record
+      mini_object : TGstMiniObject;
+    end;
+  TGstCaps = T_GstCaps;
+  PGstCaps = ^TGstCaps;
+  PPGstCaps = ^PGstCaps;
+
+(* Const before type ignored *)
+  T_GstStaticCaps = record
+      caps : PGstCaps;
+      _string : Pchar;
+      _gst_reserved : array[0..3] of Tgpointer;
+    end;
+  TGstStaticCaps = T_GstStaticCaps;
+  TGstCapsForeachFunc = function (features:PGstCapsFeatures; structure:PGstStructure; user_data:Tgpointer):Tgboolean;cdecl;
+  TGstCapsMapFunc = function (features:PGstCapsFeatures; structure:PGstStructure; user_data:Tgpointer):Tgboolean;cdecl;
+  TGstCapsFilterMapFunc = function (features:PGstCapsFeatures; structure:PGstStructure; user_data:Tgpointer):Tgboolean;cdecl;
+
+  TGstCaps_autoptr = PGstCaps;
+  TGstCaps_listautoptr = PGList;
+  TGstCaps_slistautoptr = PGSList;
+  TGstCaps_queueautoptr = PGQueue;
+
+  {
+  
+  static inline GstCaps *
+  gst_caps_ref (GstCaps * caps)
+  
+    return (GstCaps *) gst_mini_object_ref (((GstMiniObject*)(caps)));
+  
+  # 220 "gstcaps.h"
+  
+  static inline void
+  gst_caps_unref (GstCaps * caps)
+  
+    gst_mini_object_unref (((GstMiniObject*)(caps)));
+  
+  # 239 "gstcaps.h"
+  static inline void
+  gst_clear_caps (GstCaps ** caps_ptr)
+  
+    do  _Static_assert (sizeof *(((GstMiniObject **) caps_ptr)) == sizeof (gpointer), "Expression evaluates to false"); __typeof__((((GstMiniObject **) caps_ptr))) _pp = (((GstMiniObject **) caps_ptr)); __typeof__(*(((GstMiniObject **) caps_ptr))) _ptr = *_pp; *_pp = 
+  # 242 "gstcaps.h" 3 4
+   ((void *)0)
+  # 242 "gstcaps.h"
+   ; if (_ptr) (gst_mini_object_unref) (_ptr);  while (0) ;
+  
+   }
+(* Const before type ignored *)
+
+  function gst_caps_copy(caps:PGstCaps):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_copy';
+
+  {
+  static inline gboolean
+  gst_caps_replace (GstCaps **old_caps, GstCaps *new_caps)
+  
+      return gst_mini_object_replace ((GstMiniObject **) old_caps, (GstMiniObject *) new_caps);
+  
+  # 316 "gstcaps.h"
+  static inline gboolean
+  gst_caps_take (GstCaps **old_caps, GstCaps *new_caps)
+  
+      return gst_mini_object_take ((GstMiniObject **) old_caps, (GstMiniObject *) new_caps);
+  
+  
+   }
+
+
+  function gst_caps_get_type:TGType;cdecl;external gstreamerlib name 'gst_caps_get_type';
+
+  function gst_caps_new_empty:PGstCaps;cdecl;external gstreamerlib name 'gst_caps_new_empty';
+
+  function gst_caps_new_any:PGstCaps;cdecl;external gstreamerlib name 'gst_caps_new_any';
+
+(* Const before type ignored *)
+  function gst_caps_new_empty_simple(media_type:Pchar):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_new_empty_simple';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_caps_new_simple(media_type:Pchar; fieldname:Pchar; args:array of const):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_new_simple';
+
+  function gst_caps_new_simple(media_type:Pchar; fieldname:Pchar):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_new_simple';
+
+  function gst_caps_new_full(struct1:PGstStructure; args:array of const):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_new_full';
+
+  function gst_caps_new_full(struct1:PGstStructure):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_new_full';
+
+  function gst_caps_new_full_valist(structure:PGstStructure; var_args:Tva_list):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_new_full_valist';
+
+  function gst_static_caps_get_type:TGType;cdecl;external gstreamerlib name 'gst_static_caps_get_type';
+
+  function gst_static_caps_get(static_caps:PGstStaticCaps):PGstCaps;cdecl;external gstreamerlib name 'gst_static_caps_get';
+
+  procedure gst_static_caps_cleanup(static_caps:PGstStaticCaps);cdecl;external gstreamerlib name 'gst_static_caps_cleanup';
+
+  procedure gst_caps_append(caps1:PGstCaps; caps2:PGstCaps);cdecl;external gstreamerlib name 'gst_caps_append';
+
+  procedure gst_caps_append_structure(caps:PGstCaps; structure:PGstStructure);cdecl;external gstreamerlib name 'gst_caps_append_structure';
+
+  procedure gst_caps_append_structure_full(caps:PGstCaps; structure:PGstStructure; features:PGstCapsFeatures);cdecl;external gstreamerlib name 'gst_caps_append_structure_full';
+
+  procedure gst_caps_remove_structure(caps:PGstCaps; idx:Tguint);cdecl;external gstreamerlib name 'gst_caps_remove_structure';
+
+  function gst_caps_merge(caps1:PGstCaps; caps2:PGstCaps):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_merge';
+
+  function gst_caps_merge_structure(caps:PGstCaps; structure:PGstStructure):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_merge_structure';
+
+  function gst_caps_merge_structure_full(caps:PGstCaps; structure:PGstStructure; features:PGstCapsFeatures):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_merge_structure_full';
+
+(* Const before type ignored *)
+  function gst_caps_get_size(caps:PGstCaps):Tguint;cdecl;external gstreamerlib name 'gst_caps_get_size';
+
+(* Const before type ignored *)
+  function gst_caps_get_structure(caps:PGstCaps; index:Tguint):PGstStructure;cdecl;external gstreamerlib name 'gst_caps_get_structure';
+
+  function gst_caps_steal_structure(caps:PGstCaps; index:Tguint):PGstStructure;cdecl;external gstreamerlib name 'gst_caps_steal_structure';
+
+  procedure gst_caps_set_features(caps:PGstCaps; index:Tguint; features:PGstCapsFeatures);cdecl;external gstreamerlib name 'gst_caps_set_features';
+
+  procedure gst_caps_set_features_simple(caps:PGstCaps; features:PGstCapsFeatures);cdecl;external gstreamerlib name 'gst_caps_set_features_simple';
+
+(* Const before type ignored *)
+  function gst_caps_get_features(caps:PGstCaps; index:Tguint):PGstCapsFeatures;cdecl;external gstreamerlib name 'gst_caps_get_features';
+
+(* Const before type ignored *)
+  function gst_caps_copy_nth(caps:PGstCaps; nth:Tguint):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_copy_nth';
+
+  function gst_caps_truncate(caps:PGstCaps):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_truncate';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_caps_set_value(caps:PGstCaps; field:Pchar; value:PGValue);cdecl;external gstreamerlib name 'gst_caps_set_value';
+
+(* Const before type ignored *)
+  procedure gst_caps_set_simple(caps:PGstCaps; field:Pchar; args:array of const);cdecl;external gstreamerlib name 'gst_caps_set_simple';
+
+  procedure gst_caps_set_simple(caps:PGstCaps; field:Pchar);cdecl;external gstreamerlib name 'gst_caps_set_simple';
+
+(* Const before type ignored *)
+  procedure gst_caps_set_simple_valist(caps:PGstCaps; field:Pchar; varargs:Tva_list);cdecl;external gstreamerlib name 'gst_caps_set_simple_valist';
+
+(* Const before type ignored *)
+  function gst_caps_foreach(caps:PGstCaps; func:TGstCapsForeachFunc; user_data:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_foreach';
+
+  function gst_caps_map_in_place(caps:PGstCaps; func:TGstCapsMapFunc; user_data:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_map_in_place';
+
+  procedure gst_caps_filter_and_map_in_place(caps:PGstCaps; func:TGstCapsFilterMapFunc; user_data:Tgpointer);cdecl;external gstreamerlib name 'gst_caps_filter_and_map_in_place';
+
+(* Const before type ignored *)
+  function gst_caps_is_any(caps:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_is_any';
+
+(* Const before type ignored *)
+  function gst_caps_is_empty(caps:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_is_empty';
+
+(* Const before type ignored *)
+  function gst_caps_is_fixed(caps:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_is_fixed';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_caps_is_always_compatible(caps1:PGstCaps; caps2:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_is_always_compatible';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_caps_is_subset(subset:PGstCaps; superset:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_is_subset';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_caps_is_subset_structure(caps:PGstCaps; structure:PGstStructure):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_is_subset_structure';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_caps_is_subset_structure_full(caps:PGstCaps; structure:PGstStructure; features:PGstCapsFeatures):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_is_subset_structure_full';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_caps_is_equal(caps1:PGstCaps; caps2:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_is_equal';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_caps_is_equal_fixed(caps1:PGstCaps; caps2:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_is_equal_fixed';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_caps_can_intersect(caps1:PGstCaps; caps2:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_can_intersect';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_caps_is_strictly_equal(caps1:PGstCaps; caps2:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_is_strictly_equal';
+
+  function gst_caps_intersect(caps1:PGstCaps; caps2:PGstCaps):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_intersect';
+
+  function gst_caps_intersect_full(caps1:PGstCaps; caps2:PGstCaps; mode:TGstCapsIntersectMode):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_intersect_full';
+
+  function gst_caps_subtract(minuend:PGstCaps; subtrahend:PGstCaps):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_subtract';
+
+  function gst_caps_normalize(caps:PGstCaps):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_normalize';
+
+  function gst_caps_simplify(caps:PGstCaps):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_simplify';
+
+  function gst_caps_fixate(caps:PGstCaps):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_fixate';
+
+(* Const before type ignored *)
+  function gst_caps_to_string(caps:PGstCaps):Pgchar;cdecl;external gstreamerlib name 'gst_caps_to_string';
+
+(* Const before type ignored *)
+  function gst_caps_from_string(_string:Pgchar):PGstCaps;cdecl;external gstreamerlib name 'gst_caps_from_string';
+
+
+  var
+    _gst_caps_type : TGType;cvar;external;
+    _gst_caps_any : PGstCaps;cvar;external;
+    _gst_caps_none : PGstCaps;cvar;external;
+

+ 120 - 0
packages/gstreamer/src/gstcapsfeatures.inc

@@ -0,0 +1,120 @@
+{* GStreamer
+ * Copyright (C) 2013 Collabora Ltd.
+ *   Author: Sebastian Dröge <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+  Type
+    Pgchar  = ^Tgchar;
+    Pgint  = ^Tgint;
+    PGList  = ^TGList;
+    PGQueue  = ^TGQueue;
+    PGSList  = ^TGSList;
+    PGstCapsFeatures  = ^TGstCapsFeatures;
+    PGstCapsFeatures_autoptr  = ^TGstCapsFeatures_autoptr;
+    PGstCapsFeatures_listautoptr  = ^TGstCapsFeatures_listautoptr;
+    PGstCapsFeatures_queueautoptr  = ^TGstCapsFeatures_queueautoptr;
+    PGstCapsFeatures_slistautoptr  = ^TGstCapsFeatures_slistautoptr;
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+
+  TGstCapsFeatures = record end;
+  T_GstCapsFeatures = TGstCapsFeatures;
+  TGstCapsFeatures_autoptr = PGstCapsFeatures;
+  TGstCapsFeatures_listautoptr = PGList;
+  TGstCapsFeatures_slistautoptr = PGSList;
+  TGstCapsFeatures_queueautoptr = PGQueue;
+
+    var
+      _gst_caps_features_type : TGType;cvar;external;
+      _gst_caps_features_any : PGstCapsFeatures;cvar;external;
+      _gst_caps_features_memory_system_memory : PGstCapsFeatures;cvar;external;
+
+  function gst_caps_features_get_type:TGType;cdecl;external gstreamerlib name 'gst_caps_features_get_type';
+
+  function gst_is_caps_features(obj:Tgconstpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_is_caps_features';
+
+  function gst_caps_features_new_empty:PGstCapsFeatures;cdecl;external gstreamerlib name 'gst_caps_features_new_empty';
+
+  function gst_caps_features_new_any:PGstCapsFeatures;cdecl;external gstreamerlib name 'gst_caps_features_new_any';
+
+(* Const before type ignored *)
+  function gst_caps_features_new(feature1:Pgchar; args:array of const):PGstCapsFeatures;cdecl;external gstreamerlib name 'gst_caps_features_new';
+
+  function gst_caps_features_new(feature1:Pgchar):PGstCapsFeatures;cdecl;external gstreamerlib name 'gst_caps_features_new';
+
+(* Const before type ignored *)
+  function gst_caps_features_new_valist(feature1:Pgchar; varargs:Tva_list):PGstCapsFeatures;cdecl;external gstreamerlib name 'gst_caps_features_new_valist';
+
+  function gst_caps_features_new_id(feature1:TGQuark; args:array of const):PGstCapsFeatures;cdecl;external gstreamerlib name 'gst_caps_features_new_id';
+
+  function gst_caps_features_new_id(feature1:TGQuark):PGstCapsFeatures;cdecl;external gstreamerlib name 'gst_caps_features_new_id';
+
+  function gst_caps_features_new_id_valist(feature1:TGQuark; varargs:Tva_list):PGstCapsFeatures;cdecl;external gstreamerlib name 'gst_caps_features_new_id_valist';
+
+  function gst_caps_features_set_parent_refcount(features:PGstCapsFeatures; refcount:Pgint):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_features_set_parent_refcount';
+
+(* Const before type ignored *)
+  function gst_caps_features_copy(features:PGstCapsFeatures):PGstCapsFeatures;cdecl;external gstreamerlib name 'gst_caps_features_copy';
+
+  procedure gst_caps_features_free(features:PGstCapsFeatures);cdecl;external gstreamerlib name 'gst_caps_features_free';
+
+(* Const before type ignored *)
+  function gst_caps_features_to_string(features:PGstCapsFeatures):Pgchar;cdecl;external gstreamerlib name 'gst_caps_features_to_string';
+
+(* Const before type ignored *)
+  function gst_caps_features_from_string(features:Pgchar):PGstCapsFeatures;cdecl;external gstreamerlib name 'gst_caps_features_from_string';
+
+(* Const before type ignored *)
+  function gst_caps_features_get_size(features:PGstCapsFeatures):Tguint;cdecl;external gstreamerlib name 'gst_caps_features_get_size';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_caps_features_get_nth(features:PGstCapsFeatures; i:Tguint):Pgchar;cdecl;external gstreamerlib name 'gst_caps_features_get_nth';
+
+(* Const before type ignored *)
+  function gst_caps_features_get_nth_id(features:PGstCapsFeatures; i:Tguint):TGQuark;cdecl;external gstreamerlib name 'gst_caps_features_get_nth_id';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_caps_features_contains(features:PGstCapsFeatures; feature:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_features_contains';
+
+(* Const before type ignored *)
+  function gst_caps_features_contains_id(features:PGstCapsFeatures; feature:TGQuark):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_features_contains_id';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_caps_features_is_equal(features1:PGstCapsFeatures; features2:PGstCapsFeatures):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_features_is_equal';
+
+(* Const before type ignored *)
+  function gst_caps_features_is_any(features:PGstCapsFeatures):Tgboolean;cdecl;external gstreamerlib name 'gst_caps_features_is_any';
+
+(* Const before type ignored *)
+  procedure gst_caps_features_add(features:PGstCapsFeatures; feature:Pgchar);cdecl;external gstreamerlib name 'gst_caps_features_add';
+
+  procedure gst_caps_features_add_id(features:PGstCapsFeatures; feature:TGQuark);cdecl;external gstreamerlib name 'gst_caps_features_add_id';
+
+(* Const before type ignored *)
+  procedure gst_caps_features_remove(features:PGstCapsFeatures; feature:Pgchar);cdecl;external gstreamerlib name 'gst_caps_features_remove';
+
+  procedure gst_caps_features_remove_id(features:PGstCapsFeatures; feature:TGQuark);cdecl;external gstreamerlib name 'gst_caps_features_remove_id';
+
+
+

+ 82 - 0
packages/gstreamer/src/gstchildproxy.inc

@@ -0,0 +1,82 @@
+{* GStreamer
+ * Copyright (C) 2005 Stefan Kost <[email protected]>
+ *
+ * gstchildproxy.h: interface header for multi child elements
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+  Type
+    P_GstChildProxyInterface  = ^T_GstChildProxyInterface;
+    PGstChildProxy  = ^TGstChildProxy;
+
+    TGstChildProxy = record end;
+    T_GstChildProxy = TGstChildProxy;
+
+
+    T_GstChildProxyInterface = record
+        parent : TGTypeInterface;
+        get_child_by_name : function (parent:PGstChildProxy; name:Pgchar):PGObject;cdecl;
+        get_child_by_index : function (parent:PGstChildProxy; index:Tguint):PGObject;cdecl;
+        get_children_count : function (parent:PGstChildProxy):Tguint;cdecl;
+        child_added : procedure (parent:PGstChildProxy; child:PGObject; name:Pgchar);cdecl;
+        child_removed : procedure (parent:PGstChildProxy; child:PGObject; name:Pgchar);cdecl;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstChildProxyInterface = T_GstChildProxyInterface;
+
+  function gst_child_proxy_get_type:TGType;cdecl;external gstreamerlib name 'gst_child_proxy_get_type';
+
+(* Const before type ignored *)
+  function gst_child_proxy_get_child_by_name(parent:PGstChildProxy; name:Pgchar):PGObject;cdecl;external gstreamerlib name 'gst_child_proxy_get_child_by_name';
+
+  function gst_child_proxy_get_children_count(parent:PGstChildProxy):Tguint;cdecl;external gstreamerlib name 'gst_child_proxy_get_children_count';
+
+  function gst_child_proxy_get_child_by_index(parent:PGstChildProxy; index:Tguint):PGObject;cdecl;external gstreamerlib name 'gst_child_proxy_get_child_by_index';
+
+(* Const before type ignored *)
+  function gst_child_proxy_lookup(object_:PGstChildProxy; name:Pgchar; target:PPGObject; pspec:PPGParamSpec):Tgboolean;cdecl;external gstreamerlib name 'gst_child_proxy_lookup';
+
+(* Const before type ignored *)
+  procedure gst_child_proxy_get_property(object_:PGstChildProxy; name:Pgchar; value:PGValue);cdecl;external gstreamerlib name 'gst_child_proxy_get_property';
+
+(* Const before type ignored *)
+  procedure gst_child_proxy_get_valist(object_:PGstChildProxy; first_property_name:Pgchar; var_args:Tva_list);cdecl;external gstreamerlib name 'gst_child_proxy_get_valist';
+
+(* Const before type ignored *)
+  procedure gst_child_proxy_get(object_:PGstChildProxy; first_property_name:Pgchar; args:array of const);cdecl;external gstreamerlib name 'gst_child_proxy_get';
+
+  procedure gst_child_proxy_get(object_:PGstChildProxy; first_property_name:Pgchar);cdecl;external gstreamerlib name 'gst_child_proxy_get';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_child_proxy_set_property(object_:PGstChildProxy; name:Pgchar; value:PGValue);cdecl;external gstreamerlib name 'gst_child_proxy_set_property';
+
+(* Const before type ignored *)
+  procedure gst_child_proxy_set_valist(object_:PGstChildProxy; first_property_name:Pgchar; var_args:Tva_list);cdecl;external gstreamerlib name 'gst_child_proxy_set_valist';
+
+(* Const before type ignored *)
+  procedure gst_child_proxy_set(object_:PGstChildProxy; first_property_name:Pgchar; args:array of const);cdecl;external gstreamerlib name 'gst_child_proxy_set';
+
+  procedure gst_child_proxy_set(object_:PGstChildProxy; first_property_name:Pgchar);cdecl;external gstreamerlib name 'gst_child_proxy_set';
+
+(* Const before type ignored *)
+  procedure gst_child_proxy_child_added(parent:PGstChildProxy; child:PGObject; name:Pgchar);cdecl;external gstreamerlib name 'gst_child_proxy_child_added';
+
+(* Const before type ignored *)
+  procedure gst_child_proxy_child_removed(parent:PGstChildProxy; child:PGObject; name:Pgchar);cdecl;external gstreamerlib name 'gst_child_proxy_child_removed';
+
+

+ 180 - 0
packages/gstreamer/src/gstclock.inc

@@ -0,0 +1,180 @@
+{* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *                    2005 Wim Taymans <[email protected]>
+ *
+ * gstclock.h: Header for clock subsystem
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+  Type
+    P_GstClock  = ^T_GstClock;
+    PPGstClock = ^P_GstClock;
+    P_GstClockClass  = ^T_GstClockClass;
+    Pgdouble  = ^Tgdouble;
+    PGstClock_autoptr  = ^TGstClock_autoptr;
+    PGstClock_listautoptr  = ^TGstClock_listautoptr;
+    PGstClock_queueautoptr  = ^TGstClock_queueautoptr;
+    PGstClock_slistautoptr  = ^TGstClock_slistautoptr;
+    PGstClockEntry  = ^TGstClockEntry;
+    PGstClockFlags  = ^TGstClockFlags;
+    PGstClockTime  = ^TGstClockTime;
+    PGstClockTimeDiff  = ^TGstClockTimeDiff;
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+TGstClockReturn = (
+  GST_CLOCK_OK = 0,
+  GST_CLOCK_EARLY = 1,
+  GST_CLOCK_UNSCHEDULED = 2,
+  GST_CLOCK_BUSY = 3,
+  GST_CLOCK_BADTIME = 4,
+  GST_CLOCK_ERROR = 5,
+  GST_CLOCK_UNSUPPORTED = 6,
+  GST_CLOCK_DONE = 7
+);
+
+TGstClockEntryType = (
+  GST_CLOCK_ENTRY_SINGLE,
+  GST_CLOCK_ENTRY_PERIODIC
+);
+TGstClockID = gpointer ;
+
+ TGstClockCallback = function (clock : PGstClock; time : TGstClockTime; id : TGstClockID ; user_data : gpointer): gboolean; cdecl;
+
+T_GstClockEntry = record
+    refcount : gint;
+    clock : ^GstClock;
+    _type : TGstClockEntryType;
+    time : TGstClockTime;
+    interval : TGstClockTime;
+    status : TGstClockReturn;
+    func : TGstClockCallback;
+    user_data : gpointer;
+    destroy_data : GDestroyNotify;
+    unscheduled : gboolean;
+    woken_up : gboolean;
+    _gst_reserved : array[0..3] of gpointer;
+  end;
+TGstClockEntry =T_GstClockEntry;
+
+    TGstClockFlags = (
+      GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC := GST_OBJECT_FLAG_LAST shl 0,
+      GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC := GST_OBJECT_FLAG_LAST shl 1,
+      GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC := GST_OBJECT_FLAG_LAST shl 2,
+      GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC := GST_OBJECT_FLAG_LAST shl 3,
+      GST_CLOCK_FLAG_CAN_SET_RESOLUTION := GST_OBJECT_FLAG_LAST shl 4,
+      GST_CLOCK_FLAG_CAN_SET_MASTER := GST_OBJECT_FLAG_LAST shl 5,
+      GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC := GST_OBJECT_FLAG_LAST shl 6,
+      GST_CLOCK_FLAG_LAST := GST_OBJECT_FLAG_LAST shl 8
+      );
+
+
+
+    T_GstClockClass = record
+        parent_class : TGstObjectClass;
+        change_resolution : function (clock:PGstClock; old_resolution:TGstClockTime; new_resolution:TGstClockTime):TGstClockTime;cdecl;
+        get_resolution : function (clock:PGstClock):TGstClockTime;cdecl;
+        get_internal_time : function (clock:PGstClock):TGstClockTime;cdecl;
+        wait : function (clock:PGstClock; entry:PGstClockEntry; jitter:PGstClockTimeDiff):TGstClockReturn;cdecl;
+        wait_async : function (clock:PGstClock; entry:PGstClockEntry):TGstClockReturn;cdecl;
+        unschedule : procedure (clock:PGstClock; entry:PGstClockEntry);cdecl;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstClockClass = T_GstClockClass;
+
+  TGstClock_autoptr = PGstClock;
+
+  TGstClock_listautoptr = PGList;
+
+  TGstClock_slistautoptr = PGSList;
+
+  TGstClock_queueautoptr = PGQueue;
+
+
+  function gst_clock_get_type:TGType;cdecl;external gstreamerlib name 'gst_clock_get_type';
+
+  function gst_clock_set_resolution(clock:PGstClock; resolution:TGstClockTime):TGstClockTime;cdecl;external gstreamerlib name 'gst_clock_set_resolution';
+
+  function gst_clock_get_resolution(clock:PGstClock):TGstClockTime;cdecl;external gstreamerlib name 'gst_clock_get_resolution';
+
+  function gst_clock_get_time(clock:PGstClock):TGstClockTime;cdecl;external gstreamerlib name 'gst_clock_get_time';
+
+  procedure gst_clock_set_calibration(clock:PGstClock; internal:TGstClockTime; external:TGstClockTime; rate_num:TGstClockTime; rate_denom:TGstClockTime);cdecl;external gstreamerlib name 'gst_clock_set_calibration';
+
+  procedure gst_clock_get_calibration(clock:PGstClock; internal:PGstClockTime; external:PGstClockTime; rate_num:PGstClockTime; rate_denom:PGstClockTime);cdecl;external gstreamerlib name 'gst_clock_get_calibration';
+
+  function gst_clock_set_master(clock:PGstClock; master:PGstClock):Tgboolean;cdecl;external gstreamerlib name 'gst_clock_set_master';
+
+  function gst_clock_get_master(clock:PGstClock):PGstClock;cdecl;external gstreamerlib name 'gst_clock_get_master';
+
+  procedure gst_clock_set_timeout(clock:PGstClock; timeout:TGstClockTime);cdecl;external gstreamerlib name 'gst_clock_set_timeout';
+
+  function gst_clock_get_timeout(clock:PGstClock):TGstClockTime;cdecl;external gstreamerlib name 'gst_clock_get_timeout';
+
+  function gst_clock_add_observation(clock:PGstClock; slave:TGstClockTime; master:TGstClockTime; r_squared:Pgdouble):Tgboolean;cdecl;external gstreamerlib name 'gst_clock_add_observation';
+
+  function gst_clock_add_observation_unapplied(clock:PGstClock; slave:TGstClockTime; master:TGstClockTime; r_squared:Pgdouble; internal:PGstClockTime; 
+             external:PGstClockTime; rate_num:PGstClockTime; rate_denom:PGstClockTime):Tgboolean;cdecl;external gstreamerlib name 'gst_clock_add_observation_unapplied';
+
+  function gst_clock_get_internal_time(clock:PGstClock):TGstClockTime;cdecl;external gstreamerlib name 'gst_clock_get_internal_time';
+
+  function gst_clock_adjust_unlocked(clock:PGstClock; internal:TGstClockTime):TGstClockTime;cdecl;external gstreamerlib name 'gst_clock_adjust_unlocked';
+
+  function gst_clock_adjust_with_calibration(clock:PGstClock; internal_target:TGstClockTime; cinternal:TGstClockTime; cexternal:TGstClockTime; cnum:TGstClockTime; 
+             cdenom:TGstClockTime):TGstClockTime;cdecl;external gstreamerlib name 'gst_clock_adjust_with_calibration';
+
+  function gst_clock_unadjust_with_calibration(clock:PGstClock; external_target:TGstClockTime; cinternal:TGstClockTime; cexternal:TGstClockTime; cnum:TGstClockTime; 
+             cdenom:TGstClockTime):TGstClockTime;cdecl;external gstreamerlib name 'gst_clock_unadjust_with_calibration';
+
+  function gst_clock_unadjust_unlocked(clock:PGstClock; external:TGstClockTime):TGstClockTime;cdecl;external gstreamerlib name 'gst_clock_unadjust_unlocked';
+
+  function gst_clock_wait_for_sync(clock:PGstClock; timeout:TGstClockTime):Tgboolean;cdecl;external gstreamerlib name 'gst_clock_wait_for_sync';
+
+  function gst_clock_is_synced(clock:PGstClock):Tgboolean;cdecl;external gstreamerlib name 'gst_clock_is_synced';
+
+  procedure gst_clock_set_synced(clock:PGstClock; synced:Tgboolean);cdecl;external gstreamerlib name 'gst_clock_set_synced';
+
+  function gst_clock_new_single_shot_id(clock:PGstClock; time:TGstClockTime):TGstClockID;cdecl;external gstreamerlib name 'gst_clock_new_single_shot_id';
+
+  function gst_clock_new_periodic_id(clock:PGstClock; start_time:TGstClockTime; interval:TGstClockTime):TGstClockID;cdecl;external gstreamerlib name 'gst_clock_new_periodic_id';
+
+  function gst_clock_id_ref(id:TGstClockID):TGstClockID;cdecl;external gstreamerlib name 'gst_clock_id_ref';
+
+  procedure gst_clock_id_unref(id:TGstClockID);cdecl;external gstreamerlib name 'gst_clock_id_unref';
+
+  function gst_clock_id_compare_func(id1:Tgconstpointer; id2:Tgconstpointer):Tgint;cdecl;external gstreamerlib name 'gst_clock_id_compare_func';
+
+  function gst_clock_id_get_clock(id:TGstClockID):PGstClock;cdecl;external gstreamerlib name 'gst_clock_id_get_clock';
+
+  function gst_clock_id_uses_clock(id:TGstClockID; clock:PGstClock):Tgboolean;cdecl;external gstreamerlib name 'gst_clock_id_uses_clock';
+
+  function gst_clock_id_get_time(id:TGstClockID):TGstClockTime;cdecl;external gstreamerlib name 'gst_clock_id_get_time';
+
+  function gst_clock_id_wait(id:TGstClockID; jitter:PGstClockTimeDiff):TGstClockReturn;cdecl;external gstreamerlib name 'gst_clock_id_wait';
+
+  function gst_clock_id_wait_async(id:TGstClockID; func:TGstClockCallback; user_data:Tgpointer; destroy_data:TGDestroyNotify):TGstClockReturn;cdecl;external gstreamerlib name 'gst_clock_id_wait_async';
+
+  procedure gst_clock_id_unschedule(id:TGstClockID);cdecl;external gstreamerlib name 'gst_clock_id_unschedule';
+
+  function gst_clock_single_shot_id_reinit(clock:PGstClock; id:TGstClockID; time:TGstClockTime):Tgboolean;cdecl;external gstreamerlib name 'gst_clock_single_shot_id_reinit';
+
+  function gst_clock_periodic_id_reinit(clock:PGstClock; id:TGstClockID; start_time:TGstClockTime; interval:TGstClockTime):Tgboolean;cdecl;external gstreamerlib name 'gst_clock_periodic_id_reinit';
+
+
+

+ 99 - 0
packages/gstreamer/src/gstcontext.inc

@@ -0,0 +1,99 @@
+{* GStreamer
+ * Copyright (C) 2013 Collabora Ltd.
+ *   Author: Sebastian Dröge <[email protected]>
+ * Copyright (C) 2013 Sebastian Dröge <[email protected]>
+ *
+ * gstcontext.h: Header for GstContext subsystem
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+
+  Type
+    PGstContext  = ^TGstContext;
+    PPGstContext = ^PGstContext;
+    PGstContext_autoptr  = ^TGstContext_autoptr;
+    PGstContext_listautoptr  = ^TGstContext_listautoptr;
+    PGstContext_queueautoptr  = ^TGstContext_queueautoptr;
+    PGstContext_slistautoptr  = ^TGstContext_slistautoptr;
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+    T_GstContext = record end;
+    TGstContext = T_GstContext;
+
+  TGstContext_autoptr = PGstContext;
+
+  TGstContext_listautoptr = PGList;
+
+  TGstContext_slistautoptr = PGSList;
+
+  TGstContext_queueautoptr = PGQueue;
+
+  function gst_context_get_type:TGType;cdecl;external gstreamerlib name 'gst_context_get_type';
+
+  {
+  static inline GstContext *
+  gst_context_ref (GstContext * context)
+  
+    return (GstContext *) gst_mini_object_ref (((GstMiniObject*)(context)));
+  
+  # 71 "gstcontext.h"
+  static inline void
+  gst_context_unref (GstContext * context)
+  
+    gst_mini_object_unref (((GstMiniObject*)(context)));
+  
+  # 88 "gstcontext.h"
+  static inline GstContext *
+  gst_context_copy (const GstContext * context)
+  
+    return ((GstContext*)(gst_mini_object_copy (((const GstMiniObject*)(context)))));
+  
+  # 130 "gstcontext.h"
+  static inline gboolean
+  gst_context_replace (GstContext **old_context, GstContext *new_context)
+  
+    return gst_mini_object_replace ((GstMiniObject **) old_context, (GstMiniObject *) new_context);
+  
+   }
+(* Const before type ignored *)
+  function gst_context_new(context_type:Pgchar; persistent:Tgboolean):PGstContext;cdecl;external gstreamerlib name 'gst_context_new';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_context_get_context_type(context:PGstContext):Pgchar;cdecl;external gstreamerlib name 'gst_context_get_context_type';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_context_has_context_type(context:PGstContext; context_type:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_context_has_context_type';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_context_get_structure(context:PGstContext):PGstStructure;cdecl;external gstreamerlib name 'gst_context_get_structure';
+
+  function gst_context_writable_structure(context:PGstContext):PGstStructure;cdecl;external gstreamerlib name 'gst_context_writable_structure';
+
+(* Const before type ignored *)
+  function gst_context_is_persistent(context:PGstContext):Tgboolean;cdecl;external gstreamerlib name 'gst_context_is_persistent';
+
+
+  var
+    _gst_context_type : TGType;cvar;external;
+
+

+ 86 - 0
packages/gstreamer/src/gstcontrolbinding.inc

@@ -0,0 +1,86 @@
+{* GStreamer
+ *
+ * Copyright (C) 2011 Stefan Sauer <[email protected]>
+ *
+ * gstcontrolbinding.h: Attachment for control sources
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+  Type
+    P_GstControlBinding  = ^T_GstControlBinding;
+    P_GstControlBindingClass  = ^T_GstControlBindingClass;
+    PGParamSpec  = ^TGParamSpec;
+    PGstControlBinding  = ^TGstControlBinding;
+    PGstControlBinding_autoptr  = ^TGstControlBinding_autoptr;
+    PGstControlBinding_listautoptr  = ^TGstControlBinding_listautoptr;
+    PGstControlBinding_queueautoptr  = ^TGstControlBinding_queueautoptr;
+    PGstControlBinding_slistautoptr  = ^TGstControlBinding_slistautoptr;
+    PGstControlBindingPrivate  = ^TGstControlBindingPrivate;
+
+    TGstControlBindingConvert = procedure (binding:PGstControlBinding; src_value:Tgdouble; dest_value:PGValue);cdecl;
+
+    TGstControlBindingPrivate = record end;
+
+    T_GstControlBinding = record
+        parent : TGstObject;
+        name : Pgchar;
+        pspec : PGParamSpec;
+        object_ : PGstObject;
+        disabled : Tgboolean;
+        ABI : record
+            case longint of
+              0 : ( abi : record
+                  priv : PGstControlBindingPrivate;
+                end );
+              1 : ( _gst_reserved : array[0..3] of Tgpointer );
+            end;
+      end;
+    TGstControlBinding = T_GstControlBinding;
+
+    T_GstControlBindingClass = record
+        parent_class : TGstObjectClass;
+        sync_values : function (binding:PGstControlBinding; object_:PGstObject; timestamp:TGstClockTime; last_sync:TGstClockTime):Tgboolean;cdecl;
+        get_value : function (binding:PGstControlBinding; timestamp:TGstClockTime):PGValue;cdecl;
+        get_value_array : function (binding:PGstControlBinding; timestamp:TGstClockTime; interval:TGstClockTime; n_values:Tguint; values:Tgpointer):Tgboolean;cdecl;
+        get_g_value_array : function (binding:PGstControlBinding; timestamp:TGstClockTime; interval:TGstClockTime; n_values:Tguint; values:PGValue):Tgboolean;cdecl;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+
+  TGstControlBinding_autoptr = PGstControlBinding;
+
+  TGstControlBinding_listautoptr = PGList;
+
+  TGstControlBinding_slistautoptr = PGSList;
+
+  TGstControlBinding_queueautoptr = PGQueue;
+
+  function gst_control_binding_get_type:TGType;cdecl;external gstreamerlib name 'gst_control_binding_get_type';
+
+  function gst_control_binding_sync_values(binding:PGstControlBinding; object_:PGstObject; timestamp:TGstClockTime; last_sync:TGstClockTime):Tgboolean;cdecl;external gstreamerlib name 'gst_control_binding_sync_values';
+
+  function gst_control_binding_get_value(binding:PGstControlBinding; timestamp:TGstClockTime):PGValue;cdecl;external gstreamerlib name 'gst_control_binding_get_value';
+
+  function gst_control_binding_get_value_array(binding:PGstControlBinding; timestamp:TGstClockTime; interval:TGstClockTime; n_values:Tguint; values:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_control_binding_get_value_array';
+
+  function gst_control_binding_get_g_value_array(binding:PGstControlBinding; timestamp:TGstClockTime; interval:TGstClockTime; n_values:Tguint; values:PGValue):Tgboolean;cdecl;external gstreamerlib name 'gst_control_binding_get_g_value_array';
+
+  procedure gst_control_binding_set_disabled(binding:PGstControlBinding; disabled:Tgboolean);cdecl;external gstreamerlib name 'gst_control_binding_set_disabled';
+
+  function gst_control_binding_is_disabled(binding:PGstControlBinding):Tgboolean;cdecl;external gstreamerlib name 'gst_control_binding_is_disabled';
+
+
+

+ 92 - 0
packages/gstreamer/src/gstcontrolsource.inc

@@ -0,0 +1,92 @@
+{* GStreamer
+ *
+ * Copyright (C) 2007 Sebastian Dröge <[email protected]>
+ *
+ * gstcontrolsource.h: Interface declaration for control sources
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+  Type
+    P_GstControlSource  = ^T_GstControlSource;
+    P_GstControlSourceClass  = ^T_GstControlSourceClass;
+    P_GstTimedValue  = ^T_GstTimedValue;
+    PGstControlSource  = ^TGstControlSource;
+    PGstControlSource_autoptr  = ^TGstControlSource_autoptr;
+    PGstControlSource_listautoptr  = ^TGstControlSource_listautoptr;
+    PGstControlSource_queueautoptr  = ^TGstControlSource_queueautoptr;
+    PGstControlSource_slistautoptr  = ^TGstControlSource_slistautoptr;
+    PGstValueArray  = ^TGstValueArray;
+    PGstValueArray_autoptr  = ^TGstValueArray_autoptr;
+    PGstValueArray_listautoptr  = ^TGstValueArray_listautoptr;
+    PGstValueArray_queueautoptr  = ^TGstValueArray_queueautoptr;
+    PGstValueArray_slistautoptr  = ^TGstValueArray_slistautoptr;
+
+
+    TGstValueArray = record end;
+    T_GstValueArray = TGstValueArray;
+
+
+    T_GstTimedValue = record
+        timestamp : TGstClockTime;
+        value : Tgdouble;
+      end;
+    TGstTimedValue = T_GstTimedValue ;
+
+
+    TGstControlSourceGetValue = function (self:PGstControlSource; timestamp:TGstClockTime; value:Pgdouble):Tgboolean;cdecl;
+
+    TGstControlSourceGetValueArray = function (self:PGstControlSource; timestamp:TGstClockTime; interval:TGstClockTime; n_values:Tguint; values:Pgdouble):Tgboolean;cdecl;
+
+    T_GstControlSource = record
+        parent : TGstObject;
+        get_value : TGstControlSourceGetValue;
+        get_value_array : TGstControlSourceGetValueArray;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstControlSource = T_GstControlSource;
+
+
+    T_GstControlSourceClass = record
+        parent_class : TGstObjectClass;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstControlSourceClass = T_GstControlSourceClass;
+
+    TGstControlSource_autoptr = PGstControlSource;
+
+    TGstControlSource_listautoptr = PGList;
+
+    TGstControlSource_slistautoptr = PGSList;
+
+    TGstControlSource_queueautoptr = PGQueue;
+
+    TGstValueArray_autoptr = PGstValueArray;
+
+    TGstValueArray_listautoptr = PGList;
+
+    TGstValueArray_slistautoptr = PGSList;
+
+    TGstValueArray_queueautoptr = PGQueue;
+
+  function gst_control_source_get_type:TGType;cdecl;external gstreamerlib name 'gst_control_source_get_type';
+
+  function gst_control_source_get_value(self:PGstControlSource; timestamp:TGstClockTime; value:Pgdouble):Tgboolean;cdecl;external gstreamerlib name 'gst_control_source_get_value';
+
+  function gst_control_source_get_value_array(self:PGstControlSource; timestamp:TGstClockTime; interval:TGstClockTime; n_values:Tguint; values:Pgdouble):Tgboolean;cdecl;external gstreamerlib name 'gst_control_source_get_value_array';
+
+
+

+ 123 - 0
packages/gstreamer/src/gstdatetime.inc

@@ -0,0 +1,123 @@
+{* GStreamer
+ * Copyright (C) 2010 Thiago Santos <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+
+  Type
+    PGDateTime  = ^TGDateTime;
+    PGstDateTime  = ^TGstDateTime;
+    PPGstDateTime = ^PGstDateTime;
+    PGstDateTime_autoptr  = ^TGstDateTime_autoptr;
+    PGstDateTime_listautoptr  = ^TGstDateTime_listautoptr;
+    PGstDateTime_queueautoptr  = ^TGstDateTime_queueautoptr;
+    PGstDateTime_slistautoptr  = ^TGstDateTime_slistautoptr;
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+  TGstDateTime_autoptr = PGstDateTime;
+
+  TGstDateTime_listautoptr = PGList;
+
+  TGstDateTime_slistautoptr = PGSList;
+
+  TGstDateTime_queueautoptr = PGQueue;
+
+  TGstDateTime = record end;
+  T_GstDateTime = TGstDateTime;
+
+    var
+      _gst_date_time_type : TGType;cvar;external;
+
+  function gst_date_time_get_type:TGType;cdecl;external gstreamerlib name 'gst_date_time_get_type';
+
+(* Const before type ignored *)
+  function gst_date_time_has_year(datetime:PGstDateTime):Tgboolean;cdecl;external gstreamerlib name 'gst_date_time_has_year';
+
+(* Const before type ignored *)
+  function gst_date_time_has_month(datetime:PGstDateTime):Tgboolean;cdecl;external gstreamerlib name 'gst_date_time_has_month';
+
+(* Const before type ignored *)
+  function gst_date_time_has_day(datetime:PGstDateTime):Tgboolean;cdecl;external gstreamerlib name 'gst_date_time_has_day';
+
+(* Const before type ignored *)
+  function gst_date_time_has_time(datetime:PGstDateTime):Tgboolean;cdecl;external gstreamerlib name 'gst_date_time_has_time';
+
+(* Const before type ignored *)
+  function gst_date_time_has_second(datetime:PGstDateTime):Tgboolean;cdecl;external gstreamerlib name 'gst_date_time_has_second';
+
+(* Const before type ignored *)
+  function gst_date_time_get_year(datetime:PGstDateTime):Tgint;cdecl;external gstreamerlib name 'gst_date_time_get_year';
+
+(* Const before type ignored *)
+  function gst_date_time_get_month(datetime:PGstDateTime):Tgint;cdecl;external gstreamerlib name 'gst_date_time_get_month';
+
+(* Const before type ignored *)
+  function gst_date_time_get_day(datetime:PGstDateTime):Tgint;cdecl;external gstreamerlib name 'gst_date_time_get_day';
+
+(* Const before type ignored *)
+  function gst_date_time_get_hour(datetime:PGstDateTime):Tgint;cdecl;external gstreamerlib name 'gst_date_time_get_hour';
+
+(* Const before type ignored *)
+  function gst_date_time_get_minute(datetime:PGstDateTime):Tgint;cdecl;external gstreamerlib name 'gst_date_time_get_minute';
+
+(* Const before type ignored *)
+  function gst_date_time_get_second(datetime:PGstDateTime):Tgint;cdecl;external gstreamerlib name 'gst_date_time_get_second';
+
+(* Const before type ignored *)
+  function gst_date_time_get_microsecond(datetime:PGstDateTime):Tgint;cdecl;external gstreamerlib name 'gst_date_time_get_microsecond';
+
+(* Const before type ignored *)
+  function gst_date_time_get_time_zone_offset(datetime:PGstDateTime):Tgfloat;cdecl;external gstreamerlib name 'gst_date_time_get_time_zone_offset';
+
+  function gst_date_time_new_from_unix_epoch_local_time(secs:Tgint64):PGstDateTime;cdecl;external gstreamerlib name 'gst_date_time_new_from_unix_epoch_local_time';
+
+  function gst_date_time_new_from_unix_epoch_utc(secs:Tgint64):PGstDateTime;cdecl;external gstreamerlib name 'gst_date_time_new_from_unix_epoch_utc';
+
+  function gst_date_time_new_local_time(year:Tgint; month:Tgint; day:Tgint; hour:Tgint; minute:Tgint; 
+             seconds:Tgdouble):PGstDateTime;cdecl;external gstreamerlib name 'gst_date_time_new_local_time';
+
+  function gst_date_time_new_y(year:Tgint):PGstDateTime;cdecl;external gstreamerlib name 'gst_date_time_new_y';
+
+  function gst_date_time_new_ym(year:Tgint; month:Tgint):PGstDateTime;cdecl;external gstreamerlib name 'gst_date_time_new_ym';
+
+  function gst_date_time_new_ymd(year:Tgint; month:Tgint; day:Tgint):PGstDateTime;cdecl;external gstreamerlib name 'gst_date_time_new_ymd';
+
+  function gst_date_time_new(tzoffset:Tgfloat; year:Tgint; month:Tgint; day:Tgint; hour:Tgint; 
+             minute:Tgint; seconds:Tgdouble):PGstDateTime;cdecl;external gstreamerlib name 'gst_date_time_new';
+
+  function gst_date_time_new_now_local_time:PGstDateTime;cdecl;external gstreamerlib name 'gst_date_time_new_now_local_time';
+
+  function gst_date_time_new_now_utc:PGstDateTime;cdecl;external gstreamerlib name 'gst_date_time_new_now_utc';
+
+  function gst_date_time_to_iso8601_string(datetime:PGstDateTime):Pgchar;cdecl;external gstreamerlib name 'gst_date_time_to_iso8601_string';
+
+(* Const before type ignored *)
+  function gst_date_time_new_from_iso8601_string(_string:Pgchar):PGstDateTime;cdecl;external gstreamerlib name 'gst_date_time_new_from_iso8601_string';
+
+  function gst_date_time_to_g_date_time(datetime:PGstDateTime):PGDateTime;cdecl;external gstreamerlib name 'gst_date_time_to_g_date_time';
+
+  function gst_date_time_new_from_g_date_time(dt:PGDateTime):PGstDateTime;cdecl;external gstreamerlib name 'gst_date_time_new_from_g_date_time';
+
+  function gst_date_time_ref(datetime:PGstDateTime):PGstDateTime;cdecl;external gstreamerlib name 'gst_date_time_ref';
+
+  procedure gst_date_time_unref(datetime:PGstDateTime);cdecl;external gstreamerlib name 'gst_date_time_unref';
+
+
+

+ 41 - 0
packages/gstreamer/src/gstdebugutils.inc

@@ -0,0 +1,41 @@
+{* GStreamer
+ * Copyright (C) 2007 Stefan Kost <[email protected]>
+ *
+ * gstdebugutils.h: debugging and analysis utilities
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+  Type
+
+    PGstDebugGraphDetails  = ^TGstDebugGraphDetails;
+
+    TGstDebugGraphDetails = (GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE := 1 shl 0,
+      GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS := 1 shl 1,
+      GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS := 1 shl 2,
+      GST_DEBUG_GRAPH_SHOW_STATES := 1 shl 3,GST_DEBUG_GRAPH_SHOW_FULL_PARAMS := 1 shl 4,
+      GST_DEBUG_GRAPH_SHOW_ALL := (1 shl 4)-1,GST_DEBUG_GRAPH_SHOW_VERBOSE := Tgint($ffffffff)
+      );
+
+  function gst_debug_bin_to_dot_data(bin:PGstBin; details:TGstDebugGraphDetails):Pgchar;cdecl;external gstreamerlib name 'gst_debug_bin_to_dot_data';
+
+(* Const before type ignored *)
+  procedure gst_debug_bin_to_dot_file(bin:PGstBin; details:TGstDebugGraphDetails; file_name:Pgchar);cdecl;external gstreamerlib name 'gst_debug_bin_to_dot_file';
+
+(* Const before type ignored *)
+  procedure gst_debug_bin_to_dot_file_with_ts(bin:PGstBin; details:TGstDebugGraphDetails; file_name:Pgchar);cdecl;external gstreamerlib name 'gst_debug_bin_to_dot_file_with_ts';
+
+

+ 81 - 0
packages/gstreamer/src/gstdevice.inc

@@ -0,0 +1,81 @@
+{/* GStreamer
+ * Copyright (C) 2012 Olivier Crete <[email protected]>
+ *
+ * gstdevice.c: Device discovery
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */}
+
+  Type
+    P_GstDevice  = ^T_GstDevice;
+
+    P_GstDeviceClass  = ^T_GstDeviceClass;
+    PGstDevice_autoptr  = ^TGstDevice_autoptr;
+    PGstDevice_listautoptr  = ^TGstDevice_listautoptr;
+    PGstDevice_queueautoptr  = ^TGstDevice_queueautoptr;
+    PGstDevice_slistautoptr  = ^TGstDevice_slistautoptr;
+    PGstDevicePrivate  = ^TGstDevicePrivate;
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+  TGstDevicePrivate = record end;
+  T_GstDevicePrivate = TGstDevicePrivate;
+
+
+    T_GstDevice = record
+        parent : TGstObject;
+        priv : PGstDevicePrivate;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    PGstDevice = ^T_GstDevice;
+    PPGstDevice = ^PGstDevice;
+
+    T_GstDeviceClass = record
+        parent_class : TGstObjectClass;
+        create_element : function (device: PGstDevice; name:Pgchar):PGstElement;cdecl;
+        reconfigure_element : function (device:PGstDevice; element:PGstElement):Tgboolean;cdecl;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+
+  TGstDevice_autoptr = PGstDevice;
+  TGstDevice_listautoptr = PGList;
+  TGstDevice_slistautoptr = PGSList;
+  TGstDevice_queueautoptr = PGQueue;
+
+  function gst_device_get_type:TGType;cdecl;external gstreamerlib name 'gst_device_get_type';
+
+(* Const before type ignored *)
+  function gst_device_create_element(device:PGstDevice; name:Pgchar):PGstElement;cdecl;external gstreamerlib name 'gst_device_create_element';
+
+  function gst_device_get_caps(device:PGstDevice):PGstCaps;cdecl;external gstreamerlib name 'gst_device_get_caps';
+
+  function gst_device_get_display_name(device:PGstDevice):Pgchar;cdecl;external gstreamerlib name 'gst_device_get_display_name';
+
+  function gst_device_get_device_class(device:PGstDevice):Pgchar;cdecl;external gstreamerlib name 'gst_device_get_device_class';
+
+  function gst_device_get_properties(device:PGstDevice):PGstStructure;cdecl;external gstreamerlib name 'gst_device_get_properties';
+
+  function gst_device_reconfigure_element(device:PGstDevice; element:PGstElement):Tgboolean;cdecl;external gstreamerlib name 'gst_device_reconfigure_element';
+
+  function gst_device_has_classesv(device:PGstDevice; classes:PPgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_device_has_classesv';
+
+(* Const before type ignored *)
+  function gst_device_has_classes(device:PGstDevice; classes:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_device_has_classes';
+
+
+

+ 85 - 0
packages/gstreamer/src/gstdevicemonitor.inc

@@ -0,0 +1,85 @@
+{/* GStreamer
+ * Copyright (C) 2013 Olivier Crete <[email protected]>
+ *
+ * gstdevicemonitor.c: Device monitor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */    }
+
+
+  Type
+    P_GstDeviceMonitor  = ^T_GstDeviceMonitor;
+    P_GstDeviceMonitorClass  = ^T_GstDeviceMonitorClass;
+    PGstDeviceMonitor  = ^TGstDeviceMonitor;
+    PGstDeviceMonitor_autoptr  = ^TGstDeviceMonitor_autoptr;
+    PGstDeviceMonitor_listautoptr  = ^TGstDeviceMonitor_listautoptr;
+    PGstDeviceMonitor_queueautoptr  = ^TGstDeviceMonitor_queueautoptr;
+    PGstDeviceMonitor_slistautoptr  = ^TGstDeviceMonitor_slistautoptr;
+    PGstDeviceMonitorPrivate  = ^TGstDeviceMonitorPrivate;
+
+
+    TGstDeviceMonitorPrivate = record end;
+    T_GstDeviceMonitorPrivate = TGstDeviceMonitorPrivate;
+    T_GstDeviceMonitor = record
+        parent : TGstObject;
+        priv : PGstDeviceMonitorPrivate;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstDeviceMonitor = T_GstDeviceMonitor;
+
+
+
+    T_GstDeviceMonitorClass = record
+        parent_class : TGstObjectClass;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstDeviceMonitorClass = T_GstDeviceMonitorClass ;
+
+
+  TGstDeviceMonitor_autoptr = PGstDeviceMonitor;
+
+  TGstDeviceMonitor_listautoptr = PGList;
+
+  TGstDeviceMonitor_slistautoptr = PGSList;
+
+  TGstDeviceMonitor_queueautoptr = PGQueue;
+
+
+  function gst_device_monitor_get_type:TGType;cdecl;external gstreamerlib name 'gst_device_monitor_get_type';
+
+  function gst_device_monitor_new:PGstDeviceMonitor;cdecl;external gstreamerlib name 'gst_device_monitor_new';
+
+  function gst_device_monitor_get_bus(monitor:PGstDeviceMonitor):PGstBus;cdecl;external gstreamerlib name 'gst_device_monitor_get_bus';
+
+  function gst_device_monitor_get_devices(monitor:PGstDeviceMonitor):PGList;cdecl;external gstreamerlib name 'gst_device_monitor_get_devices';
+
+  function gst_device_monitor_start(monitor:PGstDeviceMonitor):Tgboolean;cdecl;external gstreamerlib name 'gst_device_monitor_start';
+
+  procedure gst_device_monitor_stop(monitor:PGstDeviceMonitor);cdecl;external gstreamerlib name 'gst_device_monitor_stop';
+
+(* Const before type ignored *)
+  function gst_device_monitor_add_filter(monitor:PGstDeviceMonitor; classes:Pgchar; caps:PGstCaps):Tguint;cdecl;external gstreamerlib name 'gst_device_monitor_add_filter';
+
+  function gst_device_monitor_remove_filter(monitor:PGstDeviceMonitor; filter_id:Tguint):Tgboolean;cdecl;external gstreamerlib name 'gst_device_monitor_remove_filter';
+
+  function gst_device_monitor_get_providers(monitor:PGstDeviceMonitor):PPgchar;cdecl;external gstreamerlib name 'gst_device_monitor_get_providers';
+
+  procedure gst_device_monitor_set_show_all_devices(monitor:PGstDeviceMonitor; show_all:Tgboolean);cdecl;external gstreamerlib name 'gst_device_monitor_set_show_all_devices';
+
+  function gst_device_monitor_get_show_all_devices(monitor:PGstDeviceMonitor):Tgboolean;cdecl;external gstreamerlib name 'gst_device_monitor_get_show_all_devices';
+
+
+

+ 128 - 0
packages/gstreamer/src/gstdeviceprovider.inc

@@ -0,0 +1,128 @@
+{
+/* GStreamer
+ * Copyright (C) 2012 Olivier Crete <[email protected]>
+ *
+ * gstdeviceprovider.h: Device probing and monitoring
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+}
+  Type
+    P_GstDeviceProvider  = ^T_GstDeviceProvider;
+    P_GstDeviceProviderClass  = ^T_GstDeviceProviderClass;
+    PGstDeviceProvider  = ^TGstDeviceProvider;
+    PGstDeviceProvider_autoptr  = ^TGstDeviceProvider_autoptr;
+    PGstDeviceProvider_listautoptr  = ^TGstDeviceProvider_listautoptr;
+    PGstDeviceProvider_queueautoptr  = ^TGstDeviceProvider_queueautoptr;
+    PGstDeviceProvider_slistautoptr  = ^TGstDeviceProvider_slistautoptr;
+    PGstDeviceProviderClass  = ^TGstDeviceProviderClass;
+    PGstDeviceProviderFactory  = ^TGstDeviceProviderFactory;
+    PGstDeviceProviderPrivate  = ^TGstDeviceProviderPrivate;
+
+    T_GstDeviceProviderFactory  = record end;
+    TGstDeviceProviderFactory = T_GstDeviceProviderFactory ;
+
+    T_GstDeviceProviderFactoryClass = record end;
+    TGstDeviceProviderFactoryClass = T_GstDeviceProviderFactoryClass;
+
+    T_GstDeviceProviderPrivate = record end;
+    TGstDeviceProviderPrivate = T_GstDeviceProviderPrivate;
+
+    T_GstDeviceProvider = record
+        parent : TGstObject;
+        devices : PGList;
+        priv : PGstDeviceProviderPrivate;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstDeviceProvider = T_GstDeviceProvider;
+
+    T_GstDeviceProviderClass = record
+        parent_class : TGstObjectClass;
+        factory : PGstDeviceProviderFactory;
+        probe : function (provider:PGstDeviceProvider):PGList;cdecl;
+        start : function (provider:PGstDeviceProvider):Tgboolean;cdecl;
+        stop : procedure (provider:PGstDeviceProvider);cdecl;
+        metadata : Tgpointer;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstDeviceProviderClass = T_GstDeviceProviderClass;
+
+    TGstDeviceProvider_autoptr = PGstDeviceProvider;
+
+    TGstDeviceProvider_listautoptr = PGList;
+
+    TGstDeviceProvider_slistautoptr = PGSList;
+
+    TGstDeviceProvider_queueautoptr = PGQueue;
+
+
+  function gst_device_provider_get_type:TGType;cdecl;external gstreamerlib name 'gst_device_provider_get_type';
+
+  function gst_device_provider_get_devices(provider:PGstDeviceProvider):PGList;cdecl;external gstreamerlib name 'gst_device_provider_get_devices';
+
+  function gst_device_provider_start(provider:PGstDeviceProvider):Tgboolean;cdecl;external gstreamerlib name 'gst_device_provider_start';
+
+  procedure gst_device_provider_stop(provider:PGstDeviceProvider);cdecl;external gstreamerlib name 'gst_device_provider_stop';
+
+  function gst_device_provider_can_monitor(provider:PGstDeviceProvider):Tgboolean;cdecl;external gstreamerlib name 'gst_device_provider_can_monitor';
+
+  function gst_device_provider_get_bus(provider:PGstDeviceProvider):PGstBus;cdecl;external gstreamerlib name 'gst_device_provider_get_bus';
+
+  procedure gst_device_provider_device_add(provider:PGstDeviceProvider; device:PGstDevice);cdecl;external gstreamerlib name 'gst_device_provider_device_add';
+
+  procedure gst_device_provider_device_remove(provider:PGstDeviceProvider; device:PGstDevice);cdecl;external gstreamerlib name 'gst_device_provider_device_remove';
+
+  function gst_device_provider_get_hidden_providers(provider:PGstDeviceProvider):PPgchar;cdecl;external gstreamerlib name 'gst_device_provider_get_hidden_providers';
+
+(* Const before type ignored *)
+  procedure gst_device_provider_hide_provider(provider:PGstDeviceProvider; name:Pgchar);cdecl;external gstreamerlib name 'gst_device_provider_hide_provider';
+
+(* Const before type ignored *)
+  procedure gst_device_provider_unhide_provider(provider:PGstDeviceProvider; name:Pgchar);cdecl;external gstreamerlib name 'gst_device_provider_unhide_provider';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_device_provider_get_metadata(provider:PGstDeviceProvider; key:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_device_provider_get_metadata';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_device_provider_class_set_metadata(klass:PGstDeviceProviderClass; longname:Pgchar; classification:Pgchar; description:Pgchar; author:Pgchar);cdecl;external gstreamerlib name 'gst_device_provider_class_set_metadata';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_device_provider_class_set_static_metadata(klass:PGstDeviceProviderClass; longname:Pgchar; classification:Pgchar; description:Pgchar; author:Pgchar);cdecl;external gstreamerlib name 'gst_device_provider_class_set_static_metadata';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_device_provider_class_add_metadata(klass:PGstDeviceProviderClass; key:Pgchar; value:Pgchar);cdecl;external gstreamerlib name 'gst_device_provider_class_add_metadata';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_device_provider_class_add_static_metadata(klass:PGstDeviceProviderClass; key:Pgchar; value:Pgchar);cdecl;external gstreamerlib name 'gst_device_provider_class_add_static_metadata';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_device_provider_class_get_metadata(klass:PGstDeviceProviderClass; key:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_device_provider_class_get_metadata';
+
+  procedure gst_device_provider_device_changed(provider:PGstDeviceProvider; device:PGstDevice; changed_device:PGstDevice);cdecl;external gstreamerlib name 'gst_device_provider_device_changed';
+
+  function gst_device_provider_get_factory(provider:PGstDeviceProvider):PGstDeviceProviderFactory;cdecl;external gstreamerlib name 'gst_device_provider_get_factory';
+
+

+ 68 - 0
packages/gstreamer/src/gstdeviceproviderfactory.inc

@@ -0,0 +1,68 @@
+{/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *               2000,2004 Wim Taymans <[email protected]>
+ *               2012 Olivier Crete <[email protected]>
+ *
+ * gstdeviceproviderfactory.h: Header for GstDeviceProviderFactory
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *}
+
+Type
+    PGstDeviceProviderFactory_autoptr  = ^TGstDeviceProviderFactory_autoptr;
+    PGstDeviceProviderFactory_listautoptr  = ^TGstDeviceProviderFactory_listautoptr;
+    PGstDeviceProviderFactory_queueautoptr  = ^TGstDeviceProviderFactory_queueautoptr;
+    PGstDeviceProviderFactory_slistautoptr  = ^TGstDeviceProviderFactory_slistautoptr;
+
+  TGstDeviceProviderFactory_autoptr = PGstDeviceProviderFactory;
+
+  TGstDeviceProviderFactory_listautoptr = PGList;
+
+  TGstDeviceProviderFactory_slistautoptr = PGSList;
+
+  TGstDeviceProviderFactory_queueautoptr = PGQueue;
+
+
+  function gst_device_provider_factory_get_type:TGType;cdecl;external gstreamerlib name 'gst_device_provider_factory_get_type';
+
+(* Const before type ignored *)
+  function gst_device_provider_factory_find(name:Pgchar):PGstDeviceProviderFactory;cdecl;external gstreamerlib name 'gst_device_provider_factory_find';
+
+  function gst_device_provider_factory_get_device_provider_type(factory:PGstDeviceProviderFactory):TGType;cdecl;external gstreamerlib name 'gst_device_provider_factory_get_device_provider_type';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_device_provider_factory_get_metadata(factory:PGstDeviceProviderFactory; key:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_device_provider_factory_get_metadata';
+
+  function gst_device_provider_factory_get_metadata_keys(factory:PGstDeviceProviderFactory):PPgchar;cdecl;external gstreamerlib name 'gst_device_provider_factory_get_metadata_keys';
+
+  function gst_device_provider_factory_get(factory:PGstDeviceProviderFactory):PGstDeviceProvider;cdecl;external gstreamerlib name 'gst_device_provider_factory_get';
+
+(* Const before type ignored *)
+  function gst_device_provider_factory_get_by_name(factoryname:Pgchar):PGstDeviceProvider;cdecl;external gstreamerlib name 'gst_device_provider_factory_get_by_name';
+
+(* Const before type ignored *)
+  function gst_device_provider_register(plugin:PGstPlugin; name:Pgchar; rank:Tguint; _type:TGType):Tgboolean;cdecl;external gstreamerlib name 'gst_device_provider_register';
+
+  function gst_device_provider_factory_has_classesv(factory:PGstDeviceProviderFactory; classes:PPgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_device_provider_factory_has_classesv';
+
+(* Const before type ignored *)
+  function gst_device_provider_factory_has_classes(factory:PGstDeviceProviderFactory; classes:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_device_provider_factory_has_classes';
+
+  function gst_device_provider_factory_list_get_device_providers(minrank:TGstRank):PGList;cdecl;external gstreamerlib name 'gst_device_provider_factory_list_get_device_providers';
+
+
+

+ 34 - 0
packages/gstreamer/src/gstdynamictypefactory.inc

@@ -0,0 +1,34 @@
+{
+/* GStreamer
+ * Copyright (C) 2015 Jan Schmidt <[email protected]>
+ *
+ * gstdynamictypefactory.h: Header for GstDynamicTypeFactory
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+
+
+
+  function gst_dynamic_type_factory_get_type:TGType;cdecl;external gstreamerlib name 'gst_dynamic_type_factory_get_type';
+
+(* Const before type ignored *)
+  function gst_dynamic_type_factory_load(factoryname:Pgchar):TGType;cdecl;external gstreamerlib name 'gst_dynamic_type_factory_load';
+
+  function gst_dynamic_type_register(plugin:PGstPlugin; _type:TGType):Tgboolean;cdecl;external gstreamerlib name 'gst_dynamic_type_register';
+
+

+ 230 - 0
packages/gstreamer/src/gstelement.inc

@@ -0,0 +1,230 @@
+{* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *               2000,2004 Wim Taymans <[email protected]>
+ *
+ * gstelement.h: Header for GstElement
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+
+Type
+  P_GstElement  = ^T_GstElement;
+  PPGstElement = ^PGstElement;
+  P_GstElementClass  = ^T_GstElementClass;
+
+  PGstElement_autoptr  = ^TGstElement_autoptr;
+  PGstElement_listautoptr  = ^TGstElement_listautoptr;
+  PGstElement_queueautoptr  = ^TGstElement_queueautoptr;
+  PGstElement_slistautoptr  = ^TGstElement_slistautoptr;
+  PGstElementClass  = ^TGstElementClass;
+  PGstElementFlags  = ^TGstElementFlags;
+
+  PGstState  = ^TGstState;
+  PGstStateChange  = ^TGstStateChange;
+
+
+  T_GstElementClass = record
+    parent_class : TGstObjectClass;
+    metadata : Tgpointer;
+    elementfactory : PGstElementFactory;
+    padtemplates : PGList;
+    numpadtemplates : Tgint;
+    pad_templ_cookie : Tguint32;
+    pad_added : procedure (element:PGstElement; pad:PGstPad);cdecl;
+    pad_removed : procedure (element:PGstElement; pad:PGstPad);cdecl;
+    no_more_pads : procedure (element:PGstElement);cdecl;
+    request_new_pad : function (element:PGstElement; templ:PGstPadTemplate; name:Pgchar; caps:PGstCaps):PGstPad;cdecl;
+    release_pad : procedure (element:PGstElement; pad:PGstPad);cdecl;
+    get_state : function (element:PGstElement; state:PGstState; pending:PGstState; timeout:TGstClockTime):TGstStateChangeReturn;cdecl;
+    set_state : function (element:PGstElement; state:TGstState):TGstStateChangeReturn;cdecl;
+    change_state : function (element:PGstElement; transition:TGstStateChange):TGstStateChangeReturn;cdecl;
+    state_changed : procedure (element:PGstElement; oldstate:TGstState; newstate:TGstState; pending:TGstState);cdecl;
+    set_bus : procedure (element:PGstElement; bus:PGstBus);cdecl;
+    provide_clock : function (element:PGstElement):PGstClock;cdecl;
+    set_clock : function (element:PGstElement; clock:PGstClock):Tgboolean;cdecl;
+    send_event : function (element:PGstElement; event:PGstEvent):Tgboolean;cdecl;
+    query : function (element:PGstElement; query:PGstQuery):Tgboolean;cdecl;
+    post_message : function (element:PGstElement; message:PGstMessage):Tgboolean;cdecl;
+    set_context : procedure (element:PGstElement; context:PGstContext);cdecl;
+    _gst_reserved : array[0..(20-2)-1] of Tgpointer;
+  end;
+  TGstElementClass = T_GstElementClass;
+
+
+  TGstElement_autoptr = PGstElement;
+  TGstElement_listautoptr = PGList;
+  TGstElement_slistautoptr = PGSList;
+  TGstElement_queueautoptr = PGQueue;
+
+
+  function gst_make_element_message_details(name:Pchar; args:array of const):PGstStructure;cdecl;external gstreamerlib name 'gst_make_element_message_details';
+  function gst_make_element_message_details(name:Pchar):PGstStructure;cdecl;external gstreamerlib name 'gst_make_element_message_details';
+
+
+  procedure gst_element_class_add_pad_template(klass:PGstElementClass; templ:PGstPadTemplate);cdecl;external gstreamerlib name 'gst_element_class_add_pad_template';
+
+  procedure gst_element_class_add_static_pad_template(klass:PGstElementClass; static_templ:PGstStaticPadTemplate);cdecl;external gstreamerlib name 'gst_element_class_add_static_pad_template';
+
+  procedure gst_element_class_add_static_pad_template_with_gtype(klass:PGstElementClass; static_templ:PGstStaticPadTemplate; pad_type:TGType);cdecl;external gstreamerlib name 'gst_element_class_add_static_pad_template_with_gtype';
+
+  function gst_element_class_get_pad_template(element_class:PGstElementClass; name:Pgchar):PGstPadTemplate;cdecl;external gstreamerlib name 'gst_element_class_get_pad_template';
+
+  function gst_element_class_get_pad_template_list(element_class:PGstElementClass):PGList;cdecl;external gstreamerlib name 'gst_element_class_get_pad_template_list';
+
+  procedure gst_element_class_set_metadata(klass:PGstElementClass; longname:Pgchar; classification:Pgchar; description:Pgchar; author:Pgchar);cdecl;external gstreamerlib name 'gst_element_class_set_metadata';
+
+  procedure gst_element_class_set_static_metadata(klass:PGstElementClass; longname:Pgchar; classification:Pgchar; description:Pgchar; author:Pgchar);cdecl;external gstreamerlib name 'gst_element_class_set_static_metadata';
+
+  procedure gst_element_class_add_metadata(klass:PGstElementClass; key:Pgchar; value:Pgchar);cdecl;external gstreamerlib name 'gst_element_class_add_metadata';
+
+  procedure gst_element_class_add_static_metadata(klass:PGstElementClass; key:Pgchar; value:Pgchar);cdecl;external gstreamerlib name 'gst_element_class_add_static_metadata';
+
+  function gst_element_class_get_metadata(klass:PGstElementClass; key:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_element_class_get_metadata';
+
+  function gst_element_get_type:TGType;cdecl;external gstreamerlib name 'gst_element_get_type';
+
+  function gst_element_provide_clock(element:PGstElement):PGstClock;cdecl;external gstreamerlib name 'gst_element_provide_clock';
+
+  function gst_element_get_clock(element:PGstElement):PGstClock;cdecl;external gstreamerlib name 'gst_element_get_clock';
+
+  function gst_element_set_clock(element:PGstElement; clock:PGstClock):Tgboolean;cdecl;external gstreamerlib name 'gst_element_set_clock';
+
+  procedure gst_element_set_base_time(element:PGstElement; time:TGstClockTime);cdecl;external gstreamerlib name 'gst_element_set_base_time';
+
+  function gst_element_get_base_time(element:PGstElement):TGstClockTime;cdecl;external gstreamerlib name 'gst_element_get_base_time';
+
+  procedure gst_element_set_start_time(element:PGstElement; time:TGstClockTime);cdecl;external gstreamerlib name 'gst_element_set_start_time';
+
+  function gst_element_get_start_time(element:PGstElement):TGstClockTime;cdecl;external gstreamerlib name 'gst_element_get_start_time';
+
+  procedure gst_element_set_bus(element:PGstElement; bus:PGstBus);cdecl;external gstreamerlib name 'gst_element_set_bus';
+
+  function gst_element_get_bus(element:PGstElement):PGstBus;cdecl;external gstreamerlib name 'gst_element_get_bus';
+
+  procedure gst_element_set_context(element:PGstElement; context:PGstContext);cdecl;external gstreamerlib name 'gst_element_set_context';
+
+  function gst_element_get_contexts(element:PGstElement):PGList;cdecl;external gstreamerlib name 'gst_element_get_contexts';
+
+(* Const before type ignored *)
+  function gst_element_get_context(element:PGstElement; context_type:Pgchar):PGstContext;cdecl;external gstreamerlib name 'gst_element_get_context';
+
+(* Const before type ignored *)
+  function gst_element_get_context_unlocked(element:PGstElement; context_type:Pgchar):PGstContext;cdecl;external gstreamerlib name 'gst_element_get_context_unlocked';
+
+  function gst_element_add_pad(element:PGstElement; pad:PGstPad):Tgboolean;cdecl;external gstreamerlib name 'gst_element_add_pad';
+
+  function gst_element_remove_pad(element:PGstElement; pad:PGstPad):Tgboolean;cdecl;external gstreamerlib name 'gst_element_remove_pad';
+
+  procedure gst_element_no_more_pads(element:PGstElement);cdecl;external gstreamerlib name 'gst_element_no_more_pads';
+
+(* Const before type ignored *)
+  function gst_element_get_static_pad(element:PGstElement; name:Pgchar):PGstPad;cdecl;external gstreamerlib name 'gst_element_get_static_pad';
+
+(* Const before type ignored *)
+  function gst_element_get_request_pad(element:PGstElement; name:Pgchar):PGstPad;cdecl;external gstreamerlib name 'gst_element_get_request_pad';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_element_request_pad(element:PGstElement; templ:PGstPadTemplate; name:Pgchar; caps:PGstCaps):PGstPad;cdecl;external gstreamerlib name 'gst_element_request_pad';
+
+  procedure gst_element_release_request_pad(element:PGstElement; pad:PGstPad);cdecl;external gstreamerlib name 'gst_element_release_request_pad';
+
+  function gst_element_iterate_pads(element:PGstElement):PGstIterator;cdecl;external gstreamerlib name 'gst_element_iterate_pads';
+
+  function gst_element_iterate_src_pads(element:PGstElement):PGstIterator;cdecl;external gstreamerlib name 'gst_element_iterate_src_pads';
+
+  function gst_element_iterate_sink_pads(element:PGstElement):PGstIterator;cdecl;external gstreamerlib name 'gst_element_iterate_sink_pads';
+
+
+  type
+
+    TGstElementForeachPadFunc = function (element:PGstElement; pad:PGstPad; user_data:Tgpointer):Tgboolean;cdecl;
+
+  function gst_element_foreach_sink_pad(element:PGstElement; func:TGstElementForeachPadFunc; user_data:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_element_foreach_sink_pad';
+
+  function gst_element_foreach_src_pad(element:PGstElement; func:TGstElementForeachPadFunc; user_data:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_element_foreach_src_pad';
+
+  function gst_element_foreach_pad(element:PGstElement; func:TGstElementForeachPadFunc; user_data:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_element_foreach_pad';
+
+  function gst_element_send_event(element:PGstElement; event:PGstEvent):Tgboolean;cdecl;external gstreamerlib name 'gst_element_send_event';
+
+  function gst_element_seek(element:PGstElement; rate:Tgdouble; format:TGstFormat; flags:TGstSeekFlags; start_type:TGstSeekType; 
+             start:Tgint64; stop_type:TGstSeekType; stop:Tgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_element_seek';
+
+  function gst_element_query(element:PGstElement; query:PGstQuery):Tgboolean;cdecl;external gstreamerlib name 'gst_element_query';
+
+  function gst_element_post_message(element:PGstElement; message:PGstMessage):Tgboolean;cdecl;external gstreamerlib name 'gst_element_post_message';
+
+(* Const before type ignored *)
+  function _gst_element_error_printf(format:Pgchar; args:array of const):Pgchar;cdecl;external gstreamerlib name '_gst_element_error_printf';
+
+  function _gst_element_error_printf(format:Pgchar):Pgchar;cdecl;external gstreamerlib name '_gst_element_error_printf';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_element_message_full(element:PGstElement; _type:TGstMessageType; domain:TGQuark; code:Tgint; text:Pgchar; 
+              debug:Pgchar; afile:Pgchar; _function:Pgchar; line:Tgint);cdecl;external gstreamerlib name 'gst_element_message_full';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_element_message_full_with_details(element:PGstElement; _type:TGstMessageType; domain:TGQuark; code:Tgint; text:Pgchar; 
+              debug:Pgchar; afile:Pgchar; _function:Pgchar; line:Tgint; structure:PGstStructure);cdecl;external gstreamerlib name 'gst_element_message_full_with_details';
+
+  function gst_element_is_locked_state(element:PGstElement):Tgboolean;cdecl;external gstreamerlib name 'gst_element_is_locked_state';
+
+  function gst_element_set_locked_state(element:PGstElement; locked_state:Tgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_element_set_locked_state';
+
+  function gst_element_sync_state_with_parent(element:PGstElement):Tgboolean;cdecl;external gstreamerlib name 'gst_element_sync_state_with_parent';
+
+  function gst_element_get_state(element:PGstElement; state:PGstState; pending:PGstState; timeout:TGstClockTime):TGstStateChangeReturn;cdecl;external gstreamerlib name 'gst_element_get_state';
+
+  function gst_element_set_state(element:PGstElement; state:TGstState):TGstStateChangeReturn;cdecl;external gstreamerlib name 'gst_element_set_state';
+
+  procedure gst_element_abort_state(element:PGstElement);cdecl;external gstreamerlib name 'gst_element_abort_state';
+
+  function gst_element_change_state(element:PGstElement; transition:TGstStateChange):TGstStateChangeReturn;cdecl;external gstreamerlib name 'gst_element_change_state';
+
+  function gst_element_continue_state(element:PGstElement; ret:TGstStateChangeReturn):TGstStateChangeReturn;cdecl;external gstreamerlib name 'gst_element_continue_state';
+
+  procedure gst_element_lost_state(element:PGstElement);cdecl;external gstreamerlib name 'gst_element_lost_state';
+
+
+  type
+
+    TGstElementCallAsyncFunc = procedure (element:PGstElement; user_data:Tgpointer);cdecl;
+
+  procedure gst_element_call_async(element:PGstElement; func:TGstElementCallAsyncFunc; user_data:Tgpointer; destroy_notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_element_call_async';
+
+  function gst_element_get_factory(element:PGstElement):PGstElementFactory;cdecl;external gstreamerlib name 'gst_element_get_factory';
+
+(* Const before type ignored *)
+  function gst_element_add_property_notify_watch(element:PGstElement; property_name:Pgchar; include_value:Tgboolean):Tgulong;cdecl;external gstreamerlib name 'gst_element_add_property_notify_watch';
+
+(* Const before type ignored *)
+  function gst_element_add_property_deep_notify_watch(element:PGstElement; property_name:Pgchar; include_value:Tgboolean):Tgulong;cdecl;external gstreamerlib name 'gst_element_add_property_deep_notify_watch';
+
+  procedure gst_element_remove_property_notify_watch(element:PGstElement; watch_id:Tgulong);cdecl;external gstreamerlib name 'gst_element_remove_property_notify_watch';
+
+(* Const before type ignored *)
+  function gst_element_get_pad_template(element:PGstElement; name:Pgchar):PGstPadTemplate;cdecl;external gstreamerlib name 'gst_element_get_pad_template';
+
+  function gst_element_get_pad_template_list(element:PGstElement):PGList;cdecl;external gstreamerlib name 'gst_element_get_pad_template_list';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_element_get_metadata(element:PGstElement; key:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_element_get_metadata';
+

+ 82 - 0
packages/gstreamer/src/gstelementfactory.inc

@@ -0,0 +1,82 @@
+{* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *               2000,2004 Wim Taymans <[email protected]>
+ *
+ * gstelementfactory.h: Header for GstElementFactory
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+
+  Type
+    PGstElementFactory  = ^TGstElementFactory;
+    PGstElementFactory_autoptr  = ^TGstElementFactory_autoptr;
+    PGstElementFactory_listautoptr  = ^TGstElementFactory_listautoptr;
+    PGstElementFactory_queueautoptr  = ^TGstElementFactory_queueautoptr;
+    PGstElementFactory_slistautoptr  = ^TGstElementFactory_slistautoptr;
+    PGstElementFactoryListType  = ^TGstElementFactoryListType;
+
+    T_GstElementFactory = record end;
+    TGstElementFactory = T_GstElementFactory;
+    T_GstElementFactoryClass = record end;
+    TGstElementFactoryClass = T_GstElementFactoryClass ;
+
+
+  TGstElementFactoryListType = Tguint64;
+
+  TGstElementFactory_autoptr = PGstElementFactory;
+
+  TGstElementFactory_listautoptr = PGList;
+
+  TGstElementFactory_slistautoptr = PGSList;
+
+  TGstElementFactory_queueautoptr = PGQueue;
+
+
+  function gst_element_factory_get_type:TGType;cdecl;external gstreamerlib name 'gst_element_factory_get_type';
+
+  function gst_element_factory_find(name:Pgchar):PGstElementFactory;cdecl;external gstreamerlib name 'gst_element_factory_find';
+
+  function gst_element_factory_get_element_type(factory:PGstElementFactory):TGType;cdecl;external gstreamerlib name 'gst_element_factory_get_element_type';
+
+  function gst_element_factory_get_metadata(factory:PGstElementFactory; key:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_element_factory_get_metadata';
+
+  function gst_element_factory_get_metadata_keys(factory:PGstElementFactory):PPgchar;cdecl;external gstreamerlib name 'gst_element_factory_get_metadata_keys';
+
+  function gst_element_factory_get_num_pad_templates(factory:PGstElementFactory):Tguint;cdecl;external gstreamerlib name 'gst_element_factory_get_num_pad_templates';
+
+  function gst_element_factory_get_static_pad_templates(factory:PGstElementFactory):PGList;cdecl;external gstreamerlib name 'gst_element_factory_get_static_pad_templates';
+
+  function gst_element_factory_get_uri_type(factory:PGstElementFactory):TGstURIType;cdecl;external gstreamerlib name 'gst_element_factory_get_uri_type';
+
+  function gst_element_factory_get_uri_protocols(factory:PGstElementFactory):PPgchar;cdecl;external gstreamerlib name 'gst_element_factory_get_uri_protocols';
+
+  function gst_element_factory_has_interface(factory:PGstElementFactory; interfacename:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_element_factory_has_interface';
+
+  function gst_element_factory_create(factory:PGstElementFactory; name:Pgchar):PGstElement;cdecl;external gstreamerlib name 'gst_element_factory_create';
+
+  function gst_element_factory_make(factoryname:Pgchar; name:Pgchar):PGstElement;cdecl;external gstreamerlib name 'gst_element_factory_make';
+
+  function gst_element_register(plugin:PGstPlugin; name:Pgchar; rank:Tguint; _type:TGType):Tgboolean;cdecl;external gstreamerlib name 'gst_element_register';
+
+
+  function gst_element_factory_list_is_type(factory:PGstElementFactory; _type:TGstElementFactoryListType):Tgboolean;cdecl;external gstreamerlib name 'gst_element_factory_list_is_type';
+
+  function gst_element_factory_list_get_elements(_type:TGstElementFactoryListType; minrank:TGstRank):PGList;cdecl;external gstreamerlib name 'gst_element_factory_list_get_elements';
+
+  function gst_element_factory_list_filter(list:PGList; caps:PGstCaps; direction: TGstPadDirection; subsetonly:Tgboolean):PGList;cdecl;external gstreamerlib name 'gst_element_factory_list_filter';
+
+

+ 76 - 0
packages/gstreamer/src/gstelementmetadata.inc

@@ -0,0 +1,76 @@
+{* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *               2000,2004 Wim Taymans <[email protected]>
+ *
+ * gstelementmetadata.h: Metadata for GstElement classes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+Const
+
+{*
+ * GST_ELEMENT_METADATA_LONGNAME:
+ *
+ * The long English name of the element. E.g. ';File Sink';
+ }
+ GST_ELEMENT_METADATA_LONGNAME      = 'long-name';
+{*
+ * GST_ELEMENT_METADATA_KLASS:
+ *
+ * String describing the type of element, as an unordered list
+ * separated with slashes ('/'). See draft-klass.txt of the design docs
+ * for more details and common types. E.g: = 'Sink/File';
+ }
+ GST_ELEMENT_METADATA_KLASS         = 'klass';
+
+{*
+ * GST_ELEMENT_METADATA_DESCRIPTION:
+ *
+ * Sentence describing the purpose of the element.
+ * E.g: = 'Write stream to a file';
+ }
+ GST_ELEMENT_METADATA_DESCRIPTION   = 'description';
+{*
+ * GST_ELEMENT_METADATA_AUTHOR:
+ *
+ * Name and contact details of the author(s). Use \n to separate
+ * multiple author details.
+ * E.g: = 'Joe Bloggs &lt;joe.blogs at foo.com&gt;';
+ }
+ GST_ELEMENT_METADATA_AUTHOR        = 'author';
+
+{*
+ * GST_ELEMENT_METADATA_DOC_URI:
+ *
+ * Set uri pointing to user documentation. Applications can use this to show
+ * help for e.g. effects to users.
+ }
+ GST_ELEMENT_METADATA_DOC_URI       = 'doc-uri';
+{*
+ * GST_ELEMENT_METADATA_ICON_NAME:
+ *
+ * Elements that bridge to certain other products can include an icon of that
+ * used product. Application can show the icon in menus/selectors to help
+ * identifying specific elements.
+ }
+ GST_ELEMENT_METADATA_ICON_NAME     = 'icon-name';
+
+

+ 208 - 0
packages/gstreamer/src/gstenum.inc

@@ -0,0 +1,208 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2022 by Michael Van Canneyt ([email protected]) member of the Free Pascal development team
+
+    Enumeration types needed in several include files
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+
+Type
+  // Moved here from gstminiobject.inc
+  TGstMiniObjectFlags = (
+    GST_MINI_OBJECT_FLAG_LOCKABLE := 1 shl 0,
+    GST_MINI_OBJECT_FLAG_LOCK_READONLY := 1 shl 1,
+    GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED := 1 shl 2,
+    GST_MINI_OBJECT_FLAG_LAST := 1 shl 4);
+
+  // moved here from gstcaps.inc
+  TGstCapsFlags = (GST_CAPS_FLAG_ANY := Ord(GST_MINI_OBJECT_FLAG_LAST) shl 0);
+
+  TGstCapsIntersectMode = (GST_CAPS_INTERSECT_ZIG_ZAG := 0,GST_CAPS_INTERSECT_FIRST := 1
+    );
+  PGstBufferPoolAcquireFlags = ^TGstBufferPoolAcquireFlags;
+  TGstBufferPoolAcquireFlags = (
+    GST_BUFFER_POOL_ACQUIRE_FLAG_NONE := 0,
+    GST_BUFFER_POOL_ACQUIRE_FLAG_KEY_UNIT := 1 shl 0,
+    GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT := 1 shl 1,
+    GST_BUFFER_POOL_ACQUIRE_FLAG_DISCONT := 1 shl 2,
+    GST_BUFFER_POOL_ACQUIRE_FLAG_LAST := 1 shl 16
+    );
+
+  PGstFormat = ^TGstFormat;
+  TGstFormat = (GST_FORMAT_UNDEFINED := 0,GST_FORMAT_DEFAULT := 1,
+    GST_FORMAT_BYTES := 2,GST_FORMAT_TIME := 3,
+    GST_FORMAT_BUFFERS := 4,GST_FORMAT_PERCENT := 5
+    );
+
+
+  TGstBufferingMode = (
+  GST_BUFFERING_STREAM,
+  GST_BUFFERING_DOWNLOAD,
+  GST_BUFFERING_TIMESHIFT,
+  GST_BUFFERING_LIVE
+  )  ;
+  PGstBufferingMode = ^TGstBufferingMode;
+
+  PGstMessageType = ^TGstMessageType;
+  TGstMessageType = (
+    GST_MESSAGE_UNKNOWN := 0,
+    GST_MESSAGE_EOS := 1 shl 0,
+    GST_MESSAGE_ERROR := 1 shl 1,
+    GST_MESSAGE_WARNING := 1 shl 2,
+    GST_MESSAGE_INFO := 1 shl 3,
+    GST_MESSAGE_TAG := 1 shl 4,
+    GST_MESSAGE_BUFFERING := 1 shl 5,
+    GST_MESSAGE_STATE_CHANGED := 1 shl 6,
+    GST_MESSAGE_STATE_DIRTY := 1 shl 7,
+    GST_MESSAGE_STEP_DONE := 1 shl 8,
+    GST_MESSAGE_CLOCK_PROVIDE := 1 shl 9,
+    GST_MESSAGE_CLOCK_LOST := 1 shl 10,
+    GST_MESSAGE_NEW_CLOCK := 1 shl 11,
+    GST_MESSAGE_STRUCTURE_CHANGE := 1 shl 12,
+    GST_MESSAGE_STREAM_STATUS := 1 shl 13,
+    GST_MESSAGE_APPLICATION := 1 shl 14,
+    GST_MESSAGE_ELEMENT := 1 shl 15,
+    GST_MESSAGE_SEGMENT_START := 1 shl 16,
+    GST_MESSAGE_SEGMENT_DONE := 1 shl 17,
+    GST_MESSAGE_DURATION_CHANGED := 1 shl 18,
+    GST_MESSAGE_LATENCY := 1 shl 19,
+    GST_MESSAGE_ASYNC_START := 1 shl 20,
+    GST_MESSAGE_ASYNC_DONE := 1 shl 21,
+    GST_MESSAGE_REQUEST_STATE := 1 shl 22,
+    GST_MESSAGE_STEP_START := 1 shl 23,
+    GST_MESSAGE_QOS := 1 shl 24,
+    GST_MESSAGE_PROGRESS := 1 shl 25,
+    GST_MESSAGE_TOC := 1 shl 26,
+    GST_MESSAGE_RESET_TIME := 1 shl 27,
+    GST_MESSAGE_STREAM_START := 1 shl 28,
+    GST_MESSAGE_NEED_CONTEXT := 1 shl 29,
+    GST_MESSAGE_HAVE_CONTEXT := 1 shl 30,
+    GST_MESSAGE_EXTENDED := Tgint(1 shl 31),
+    GST_MESSAGE_DEVICE_ADDED := Ord(GST_MESSAGE_EXTENDED)+1,
+    GST_MESSAGE_DEVICE_REMOVED := Ord(GST_MESSAGE_EXTENDED)+2,
+    GST_MESSAGE_PROPERTY_NOTIFY := Ord(GST_MESSAGE_EXTENDED)+3,
+    GST_MESSAGE_STREAM_COLLECTION := Ord(GST_MESSAGE_EXTENDED)+4,
+    GST_MESSAGE_STREAMS_SELECTED := Ord(GST_MESSAGE_EXTENDED)+5,
+    GST_MESSAGE_REDIRECT := Ord(GST_MESSAGE_EXTENDED)+6,
+    GST_MESSAGE_DEVICE_CHANGED := Ord(GST_MESSAGE_EXTENDED)+7,
+    GST_MESSAGE_ANY := Tgint($ffffffff)
+    );
+
+  TGstState = (
+  GST_STATE_VOID_PENDING = 0,
+  GST_STATE_NULL = 1,
+  GST_STATE_READY = 2,
+  GST_STATE_PAUSED = 3,
+  GST_STATE_PLAYING = 4
+
+);
+
+
+
+TGstStateChangeReturn = (
+  GST_STATE_CHANGE_FAILURE = 0,
+  GST_STATE_CHANGE_SUCCESS = 1,
+  GST_STATE_CHANGE_ASYNC = 2,
+  GST_STATE_CHANGE_NO_PREROLL = 3
+) ;
+
+
+
+//    PGstStateChange = ^TGstStateChange;
+    TGstStateChange = (
+      GST_STATE_CHANGE_NULL_TO_READY := (Ord(GST_STATE_NULL) shl 3) or Ord(GST_STATE_READY),
+      GST_STATE_CHANGE_READY_TO_PAUSED := (Ord(GST_STATE_READY) shl 3) or Ord(GST_STATE_PAUSED),
+      GST_STATE_CHANGE_PAUSED_TO_PLAYING := (ord(GST_STATE_PAUSED) shl 3) or Ord(GST_STATE_PLAYING),
+      GST_STATE_CHANGE_PLAYING_TO_PAUSED := (ord(GST_STATE_PLAYING) shl 3) or Ord(GST_STATE_PAUSED),
+      GST_STATE_CHANGE_PAUSED_TO_READY := (ord(GST_STATE_PAUSED) shl 3) or Ord(GST_STATE_READY),
+      GST_STATE_CHANGE_READY_TO_NULL := (ord(GST_STATE_READY) shl 3) or Ord(GST_STATE_NULL),
+      GST_STATE_CHANGE_NULL_TO_NULL := (ord(GST_STATE_NULL) shl 3) or Ord(GST_STATE_NULL),
+      GST_STATE_CHANGE_READY_TO_READY := (ord(GST_STATE_READY) shl 3) or Ord(GST_STATE_READY),
+      GST_STATE_CHANGE_PAUSED_TO_PAUSED := (ord(GST_STATE_PAUSED) shl 3) or Ord(GST_STATE_PAUSED),
+      GST_STATE_CHANGE_PLAYING_TO_PLAYING := (ord(GST_STATE_PLAYING) shl 3) or Ord(GST_STATE_PLAYING)
+      );
+
+    TGstElementFlags = (
+      GST_ELEMENT_FLAG_LOCKED_STATE := GST_OBJECT_FLAG_LAST shl 0,
+      GST_ELEMENT_FLAG_SINK := GST_OBJECT_FLAG_LAST shl 1,
+      GST_ELEMENT_FLAG_SOURCE := GST_OBJECT_FLAG_LAST shl 2,
+      GST_ELEMENT_FLAG_PROVIDE_CLOCK := GST_OBJECT_FLAG_LAST shl 3,
+      GST_ELEMENT_FLAG_REQUIRE_CLOCK := GST_OBJECT_FLAG_LAST shl 4,
+      GST_ELEMENT_FLAG_INDEXABLE := GST_OBJECT_FLAG_LAST shl 5,
+      GST_ELEMENT_FLAG_LAST := GST_OBJECT_FLAG_LAST shl 10
+      );
+
+    TGstStreamFlags = (
+      GST_STREAM_FLAG_NONE,
+      GST_STREAM_FLAG_SPARSE := (1 shl 0),
+      GST_STREAM_FLAG_SELECT := (1 shl 1),
+      GST_STREAM_FLAG_UNSELECT := (1 shl 2)
+    );
+
+    TGstPadLinkReturn = (
+      GST_PAD_LINK_OK := 0,
+      GST_PAD_LINK_WRONG_HIERARCHY := -(1),
+      GST_PAD_LINK_WAS_LINKED := -(2),
+      GST_PAD_LINK_WRONG_DIRECTION := -(3),
+      GST_PAD_LINK_NOFORMAT := -(4),
+      GST_PAD_LINK_NOSCHED := -(5),
+      GST_PAD_LINK_REFUSED := -(6)
+    );
+    PGstPadLinkReturn = ^TGstPadLinkReturn;
+
+    TGstFlowReturn = (
+      GST_FLOW_CUSTOM_SUCCESS_2 := 102,
+      GST_FLOW_CUSTOM_SUCCESS_1 := 101,
+      GST_FLOW_CUSTOM_SUCCESS := 100,
+      GST_FLOW_OK := 0,
+      GST_FLOW_NOT_LINKED := -(1),
+      GST_FLOW_FLUSHING := -(2),
+      GST_FLOW_EOS := -(3),
+      GST_FLOW_NOT_NEGOTIATED := -(4),
+      GST_FLOW_ERROR := -(5),
+      GST_FLOW_NOT_SUPPORTED := -(6),
+      GST_FLOW_CUSTOM_ERROR := -(100),
+      GST_FLOW_CUSTOM_ERROR_1 := -(101),
+      GST_FLOW_CUSTOM_ERROR_2 := -(102));
+
+  TGstPadLinkCheck = (
+    GST_PAD_LINK_CHECK_NOTHING := 0,
+    GST_PAD_LINK_CHECK_HIERARCHY := 1 shl 0,
+    GST_PAD_LINK_CHECK_TEMPLATE_CAPS := 1 shl 1,
+    GST_PAD_LINK_CHECK_CAPS := 1 shl 2,
+    GST_PAD_LINK_CHECK_NO_RECONFIGURE := 1 shl 3,
+    GST_PAD_LINK_CHECK_DEFAULT := Ord(GST_PAD_LINK_CHECK_HIERARCHY) or  Ord(GST_PAD_LINK_CHECK_CAPS)
+    );
+
+  TGstPadDirection = (
+    GST_PAD_UNKNOWN,
+    GST_PAD_SRC,
+    GST_PAD_SINK
+  );
+  PGstPadDirection = ^TGstPadDirection;
+
+  TGstPadMode = (
+    GST_PAD_MODE_NONE,
+    GST_PAD_MODE_PUSH,
+    GST_PAD_MODE_PULL
+  );
+  PGstPadMode = TGstPadMode;
+
+  PGstMemoryFlags = ^TGstMemoryFlags;
+  TGstMemoryFlags = (
+    GST_MEMORY_FLAG_READONLY := Ord(GST_MINI_OBJECT_FLAG_LOCK_READONLY),
+    GST_MEMORY_FLAG_NO_SHARE := Ord(GST_MINI_OBJECT_FLAG_LAST) shl 0,
+    GST_MEMORY_FLAG_ZERO_PREFIXED := Ord(GST_MINI_OBJECT_FLAG_LAST) shl 1,
+    GST_MEMORY_FLAG_ZERO_PADDED := Ord(GST_MINI_OBJECT_FLAG_LAST) shl 2,
+    GST_MEMORY_FLAG_PHYSICALLY_CONTIGUOUS := Ord(GST_MINI_OBJECT_FLAG_LAST) shl 3,
+    GST_MEMORY_FLAG_NOT_MAPPABLE := Ord(GST_MINI_OBJECT_FLAG_LAST) shl 4,
+    GST_MEMORY_FLAG_LAST := Ord(GST_MINI_OBJECT_FLAG_LAST) shl 16
+    );
+

+ 173 - 0
packages/gstreamer/src/gstenumtypes.inc

@@ -0,0 +1,173 @@
+
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+
+  function gst_allocator_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_allocator_flags_get_type';
+
+  function gst_bin_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_bin_flags_get_type';
+
+  function gst_buffer_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_buffer_flags_get_type';
+
+  function gst_buffer_copy_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_buffer_copy_flags_get_type';
+
+  function gst_buffer_pool_acquire_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_buffer_pool_acquire_flags_get_type';
+
+  function gst_bus_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_bus_flags_get_type';
+
+  function gst_bus_sync_reply_get_type:TGType;cdecl;external gstreamerlib name 'gst_bus_sync_reply_get_type';
+
+  function gst_caps_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_caps_flags_get_type';
+
+  function gst_caps_intersect_mode_get_type:TGType;cdecl;external gstreamerlib name 'gst_caps_intersect_mode_get_type';
+
+  function gst_clock_return_get_type:TGType;cdecl;external gstreamerlib name 'gst_clock_return_get_type';
+
+  function gst_clock_entry_type_get_type:TGType;cdecl;external gstreamerlib name 'gst_clock_entry_type_get_type';
+
+  function gst_clock_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_clock_flags_get_type';
+
+  function gst_debug_graph_details_get_type:TGType;cdecl;external gstreamerlib name 'gst_debug_graph_details_get_type';
+
+  function gst_state_get_type:TGType;cdecl;external gstreamerlib name 'gst_state_get_type';
+
+  function gst_state_change_return_get_type:TGType;cdecl;external gstreamerlib name 'gst_state_change_return_get_type';
+
+  function gst_state_change_get_type:TGType;cdecl;external gstreamerlib name 'gst_state_change_get_type';
+
+  function gst_element_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_element_flags_get_type';
+
+  function gst_core_error_get_type:TGType;cdecl;external gstreamerlib name 'gst_core_error_get_type';
+
+  function gst_library_error_get_type:TGType;cdecl;external gstreamerlib name 'gst_library_error_get_type';
+
+  function gst_resource_error_get_type:TGType;cdecl;external gstreamerlib name 'gst_resource_error_get_type';
+
+  function gst_stream_error_get_type:TGType;cdecl;external gstreamerlib name 'gst_stream_error_get_type';
+
+  function gst_event_type_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_event_type_flags_get_type';
+
+  function gst_event_type_get_type:TGType;cdecl;external gstreamerlib name 'gst_event_type_get_type';
+
+  function gst_stream_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_stream_flags_get_type';
+
+  function gst_qos_type_get_type:TGType;cdecl;external gstreamerlib name 'gst_qos_type_get_type';
+
+  function gst_format_get_type:TGType;cdecl;external gstreamerlib name 'gst_format_get_type';
+
+  function gst_debug_level_get_type:TGType;cdecl;external gstreamerlib name 'gst_debug_level_get_type';
+
+  function gst_debug_color_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_debug_color_flags_get_type';
+
+  function gst_stack_trace_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_stack_trace_flags_get_type';
+
+  function gst_debug_color_mode_get_type:TGType;cdecl;external gstreamerlib name 'gst_debug_color_mode_get_type';
+
+  function gst_iterator_result_get_type:TGType;cdecl;external gstreamerlib name 'gst_iterator_result_get_type';
+
+  function gst_iterator_item_get_type:TGType;cdecl;external gstreamerlib name 'gst_iterator_item_get_type';
+
+  function gst_memory_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_memory_flags_get_type';
+
+  function gst_map_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_map_flags_get_type';
+
+  function gst_message_type_get_type:TGType;cdecl;external gstreamerlib name 'gst_message_type_get_type';
+
+  function gst_structure_change_type_get_type:TGType;cdecl;external gstreamerlib name 'gst_structure_change_type_get_type';
+
+  function gst_stream_status_type_get_type:TGType;cdecl;external gstreamerlib name 'gst_stream_status_type_get_type';
+
+  function gst_progress_type_get_type:TGType;cdecl;external gstreamerlib name 'gst_progress_type_get_type';
+
+  function gst_meta_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_meta_flags_get_type';
+
+  function gst_mini_object_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_mini_object_flags_get_type';
+
+  function gst_lock_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_lock_flags_get_type';
+
+  function gst_object_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_object_flags_get_type';
+
+  function gst_pad_direction_get_type:TGType;cdecl;external gstreamerlib name 'gst_pad_direction_get_type';
+
+  function gst_pad_mode_get_type:TGType;cdecl;external gstreamerlib name 'gst_pad_mode_get_type';
+
+  function gst_pad_link_return_get_type:TGType;cdecl;external gstreamerlib name 'gst_pad_link_return_get_type';
+
+  function gst_flow_return_get_type:TGType;cdecl;external gstreamerlib name 'gst_flow_return_get_type';
+
+  function gst_pad_link_check_get_type:TGType;cdecl;external gstreamerlib name 'gst_pad_link_check_get_type';
+
+  function gst_pad_probe_type_get_type:TGType;cdecl;external gstreamerlib name 'gst_pad_probe_type_get_type';
+
+  function gst_pad_probe_return_get_type:TGType;cdecl;external gstreamerlib name 'gst_pad_probe_return_get_type';
+
+  function gst_pad_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_pad_flags_get_type';
+
+  function gst_pad_presence_get_type:TGType;cdecl;external gstreamerlib name 'gst_pad_presence_get_type';
+
+  function gst_pad_template_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_pad_template_flags_get_type';
+
+  function gst_parse_error_get_type:TGType;cdecl;external gstreamerlib name 'gst_parse_error_get_type';
+
+  function gst_parse_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_parse_flags_get_type';
+
+  function gst_pipeline_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_pipeline_flags_get_type';
+
+  function gst_plugin_error_get_type:TGType;cdecl;external gstreamerlib name 'gst_plugin_error_get_type';
+
+  function gst_plugin_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_plugin_flags_get_type';
+
+  function gst_plugin_dependency_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_plugin_dependency_flags_get_type';
+
+  function gst_rank_get_type:TGType;cdecl;external gstreamerlib name 'gst_rank_get_type';
+
+  function gst_promise_result_get_type:TGType;cdecl;external gstreamerlib name 'gst_promise_result_get_type';
+
+  function gst_query_type_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_query_type_flags_get_type';
+
+  function gst_query_type_get_type:TGType;cdecl;external gstreamerlib name 'gst_query_type_get_type';
+
+  function gst_buffering_mode_get_type:TGType;cdecl;external gstreamerlib name 'gst_buffering_mode_get_type';
+
+  function gst_scheduling_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_scheduling_flags_get_type';
+
+  function gst_seek_type_get_type:TGType;cdecl;external gstreamerlib name 'gst_seek_type_get_type';
+
+  function gst_seek_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_seek_flags_get_type';
+
+  function gst_segment_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_segment_flags_get_type';
+
+  function gst_stream_type_get_type:TGType;cdecl;external gstreamerlib name 'gst_stream_type_get_type';
+
+  function gst_clock_type_get_type:TGType;cdecl;external gstreamerlib name 'gst_clock_type_get_type';
+
+  function gst_tag_merge_mode_get_type:TGType;cdecl;external gstreamerlib name 'gst_tag_merge_mode_get_type';
+
+  function gst_tag_flag_get_type:TGType;cdecl;external gstreamerlib name 'gst_tag_flag_get_type';
+
+  function gst_tag_scope_get_type:TGType;cdecl;external gstreamerlib name 'gst_tag_scope_get_type';
+
+  function gst_task_state_get_type:TGType;cdecl;external gstreamerlib name 'gst_task_state_get_type';
+
+  function gst_toc_scope_get_type:TGType;cdecl;external gstreamerlib name 'gst_toc_scope_get_type';
+
+  function gst_toc_entry_type_get_type:TGType;cdecl;external gstreamerlib name 'gst_toc_entry_type_get_type';
+
+  function gst_toc_loop_type_get_type:TGType;cdecl;external gstreamerlib name 'gst_toc_loop_type_get_type';
+
+  function gst_tracer_value_scope_get_type:TGType;cdecl;external gstreamerlib name 'gst_tracer_value_scope_get_type';
+
+  function gst_tracer_value_flags_get_type:TGType;cdecl;external gstreamerlib name 'gst_tracer_value_flags_get_type';
+
+  function gst_type_find_probability_get_type:TGType;cdecl;external gstreamerlib name 'gst_type_find_probability_get_type';
+
+  function gst_uri_error_get_type:TGType;cdecl;external gstreamerlib name 'gst_uri_error_get_type';
+
+  function gst_uri_type_get_type:TGType;cdecl;external gstreamerlib name 'gst_uri_type_get_type';
+
+  function gst_search_mode_get_type:TGType;cdecl;external gstreamerlib name 'gst_search_mode_get_type';
+
+

+ 90 - 0
packages/gstreamer/src/gsterror.inc

@@ -0,0 +1,90 @@
+{* GStreamer
+ * Copyright (C) 2004 Thomas Vander Stichele <thomas at apestaart dot org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+  Type
+    PGstCoreError  = ^TGstCoreError;
+    PGstLibraryError  = ^TGstLibraryError;
+    PGstResourceError  = ^TGstResourceError;
+    PGstStreamError  = ^TGstStreamError;
+
+    TGstCoreError = (
+      GST_CORE_ERROR_FAILED := 1,
+      GST_CORE_ERROR_TOO_LAZY,
+      GST_CORE_ERROR_NOT_IMPLEMENTED,
+      GST_CORE_ERROR_STATE_CHANGE,
+      GST_CORE_ERROR_PAD,
+      GST_CORE_ERROR_THREAD,
+      GST_CORE_ERROR_NEGOTIATION,
+      GST_CORE_ERROR_EVENT,
+      GST_CORE_ERROR_SEEK,
+      GST_CORE_ERROR_CAPS,
+      GST_CORE_ERROR_TAG,
+      GST_CORE_ERROR_MISSING_PLUGIN,
+      GST_CORE_ERROR_CLOCK,
+      GST_CORE_ERROR_DISABLED,
+      GST_CORE_ERROR_NUM_ERRORS);
+
+    TGstLibraryError = (
+      GST_LIBRARY_ERROR_FAILED := 1,
+      GST_LIBRARY_ERROR_TOO_LAZY,
+      GST_LIBRARY_ERROR_INIT,
+      GST_LIBRARY_ERROR_SHUTDOWN,
+      GST_LIBRARY_ERROR_SETTINGS,
+      GST_LIBRARY_ERROR_ENCODE,
+      GST_LIBRARY_ERROR_NUM_ERRORS);
+
+    TGstResourceError = (
+      GST_RESOURCE_ERROR_FAILED := 1,
+      GST_RESOURCE_ERROR_TOO_LAZY,
+      GST_RESOURCE_ERROR_NOT_FOUND,
+      GST_RESOURCE_ERROR_BUSY,
+      GST_RESOURCE_ERROR_OPEN_READ,
+      GST_RESOURCE_ERROR_OPEN_WRITE,
+      GST_RESOURCE_ERROR_OPEN_READ_WRITE,
+      GST_RESOURCE_ERROR_CLOSE,
+      GST_RESOURCE_ERROR_READ,
+      GST_RESOURCE_ERROR_WRITE,
+      GST_RESOURCE_ERROR_SEEK,
+      GST_RESOURCE_ERROR_SYNC,
+      GST_RESOURCE_ERROR_SETTINGS,
+      GST_RESOURCE_ERROR_NO_SPACE_LEFT,
+      GST_RESOURCE_ERROR_NOT_AUTHORIZED,
+      GST_RESOURCE_ERROR_NUM_ERRORS
+    );
+
+    TGstStreamError = (GST_STREAM_ERROR_FAILED := 1,GST_STREAM_ERROR_TOO_LAZY,
+      GST_STREAM_ERROR_NOT_IMPLEMENTED,GST_STREAM_ERROR_TYPE_NOT_FOUND,
+      GST_STREAM_ERROR_WRONG_TYPE,GST_STREAM_ERROR_CODEC_NOT_FOUND,
+      GST_STREAM_ERROR_DECODE,GST_STREAM_ERROR_ENCODE,
+      GST_STREAM_ERROR_DEMUX,GST_STREAM_ERROR_MUX,
+      GST_STREAM_ERROR_FORMAT,GST_STREAM_ERROR_DECRYPT,
+      GST_STREAM_ERROR_DECRYPT_NOKEY,GST_STREAM_ERROR_NUM_ERRORS
+      );
+
+  function gst_error_get_message(domain:TGQuark; code:Tgint):Pgchar;cdecl;external gstreamerlib name 'gst_error_get_message';
+
+  function gst_stream_error_quark:TGQuark;cdecl;external gstreamerlib name 'gst_stream_error_quark';
+
+  function gst_core_error_quark:TGQuark;cdecl;external gstreamerlib name 'gst_core_error_quark';
+
+  function gst_resource_error_quark:TGQuark;cdecl;external gstreamerlib name 'gst_resource_error_quark';
+
+  function gst_library_error_quark:TGQuark;cdecl;external gstreamerlib name 'gst_library_error_quark';
+
+

+ 324 - 0
packages/gstreamer/src/gstevent.inc

@@ -0,0 +1,324 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *                    2005 Wim Taymans <[email protected]>
+ *
+ * gstevent.h: Header for GstEvent subsystem
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    PGstEvent  = ^TGstEvent;
+    PPGstEvent = ^PGstEvent;
+    PGstEvent_autoptr  = ^TGstEvent_autoptr;
+    PGstEvent_listautoptr  = ^TGstEvent_listautoptr;
+    PGstEvent_queueautoptr  = ^TGstEvent_queueautoptr;
+    PGstEvent_slistautoptr  = ^TGstEvent_slistautoptr;
+    PGstQOSType  = ^TGstQOSType;
+    PGstStreamFlags  = ^TGstStreamFlags;
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+  TGstEvent_autoptr = PGstEvent;
+
+  TGstEvent_listautoptr = PGList;
+
+  TGstEvent_slistautoptr = PGSList;
+
+  TGstEvent_queueautoptr = PGQueue;
+
+  TGstEventTypeFlags = (
+    GST_EVENT_TYPE_UPSTREAM := 1 shl 0,
+    GST_EVENT_TYPE_DOWNSTREAM := 1 shl 1,
+    GST_EVENT_TYPE_SERIALIZED := 1 shl 2,
+    GST_EVENT_TYPE_STICKY := 1 shl 3,
+    GST_EVENT_TYPE_STICKY_MULTI := 1 shl 4
+  );
+
+  TGstEventType = (
+    GST_EVENT_UNKNOWN := (((0) shl (8)) or (0)),
+
+
+    GST_EVENT_FLUSH_START := (((10) shl (8)) or (ord(GST_EVENT_TYPE_UPSTREAM) or ord(GST_EVENT_TYPE_DOWNSTREAM))),
+    GST_EVENT_FLUSH_STOP := (((20) shl (8)) or ((ord(GST_EVENT_TYPE_UPSTREAM) or ord(GST_EVENT_TYPE_DOWNSTREAM)) or ord(GST_EVENT_TYPE_SERIALIZED))),
+
+
+    GST_EVENT_STREAM_START := (((40) shl (8)) or (ord(GST_EVENT_TYPE_DOWNSTREAM) or ord(GST_EVENT_TYPE_SERIALIZED) or ord(GST_EVENT_TYPE_STICKY))),
+    GST_EVENT_CAPS := (((50) shl (8)) or (ord(GST_EVENT_TYPE_DOWNSTREAM) or ord(GST_EVENT_TYPE_SERIALIZED) or ord(GST_EVENT_TYPE_STICKY))),
+    GST_EVENT_SEGMENT := (((70) shl (8)) or (ord(GST_EVENT_TYPE_DOWNSTREAM) or ord(GST_EVENT_TYPE_SERIALIZED) or ord(GST_EVENT_TYPE_STICKY))),
+    GST_EVENT_STREAM_COLLECTION := (((75) shl (8)) or (ord(GST_EVENT_TYPE_DOWNSTREAM) or ord(GST_EVENT_TYPE_SERIALIZED) or ord(GST_EVENT_TYPE_STICKY) or ord(GST_EVENT_TYPE_STICKY_MULTI))),
+    GST_EVENT_TAG := (((80) shl (8)) or (ord(GST_EVENT_TYPE_DOWNSTREAM) or ord(GST_EVENT_TYPE_SERIALIZED) or ord(GST_EVENT_TYPE_STICKY) or ord(GST_EVENT_TYPE_STICKY_MULTI))),
+    GST_EVENT_BUFFERSIZE := (((90) shl (8)) or (ord(GST_EVENT_TYPE_DOWNSTREAM) or ord(GST_EVENT_TYPE_SERIALIZED) or ord(GST_EVENT_TYPE_STICKY))),
+    GST_EVENT_SINK_MESSAGE := (((100) shl (8)) or (ord(GST_EVENT_TYPE_DOWNSTREAM) or ord(GST_EVENT_TYPE_SERIALIZED) or ord(GST_EVENT_TYPE_STICKY) or ord(GST_EVENT_TYPE_STICKY_MULTI))),
+    GST_EVENT_STREAM_GROUP_DONE := (((105) shl (8)) or (ord(GST_EVENT_TYPE_DOWNSTREAM) or ord(GST_EVENT_TYPE_SERIALIZED) or ord(GST_EVENT_TYPE_STICKY))),
+    GST_EVENT_EOS := (((110) shl (8)) or (ord(GST_EVENT_TYPE_DOWNSTREAM) or ord(GST_EVENT_TYPE_SERIALIZED) or ord(GST_EVENT_TYPE_STICKY))),
+    GST_EVENT_TOC := (((120) shl (8)) or (ord(GST_EVENT_TYPE_DOWNSTREAM) or ord(GST_EVENT_TYPE_SERIALIZED) or ord(GST_EVENT_TYPE_STICKY) or ord(GST_EVENT_TYPE_STICKY_MULTI))),
+    GST_EVENT_PROTECTION := (((130) shl (8)) or (ord(GST_EVENT_TYPE_DOWNSTREAM) or ord(GST_EVENT_TYPE_SERIALIZED) or ord(GST_EVENT_TYPE_STICKY) or ord(GST_EVENT_TYPE_STICKY_MULTI))),
+
+
+    GST_EVENT_SEGMENT_DONE := (((150) shl (8)) or Ord(GST_EVENT_TYPE_DOWNSTREAM) or Ord(GST_EVENT_TYPE_SERIALIZED)),
+    GST_EVENT_GAP := (((160) shl (8)) or Ord(GST_EVENT_TYPE_DOWNSTREAM) or Ord(GST_EVENT_TYPE_SERIALIZED)),
+
+
+    GST_EVENT_QOS := (((190) shl (8)) or Ord(GST_EVENT_TYPE_UPSTREAM)),
+    GST_EVENT_SEEK := (((200) shl (8)) or Ord(GST_EVENT_TYPE_UPSTREAM)),
+    GST_EVENT_NAVIGATION := (((210) shl (8)) or Ord(GST_EVENT_TYPE_UPSTREAM)),
+    GST_EVENT_LATENCY := (((220) shl (8)) or Ord(GST_EVENT_TYPE_UPSTREAM)),
+    GST_EVENT_STEP := (((230) shl (8)) or Ord(GST_EVENT_TYPE_UPSTREAM)),
+    GST_EVENT_RECONFIGURE := (((240) shl (8)) or Ord(GST_EVENT_TYPE_UPSTREAM)),
+    GST_EVENT_TOC_SELECT := (((250) shl (8)) or Ord(GST_EVENT_TYPE_UPSTREAM)),
+    GST_EVENT_SELECT_STREAMS := (((260) shl (8)) or Ord(GST_EVENT_TYPE_UPSTREAM)),
+
+
+    GST_EVENT_CUSTOM_UPSTREAM := (((270) shl (8)) or Ord(GST_EVENT_TYPE_UPSTREAM)),
+    GST_EVENT_CUSTOM_DOWNSTREAM := (((280) shl (8)) or Ord(GST_EVENT_TYPE_DOWNSTREAM) or Ord(GST_EVENT_TYPE_SERIALIZED)),
+    GST_EVENT_CUSTOM_DOWNSTREAM_OOB := (((290) shl (8)) or Ord(GST_EVENT_TYPE_DOWNSTREAM)),
+    GST_EVENT_CUSTOM_DOWNSTREAM_STICKY := (((300) shl (8))
+                                           or Ord(GST_EVENT_TYPE_DOWNSTREAM)
+                                           or Ord(GST_EVENT_TYPE_SERIALIZED)
+                                           or Ord(GST_EVENT_TYPE_STICKY)
+                                           or Ord(GST_EVENT_TYPE_STICKY_MULTI)),
+    GST_EVENT_CUSTOM_BOTH := (((310) shl (8)) or
+                              ((Ord(GST_EVENT_TYPE_UPSTREAM) or Ord(GST_EVENT_TYPE_DOWNSTREAM)) or Ord(GST_EVENT_TYPE_SERIALIZED))),
+    GST_EVENT_CUSTOM_BOTH_OOB := (((320) shl (8)) or ((Ord(GST_EVENT_TYPE_UPSTREAM) or ord(GST_EVENT_TYPE_DOWNSTREAM))))
+  );
+
+
+  TGstQOSType = (
+    GST_QOS_TYPE_OVERFLOW := 0,
+    GST_QOS_TYPE_UNDERFLOW := 1,
+    GST_QOS_TYPE_THROTTLE := 2
+   );
+
+  T_GstEvent = record
+      mini_object : TGstMiniObject ;
+      type_ : TGstEventType ;
+      timestamp : tguint64 ;
+      seqnum : tguint32 ;
+  end;
+  TGstEvent = T_GstEvent;
+  {
+  
+  static inline gboolean
+  gst_event_replace (GstEvent **old_event, GstEvent *new_event)
+  
+    return gst_mini_object_replace ((GstMiniObject **) old_event, (GstMiniObject *) new_event);
+  
+  # 347 "gstevent.h"
+  static inline GstEvent *
+  gst_event_steal (GstEvent **old_event)
+  
+    return ((GstEvent *)(gst_mini_object_steal ((GstMiniObject **) old_event)));
+  
+  # 368 "gstevent.h"
+  static inline gboolean
+  gst_event_take (GstEvent **old_event, GstEvent *new_event)
+  
+    return gst_mini_object_take ((GstMiniObject **) old_event, (GstMiniObject *) new_event);
+  
+  # 389 "gstevent.h"
+  # 405 "gstevent.h"
+
+  extern
+  const gchar* gst_event_type_get_name (GstEventType type);
+  
+  extern
+  GQuark gst_event_type_to_quark (GstEventType type);
+  
+  extern
+  GstEventTypeFlags
+                  gst_event_type_get_flags (GstEventType type);
+  # 435 "gstevent.h"
+  static inline GstEvent *
+  gst_event_ref (GstEvent * event)
+  
+    return (GstEvent *) gst_mini_object_ref (((GstMiniObject*)(event)));
+  
+  
+  
+  
+  
+  
+  
+  
+  static inline void
+  gst_event_unref (GstEvent * event)
+  
+    gst_mini_object_unref (((GstMiniObject*)(event)));
+  
+  # 466 "gstevent.h"
+  static inline void
+  gst_clear_event (GstEvent ** event_ptr)
+  
+    do  _Static_assert (sizeof *(((GstMiniObject **) event_ptr)) == sizeof (gpointer), "Expression evaluates to false"); __typeof__((((GstMiniObject **) event_ptr))) _pp = (((GstMiniObject **) event_ptr)); __typeof__(*(((GstMiniObject **) event_ptr))) _ptr = *_pp; *_pp = 
+  # 469 "gstevent.h" 3 4
+   ((void *)0)
+  # 469 "gstevent.h"
+   ; if (_ptr) (gst_mini_object_unref) (_ptr);  while (0) ;
+  
+  # 481 "gstevent.h"
+  static inline GstEvent *
+  gst_event_copy (const GstEvent * event)
+  
+    return ((GstEvent *)(gst_mini_object_copy (((const GstMiniObject*)(event)))));
+  
+  
+   }
+
+  function gst_event_get_type:TGType;cdecl;external gstreamerlib name 'gst_event_get_type';
+
+  function gst_event_new_custom(_type:TGstEventType; structure:PGstStructure):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_custom';
+
+(* Const before type ignored *)
+  function gst_event_get_structure(event:PGstEvent):PGstStructure;cdecl;external gstreamerlib name 'gst_event_get_structure';
+
+  function gst_event_writable_structure(event:PGstEvent):PGstStructure;cdecl;external gstreamerlib name 'gst_event_writable_structure';
+
+(* Const before type ignored *)
+  function gst_event_has_name(event:PGstEvent; name:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_event_has_name';
+
+  function gst_event_get_seqnum(event:PGstEvent):Tguint32;cdecl;external gstreamerlib name 'gst_event_get_seqnum';
+
+  procedure gst_event_set_seqnum(event:PGstEvent; seqnum:Tguint32);cdecl;external gstreamerlib name 'gst_event_set_seqnum';
+
+  function gst_event_get_running_time_offset(event:PGstEvent):Tgint64;cdecl;external gstreamerlib name 'gst_event_get_running_time_offset';
+
+  procedure gst_event_set_running_time_offset(event:PGstEvent; offset:Tgint64);cdecl;external gstreamerlib name 'gst_event_set_running_time_offset';
+
+(* Const before type ignored *)
+  function gst_event_new_stream_start(stream_id:Pgchar):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_stream_start';
+
+(* Const before type ignored *)
+  procedure gst_event_parse_stream_start(event:PGstEvent; stream_id:PPgchar);cdecl;external gstreamerlib name 'gst_event_parse_stream_start';
+
+  procedure gst_event_set_stream(event:PGstEvent; stream:PGstStream);cdecl;external gstreamerlib name 'gst_event_set_stream';
+
+  procedure gst_event_parse_stream(event:PGstEvent; stream:PPGstStream);cdecl;external gstreamerlib name 'gst_event_parse_stream';
+
+  procedure gst_event_set_stream_flags(event:PGstEvent; flags:TGstStreamFlags);cdecl;external gstreamerlib name 'gst_event_set_stream_flags';
+
+  procedure gst_event_parse_stream_flags(event:PGstEvent; flags:PGstStreamFlags);cdecl;external gstreamerlib name 'gst_event_parse_stream_flags';
+
+  procedure gst_event_set_group_id(event:PGstEvent; group_id:Tguint);cdecl;external gstreamerlib name 'gst_event_set_group_id';
+
+  function gst_event_parse_group_id(event:PGstEvent; group_id:Pguint):Tgboolean;cdecl;external gstreamerlib name 'gst_event_parse_group_id';
+
+  function gst_event_new_flush_start:PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_flush_start';
+
+  function gst_event_new_flush_stop(reset_time:Tgboolean):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_flush_stop';
+
+  procedure gst_event_parse_flush_stop(event:PGstEvent; reset_time:Pgboolean);cdecl;external gstreamerlib name 'gst_event_parse_flush_stop';
+
+  function gst_event_new_stream_collection(collection:PGstStreamCollection):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_stream_collection';
+
+  procedure gst_event_parse_stream_collection(event:PGstEvent; collection:PPGstStreamCollection);cdecl;external gstreamerlib name 'gst_event_parse_stream_collection';
+
+  function gst_event_new_select_streams(streams:PGList):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_select_streams';
+
+  procedure gst_event_parse_select_streams(event:PGstEvent; streams:PPGList);cdecl;external gstreamerlib name 'gst_event_parse_select_streams';
+
+  function gst_event_new_stream_group_done(group_id:Tguint):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_stream_group_done';
+
+  procedure gst_event_parse_stream_group_done(event:PGstEvent; group_id:Pguint);cdecl;external gstreamerlib name 'gst_event_parse_stream_group_done';
+
+  function gst_event_new_eos:PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_eos';
+
+  function gst_event_new_gap(timestamp:TGstClockTime; duration:TGstClockTime):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_gap';
+
+  procedure gst_event_parse_gap(event:PGstEvent; timestamp:PGstClockTime; duration:PGstClockTime);cdecl;external gstreamerlib name 'gst_event_parse_gap';
+
+  function gst_event_new_caps(caps:PGstCaps):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_caps';
+
+  procedure gst_event_parse_caps(event:PGstEvent; caps:PPGstCaps);cdecl;external gstreamerlib name 'gst_event_parse_caps';
+
+(* Const before type ignored *)
+  function gst_event_new_segment(segment:PGstSegment):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_segment';
+
+(* Const before type ignored *)
+  procedure gst_event_parse_segment(event:PGstEvent; segment:PPGstSegment);cdecl;external gstreamerlib name 'gst_event_parse_segment';
+
+  procedure gst_event_copy_segment(event:PGstEvent; segment:PGstSegment);cdecl;external gstreamerlib name 'gst_event_copy_segment';
+
+  function gst_event_new_tag(taglist:PGstTagList):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_tag';
+
+  procedure gst_event_parse_tag(event:PGstEvent; taglist:PPGstTagList);cdecl;external gstreamerlib name 'gst_event_parse_tag';
+
+  function gst_event_new_toc(toc:PGstToc; updated:Tgboolean):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_toc';
+
+  procedure gst_event_parse_toc(event:PGstEvent; toc:PPGstToc; updated:Pgboolean);cdecl;external gstreamerlib name 'gst_event_parse_toc';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_event_new_protection(system_id:Pgchar; data:PGstBuffer; origin:Pgchar):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_protection';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_event_parse_protection(event:PGstEvent; system_id:PPgchar; data:PPGstBuffer; origin:PPgchar);cdecl;external gstreamerlib name 'gst_event_parse_protection';
+
+  function gst_event_new_buffer_size(format:TGstFormat; minsize:Tgint64; maxsize:Tgint64; async:Tgboolean):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_buffer_size';
+
+  procedure gst_event_parse_buffer_size(event:PGstEvent; format:PGstFormat; minsize:Pgint64; maxsize:Pgint64; async:Pgboolean);cdecl;external gstreamerlib name 'gst_event_parse_buffer_size';
+
+(* Const before type ignored *)
+  function gst_event_new_sink_message(name:Pgchar; msg:PGstMessage):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_sink_message';
+
+  procedure gst_event_parse_sink_message(event:PGstEvent; msg:PPGstMessage);cdecl;external gstreamerlib name 'gst_event_parse_sink_message';
+
+  function gst_event_new_qos(_type:TGstQOSType; proportion:Tgdouble; diff:TGstClockTimeDiff; timestamp:TGstClockTime):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_qos';
+
+  procedure gst_event_parse_qos(event:PGstEvent; _type:PGstQOSType; proportion:Pgdouble; diff:PGstClockTimeDiff; timestamp:PGstClockTime);cdecl;external gstreamerlib name 'gst_event_parse_qos';
+
+  function gst_event_new_seek(rate:Tgdouble; format:TGstFormat; flags:TGstSeekFlags; start_type:TGstSeekType; start:Tgint64; 
+             stop_type:TGstSeekType; stop:Tgint64):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_seek';
+
+  procedure gst_event_parse_seek(event:PGstEvent; rate:Pgdouble; format:PGstFormat; flags:PGstSeekFlags; start_type:PGstSeekType; 
+              start:Pgint64; stop_type:PGstSeekType; stop:Pgint64);cdecl;external gstreamerlib name 'gst_event_parse_seek';
+
+  procedure gst_event_set_seek_trickmode_interval(event:PGstEvent; interval:TGstClockTime);cdecl;external gstreamerlib name 'gst_event_set_seek_trickmode_interval';
+
+  procedure gst_event_parse_seek_trickmode_interval(event:PGstEvent; interval:PGstClockTime);cdecl;external gstreamerlib name 'gst_event_parse_seek_trickmode_interval';
+
+  function gst_event_new_navigation(structure:PGstStructure):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_navigation';
+
+  function gst_event_new_latency(latency:TGstClockTime):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_latency';
+
+  procedure gst_event_parse_latency(event:PGstEvent; latency:PGstClockTime);cdecl;external gstreamerlib name 'gst_event_parse_latency';
+
+  function gst_event_new_step(format:TGstFormat; amount:Tguint64; rate:Tgdouble; flush:Tgboolean; intermediate:Tgboolean):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_step';
+
+  procedure gst_event_parse_step(event:PGstEvent; format:PGstFormat; amount:Pguint64; rate:Pgdouble; flush:Pgboolean; 
+              intermediate:Pgboolean);cdecl;external gstreamerlib name 'gst_event_parse_step';
+
+  function gst_event_new_reconfigure:PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_reconfigure';
+
+(* Const before type ignored *)
+  function gst_event_new_toc_select(uid:Pgchar):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_toc_select';
+
+  procedure gst_event_parse_toc_select(event:PGstEvent; uid:PPgchar);cdecl;external gstreamerlib name 'gst_event_parse_toc_select';
+
+  function gst_event_new_segment_done(format:TGstFormat; position:Tgint64):PGstEvent;cdecl;external gstreamerlib name 'gst_event_new_segment_done';
+
+  procedure gst_event_parse_segment_done(event:PGstEvent; format:PGstFormat; position:Pgint64);cdecl;external gstreamerlib name 'gst_event_parse_segment_done';
+
+
+
+  var
+    _gst_event_type : TGType;cvar;external;
+

+ 61 - 0
packages/gstreamer/src/gstformat.inc

@@ -0,0 +1,61 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *
+ * gstformat.h: Header for GstFormat types used in queries and
+ *              seeking.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+
+  Type
+    P_GstFormatDefinition  = ^T_GstFormatDefinition;
+    PGstFormatDefinition  = ^TGstFormatDefinition;
+  //  PGstIterator  = ^TGstIterator;
+
+    T_GstFormatDefinition = record
+        value : TGstFormat;
+        nick : Pgchar;
+        description : Pgchar;
+        quark : TGQuark;
+      end;
+    TGstFormatDefinition = T_GstFormatDefinition;
+
+(* Const before type ignored *)
+
+  function gst_format_get_name(format:TGstFormat):Pgchar;cdecl;external gstreamerlib name 'gst_format_get_name';
+
+  function gst_format_to_quark(format:TGstFormat):TGQuark;cdecl;external gstreamerlib name 'gst_format_to_quark';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_format_register(nick:Pgchar; description:Pgchar):TGstFormat;cdecl;external gstreamerlib name 'gst_format_register';
+
+(* Const before type ignored *)
+  function gst_format_get_by_nick(nick:Pgchar):TGstFormat;cdecl;external gstreamerlib name 'gst_format_get_by_nick';
+
+(* Const before type ignored *)
+  function gst_formats_contains(formats:PGstFormat; format:TGstFormat):Tgboolean;cdecl;external gstreamerlib name 'gst_formats_contains';
+
+(* Const before type ignored *)
+  function gst_format_get_details(format:TGstFormat):PGstFormatDefinition;cdecl;external gstreamerlib name 'gst_format_get_details';
+
+  function gst_format_iterate_definitions:PGstIterator;cdecl;external gstreamerlib name 'gst_format_iterate_definitions';
+
+

+ 154 - 0
packages/gstreamer/src/gstformat.pp

@@ -0,0 +1,154 @@
+
+unit gstformat;
+interface
+
+{
+  Automatically converted by H2Pas 1.0.0 from gstformat.h
+  The following command line parameters were used:
+    gstformat.h
+}
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+  { GStreamer
+   * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+   *                    2000 Wim Taymans <[email protected]>
+   *
+   * gstformat.h: Header for GstFormat types used in queries and
+   *              seeking.
+   *
+   * This library is free software; you can redistribute it and/or
+   * modify it under the terms of the GNU Library General Public
+   * License as published by the Free Software Foundation; either
+   * version 2 of the License, or (at your option) any later version.
+   *
+   * This library is distributed in the hope that it will be useful,
+   * but WITHOUT ANY WARRANTY; without even the implied warranty of
+   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   * Library General Public License for more details.
+   *
+   * You should have received a copy of the GNU Library General Public
+   * License along with this library; if not, write to the
+   * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+   * Boston, MA 02110-1301, USA.
+    }
+{$ifndef __GST_FORMAT_H__}
+{$define __GST_FORMAT_H__}  
+{$include <glib.h>}
+{$include <gst/gstiterator.h>}
+  {*
+   * GstFormat:
+   * @GST_FORMAT_UNDEFINED: undefined format
+   * @GST_FORMAT_DEFAULT: the default format of the pad/element. This can be
+   *    samples for raw audio, frames/fields for raw video (some, but not all,
+   *    elements support this; use @GST_FORMAT_TIME if you don't have a good
+   *    reason to query for samples/frames)
+   * @GST_FORMAT_BYTES: bytes
+   * @GST_FORMAT_TIME: time in nanoseconds
+   * @GST_FORMAT_BUFFERS: buffers (few, if any, elements implement this as of
+   *     May 2009)
+   * @GST_FORMAT_PERCENT: percentage of stream (few, if any, elements implement
+   *     this as of May 2009)
+   *
+   * Standard predefined formats
+    }
+  { NOTE: don't forget to update the table in gstformat.c when changing
+   * this enum  }
+(* error 
+typedef enum {
+  { must be first in list  }
+in declaration at line 59 *)
+    { a percentage is always relative to 1000000  }
+    {*
+     * GST_FORMAT_PERCENT_MAX:
+     *
+     * The PERCENT format is between 0 and this value
+      }
+
+    { was #define dname def_expr }
+    function GST_FORMAT_PERCENT_MAX : longint; { return type might be wrong }
+
+    {*
+     * GST_FORMAT_PERCENT_SCALE:
+     *
+     * The value used to scale down the reported PERCENT format value to
+     * its real value.
+      }
+    { was #define dname def_expr }
+    function GST_FORMAT_PERCENT_SCALE : longint; { return type might be wrong }
+
+
+    type
+      _GstFormatDefinition = GstFormatDefinition;
+    {*
+     * GstFormatDefinition:
+     * @value: The unique id of this format
+     * @nick: A short nick of the format
+     * @description: A longer description of the format
+     * @quark: A quark for the nick
+     *
+     * A format definition
+      }
+(* Const before type ignored *)
+(* Const before type ignored *)
+      _GstFormatDefinition = record
+          value : GstFormat;
+          nick : ^gchar;
+          description : ^gchar;
+          quark : GQuark;
+        end;
+
+(* error 
+const gchar*    gst_format_get_name             (GstFormat format);
+ in declarator_list *)
+(* error 
+GQuark          gst_format_to_quark             (GstFormat format);
+ in declarator_list *)
+    { register a new format  }
+(* error 
+GstFormat       gst_format_register             (const gchar *nick,
+(* error 
+                                                 const gchar *description);
+ in declarator_list *)
+ in declarator_list *)
+(* error 
+GstFormat       gst_format_get_by_nick          (const gchar *nick);
+ in declarator_list *)
+    { check if a format is in an array of formats  }
+(* error 
+gboolean        gst_formats_contains            (const GstFormat *formats, GstFormat format);
+(* error 
+gboolean        gst_formats_contains            (const GstFormat *formats, GstFormat format);
+ in declarator_list *)
+ in declarator_list *)
+    { query for format details  }
+(* error 
+const GstFormatDefinition*
+ in declarator_list *)
+(* error 
+GstIterator*    gst_format_iterate_definitions  (void);
+ in declarator_list *)
+{$endif}
+    { __GST_FORMAT_H__  }
+(* error 
+#endif /* __GST_FORMAT_H__ */
+
+implementation
+
+    { was #define dname def_expr }
+    function GST_FORMAT_PERCENT_MAX : longint; { return type might be wrong }
+      begin
+        GST_FORMAT_PERCENT_MAX:=G_GINT64_CONSTANT(1000000);
+      end;
+
+    { was #define dname def_expr }
+    function GST_FORMAT_PERCENT_SCALE : longint; { return type might be wrong }
+      begin
+        GST_FORMAT_PERCENT_SCALE:=G_GINT64_CONSTANT(10000);
+      end;
+
+
+end.

+ 133 - 0
packages/gstreamer/src/gstghostpad.inc

@@ -0,0 +1,133 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *                    2005 Andy Wingo <[email protected]>
+ *
+ * gstghostpad.h: Proxy pads
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstGhostPad  = ^T_GstGhostPad;
+    P_GstGhostPadClass  = ^T_GstGhostPadClass;
+    P_GstProxyPad  = ^T_GstProxyPad;
+    P_GstProxyPadClass  = ^T_GstProxyPadClass;
+    PGstGhostPad  = ^TGstGhostPad;
+    PGstGhostPad_autoptr  = ^TGstGhostPad_autoptr;
+    PGstGhostPad_listautoptr  = ^TGstGhostPad_listautoptr;
+    PGstGhostPad_queueautoptr  = ^TGstGhostPad_queueautoptr;
+    PGstGhostPad_slistautoptr  = ^TGstGhostPad_slistautoptr;
+    PGstGhostPadPrivate  = ^TGstGhostPadPrivate;
+    PGstProxyPad  = ^TGstProxyPad;
+    PGstProxyPad_autoptr  = ^TGstProxyPad_autoptr;
+    PGstProxyPad_listautoptr  = ^TGstProxyPad_listautoptr;
+    PGstProxyPad_queueautoptr  = ^TGstProxyPad_queueautoptr;
+    PGstProxyPad_slistautoptr  = ^TGstProxyPad_slistautoptr;
+    PGstProxyPadPrivate  = ^TGstProxyPadPrivate;
+
+    TGstProxyPadPrivate = record end;
+
+    T_GstProxyPadPrivate = TGstProxyPadPrivate;
+
+    T_GstProxyPad = record
+        pad : TGstPad;
+        priv : PGstProxyPadPrivate;
+      end;
+    TGstProxyPad = T_GstProxyPad;
+
+    T_GstProxyPadClass = record
+        parent_class : TGstPadClass;
+        _gst_reserved : array[0..0] of Tgpointer;
+      end;
+    TGstProxyPadClass = T_GstProxyPadClass;
+
+
+    TGstGhostPadPrivate = record end;
+    T_GstGhostPadPrivate = TGstGhostPadPrivate;
+
+
+    T_GstGhostPad = record
+        pad : TGstProxyPad;
+        priv : PGstGhostPadPrivate;
+      end;
+    TGstGhostPad = T_GstGhostPad;
+
+
+    T_GstGhostPadClass = record
+        parent_class : TGstProxyPadClass;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstGhostPadClass = T_GstGhostPadClass;
+
+    TGstGhostPad_autoptr = PGstGhostPad;
+
+    TGstGhostPad_listautoptr = PGList;
+
+    TGstGhostPad_slistautoptr = PGSList;
+
+    TGstGhostPad_queueautoptr = PGQueue;
+
+    TGstProxyPad_autoptr = PGstProxyPad;
+
+    TGstProxyPad_listautoptr = PGList;
+
+    TGstProxyPad_slistautoptr = PGSList;
+
+    TGstProxyPad_queueautoptr = PGQueue;
+
+
+    function gst_proxy_pad_get_type:TGType;cdecl;external gstreamerlib name 'gst_proxy_pad_get_type';
+
+    function gst_proxy_pad_get_internal(pad:PGstProxyPad):PGstProxyPad;cdecl;external gstreamerlib name 'gst_proxy_pad_get_internal';
+
+    function gst_proxy_pad_iterate_internal_links_default(pad:PGstPad; parent:PGstObject):PGstIterator;cdecl;external gstreamerlib name 'gst_proxy_pad_iterate_internal_links_default';
+
+    function gst_proxy_pad_chain_default(pad:PGstPad; parent:PGstObject; buffer:PGstBuffer):TGstFlowReturn;cdecl;external gstreamerlib name 'gst_proxy_pad_chain_default';
+
+    function gst_proxy_pad_chain_list_default(pad:PGstPad; parent:PGstObject; list:PGstBufferList):TGstFlowReturn;cdecl;external gstreamerlib name 'gst_proxy_pad_chain_list_default';
+
+    function gst_proxy_pad_getrange_default(pad:PGstPad; parent:PGstObject; offset:Tguint64; size:Tguint; buffer:PPGstBuffer):TGstFlowReturn;cdecl;external gstreamerlib name 'gst_proxy_pad_getrange_default';
+
+
+  function gst_ghost_pad_get_type:TGType;cdecl;external gstreamerlib name 'gst_ghost_pad_get_type';
+
+(* Const before type ignored *)
+  function gst_ghost_pad_new(name:Pgchar; target:PGstPad):PGstPad;cdecl;external gstreamerlib name 'gst_ghost_pad_new';
+
+(* Const before type ignored *)
+  function gst_ghost_pad_new_no_target(name:Pgchar; dir:TGstPadDirection):PGstPad;cdecl;external gstreamerlib name 'gst_ghost_pad_new_no_target';
+
+(* Const before type ignored *)
+  function gst_ghost_pad_new_from_template(name:Pgchar; target:PGstPad; templ:PGstPadTemplate):PGstPad;cdecl;external gstreamerlib name 'gst_ghost_pad_new_from_template';
+
+(* Const before type ignored *)
+  function gst_ghost_pad_new_no_target_from_template(name:Pgchar; templ:PGstPadTemplate):PGstPad;cdecl;external gstreamerlib name 'gst_ghost_pad_new_no_target_from_template';
+
+  function gst_ghost_pad_get_target(gpad:PGstGhostPad):PGstPad;cdecl;external gstreamerlib name 'gst_ghost_pad_get_target';
+
+  function gst_ghost_pad_set_target(gpad:PGstGhostPad; newtarget:PGstPad):Tgboolean;cdecl;external gstreamerlib name 'gst_ghost_pad_set_target';
+
+  function gst_ghost_pad_construct(gpad:PGstGhostPad):Tgboolean;cdecl;external gstreamerlib name 'gst_ghost_pad_construct';
+
+  function gst_ghost_pad_activate_mode_default(pad:PGstPad; parent:PGstObject; mode:TGstPadMode; active:Tgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_ghost_pad_activate_mode_default';
+
+  function gst_ghost_pad_internal_activate_mode_default(pad:PGstPad; parent:PGstObject; mode:TGstPadMode; active:Tgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_ghost_pad_internal_activate_mode_default';
+
+
+

+ 234 - 0
packages/gstreamer/src/gstinfo.inc

@@ -0,0 +1,234 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *                    2003 Benjamin Otte <[email protected]>
+ *
+ * gstinfo.h: debugging functions
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+}
+  Type
+    P_GstDebugCategory  = ^T_GstDebugCategory;
+    PGstDebugCategory  = ^TGstDebugCategory;
+    PGstDebugColorFlags  = ^TGstDebugColorFlags;
+    PGstDebugColorMode  = ^TGstDebugColorMode;
+    PGstDebugLevel  = ^TGstDebugLevel;
+    PGstDebugMessage  = ^TGstDebugMessage;
+    PGstStackTraceFlags  = ^TGstStackTraceFlags;
+
+
+    TGstDebugLevel = (
+      GST_LEVEL_NONE := 0,
+      GST_LEVEL_ERROR := 1,
+      GST_LEVEL_WARNING := 2,
+      GST_LEVEL_FIXME := 3,
+      GST_LEVEL_INFO := 4,
+      GST_LEVEL_DEBUG := 5,
+      GST_LEVEL_LOG := 6,
+      GST_LEVEL_TRACE := 7,
+      GST_LEVEL_MEMDUMP := 9,
+      GST_LEVEL_COUNT
+      );
+
+    TGstDebugColorFlags = (
+      GST_DEBUG_FG_BLACK := $0000,
+      GST_DEBUG_FG_RED := $0001,
+      GST_DEBUG_FG_GREEN := $0002,
+      GST_DEBUG_FG_YELLOW := $0003,
+      GST_DEBUG_FG_BLUE := $0004,
+      GST_DEBUG_FG_MAGENTA := $0005,
+      GST_DEBUG_FG_CYAN := $0006,
+      GST_DEBUG_FG_WHITE := $0007,
+      GST_DEBUG_BG_BLACK := $0000,
+      GST_DEBUG_BG_RED := $0010,
+      GST_DEBUG_BG_GREEN := $0020,
+      GST_DEBUG_BG_YELLOW := $0030,
+      GST_DEBUG_BG_BLUE := $0040,
+      GST_DEBUG_BG_MAGENTA := $0050,
+      GST_DEBUG_BG_CYAN := $0060,
+      GST_DEBUG_BG_WHITE := $0070,
+      GST_DEBUG_BOLD := $0100,
+      GST_DEBUG_UNDERLINE := $0200
+      );
+
+
+    TGstStackTraceFlags = (
+      GST_STACK_TRACE_SHOW_FULL := 1 shl 0
+    );
+
+
+    TGstDebugColorMode = (
+      GST_DEBUG_COLOR_MODE_OFF := 0,
+      GST_DEBUG_COLOR_MODE_ON := 1,
+      GST_DEBUG_COLOR_MODE_UNIX := 2
+    );
+
+    T_GstDebugCategory = record
+        threshold : Tgint;
+        color : Tguint;
+        name : Pgchar;
+        description : Pgchar;
+      end;
+    TGstDebugCategory = T_GstDebugCategory;
+
+    TGstDebugMessage = record end;
+    T_GstDebugMessage = TGstDebugMessage;
+
+    TGstLogFunction = procedure (category:PGstDebugCategory; level:TGstDebugLevel; afile:Pgchar; _function:Pgchar; line:Tgint; 
+                  aobject:PGObject; message:PGstDebugMessage; user_data:Tgpointer);cdecl;
+
+  TGstDebugFuncPtr = procedure (_para1:pointer);cdecl;
+
+  procedure gst_debug_log(category:PGstDebugCategory; level:TGstDebugLevel; afile:Pgchar; _function:Pgchar; line:Tgint; 
+              object_:PGObject; format:Pgchar; args:array of const);cdecl;external gstreamerlib name 'gst_debug_log';
+
+  procedure gst_debug_log(category:PGstDebugCategory; level:TGstDebugLevel; afile:Pgchar; _function:Pgchar; line:Tgint; 
+              object_:PGObject; format:Pgchar);cdecl;external gstreamerlib name 'gst_debug_log';
+
+  procedure gst_debug_log_valist(category:PGstDebugCategory; level:TGstDebugLevel; afile:Pgchar; _function:Pgchar; line:Tgint;
+              object_:PGObject; format:Pgchar; args:Tva_list);cdecl;external gstreamerlib name 'gst_debug_log_valist';
+
+  function _gst_debug_category_new(name:Pgchar; color:Tguint; description:Pgchar):PGstDebugCategory;cdecl;external gstreamerlib name '_gst_debug_category_new';
+
+  function _gst_debug_get_category(name:Pgchar):PGstDebugCategory;cdecl;external gstreamerlib name '_gst_debug_get_category';
+  procedure _gst_debug_dump_mem(cat:PGstDebugCategory; afile:Pgchar; func:Pgchar; line:Tgint; obj:PGObject;
+              msg:Pgchar; data:Pguint8; length:Tguint);cdecl;external gstreamerlib name '_gst_debug_dump_mem';
+
+
+(* Const before type ignored *)
+
+  procedure _gst_debug_register_funcptr(func:TGstDebugFuncPtr; ptrname:Pgchar);cdecl;external gstreamerlib name '_gst_debug_register_funcptr';
+
+(* Const before type ignored *)
+  function _gst_debug_nameof_funcptr(func:TGstDebugFuncPtr):Pgchar;cdecl;external gstreamerlib name '_gst_debug_nameof_funcptr';
+
+(* Const before type ignored *)
+  function gst_debug_message_get(message:PGstDebugMessage):Pgchar;cdecl;external gstreamerlib name 'gst_debug_message_get';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_debug_log_default(category:PGstDebugCategory; level:TGstDebugLevel; afile:Pgchar; _function:Pgchar; line:Tgint; 
+              object_:PGObject; message:PGstDebugMessage; user_data:Tgpointer);cdecl;external gstreamerlib name 'gst_debug_log_default';
+
+(* Const before type ignored *)
+  function gst_debug_level_get_name(level:TGstDebugLevel):Pgchar;cdecl;external gstreamerlib name 'gst_debug_level_get_name';
+
+  procedure gst_debug_add_log_function(func:TGstLogFunction; user_data:Tgpointer; notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_debug_add_log_function';
+
+  function gst_debug_remove_log_function(func:TGstLogFunction):Tguint;cdecl;external gstreamerlib name 'gst_debug_remove_log_function';
+
+  function gst_debug_remove_log_function_by_data(data:Tgpointer):Tguint;cdecl;external gstreamerlib name 'gst_debug_remove_log_function_by_data';
+
+  procedure gst_debug_set_active(active:Tgboolean);cdecl;external gstreamerlib name 'gst_debug_set_active';
+
+  function gst_debug_is_active:Tgboolean;cdecl;external gstreamerlib name 'gst_debug_is_active';
+
+  procedure gst_debug_set_colored(colored:Tgboolean);cdecl;external gstreamerlib name 'gst_debug_set_colored';
+
+  procedure gst_debug_set_color_mode(mode:TGstDebugColorMode);cdecl;external gstreamerlib name 'gst_debug_set_color_mode';
+
+(* Const before type ignored *)
+  procedure gst_debug_set_color_mode_from_string(mode:Pgchar);cdecl;external gstreamerlib name 'gst_debug_set_color_mode_from_string';
+
+  function gst_debug_is_colored:Tgboolean;cdecl;external gstreamerlib name 'gst_debug_is_colored';
+
+  function gst_debug_get_color_mode:TGstDebugColorMode;cdecl;external gstreamerlib name 'gst_debug_get_color_mode';
+
+  procedure gst_debug_set_default_threshold(level:TGstDebugLevel);cdecl;external gstreamerlib name 'gst_debug_set_default_threshold';
+
+  function gst_debug_get_default_threshold:TGstDebugLevel;cdecl;external gstreamerlib name 'gst_debug_get_default_threshold';
+
+(* Const before type ignored *)
+  procedure gst_debug_set_threshold_for_name(name:Pgchar; level:TGstDebugLevel);cdecl;external gstreamerlib name 'gst_debug_set_threshold_for_name';
+
+(* Const before type ignored *)
+  procedure gst_debug_set_threshold_from_string(list:Pgchar; reset:Tgboolean);cdecl;external gstreamerlib name 'gst_debug_set_threshold_from_string';
+
+(* Const before type ignored *)
+  procedure gst_debug_unset_threshold_for_name(name:Pgchar);cdecl;external gstreamerlib name 'gst_debug_unset_threshold_for_name';
+
+  procedure gst_debug_category_free(category:PGstDebugCategory);cdecl;external gstreamerlib name 'gst_debug_category_free';
+
+  procedure gst_debug_category_set_threshold(category:PGstDebugCategory; level:TGstDebugLevel);cdecl;external gstreamerlib name 'gst_debug_category_set_threshold';
+
+  procedure gst_debug_category_reset_threshold(category:PGstDebugCategory);cdecl;external gstreamerlib name 'gst_debug_category_reset_threshold';
+
+  function gst_debug_category_get_threshold(category:PGstDebugCategory):TGstDebugLevel;cdecl;external gstreamerlib name 'gst_debug_category_get_threshold';
+
+(* Const before type ignored *)
+  function gst_debug_category_get_name(category:PGstDebugCategory):Pgchar;cdecl;external gstreamerlib name 'gst_debug_category_get_name';
+
+  function gst_debug_category_get_color(category:PGstDebugCategory):Tguint;cdecl;external gstreamerlib name 'gst_debug_category_get_color';
+
+(* Const before type ignored *)
+  function gst_debug_category_get_description(category:PGstDebugCategory):Pgchar;cdecl;external gstreamerlib name 'gst_debug_category_get_description';
+
+  function gst_debug_get_all_categories:PGSList;cdecl;external gstreamerlib name 'gst_debug_get_all_categories';
+
+  function gst_debug_construct_term_color(colorinfo:Tguint):Pgchar;cdecl;external gstreamerlib name 'gst_debug_construct_term_color';
+
+  function gst_debug_construct_win_color(colorinfo:Tguint):Tgint;cdecl;external gstreamerlib name 'gst_debug_construct_win_color';
+
+(* Const before type ignored *)
+  function gst_info_vasprintf(result:PPgchar; format:Pgchar; args:Tva_list):Tgint;cdecl;external gstreamerlib name 'gst_info_vasprintf';
+
+(* Const before type ignored *)
+  function gst_info_strdup_vprintf(format:Pgchar; args:Tva_list):Pgchar;cdecl;external gstreamerlib name 'gst_info_strdup_vprintf';
+
+(* Const before type ignored *)
+  function gst_info_strdup_printf(format:Pgchar; args:array of const):Pgchar;cdecl;external gstreamerlib name 'gst_info_strdup_printf';
+
+  function gst_info_strdup_printf(format:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_info_strdup_printf';
+
+(* Const before type ignored *)
+  procedure gst_print(format:Pgchar; args:array of const);cdecl;external gstreamerlib name 'gst_print';
+
+  procedure gst_print(format:Pgchar);cdecl;external gstreamerlib name 'gst_print';
+
+(* Const before type ignored *)
+  procedure gst_println(format:Pgchar; args:array of const);cdecl;external gstreamerlib name 'gst_println';
+
+  procedure gst_println(format:Pgchar);cdecl;external gstreamerlib name 'gst_println';
+
+(* Const before type ignored *)
+  procedure gst_printerr(format:Pgchar; args:array of const);cdecl;external gstreamerlib name 'gst_printerr';
+
+  procedure gst_printerr(format:Pgchar);cdecl;external gstreamerlib name 'gst_printerr';
+
+(* Const before type ignored *)
+  procedure gst_printerrln(format:Pgchar; args:array of const);cdecl;external gstreamerlib name 'gst_printerrln';
+
+  procedure gst_printerrln(format:Pgchar);cdecl;external gstreamerlib name 'gst_printerrln';
+
+
+    var
+      GST_CAT_DEFAULT : PGstDebugCategory;cvar;external;
+      _gst_debug_enabled : Tgboolean;cvar;external;
+      _gst_debug_min : TGstDebugLevel;cvar;external;
+
+  procedure gst_debug_print_stack_trace;cdecl;external gstreamerlib name 'gst_debug_print_stack_trace';
+
+  function gst_debug_get_stack_trace(flags:TGstStackTraceFlags):Pgchar;cdecl;external gstreamerlib name 'gst_debug_get_stack_trace';
+
+  procedure gst_debug_add_ring_buffer_logger(max_size_per_thread:Tguint; thread_timeout:Tguint);cdecl;external gstreamerlib name 'gst_debug_add_ring_buffer_logger';
+
+  procedure gst_debug_remove_ring_buffer_logger;cdecl;external gstreamerlib name 'gst_debug_remove_ring_buffer_logger';
+
+  function gst_debug_ring_buffer_logger_get_logs:PPgchar;cdecl;external gstreamerlib name 'gst_debug_ring_buffer_logger_get_logs';
+
+

+ 124 - 0
packages/gstreamer/src/gstiterator.inc

@@ -0,0 +1,124 @@
+{
+/* GStreamer
+ * Copyright (C) 2004 Wim Taymans <[email protected]>
+ * Copyright (C) 2011 Sebastian Dröge <[email protected]>
+ *
+ * gstiterator.h: Header for GstIterator
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+}
+  Type
+    P_GstIterator  = ^T_GstIterator;
+    PGObject  = ^TGObject;
+    PGstIterator  = ^TGstIterator;
+    PGstIterator_autoptr  = ^TGstIterator_autoptr;
+    PGstIterator_listautoptr  = ^TGstIterator_listautoptr;
+    PGstIterator_queueautoptr  = ^TGstIterator_queueautoptr;
+    PGstIterator_slistautoptr  = ^TGstIterator_slistautoptr;
+    PGstIteratorItem  = ^TGstIteratorItem;
+    PGstIteratorResult  = ^TGstIteratorResult;
+    Pguint32  = ^Tguint32;
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+
+    TGstIteratorResult = (
+      GST_ITERATOR_DONE := 0,
+      GST_ITERATOR_OK := 1,
+      GST_ITERATOR_RESYNC_ := 2,
+      GST_ITERATOR_ERROR := 3
+      );
+
+    TGstIteratorItem = (GST_ITERATOR_ITEM_SKIP := 0,GST_ITERATOR_ITEM_PASS := 1,
+      GST_ITERATOR_ITEM_END := 2);
+(* Const before type ignored *)
+
+    TGstIteratorCopyFunction = procedure (it:PGstIterator; copy:PGstIterator);cdecl;
+(* Const before type ignored *)
+
+    TGstIteratorItemFunction = function (it:PGstIterator; item:PGValue):TGstIteratorItem;cdecl;
+
+    TGstIteratorNextFunction = function (it:PGstIterator; result:PGValue):TGstIteratorResult;cdecl;
+
+    TGstIteratorResyncFunction = procedure (it:PGstIterator);cdecl;
+
+    TGstIteratorFreeFunction = procedure (it:PGstIterator);cdecl;
+(* Const before type ignored *)
+
+    TGstIteratorForeachFunction = procedure (item:PGValue; user_data:Tgpointer);cdecl;
+(* Const before type ignored *)
+
+    TGstIteratorFoldFunction = function (item:PGValue; ret:PGValue; user_data:Tgpointer):Tgboolean;cdecl;
+    T_GstIterator = record
+        copy : TGstIteratorCopyFunction;
+        next : TGstIteratorNextFunction;
+        item : TGstIteratorItemFunction;
+        resync : TGstIteratorResyncFunction;
+        free : TGstIteratorFreeFunction;
+        pushed : PGstIterator;
+        _type : TGType;
+        lock : PGMutex;
+        cookie : Tguint32;
+        master_cookie : Pguint32;
+        size : Tguint;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstIterator = T_GstIterator;
+
+  TGstIterator_autoptr = PGstIterator;
+
+  TGstIterator_listautoptr = PGList;
+
+  TGstIterator_slistautoptr = PGSList;
+
+  TGstIterator_queueautoptr = PGQueue;
+
+  function gst_iterator_get_type:TGType;cdecl;external gstreamerlib name 'gst_iterator_get_type';
+
+  function gst_iterator_new(size:Tguint; _type:TGType; lock:PGMutex; master_cookie:Pguint32; copy:TGstIteratorCopyFunction; 
+             next:TGstIteratorNextFunction; item:TGstIteratorItemFunction; resync:TGstIteratorResyncFunction; free:TGstIteratorFreeFunction):PGstIterator;cdecl;external gstreamerlib name 'gst_iterator_new';
+
+  function gst_iterator_new_list(_type:TGType; lock:PGMutex; master_cookie:Pguint32; list:PPGList; owner:PGObject; 
+             item:TGstIteratorItemFunction):PGstIterator;cdecl;external gstreamerlib name 'gst_iterator_new_list';
+
+(* Const before type ignored *)
+  function gst_iterator_new_single(_type:TGType; object_:PGValue):PGstIterator;cdecl;external gstreamerlib name 'gst_iterator_new_single';
+
+(* Const before type ignored *)
+  function gst_iterator_copy(it:PGstIterator):PGstIterator;cdecl;external gstreamerlib name 'gst_iterator_copy';
+
+  function gst_iterator_next(it:PGstIterator; elem:PGValue):TGstIteratorResult;cdecl;external gstreamerlib name 'gst_iterator_next';
+
+  procedure gst_iterator_resync(it:PGstIterator);cdecl;external gstreamerlib name 'gst_iterator_resync';
+
+  procedure gst_iterator_free(it:PGstIterator);cdecl;external gstreamerlib name 'gst_iterator_free';
+
+  procedure gst_iterator_push(it:PGstIterator; other:PGstIterator);cdecl;external gstreamerlib name 'gst_iterator_push';
+
+(* Const before type ignored *)
+  function gst_iterator_filter(it:PGstIterator; func:TGCompareFunc; user_data:PGValue):PGstIterator;cdecl;external gstreamerlib name 'gst_iterator_filter';
+
+  function gst_iterator_fold(it:PGstIterator; func:TGstIteratorFoldFunction; ret:PGValue; user_data:Tgpointer):TGstIteratorResult;cdecl;external gstreamerlib name 'gst_iterator_fold';
+
+  function gst_iterator_foreach(it:PGstIterator; func:TGstIteratorForeachFunction; user_data:Tgpointer):TGstIteratorResult;cdecl;external gstreamerlib name 'gst_iterator_foreach';
+
+  function gst_iterator_find_custom(it:PGstIterator; func:TGCompareFunc; elem:PGValue; user_data:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_iterator_find_custom';
+
+
+

+ 175 - 0
packages/gstreamer/src/gstmemory.inc

@@ -0,0 +1,175 @@
+{
+/* GStreamer
+ * Copyright (C) 2009 Wim Taymans <[email protected]>
+ *
+ * gstmemory.h: Header for memory blocks
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstMemory  = ^T_GstMemory;
+    PGstAllocator  = ^TGstAllocator;
+    PGstAllocator_autoptr  = ^TGstAllocator_autoptr;
+    PGstAllocator_listautoptr  = ^TGstAllocator_listautoptr;
+    PGstAllocator_queueautoptr  = ^TGstAllocator_queueautoptr;
+    PGstAllocator_slistautoptr  = ^TGstAllocator_slistautoptr;
+    PGstMapFlags  = ^TGstMapFlags;
+    PGstMapInfo  = ^TGstMapInfo;
+    PGstMemory  = ^TGstMemory;
+    PGstMemory_autoptr  = ^TGstMemory_autoptr;
+    PGstMemory_listautoptr  = ^TGstMemory_listautoptr;
+    PGstMemory_queueautoptr  = ^TGstMemory_queueautoptr;
+    PGstMemory_slistautoptr  = ^TGstMemory_slistautoptr;
+    PGstMemoryCopyFunction  = ^TGstMemoryCopyFunction;
+    PGstMemoryShareFunction  = ^TGstMemoryShareFunction;
+    Pguint8  = ^Tguint8;
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+    T_GstMemory = record
+        mini_object : TGstMiniObject;
+        allocator : PGstAllocator;
+        parent : PGstMemory;
+        maxsize : Tgsize;
+        align : Tgsize;
+        offset : Tgsize;
+        size : Tgsize;
+      end;
+    TGstMemory = T_GstMemory ;
+
+
+
+    TGstMapFlags = (
+      GST_MAP_READ := Ord(GST_LOCK_FLAG_READ),
+      GST_MAP_WRITE := Ord(GST_LOCK_FLAG_WRITE),
+      GST_MAP_FLAG_LAST := 1 shl 16);
+
+    TGstMapInfo = record
+        memory : PGstMemory;
+        flags : TGstMapFlags;
+        data : Pguint8;
+        size : Tgsize;
+        maxsize : Tgsize;
+        user_data : array[0..3] of Tgpointer;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+
+    TGstMemoryMapFunction = function (mem:PGstMemory; maxsize:Tgsize; flags:TGstMapFlags):Tgpointer;cdecl;
+
+    TGstMemoryMapFullFunction = function (mem:PGstMemory; info:PGstMapInfo; maxsize:Tgsize):Tgpointer;cdecl;
+
+    TGstMemoryUnmapFunction = procedure (mem:PGstMemory);cdecl;
+
+    TGstMemoryUnmapFullFunction = procedure (mem:PGstMemory; info:PGstMapInfo);cdecl;
+
+
+    TGstMemoryCopyFunction = function (mem:PGstMemory; offset:Tgssize; size:Tgssize):PGstMemory;cdecl;
+
+
+    TGstMemoryShareFunction = function (mem:PGstMemory; offset:Tgssize; size:Tgssize):PGstMemory;cdecl;
+
+    TGstMemoryIsSpanFunction = function (mem1:PGstMemory; mem2:PGstMemory; offset:Pgsize):Tgboolean;cdecl;
+
+
+    TGstMemory_autoptr = PGstMemory;
+
+    TGstMemory_listautoptr = PGList;
+
+    TGstMemory_slistautoptr = PGSList;
+
+    TGstMemory_queueautoptr = PGQueue;
+    TGstAllocator_autoptr = PGstAllocator;
+
+    TGstAllocator_listautoptr = PGList;
+
+    TGstAllocator_slistautoptr = PGSList;
+
+    TGstAllocator_queueautoptr = PGQueue;
+
+    // Moved here from gstallocator.inc
+    TGstAllocatorPrivate = record end;
+    T_GstAllocatorPrivate = TGstAllocatorPrivate;
+    PGstAllocatorPrivate = ^TGstAllocatorPrivate;
+
+    T_GstAllocator = record
+        object_ : TGstObject;
+        mem_type : Pgchar;
+        mem_map : TGstMemoryMapFunction;
+        mem_unmap : TGstMemoryUnmapFunction;
+        mem_copy : TGstMemoryCopyFunction;
+        mem_share : TGstMemoryShareFunction;
+        mem_is_span : TGstMemoryIsSpanFunction;
+        mem_map_full : TGstMemoryMapFullFunction;
+        mem_unmap_full : TGstMemoryUnmapFullFunction;
+        _gst_reserved : array[0..(4-2)-1] of Tgpointer;
+        priv : PGstAllocatorPrivate;
+      end;
+    TGstAllocator = T_GstAllocator;
+
+  function gst_memory_get_type:TGType;cdecl;external gstreamerlib name 'gst_memory_get_type';
+
+  procedure gst_memory_init(mem:PGstMemory; flags:TGstMemoryFlags; allocator:PGstAllocator; parent:PGstMemory; maxsize:Tgsize; 
+              align:Tgsize; offset:Tgsize; size:Tgsize);cdecl;external gstreamerlib name 'gst_memory_init';
+
+(* Const before type ignored *)
+  function gst_memory_is_type(mem:PGstMemory; mem_type:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_memory_is_type';
+
+  {
+  
+  static inline GstMemory *
+  gst_memory_ref (GstMemory * memory)
+  
+    return (GstMemory *) gst_mini_object_ref (((GstMiniObject*)(memory)));
+  
+  
+  
+  
+  
+  
+  
+  
+  static inline void
+  gst_memory_unref (GstMemory * memory)
+  
+    gst_mini_object_unref (((GstMiniObject*)(memory)));
+  
+  
+   }
+  function gst_memory_get_sizes(mem:PGstMemory; offset:Pgsize; maxsize:Pgsize):Tgsize;cdecl;external gstreamerlib name 'gst_memory_get_sizes';
+
+  procedure gst_memory_resize(mem:PGstMemory; offset:Tgssize; size:Tgsize);cdecl;external gstreamerlib name 'gst_memory_resize';
+
+  function gst_memory_make_mapped(mem:PGstMemory; info:PGstMapInfo; flags:TGstMapFlags):PGstMemory;cdecl;external gstreamerlib name 'gst_memory_make_mapped';
+
+  function gst_memory_map(mem:PGstMemory; info:PGstMapInfo; flags:TGstMapFlags):Tgboolean;cdecl;external gstreamerlib name 'gst_memory_map';
+
+  procedure gst_memory_unmap(mem:PGstMemory; info:PGstMapInfo);cdecl;external gstreamerlib name 'gst_memory_unmap';
+
+  function gst_memory_copy(mem:PGstMemory; offset:Tgssize; size:Tgssize):PGstMemory;cdecl;external gstreamerlib name 'gst_memory_copy';
+
+  function gst_memory_share(mem:PGstMemory; offset:Tgssize; size:Tgssize):PGstMemory;cdecl;external gstreamerlib name 'gst_memory_share';
+
+  function gst_memory_is_span(mem1:PGstMemory; mem2:PGstMemory; offset:Pgsize):Tgboolean;cdecl;external gstreamerlib name 'gst_memory_is_span';
+
+
+  var
+    _gst_memory_type : TGType;cvar;external;
+
+

+ 308 - 0
packages/gstreamer/src/gstmessage.inc

@@ -0,0 +1,308 @@
+{
+/* GStreamer
+ * Copyright (C) 2004 Wim Taymans <[email protected]>
+ *
+ * gstmessage.h: Header for GstMessage subsystem
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+}
+  Type
+
+    PGstMessage_autoptr  = ^TGstMessage_autoptr;
+    PGstMessage_listautoptr  = ^TGstMessage_listautoptr;
+    PGstMessage_queueautoptr  = ^TGstMessage_queueautoptr;
+    PGstMessage_slistautoptr  = ^TGstMessage_slistautoptr;
+    PGstProgressType  = ^TGstProgressType;
+    PGstStreamStatusType  = ^TGstStreamStatusType;
+    PGstStructureChangeType  = ^TGstStructureChangeType;
+
+
+
+    TGstStructureChangeType = (GST_STRUCTURE_CHANGE_TYPE_PAD_LINK := 0,
+      GST_STRUCTURE_CHANGE_TYPE_PAD_UNLINK := 1
+      );
+
+    TGstStreamStatusType = (GST_STREAM_STATUS_TYPE_CREATE := 0,
+      GST_STREAM_STATUS_TYPE_ENTER := 1,GST_STREAM_STATUS_TYPE_LEAVE := 2,
+      GST_STREAM_STATUS_TYPE_DESTROY := 3,
+      GST_STREAM_STATUS_TYPE_START := 8,GST_STREAM_STATUS_TYPE_PAUSE := 9,
+      GST_STREAM_STATUS_TYPE_STOP := 10);
+
+    TGstProgressType = (GST_PROGRESS_TYPE_START := 0,GST_PROGRESS_TYPE_CONTINUE := 1,
+      GST_PROGRESS_TYPE_COMPLETE := 2,GST_PROGRESS_TYPE_CANCELED := 3,
+      GST_PROGRESS_TYPE_ERROR := 4);
+
+
+  TGstMessage_autoptr = PGstMessage;
+  TGstMessage_listautoptr = PGList;
+  TGstMessage_slistautoptr = PGSList;
+  TGstMessage_queueautoptr = PGQueue;
+
+  function gst_message_get_type:TGType;cdecl;external gstreamerlib name 'gst_message_get_type';
+
+(* Const before type ignored *)
+  function gst_message_type_get_name(_type:TGstMessageType):Pgchar;cdecl;external gstreamerlib name 'gst_message_type_get_name';
+
+  function gst_message_type_to_quark(_type:TGstMessageType):TGQuark;cdecl;external gstreamerlib name 'gst_message_type_to_quark';
+
+  function gst_message_new_custom(_type:TGstMessageType; src:PGstObject; structure:PGstStructure):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_custom';
+
+  function gst_message_get_structure(message:PGstMessage):PGstStructure;cdecl;external gstreamerlib name 'gst_message_get_structure';
+
+  function gst_message_writable_structure(message:PGstMessage):PGstStructure;cdecl;external gstreamerlib name 'gst_message_writable_structure';
+
+(* Const before type ignored *)
+  function gst_message_has_name(message:PGstMessage; name:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_message_has_name';
+
+  function gst_message_get_seqnum(message:PGstMessage):Tguint32;cdecl;external gstreamerlib name 'gst_message_get_seqnum';
+
+  procedure gst_message_set_seqnum(message:PGstMessage; seqnum:Tguint32);cdecl;external gstreamerlib name 'gst_message_set_seqnum';
+
+  function gst_message_new_eos(src:PGstObject):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_eos';
+
+(* Const before type ignored *)
+  function gst_message_new_error(src:PGstObject; error:PGError; debug:Pgchar):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_error';
+
+(* Const before type ignored *)
+  function gst_message_new_error_with_details(src:PGstObject; error:PGError; debug:Pgchar; details:PGstStructure):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_error_with_details';
+
+  procedure gst_message_parse_error(message:PGstMessage; gerror:PPGError; debug:PPgchar);cdecl;external gstreamerlib name 'gst_message_parse_error';
+
+(* Const before type ignored *)
+  procedure gst_message_parse_error_details(message:PGstMessage; structure:PPGstStructure);cdecl;external gstreamerlib name 'gst_message_parse_error_details';
+
+(* Const before type ignored *)
+  function gst_message_new_warning(src:PGstObject; error:PGError; debug:Pgchar):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_warning';
+
+(* Const before type ignored *)
+  function gst_message_new_warning_with_details(src:PGstObject; error:PGError; debug:Pgchar; details:PGstStructure):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_warning_with_details';
+
+  procedure gst_message_parse_warning(message:PGstMessage; gerror:PPGError; debug:PPgchar);cdecl;external gstreamerlib name 'gst_message_parse_warning';
+
+(* Const before type ignored *)
+  procedure gst_message_parse_warning_details(message:PGstMessage; structure:PPGstStructure);cdecl;external gstreamerlib name 'gst_message_parse_warning_details';
+
+(* Const before type ignored *)
+  function gst_message_new_info(src:PGstObject; error:PGError; debug:Pgchar):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_info';
+
+(* Const before type ignored *)
+  function gst_message_new_info_with_details(src:PGstObject; error:PGError; debug:Pgchar; details:PGstStructure):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_info_with_details';
+
+  procedure gst_message_parse_info(message:PGstMessage; gerror:PPGError; debug:PPgchar);cdecl;external gstreamerlib name 'gst_message_parse_info';
+
+(* Const before type ignored *)
+  procedure gst_message_parse_info_details(message:PGstMessage; structure:PPGstStructure);cdecl;external gstreamerlib name 'gst_message_parse_info_details';
+
+  function gst_message_new_tag(src:PGstObject; tag_list:PGstTagList):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_tag';
+
+  procedure gst_message_parse_tag(message:PGstMessage; tag_list:PPGstTagList);cdecl;external gstreamerlib name 'gst_message_parse_tag';
+
+  function gst_message_new_buffering(src:PGstObject; percent:Tgint):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_buffering';
+
+  procedure gst_message_parse_buffering(message:PGstMessage; percent:Pgint);cdecl;external gstreamerlib name 'gst_message_parse_buffering';
+
+  procedure gst_message_set_buffering_stats(message:PGstMessage; mode:TGstBufferingMode; avg_in:Tgint; avg_out:Tgint; buffering_left:Tgint64);cdecl;external gstreamerlib name 'gst_message_set_buffering_stats';
+
+  procedure gst_message_parse_buffering_stats(message:PGstMessage; mode:PGstBufferingMode; avg_in:Pgint; avg_out:Pgint; buffering_left:Pgint64);cdecl;external gstreamerlib name 'gst_message_parse_buffering_stats';
+
+  function gst_message_new_state_changed(src:PGstObject; oldstate:TGstState; newstate:TGstState; pending:TGstState):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_state_changed';
+
+  procedure gst_message_parse_state_changed(message:PGstMessage; oldstate:PGstState; newstate:PGstState; pending:PGstState);cdecl;external gstreamerlib name 'gst_message_parse_state_changed';
+
+  function gst_message_new_state_dirty(src:PGstObject):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_state_dirty';
+
+  function gst_message_new_step_done(src:PGstObject; format:TGstFormat; amount:Tguint64; rate:Tgdouble; flush:Tgboolean; 
+             intermediate:Tgboolean; duration:Tguint64; eos:Tgboolean):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_step_done';
+
+  procedure gst_message_parse_step_done(message:PGstMessage; format:PGstFormat; amount:Pguint64; rate:Pgdouble; flush:Pgboolean; 
+              intermediate:Pgboolean; duration:Pguint64; eos:Pgboolean);cdecl;external gstreamerlib name 'gst_message_parse_step_done';
+
+  function gst_message_new_clock_provide(src:PGstObject; clock:PGstClock; ready:Tgboolean):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_clock_provide';
+
+  procedure gst_message_parse_clock_provide(message:PGstMessage; clock:PPGstClock; ready:Pgboolean);cdecl;external gstreamerlib name 'gst_message_parse_clock_provide';
+
+  function gst_message_new_clock_lost(src:PGstObject; clock:PGstClock):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_clock_lost';
+
+  procedure gst_message_parse_clock_lost(message:PGstMessage; clock:PPGstClock);cdecl;external gstreamerlib name 'gst_message_parse_clock_lost';
+
+  function gst_message_new_new_clock(src:PGstObject; clock:PGstClock):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_new_clock';
+
+  procedure gst_message_parse_new_clock(message:PGstMessage; clock:PPGstClock);cdecl;external gstreamerlib name 'gst_message_parse_new_clock';
+
+  function gst_message_new_application(src:PGstObject; structure:PGstStructure):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_application';
+
+  function gst_message_new_element(src:PGstObject; structure:PGstStructure):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_element';
+
+  function gst_message_new_segment_start(src:PGstObject; format:TGstFormat; position:Tgint64):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_segment_start';
+
+  procedure gst_message_parse_segment_start(message:PGstMessage; format:PGstFormat; position:Pgint64);cdecl;external gstreamerlib name 'gst_message_parse_segment_start';
+
+  function gst_message_new_segment_done(src:PGstObject; format:TGstFormat; position:Tgint64):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_segment_done';
+
+  procedure gst_message_parse_segment_done(message:PGstMessage; format:PGstFormat; position:Pgint64);cdecl;external gstreamerlib name 'gst_message_parse_segment_done';
+
+  function gst_message_new_duration_changed(src:PGstObject):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_duration_changed';
+
+  function gst_message_new_latency(src:PGstObject):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_latency';
+
+  function gst_message_new_async_start(src:PGstObject):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_async_start';
+
+  function gst_message_new_async_done(src:PGstObject; running_time:TGstClockTime):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_async_done';
+
+  procedure gst_message_parse_async_done(message:PGstMessage; running_time:PGstClockTime);cdecl;external gstreamerlib name 'gst_message_parse_async_done';
+
+  function gst_message_new_structure_change(src:PGstObject; _type:TGstStructureChangeType; owner:PGstElement; busy:Tgboolean):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_structure_change';
+
+  procedure gst_message_parse_structure_change(message:PGstMessage; _type:PGstStructureChangeType; owner:PPGstElement; busy:Pgboolean);cdecl;external gstreamerlib name 'gst_message_parse_structure_change';
+
+  function gst_message_new_stream_status(src:PGstObject; _type:TGstStreamStatusType; owner:PGstElement):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_stream_status';
+
+  procedure gst_message_parse_stream_status(message:PGstMessage; _type:PGstStreamStatusType; owner:PPGstElement);cdecl;external gstreamerlib name 'gst_message_parse_stream_status';
+
+(* Const before type ignored *)
+  procedure gst_message_set_stream_status_object(message:PGstMessage; object_:PGValue);cdecl;external gstreamerlib name 'gst_message_set_stream_status_object';
+
+(* Const before type ignored *)
+  function gst_message_get_stream_status_object(message:PGstMessage):PGValue;cdecl;external gstreamerlib name 'gst_message_get_stream_status_object';
+
+  function gst_message_new_request_state(src:PGstObject; state:TGstState):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_request_state';
+
+  procedure gst_message_parse_request_state(message:PGstMessage; state:PGstState);cdecl;external gstreamerlib name 'gst_message_parse_request_state';
+
+  function gst_message_new_step_start(src:PGstObject; active:Tgboolean; format:TGstFormat; amount:Tguint64; rate:Tgdouble; 
+             flush:Tgboolean; intermediate:Tgboolean):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_step_start';
+
+  procedure gst_message_parse_step_start(message:PGstMessage; active:Pgboolean; format:PGstFormat; amount:Pguint64; rate:Pgdouble; 
+              flush:Pgboolean; intermediate:Pgboolean);cdecl;external gstreamerlib name 'gst_message_parse_step_start';
+
+  function gst_message_new_qos(src:PGstObject; live:Tgboolean; running_time:Tguint64; stream_time:Tguint64; timestamp:Tguint64; 
+             duration:Tguint64):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_qos';
+
+  procedure gst_message_set_qos_values(message:PGstMessage; jitter:Tgint64; proportion:Tgdouble; quality:Tgint);cdecl;external gstreamerlib name 'gst_message_set_qos_values';
+
+  procedure gst_message_set_qos_stats(message:PGstMessage; format:TGstFormat; processed:Tguint64; dropped:Tguint64);cdecl;external gstreamerlib name 'gst_message_set_qos_stats';
+
+  procedure gst_message_parse_qos(message:PGstMessage; live:Pgboolean; running_time:Pguint64; stream_time:Pguint64; timestamp:Pguint64; 
+              duration:Pguint64);cdecl;external gstreamerlib name 'gst_message_parse_qos';
+
+  procedure gst_message_parse_qos_values(message:PGstMessage; jitter:Pgint64; proportion:Pgdouble; quality:Pgint);cdecl;external gstreamerlib name 'gst_message_parse_qos_values';
+
+  procedure gst_message_parse_qos_stats(message:PGstMessage; format:PGstFormat; processed:Pguint64; dropped:Pguint64);cdecl;external gstreamerlib name 'gst_message_parse_qos_stats';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_message_new_progress(src:PGstObject; _type:TGstProgressType; code:Pgchar; text:Pgchar):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_progress';
+
+  procedure gst_message_parse_progress(message:PGstMessage; _type:PGstProgressType; code:PPgchar; text:PPgchar);cdecl;external gstreamerlib name 'gst_message_parse_progress';
+
+  function gst_message_new_toc(src:PGstObject; toc:PGstToc; updated:Tgboolean):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_toc';
+
+  procedure gst_message_parse_toc(message:PGstMessage; toc:PPGstToc; updated:Pgboolean);cdecl;external gstreamerlib name 'gst_message_parse_toc';
+
+  function gst_message_new_reset_time(src:PGstObject; running_time:TGstClockTime):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_reset_time';
+
+  procedure gst_message_parse_reset_time(message:PGstMessage; running_time:PGstClockTime);cdecl;external gstreamerlib name 'gst_message_parse_reset_time';
+
+  function gst_message_new_stream_start(src:PGstObject):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_stream_start';
+
+  procedure gst_message_set_group_id(message:PGstMessage; group_id:Tguint);cdecl;external gstreamerlib name 'gst_message_set_group_id';
+
+  function gst_message_parse_group_id(message:PGstMessage; group_id:Pguint):Tgboolean;cdecl;external gstreamerlib name 'gst_message_parse_group_id';
+
+(* Const before type ignored *)
+  function gst_message_new_need_context(src:PGstObject; context_type:Pgchar):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_need_context';
+
+(* Const before type ignored *)
+  function gst_message_parse_context_type(message:PGstMessage; context_type:PPgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_message_parse_context_type';
+
+  function gst_message_new_have_context(src:PGstObject; context:PGstContext):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_have_context';
+
+  procedure gst_message_parse_have_context(message:PGstMessage; context:PPGstContext);cdecl;external gstreamerlib name 'gst_message_parse_have_context';
+
+  function gst_message_new_device_added(src:PGstObject; device:PGstDevice):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_device_added';
+
+  procedure gst_message_parse_device_added(message:PGstMessage; device: PPGstDevice);cdecl;external gstreamerlib name 'gst_message_parse_device_added';
+
+  function gst_message_new_device_removed(src:PGstObject; device:PGstDevice):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_device_removed';
+
+  procedure gst_message_parse_device_removed(message:PGstMessage; device:PPGstDevice);cdecl;external gstreamerlib name 'gst_message_parse_device_removed';
+
+  function gst_message_new_device_changed(src:PGstObject; device:PGstDevice; changed_device:PGstDevice):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_device_changed';
+
+  procedure gst_message_parse_device_changed(message:PGstMessage; device:PPGstDevice; changed_device:PPGstDevice);cdecl;external gstreamerlib name 'gst_message_parse_device_changed';
+
+(* Const before type ignored *)
+  function gst_message_new_property_notify(src:PGstObject; property_name:Pgchar; val:PGValue):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_property_notify';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_message_parse_property_notify(message:PGstMessage; object_:PPGstObject; property_name:PPgchar; property_value:PPGValue);cdecl;external gstreamerlib name 'gst_message_parse_property_notify';
+
+  function gst_message_new_stream_collection(src:PGstObject; collection:PGstStreamCollection):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_stream_collection';
+
+  procedure gst_message_parse_stream_collection(message:PGstMessage; collection:PPGstStreamCollection);cdecl;external gstreamerlib name 'gst_message_parse_stream_collection';
+
+  function gst_message_new_streams_selected(src:PGstObject; collection:PGstStreamCollection):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_streams_selected';
+
+  procedure gst_message_streams_selected_add(message:PGstMessage; stream:PGstStream);cdecl;external gstreamerlib name 'gst_message_streams_selected_add';
+
+  procedure gst_message_parse_streams_selected(message:PGstMessage; collection:PPGstStreamCollection);cdecl;external gstreamerlib name 'gst_message_parse_streams_selected';
+
+  function gst_message_streams_selected_get_size(message:PGstMessage):Tguint;cdecl;external gstreamerlib name 'gst_message_streams_selected_get_size';
+
+  function gst_message_streams_selected_get_stream(message:PGstMessage; idx:Tguint):PGstStream;cdecl;external gstreamerlib name 'gst_message_streams_selected_get_stream';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_message_new_redirect(src:PGstObject; location:Pgchar; tag_list:PGstTagList; entry_struct:PGstStructure):PGstMessage;cdecl;external gstreamerlib name 'gst_message_new_redirect';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_message_add_redirect_entry(message:PGstMessage; location:Pgchar; tag_list:PGstTagList; entry_struct:PGstStructure);cdecl;external gstreamerlib name 'gst_message_add_redirect_entry';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_message_parse_redirect_entry(message:PGstMessage; entry_index:Tgsize; location:PPgchar; tag_list:PPGstTagList; entry_struct:PPGstStructure);cdecl;external gstreamerlib name 'gst_message_parse_redirect_entry';
+
+  function gst_message_get_num_redirect_entries(message:PGstMessage):Tgsize;cdecl;external gstreamerlib name 'gst_message_get_num_redirect_entries';
+
+
+  var
+    _gst_message_type : TGType;cvar;external;
+
+// Macros
+
+Function GST_TYPE_MESSAGE : TGType;
+function GST_IS_MESSAGE(obj : Pointer) : boolean;
+Function GST_MESSAGE_CAST(obj : Pointer) : PGstMessage;
+Function GST_MESSAGE(obj : Pointer) : PGstMessage;
+Function GST_MESSAGE_TYPE(message : PGStMessage) : TGstMessageType;
+function GST_MESSAGE_GET_LOCK(message : PGstmessage): PGMutex;
+procedure GST_MESSAGE_LOCK(message : PGstMessage);
+procedure GST_MESSAGE_UNLOCK(message : PGstMessage);
+function GST_MESSAGE_GET_COND(message : PGstmessage): PGCond;
+procedure GST_MESSAGE_WAIT(message : PGstMessage);
+procedure GST_MESSAGE_SIGNAL(message : PGSTMessage);
+
+// Inlinc
+function gst_message_ref (msg : PGstMessage) : PGstmessage;
+procedure gst_message_unref (msg : PGstMessage);
+function gst_message_copy (msg : PGstMessage) : PGstMessage;
+procedure gst_clear_message (msg_ptr : PPGstMessage);
+function gst_message_replace (old_message : PPGstMessage; new_message : PGstMessage) : gboolean;
+Function gst_message_take (old_message : PPGstMessage; new_message : PGstMessage) :gboolean;
+

+ 113 - 0
packages/gstreamer/src/gstmessage_impl.inc

@@ -0,0 +1,113 @@
+
+function gst_message_ref (msg : PGstMessage) : PGstmessage;
+
+begin
+   Result:=pGstMessage(gst_mini_object_ref(PGstMiniObject(msg)));
+end;
+
+procedure gst_message_unref (msg : PGstMessage);
+
+begin
+  gst_mini_object_unref(PGstMiniObject(msg));
+end;
+
+
+procedure gst_clear_message (msg_ptr : PPGstMessage);
+
+var
+  PP : PPGstMiniObject absolute msg_ptr;
+
+begin
+  if (msg_ptr<>Nil) then
+     if PP^<>Nil then
+       gst_mini_object_unref(PP^);
+end;
+
+
+function gst_message_copy (msg : PGstMessage) : PGstMessage;
+
+begin
+  Result:=PGstMessage(gst_mini_object_copy(PGstMiniObject(msg)));
+end;
+
+
+function gst_message_replace (old_message : PPGstMessage; new_message : PGstMessage) : gboolean;
+
+begin
+   Result:=gst_mini_object_replace (PPGstMiniObject(old_message), PGstMiniObject(new_message));
+end;
+
+
+Function gst_message_take (old_message : PPGstMessage; new_message : PGstMessage) :gboolean;
+begin
+   Result:=gst_mini_object_take(PPGstMiniObject(old_message),PGstMiniObject(new_message));
+end;
+
+Function GST_TYPE_MESSAGE : TGType;
+
+begin
+  Result:=_gst_message_type;
+end;
+
+function GST_IS_MESSAGE(obj : Pointer) : boolean;
+begin
+  Result:=G_TYPE_CHECK_INSTANCE_TYPE (obj, GST_TYPE_MESSAGE);
+end;
+
+Function GST_MESSAGE_CAST(obj : Pointer) : PGstMessage;
+
+begin
+  Result:=PGstMessage(obj)
+end;
+
+
+Function GST_MESSAGE(obj : Pointer) : PGstMessage;
+
+begin
+  Result:=GST_MESSAGE_CAST(obj);
+end;
+
+function GST_MESSAGE_GET_LOCK(message : PGstmessage): PGMutex;
+
+begin
+  Result:=@message^.lock;
+end;
+
+procedure GST_MESSAGE_LOCK(message : PGstMessage);
+
+begin
+  g_mutex_lock(GST_MESSAGE_GET_LOCK(message));
+end;
+
+procedure GST_MESSAGE_UNLOCK(message : PGstMessage);
+
+begin
+  g_mutex_unlock(GST_MESSAGE_GET_LOCK(message));
+end;
+
+
+function GST_MESSAGE_GET_COND(message : PGstmessage): PGCond;
+
+begin
+  Result:=@message^.cond;
+end;
+
+
+procedure GST_MESSAGE_WAIT(message : PGstMessage);
+
+begin
+  g_cond_wait(GST_MESSAGE_GET_COND(message),GST_MESSAGE_GET_LOCK(message))
+end;
+
+procedure GST_MESSAGE_SIGNAL(message : PGSTMessage);
+
+begin
+  g_cond_signal(GST_MESSAGE_GET_COND(message))
+end;
+
+Function GST_MESSAGE_TYPE(message : PGStMessage) : TGstMessageType;
+begin
+   Result:=message^._type;
+end;
+
+

+ 106 - 0
packages/gstreamer/src/gstmeta.inc

@@ -0,0 +1,106 @@
+{
+/* GStreamer
+ * Copyright (C) 2009 Wim Taymans <[email protected]>
+ *
+ * gstmeta.h: Header for Metadata structures
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstMetaInfo  = ^T_GstMetaInfo;
+    PGstMeta  = ^TGstMeta;
+    PPGstMeta = ^PGstMeta;
+    PGstMetaInfo  = ^TGstMetaInfo;
+    PGstMetaTransformCopy  = ^TGstMetaTransformCopy;
+
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+    TGstMetaInitFunction = function (meta:PGstMeta; params:Tgpointer; buffer:PGstBuffer):Tgboolean;cdecl;
+    TGstMetaFreeFunction = procedure (meta:PGstMeta; buffer:PGstBuffer);cdecl;
+    TGstMetaTransformCopy = record
+        region : Tgboolean;
+        offset : Tgsize;
+        size : Tgsize;
+      end;
+
+    TGstMetaTransformFunction = function (transbuf:PGstBuffer; meta:PGstMeta; buffer:PGstBuffer; _type:TGQuark; data:Tgpointer):Tgboolean;cdecl;
+    T_GstMetaInfo = record
+        api : TGType;
+        _type : TGType;
+        size : Tgsize;
+        init_func : TGstMetaInitFunction;
+        free_func : TGstMetaFreeFunction;
+        transform_func : TGstMetaTransformFunction;
+      end;
+    TGstMetaInfo = T_GstMetaInfo;
+
+    TGstMetaFlags = (
+      GST_META_FLAG_NONE := 0,
+      GST_META_FLAG_READONLY := 1 shl 0,
+      GST_META_FLAG_POOLED := 1 shl 1,
+      GST_META_FLAG_LOCKED := 1 shl 2,
+      GST_META_FLAG_LAST := 1 shl 16);
+
+     P_GstMeta  = ^T_GstMeta;
+     PGstMetaFlags  = ^TGstMetaFlags;
+     T_GstMeta = record
+         flags : TGstMetaFlags;
+         info : PGstMetaInfo;
+     end;
+     TGstMeta = T_GstMeta;
+
+
+var
+  _gst_meta_transform_copy : TGQuark;cvar;external;
+
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+
+  function gst_meta_api_type_register(api:Pgchar; tags:PPgchar):TGType;cdecl;external gstreamerlib name 'gst_meta_api_type_register';
+
+  function gst_meta_api_type_has_tag(api:TGType; tag:TGQuark):Tgboolean;cdecl;external gstreamerlib name 'gst_meta_api_type_has_tag';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_meta_register(api:TGType; impl:Pgchar; size:Tgsize; init_func:TGstMetaInitFunction; free_func:TGstMetaFreeFunction; 
+             transform_func:TGstMetaTransformFunction):PGstMetaInfo;cdecl;external gstreamerlib name 'gst_meta_register';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_meta_get_info(impl:Pgchar):PGstMetaInfo;cdecl;external gstreamerlib name 'gst_meta_get_info';
+
+(* Const before type ignored *)
+(* Const before declarator ignored *)
+  function gst_meta_api_type_get_tags(api:TGType):PPgchar;cdecl;external gstreamerlib name 'gst_meta_api_type_get_tags';
+
+(* Const before type ignored *)
+  function gst_meta_get_seqnum(meta:PGstMeta):Tguint64;cdecl;external gstreamerlib name 'gst_meta_get_seqnum';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_meta_compare_seqnum(meta1:PGstMeta; meta2:PGstMeta):Tgint;cdecl;external gstreamerlib name 'gst_meta_compare_seqnum';
+
+
+    var
+      _gst_meta_tag_memory : TGQuark;cvar;external;
+

+ 87 - 0
packages/gstreamer/src/gstminiobject.inc

@@ -0,0 +1,87 @@
+{
+/* GStreamer
+ * Copyright (C) 2005 David Schleef <[email protected]>
+ *
+ * gstminiobject.h: Header for GstMiniObject
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstMiniObject  = ^T_GstMiniObject;
+    PGstLockFlags  = ^TGstLockFlags;
+//    PGstMiniObject  = ^TGstMiniObject;
+    PGstMiniObjectCopyFunction  = ^TGstMiniObjectCopyFunction;
+    PGstMiniObjectFlags  = ^TGstMiniObjectFlags;
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+(* Const before type ignored *)
+
+
+
+    TGstLockFlags = (
+      GST_LOCK_FLAG_READ := 1 shl 0,
+      GST_LOCK_FLAG_WRITE := 1 shl 1,
+      GST_LOCK_FLAG_EXCLUSIVE := 1 shl 2,
+      GST_LOCK_FLAG_LAST := 1 shl 8
+      );
+
+
+  procedure gst_mini_object_init(mini_object:PGstMiniObject; flags:Tguint; _type:TGType; copy_func:TGstMiniObjectCopyFunction; dispose_func:TGstMiniObjectDisposeFunction; 
+              free_func:TGstMiniObjectFreeFunction);cdecl;external gstreamerlib name 'gst_mini_object_init';
+
+  function gst_mini_object_ref(mini_object:PGstMiniObject):PGstMiniObject;cdecl;external gstreamerlib name 'gst_mini_object_ref';
+
+  procedure gst_mini_object_unref(mini_object:PGstMiniObject);cdecl;external gstreamerlib name 'gst_mini_object_unref';
+
+  procedure gst_clear_mini_object(object_ptr:PPGstMiniObject);cdecl;external gstreamerlib name 'gst_clear_mini_object';
+
+  procedure gst_mini_object_weak_ref(object_:PGstMiniObject; notify:TGstMiniObjectNotify; data:Tgpointer);cdecl;external gstreamerlib name 'gst_mini_object_weak_ref';
+
+  procedure gst_mini_object_weak_unref(object_:PGstMiniObject; notify:TGstMiniObjectNotify; data:Tgpointer);cdecl;external gstreamerlib name 'gst_mini_object_weak_unref';
+
+  function gst_mini_object_lock(object_:PGstMiniObject; flags:TGstLockFlags):Tgboolean;cdecl;external gstreamerlib name 'gst_mini_object_lock';
+
+  procedure gst_mini_object_unlock(object_:PGstMiniObject; flags:TGstLockFlags);cdecl;external gstreamerlib name 'gst_mini_object_unlock';
+
+(* Const before type ignored *)
+  function gst_mini_object_is_writable(mini_object:PGstMiniObject):Tgboolean;cdecl;external gstreamerlib name 'gst_mini_object_is_writable';
+
+  function gst_mini_object_make_writable(mini_object:PGstMiniObject):PGstMiniObject;cdecl;external gstreamerlib name 'gst_mini_object_make_writable';
+
+(* Const before type ignored *)
+  function gst_mini_object_copy(mini_object:PGstMiniObject):PGstMiniObject;cdecl;external gstreamerlib name 'gst_mini_object_copy';
+
+  procedure gst_mini_object_set_qdata(object_:PGstMiniObject; quark:TGQuark; data:Tgpointer; destroy:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_mini_object_set_qdata';
+
+  function gst_mini_object_get_qdata(object_:PGstMiniObject; quark:TGQuark):Tgpointer;cdecl;external gstreamerlib name 'gst_mini_object_get_qdata';
+
+  function gst_mini_object_steal_qdata(object_:PGstMiniObject; quark:TGQuark):Tgpointer;cdecl;external gstreamerlib name 'gst_mini_object_steal_qdata';
+
+  procedure gst_mini_object_add_parent(object_:PGstMiniObject; parent:PGstMiniObject);cdecl;external gstreamerlib name 'gst_mini_object_add_parent';
+
+  procedure gst_mini_object_remove_parent(object_:PGstMiniObject; parent:PGstMiniObject);cdecl;external gstreamerlib name 'gst_mini_object_remove_parent';
+
+  function gst_mini_object_replace(olddata:PPGstMiniObject; newdata:PGstMiniObject):Tgboolean;cdecl;external gstreamerlib name 'gst_mini_object_replace';
+
+  function gst_mini_object_take(olddata:PPGstMiniObject; newdata:PGstMiniObject):Tgboolean;cdecl;external gstreamerlib name 'gst_mini_object_take';
+
+  function gst_mini_object_steal(olddata:PPGstMiniObject):PGstMiniObject;cdecl;external gstreamerlib name 'gst_mini_object_steal';
+
+

+ 124 - 0
packages/gstreamer/src/gstobject.inc

@@ -0,0 +1,124 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *                    2005 Wim Taymans <[email protected]>
+ *
+ * gstobject.h: Header for base GstObject
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+}
+  Type
+    PGstObject_autoptr  = ^TGstObject_autoptr;
+    PGstObject_listautoptr  = ^TGstObject_listautoptr;
+    PGstObject_queueautoptr  = ^TGstObject_queueautoptr;
+    PGstObject_slistautoptr  = ^TGstObject_slistautoptr;
+
+    TGstObject_autoptr = PGstObject;
+    TGstObject_listautoptr = PGList;
+    TGstObject_slistautoptr = PGSList;
+    TGstObject_queueautoptr = PGQueue;
+
+  PGstObjectFlags = ^TGstObjectFlags;
+  TGstObjectFlags = (
+    GST_OBJECT_FLAG_MAY_BE_LEAKED := 1 shl 0,
+    GST_OBJECT_FLAG_LAST_ := 1 shl 4
+  );
+  // T_GstObject moved to gstrec.inc
+  // TGstObject moved to gstrec.inc
+  // P_GstObject moved to gstrec.inc
+
+
+(* Const before type ignored *)
+
+
+
+function gst_object_get_type:TGType;cdecl;external gstreamerlib name 'gst_object_get_type';
+
+(* Const before type ignored *)
+function gst_object_set_name(object_:PGstObject; name:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_object_set_name';
+
+function gst_object_get_name(object_:PGstObject):Pgchar;cdecl;external gstreamerlib name 'gst_object_get_name';
+
+function gst_object_set_parent(object_:PGstObject; parent:PGstObject):Tgboolean;cdecl;external gstreamerlib name 'gst_object_set_parent';
+
+function gst_object_get_parent(object_:PGstObject):PGstObject;cdecl;external gstreamerlib name 'gst_object_get_parent';
+
+procedure gst_object_unparent(object_:PGstObject);cdecl;external gstreamerlib name 'gst_object_unparent';
+
+function gst_object_has_as_parent(object_:PGstObject; parent:PGstObject):Tgboolean;cdecl;external gstreamerlib name 'gst_object_has_as_parent';
+
+function gst_object_has_as_ancestor(object_:PGstObject; ancestor:PGstObject):Tgboolean;cdecl;external gstreamerlib name 'gst_object_has_as_ancestor';
+
+function gst_object_has_ancestor(object_:PGstObject; ancestor:PGstObject):Tgboolean;cdecl;external gstreamerlib name 'gst_object_has_ancestor';
+
+procedure gst_object_default_deep_notify(object_:PGObject; orig:PGstObject; pspec:PGParamSpec; excluded_props:PPgchar);cdecl;external gstreamerlib name 'gst_object_default_deep_notify';
+
+function gst_object_ref(object_:Tgpointer):Tgpointer;cdecl;external gstreamerlib name 'gst_object_ref';
+
+procedure gst_object_unref(object_:Tgpointer);cdecl;external gstreamerlib name 'gst_object_unref';
+
+procedure gst_clear_object(object_ptr:PPGstObject);cdecl;external gstreamerlib name 'gst_clear_object';
+
+function gst_object_ref_sink(object_:Tgpointer):Tgpointer;cdecl;external gstreamerlib name 'gst_object_ref_sink';
+
+function gst_object_replace(oldobj:PPGstObject; newobj:PGstObject):Tgboolean;cdecl;external gstreamerlib name 'gst_object_replace';
+
+function gst_object_get_path_string(object_:PGstObject):Pgchar;cdecl;external gstreamerlib name 'gst_object_get_path_string';
+
+(* Const before type ignored *)
+function gst_object_check_uniqueness(list:PGList; name:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_object_check_uniqueness';
+
+
+
+
+  function gst_object_suggest_next_sync(object_:PGstObject):TGstClockTime;cdecl;external gstreamerlib name 'gst_object_suggest_next_sync';
+
+  function gst_object_sync_values(object_:PGstObject; timestamp:TGstClockTime):Tgboolean;cdecl;external gstreamerlib name 'gst_object_sync_values';
+
+  function gst_object_has_active_control_bindings(object_:PGstObject):Tgboolean;cdecl;external gstreamerlib name 'gst_object_has_active_control_bindings';
+
+  procedure gst_object_set_control_bindings_disabled(object_:PGstObject; disabled:Tgboolean);cdecl;external gstreamerlib name 'gst_object_set_control_bindings_disabled';
+
+(* Const before type ignored *)
+  procedure gst_object_set_control_binding_disabled(object_:PGstObject; property_name:Pgchar; disabled:Tgboolean);cdecl;external gstreamerlib name 'gst_object_set_control_binding_disabled';
+
+  function gst_object_add_control_binding(object_:PGstObject; binding:PGstControlBinding):Tgboolean;cdecl;external gstreamerlib name 'gst_object_add_control_binding';
+
+(* Const before type ignored *)
+  function gst_object_get_control_binding(object_:PGstObject; property_name:Pgchar):PGstControlBinding;cdecl;external gstreamerlib name 'gst_object_get_control_binding';
+
+  function gst_object_remove_control_binding(object_:PGstObject; binding:PGstControlBinding):Tgboolean;cdecl;external gstreamerlib name 'gst_object_remove_control_binding';
+
+(* Const before type ignored *)
+  function gst_object_get_value(object_:PGstObject; property_name:Pgchar; timestamp:TGstClockTime):PGValue;cdecl;external gstreamerlib name 'gst_object_get_value';
+
+(* Const before type ignored *)
+  function gst_object_get_value_array(object_:PGstObject; property_name:Pgchar; timestamp:TGstClockTime; interval:TGstClockTime; n_values:Tguint; 
+             values:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_object_get_value_array';
+
+(* Const before type ignored *)
+  function gst_object_get_g_value_array(object_:PGstObject; property_name:Pgchar; timestamp:TGstClockTime; interval:TGstClockTime; n_values:Tguint; 
+             values:PGValue):Tgboolean;cdecl;external gstreamerlib name 'gst_object_get_g_value_array';
+
+  function gst_object_get_control_rate(object_:PGstObject):TGstClockTime;cdecl;external gstreamerlib name 'gst_object_get_control_rate';
+
+  procedure gst_object_set_control_rate(object_:PGstObject; control_rate:TGstClockTime);cdecl;external gstreamerlib name 'gst_object_set_control_rate';
+
+
+
+

+ 275 - 0
packages/gstreamer/src/gstpad.inc

@@ -0,0 +1,275 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *
+ * gstpad.h: Header for GstPad object
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+}
+  Type
+    P_GstPad  = ^T_GstPad;
+    P_GstPadClass  = ^T_GstPadClass;
+    P_GstPadProbeInfo  = ^T_GstPadProbeInfo;
+    PGstFlowReturn  = ^TGstFlowReturn;
+    PGstPad_autoptr  = ^TGstPad_autoptr;
+    PGstPad_listautoptr  = ^TGstPad_listautoptr;
+    PGstPad_queueautoptr  = ^TGstPad_queueautoptr;
+    PGstPad_slistautoptr  = ^TGstPad_slistautoptr;
+    PGstPadFlags  = ^TGstPadFlags;
+    PGstPadIterIntLinkFunction  = ^TGstPadIterIntLinkFunction;
+    PGstPadLinkCheck  = ^TGstPadLinkCheck;
+    PGstPadProbeInfo  = ^TGstPadProbeInfo;
+    PGstPadProbeReturn  = ^TGstPadProbeReturn;
+    PGstPadProbeType  = ^TGstPadProbeType;
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+
+  TGstPadProbeType = (
+    GST_PAD_PROBE_TYPE_INVALID := 0,
+    GST_PAD_PROBE_TYPE_IDLE := 1 shl 0,
+    GST_PAD_PROBE_TYPE_BLOCK := 1 shl 1,
+    GST_PAD_PROBE_TYPE_BUFFER := 1 shl 4,
+    GST_PAD_PROBE_TYPE_BUFFER_LIST := 1 shl 5,
+    GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM := 1 shl 6,
+    GST_PAD_PROBE_TYPE_EVENT_UPSTREAM := 1 shl 7,
+    GST_PAD_PROBE_TYPE_EVENT_FLUSH := 1 shl 8,
+    GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM := 1 shl 9,
+    GST_PAD_PROBE_TYPE_QUERY_UPSTREAM := 1 shl 10,
+    GST_PAD_PROBE_TYPE_PUSH := 1 shl 12,
+    GST_PAD_PROBE_TYPE_PULL := 1 shl 13,
+    GST_PAD_PROBE_TYPE_BLOCKING := Ord(GST_PAD_PROBE_TYPE_IDLE) or Ord(GST_PAD_PROBE_TYPE_BLOCK),
+    GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM := Ord(GST_PAD_PROBE_TYPE_BUFFER) or Ord(GST_PAD_PROBE_TYPE_BUFFER_LIST) or Ord(GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM),
+    GST_PAD_PROBE_TYPE_DATA_UPSTREAM := Ord(GST_PAD_PROBE_TYPE_EVENT_UPSTREAM),
+    GST_PAD_PROBE_TYPE_DATA_BOTH := Ord(GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM) or Ord(GST_PAD_PROBE_TYPE_DATA_UPSTREAM),
+    GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM := Ord(GST_PAD_PROBE_TYPE_BLOCK) or Ord(GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM),
+    GST_PAD_PROBE_TYPE_BLOCK_UPSTREAM := Ord(GST_PAD_PROBE_TYPE_BLOCK) or Ord(GST_PAD_PROBE_TYPE_DATA_UPSTREAM),
+    GST_PAD_PROBE_TYPE_EVENT_BOTH := Ord(GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) or Ord(GST_PAD_PROBE_TYPE_EVENT_UPSTREAM),
+    GST_PAD_PROBE_TYPE_QUERY_BOTH := Ord(GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM) or Ord(GST_PAD_PROBE_TYPE_QUERY_UPSTREAM),
+    GST_PAD_PROBE_TYPE_ALL_BOTH := Ord(GST_PAD_PROBE_TYPE_DATA_BOTH) or Ord(GST_PAD_PROBE_TYPE_QUERY_BOTH),
+    GST_PAD_PROBE_TYPE_SCHEDULING := Ord(GST_PAD_PROBE_TYPE_PUSH) or Ord(GST_PAD_PROBE_TYPE_PULL)
+    );
+
+  TGstPadProbeReturn = (GST_PAD_PROBE_DROP,GST_PAD_PROBE_OK,GST_PAD_PROBE_REMOVE,
+    GST_PAD_PROBE_PASS,GST_PAD_PROBE_HANDLED
+    );
+  T_GstPadProbeInfo = record
+      _type : TGstPadProbeType;
+      id : Tgulong;
+      data : Tgpointer;
+      offset : Tguint64;
+      size : Tguint;
+      ABI : record
+          case longint of
+            0 : ( _gst_reserved : array[0..3] of Tgpointer );
+            1 : ( abi : record
+                flow_ret : TGstFlowReturn;
+              end );
+          end;
+    end;
+  TGstPadProbeInfo = T_GstPadProbeInfo;
+
+  TGstPadProbeCallback = function (pad:PGstPad; info:PGstPadProbeInfo; user_data:Tgpointer):TGstPadProbeReturn;cdecl;
+
+  TGstPadStickyEventsForeachFunction = function (pad:PGstPad; event:PPGstEvent; user_data:Tgpointer):Tgboolean;cdecl;
+
+
+  TGstPadFlags = (GST_PAD_FLAG_BLOCKED := GST_OBJECT_FLAG_LAST shl 0,GST_PAD_FLAG_FLUSHING := GST_OBJECT_FLAG_LAST shl 1,
+    GST_PAD_FLAG_EOS := GST_OBJECT_FLAG_LAST shl 2,GST_PAD_FLAG_BLOCKING := GST_OBJECT_FLAG_LAST shl 3,
+    GST_PAD_FLAG_NEED_PARENT := GST_OBJECT_FLAG_LAST shl 4,GST_PAD_FLAG_NEED_RECONFIGURE := GST_OBJECT_FLAG_LAST shl 5,
+    GST_PAD_FLAG_PENDING_EVENTS := GST_OBJECT_FLAG_LAST shl 6,GST_PAD_FLAG_FIXED_CAPS := GST_OBJECT_FLAG_LAST shl 7,
+    GST_PAD_FLAG_PROXY_CAPS := GST_OBJECT_FLAG_LAST shl 8,GST_PAD_FLAG_PROXY_ALLOCATION := GST_OBJECT_FLAG_LAST shl 9,
+    GST_PAD_FLAG_PROXY_SCHEDULING := GST_OBJECT_FLAG_LAST shl 10,
+    GST_PAD_FLAG_ACCEPT_INTERSECT := GST_OBJECT_FLAG_LAST shl 11,
+    GST_PAD_FLAG_ACCEPT_TEMPLATE := GST_OBJECT_FLAG_LAST shl 12,GST_PAD_FLAG_LAST := GST_OBJECT_FLAG_LAST shl 16
+    );
+
+
+  T_GstPadClass = record
+      parent_class : TGstObjectClass;
+      linked : procedure (pad:PGstPad; peer:PGstPad);cdecl;
+      unlinked : procedure (pad:PGstPad; peer:PGstPad);cdecl;
+      _gst_reserved : array[0..3] of Tgpointer;
+    end;
+  TGstPadClass = T_GstPadClass;
+
+  TGstPad_autoptr = PGstPad;
+
+  TGstPad_listautoptr = PGList;
+
+  TGstPad_slistautoptr = PGSList;
+
+  TGstPad_queueautoptr = PGQueue;
+
+
+  function gst_flow_get_name(ret:TGstFlowReturn):Pgchar;cdecl;external gstreamerlib name 'gst_flow_get_name';
+
+  function gst_flow_to_quark(ret:TGstFlowReturn):TGQuark;cdecl;external gstreamerlib name 'gst_flow_to_quark';
+
+(* Const before type ignored *)
+  function gst_pad_link_get_name(ret:TGstPadLinkReturn):Pgchar;cdecl;external gstreamerlib name 'gst_pad_link_get_name';
+
+
+
+
+  function gst_pad_probe_info_get_event(info:PGstPadProbeInfo):PGstEvent;cdecl;external gstreamerlib name 'gst_pad_probe_info_get_event';
+
+  function gst_pad_probe_info_get_query(info:PGstPadProbeInfo):PGstQuery;cdecl;external gstreamerlib name 'gst_pad_probe_info_get_query';
+
+  function gst_pad_probe_info_get_buffer(info:PGstPadProbeInfo):PGstBuffer;cdecl;external gstreamerlib name 'gst_pad_probe_info_get_buffer';
+
+  function gst_pad_probe_info_get_buffer_list(info:PGstPadProbeInfo):PGstBufferList;cdecl;external gstreamerlib name 'gst_pad_probe_info_get_buffer_list';
+
+
+
+
+  function gst_pad_get_type:TGType;cdecl;external gstreamerlib name 'gst_pad_get_type';
+
+(* Const before type ignored *)
+  function gst_pad_new(name:Pgchar; direction:TGstPadDirection):PGstPad;cdecl;external gstreamerlib name 'gst_pad_new';
+
+(* Const before type ignored *)
+  function gst_pad_new_from_template(templ:PGstPadTemplate; name:Pgchar):PGstPad;cdecl;external gstreamerlib name 'gst_pad_new_from_template';
+
+(* Const before type ignored *)
+  function gst_pad_new_from_static_template(templ:PGstStaticPadTemplate; name:Pgchar):PGstPad;cdecl;external gstreamerlib name 'gst_pad_new_from_static_template';
+
+  function gst_pad_get_direction(pad:PGstPad):TGstPadDirection;cdecl;external gstreamerlib name 'gst_pad_get_direction';
+
+  function gst_pad_set_active(pad:PGstPad; active:Tgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_set_active';
+
+  function gst_pad_is_active(pad:PGstPad):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_is_active';
+
+  function gst_pad_activate_mode(pad:PGstPad; mode:TGstPadMode; active:Tgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_activate_mode';
+
+  function gst_pad_add_probe(pad:PGstPad; mask:TGstPadProbeType; callback:TGstPadProbeCallback; user_data:Tgpointer; destroy_data:TGDestroyNotify):Tgulong;cdecl;external gstreamerlib name 'gst_pad_add_probe';
+
+  procedure gst_pad_remove_probe(pad:PGstPad; id:Tgulong);cdecl;external gstreamerlib name 'gst_pad_remove_probe';
+
+  function gst_pad_is_blocked(pad:PGstPad):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_is_blocked';
+
+  function gst_pad_is_blocking(pad:PGstPad):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_is_blocking';
+
+  procedure gst_pad_mark_reconfigure(pad:PGstPad);cdecl;external gstreamerlib name 'gst_pad_mark_reconfigure';
+
+  function gst_pad_needs_reconfigure(pad:PGstPad):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_needs_reconfigure';
+
+  function gst_pad_check_reconfigure(pad:PGstPad):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_check_reconfigure';
+
+  procedure gst_pad_set_element_private(pad:PGstPad; priv:Tgpointer);cdecl;external gstreamerlib name 'gst_pad_set_element_private';
+
+  function gst_pad_get_element_private(pad:PGstPad):Tgpointer;cdecl;external gstreamerlib name 'gst_pad_get_element_private';
+
+  function gst_pad_get_pad_template(pad:PGstPad):PGstPadTemplate;cdecl;external gstreamerlib name 'gst_pad_get_pad_template';
+
+  function gst_pad_store_sticky_event(pad:PGstPad; event:PGstEvent):TGstFlowReturn;cdecl;external gstreamerlib name 'gst_pad_store_sticky_event';
+
+  function gst_pad_get_sticky_event(pad:PGstPad; event_type:TGstEventType; idx:Tguint):PGstEvent;cdecl;external gstreamerlib name 'gst_pad_get_sticky_event';
+
+  procedure gst_pad_sticky_events_foreach(pad:PGstPad; foreach_func:TGstPadStickyEventsForeachFunction; user_data:Tgpointer);cdecl;external gstreamerlib name 'gst_pad_sticky_events_foreach';
+
+  procedure gst_pad_set_activate_function_full(pad:PGstPad; activate:TGstPadActivateFunction; user_data:Tgpointer; notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_pad_set_activate_function_full';
+
+  procedure gst_pad_set_activatemode_function_full(pad:PGstPad; activatemode:TGstPadActivateModeFunction; user_data:Tgpointer; notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_pad_set_activatemode_function_full';
+
+  procedure gst_pad_set_chain_function_full(pad:PGstPad; chain:TGstPadChainFunction; user_data:Tgpointer; notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_pad_set_chain_function_full';
+
+  procedure gst_pad_set_chain_list_function_full(pad:PGstPad; chainlist:TGstPadChainListFunction; user_data:Tgpointer; notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_pad_set_chain_list_function_full';
+
+  procedure gst_pad_set_getrange_function_full(pad:PGstPad; get:TGstPadGetRangeFunction; user_data:Tgpointer; notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_pad_set_getrange_function_full';
+
+  procedure gst_pad_set_event_function_full(pad:PGstPad; event:TGstPadEventFunction; user_data:Tgpointer; notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_pad_set_event_function_full';
+
+  procedure gst_pad_set_event_full_function_full(pad:PGstPad; event:TGstPadEventFullFunction; user_data:Tgpointer; notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_pad_set_event_full_function_full';
+
+  procedure gst_pad_set_link_function_full(pad:PGstPad; link:TGstPadLinkFunction; user_data:Tgpointer; notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_pad_set_link_function_full';
+
+  procedure gst_pad_set_unlink_function_full(pad:PGstPad; unlink:TGstPadUnlinkFunction; user_data:Tgpointer; notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_pad_set_unlink_function_full';
+
+  function gst_pad_can_link(srcpad:PGstPad; sinkpad:PGstPad):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_can_link';
+
+  function gst_pad_link(srcpad:PGstPad; sinkpad:PGstPad):TGstPadLinkReturn;cdecl;external gstreamerlib name 'gst_pad_link';
+
+  function gst_pad_link_full(srcpad:PGstPad; sinkpad:PGstPad; flags:TGstPadLinkCheck):TGstPadLinkReturn;cdecl;external gstreamerlib name 'gst_pad_link_full';
+
+  function gst_pad_unlink(srcpad:PGstPad; sinkpad:PGstPad):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_unlink';
+
+  function gst_pad_is_linked(pad:PGstPad):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_is_linked';
+
+  function gst_pad_get_peer(pad:PGstPad):PGstPad;cdecl;external gstreamerlib name 'gst_pad_get_peer';
+
+  function gst_pad_get_pad_template_caps(pad:PGstPad):PGstCaps;cdecl;external gstreamerlib name 'gst_pad_get_pad_template_caps';
+
+  function gst_pad_get_current_caps(pad:PGstPad):PGstCaps;cdecl;external gstreamerlib name 'gst_pad_get_current_caps';
+
+  function gst_pad_has_current_caps(pad:PGstPad):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_has_current_caps';
+
+  function gst_pad_get_allowed_caps(pad:PGstPad):PGstCaps;cdecl;external gstreamerlib name 'gst_pad_get_allowed_caps';
+
+  function gst_pad_get_offset(pad:PGstPad):Tgint64;cdecl;external gstreamerlib name 'gst_pad_get_offset';
+
+  procedure gst_pad_set_offset(pad:PGstPad; offset:Tgint64);cdecl;external gstreamerlib name 'gst_pad_set_offset';
+
+  function gst_pad_push(pad:PGstPad; buffer:PGstBuffer):TGstFlowReturn;cdecl;external gstreamerlib name 'gst_pad_push';
+
+  function gst_pad_push_list(pad:PGstPad; list:PGstBufferList):TGstFlowReturn;cdecl;external gstreamerlib name 'gst_pad_push_list';
+
+  function gst_pad_pull_range(pad:PGstPad; offset:Tguint64; size:Tguint; buffer:PPGstBuffer):TGstFlowReturn;cdecl;external gstreamerlib name 'gst_pad_pull_range';
+
+  function gst_pad_push_event(pad:PGstPad; event:PGstEvent):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_push_event';
+
+  function gst_pad_event_default(pad:PGstPad; parent:PGstObject; event:PGstEvent):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_event_default';
+
+  function gst_pad_get_last_flow_return(pad:PGstPad):TGstFlowReturn;cdecl;external gstreamerlib name 'gst_pad_get_last_flow_return';
+
+  function gst_pad_chain(pad:PGstPad; buffer:PGstBuffer):TGstFlowReturn;cdecl;external gstreamerlib name 'gst_pad_chain';
+
+  function gst_pad_chain_list(pad:PGstPad; list:PGstBufferList):TGstFlowReturn;cdecl;external gstreamerlib name 'gst_pad_chain_list';
+
+  function gst_pad_get_range(pad:PGstPad; offset:Tguint64; size:Tguint; buffer:PPGstBuffer):TGstFlowReturn;cdecl;external gstreamerlib name 'gst_pad_get_range';
+
+  function gst_pad_send_event(pad:PGstPad; event:PGstEvent):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_send_event';
+
+  function gst_pad_start_task(pad:PGstPad; func:TGstTaskFunction; user_data:Tgpointer; notify:TGDestroyNotify):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_start_task';
+
+  function gst_pad_pause_task(pad:PGstPad):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_pause_task';
+
+  function gst_pad_stop_task(pad:PGstPad):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_stop_task';
+
+  function gst_pad_get_task_state(pad:PGstPad):TGstTaskState;cdecl;external gstreamerlib name 'gst_pad_get_task_state';
+
+  procedure gst_pad_set_iterate_internal_links_function_full(pad:PGstPad; iterintlink:TGstPadIterIntLinkFunction; user_data:Tgpointer; notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_pad_set_iterate_internal_links_function_full';
+
+  function gst_pad_iterate_internal_links(pad:PGstPad):PGstIterator;cdecl;external gstreamerlib name 'gst_pad_iterate_internal_links';
+
+  function gst_pad_iterate_internal_links_default(pad:PGstPad; parent:PGstObject):PGstIterator;cdecl;external gstreamerlib name 'gst_pad_iterate_internal_links_default';
+
+  function gst_pad_query(pad:PGstPad; query:PGstQuery):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_query';
+
+  function gst_pad_peer_query(pad:PGstPad; query:PGstQuery):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_peer_query';
+
+  procedure gst_pad_set_query_function_full(pad:PGstPad; query:TGstPadQueryFunction; user_data:Tgpointer; notify:TGDestroyNotify);cdecl;external gstreamerlib name 'gst_pad_set_query_function_full';
+
+  function gst_pad_query_default(pad:PGstPad; parent:PGstObject; query:PGstQuery):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_query_default';
+
+  function gst_pad_forward(pad:PGstPad; forward:TGstPadForwardFunction; user_data:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_forward';
+
+

+ 187 - 0
packages/gstreamer/src/gstpadtemplate.inc

@@ -0,0 +1,187 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *
+ * gstpadtemplate.h: Header for GstPadTemplate object
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+
+Type
+  P_GstPadTemplate  = ^T_GstPadTemplate;
+  P_GstPadTemplateClass  = ^T_GstPadTemplateClass;
+  P_GstStaticPadTemplate  = ^T_GstStaticPadTemplate;
+  PGstPadPresence  = ^TGstPadPresence;
+  PGstPadTemplate  = ^TGstPadTemplate;
+  PGstPadTemplate_autoptr  = ^TGstPadTemplate_autoptr;
+  PGstPadTemplate_listautoptr  = ^TGstPadTemplate_listautoptr;
+  PGstPadTemplate_queueautoptr  = ^TGstPadTemplate_queueautoptr;
+  PGstPadTemplate_slistautoptr  = ^TGstPadTemplate_slistautoptr;
+  PGstPadTemplateFlags  = ^TGstPadTemplateFlags;
+  PGstStaticPadTemplate  = ^TGstStaticPadTemplate;
+
+
+
+  TGstPadPresence = (
+    GST_PAD_ALWAYS,
+    GST_PAD_SOMETIMES,
+    GST_PAD_REQUEST
+  );
+
+  TGstPadTemplateFlags = (
+    GST_PAD_TEMPLATE_FLAG_LAST := GST_OBJECT_FLAG_LAST shl 4
+  );
+
+  PGstPad = ^TGstPad;
+
+  TGstPadActivateFunction = function (pad:PGstPad; parent:PGstObject):Tgboolean;cdecl;
+  TGstPadActivateModeFunction = function (pad:PGstPad; parent:PGstObject; mode:TGstPadMode; active:Tgboolean):Tgboolean;cdecl;
+  TGstPadChainFunction = function (pad:PGstPad; parent:PGstObject; buffer:PGstBuffer):TGstFlowReturn;cdecl;
+  TGstPadChainListFunction = function (pad:PGstPad; parent:PGstObject; list:PGstBufferList):TGstFlowReturn;cdecl;
+  TGstPadGetRangeFunction = function (pad:PGstPad; parent:PGstObject; offset:Tguint64; length:Tguint; buffer:PPGstBuffer):TGstFlowReturn;cdecl;
+  TGstPadEventFunction = function (pad:PGstPad; parent:PGstObject; event: PGstEvent):Tgboolean;cdecl;
+  TGstPadEventFullFunction = function (pad:PGstPad; parent:PGstObject; event:PGstEvent):TGstFlowReturn;cdecl;
+
+  TGstPadIterIntLinkFunction = function (pad:PGstPad; parent:PGstObject):PGstIterator;cdecl;
+
+  TGstPadQueryFunction = function (pad:PGstPad; parent:PGstObject; query:PGstQuery):Tgboolean;cdecl;
+
+  TGstPadLinkFunction = function (pad:PGstPad; parent:PGstObject; peer:PGstPad):TGstPadLinkReturn;cdecl;
+
+  TGstPadUnlinkFunction = procedure (pad:PGstPad; parent:PGstObject);cdecl;
+
+  TGstPadForwardFunction = function (pad:PGstPad; user_data:Tgpointer):Tgboolean;cdecl;
+
+
+  T_GstPadPrivate = record end;
+  TGstPadPrivate = T_GstPadPrivate;
+  PGstPadPrivate = ^TGstPadPrivate;
+
+  T_GstPad = record
+      object_ : TGstObject;
+      element_private : Tgpointer;
+      padtemplate : PGstPadTemplate;
+      direction : TGstPadDirection;
+      stream_rec_lock : TGRecMutex;
+      task : PGstTask;
+      block_cond : TGCond;
+      probes : TGHookList;
+      mode : TGstPadMode;
+      activatefunc : TGstPadActivateFunction;
+      activatedata : Tgpointer;
+      activatenotify : TGDestroyNotify;
+      activatemodefunc : TGstPadActivateModeFunction;
+      activatemodedata : Tgpointer;
+      activatemodenotify : TGDestroyNotify;
+      peer : PGstPad;
+      linkfunc : TGstPadLinkFunction;
+      linkdata : Tgpointer;
+      linknotify : TGDestroyNotify;
+      unlinkfunc : TGstPadUnlinkFunction;
+      unlinkdata : Tgpointer;
+      unlinknotify : TGDestroyNotify;
+      chainfunc : TGstPadChainFunction;
+      chaindata : Tgpointer;
+      chainnotify : TGDestroyNotify;
+      chainlistfunc : TGstPadChainListFunction;
+      chainlistdata : Tgpointer;
+      chainlistnotify : TGDestroyNotify;
+      getrangefunc : TGstPadGetRangeFunction;
+      getrangedata : Tgpointer;
+      getrangenotify : TGDestroyNotify;
+      eventfunc : TGstPadEventFunction;
+      eventdata : Tgpointer;
+      eventnotify : TGDestroyNotify;
+      offset : Tgint64;
+      queryfunc : TGstPadQueryFunction;
+      querydata : Tgpointer;
+      querynotify : TGDestroyNotify;
+      iterintlinkfunc : TGstPadIterIntLinkFunction;
+      iterintlinkdata : Tgpointer;
+      iterintlinknotify : TGDestroyNotify;
+      num_probes : Tgint;
+      num_blocked : Tgint;
+      priv : PGstPadPrivate;
+      ABI : record
+          case longint of
+            0 : ( _gst_reserved : array[0..3] of Tgpointer );
+            1 : ( abi : record
+                last_flowret : TGstFlowReturn;
+                eventfullfunc : TGstPadEventFullFunction;
+              end );
+          end;
+    end;
+  TGstPad = T_GstPad;
+
+  T_GstPadTemplate = record
+    object_ : TGstObject;
+    name_template : ^gchar;
+    direction : TGstPadDirection;
+    presence : TGstPadPresence;
+    caps : PGstCaps;
+    ABI : record
+        case longint of
+          0 : ( _gst_reserved : array[0..(GST_PADDING)-1] of gpointer );
+          1 : ( abi : record
+              gtype : GType;
+            end );
+        end;
+  end;
+  TGstPadTemplate =T_GstPadTemplate;
+
+  T_GstPadTemplateClass = record
+      parent_class : TGstObjectClass;
+      pad_created : procedure (templ:PGstPadTemplate; pad: PGstPad);cdecl;
+      _gst_reserved : array[0..3] of Tgpointer;
+    end;
+
+
+
+  T_GstStaticPadTemplate = record
+      name_template : Pgchar;
+      direction : TGstPadDirection;
+      presence : TGstPadPresence;
+      static_caps : TGstStaticCaps;
+    end;
+  TGstStaticPadTemplate = T_GstStaticPadTemplate;
+
+  TGstPadTemplate_autoptr = PGstPadTemplate;
+  TGstPadTemplate_listautoptr = PGList;
+  TGstPadTemplate_slistautoptr = PGSList;
+  TGstPadTemplate_queueautoptr = PGQueue;
+
+function gst_pad_template_get_type:TGType;cdecl;external gstreamerlib name 'gst_pad_template_get_type';
+
+function gst_static_pad_template_get_type:TGType;cdecl;external gstreamerlib name 'gst_static_pad_template_get_type';
+
+function gst_pad_template_new(name_template:Pgchar; direction:TGstPadDirection; presence:TGstPadPresence; caps:PGstCaps):PGstPadTemplate;cdecl;external gstreamerlib name 'gst_pad_template_new';
+
+function gst_pad_template_new_with_gtype(name_template:Pgchar; direction:TGstPadDirection; presence:TGstPadPresence; caps:PGstCaps; pad_type:TGType):PGstPadTemplate;cdecl;external gstreamerlib name 'gst_pad_template_new_with_gtype';
+
+function gst_static_pad_template_get(pad_template:PGstStaticPadTemplate):PGstPadTemplate;cdecl;external gstreamerlib name 'gst_static_pad_template_get';
+
+function gst_pad_template_new_from_static_pad_template_with_gtype(pad_template:PGstStaticPadTemplate; pad_type:TGType):PGstPadTemplate;cdecl;external gstreamerlib name 'gst_pad_template_new_from_static_pad_template_with_gtype';
+
+function gst_static_pad_template_get_caps(templ:PGstStaticPadTemplate):PGstCaps;cdecl;external gstreamerlib name 'gst_static_pad_template_get_caps';
+
+function gst_pad_template_get_caps(templ:PGstPadTemplate):PGstCaps;cdecl;external gstreamerlib name 'gst_pad_template_get_caps';
+
+procedure gst_pad_template_pad_created(templ:PGstPadTemplate; pad:PGstPad);cdecl;external gstreamerlib name 'gst_pad_template_pad_created';
+
+

+ 57 - 0
packages/gstreamer/src/gstparamspecs.inc

@@ -0,0 +1,57 @@
+{
+/* GStreamer - GParamSpecs for some of our types
+ * Copyright (C) 2007 Tim-Philipp Müller  <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+}
+  Type
+    P_GstParamSpecArray  = ^T_GstParamSpecArray;
+    P_GstParamSpecFraction  = ^T_GstParamSpecFraction;
+
+
+
+
+    T_GstParamSpecFraction = record
+        parent_instance : TGParamSpec;
+        min_num : Tgint;
+        min_den : Tgint;
+        max_num : Tgint;
+        max_den : Tgint;
+        def_num : Tgint;
+        def_den : Tgint;
+      end;
+    TGstParamSpecFraction = T_GstParamSpecFraction;
+
+    T_GstParamSpecArray = record
+        parent_instance : TGParamSpec;
+        element_spec : PGParamSpec;
+      end;
+    TGstParamSpecArray = T_GstParamSpecArray;
+
+function gst_param_spec_fraction_get_type:TGType;cdecl;external gstreamerlib name 'gst_param_spec_fraction_get_type';
+
+function gst_param_spec_array_get_type:TGType;cdecl;external gstreamerlib name 'gst_param_spec_array_get_type';
+
+  function gst_param_spec_fraction(name:Pgchar; nick:Pgchar; blurb:Pgchar; min_num:Tgint; min_denom:Tgint;
+             max_num:Tgint; max_denom:Tgint; default_num:Tgint; default_denom:Tgint; flags:TGParamFlags):PGParamSpec;cdecl;external gstreamerlib name 'gst_param_spec_fraction';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_param_spec_array(name:Pgchar; nick:Pgchar; blurb:Pgchar; element_spec:PGParamSpec; flags:TGParamFlags):PGParamSpec;cdecl;external gstreamerlib name 'gst_param_spec_array';
+
+

+ 87 - 0
packages/gstreamer/src/gstparse.inc

@@ -0,0 +1,87 @@
+{* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *
+ * gstparse.h: get a pipeline from a text pipeline description
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+  Type
+    PGstParseContext  = ^TGstParseContext;
+    PGstParseContext_autoptr  = ^TGstParseContext_autoptr;
+    PGstParseContext_listautoptr  = ^TGstParseContext_listautoptr;
+    PGstParseContext_queueautoptr  = ^TGstParseContext_queueautoptr;
+    PGstParseContext_slistautoptr  = ^TGstParseContext_slistautoptr;
+    PGstParseError  = ^TGstParseError;
+    PGstParseFlags  = ^TGstParseFlags;
+
+   TGstParseError = (
+      GST_PARSE_ERROR_SYNTAX,
+      GST_PARSE_ERROR_NO_SUCH_ELEMENT,
+      GST_PARSE_ERROR_NO_SUCH_PROPERTY,
+      GST_PARSE_ERROR_LINK,
+      GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
+      GST_PARSE_ERROR_EMPTY_BIN,
+      GST_PARSE_ERROR_EMPTY,
+      GST_PARSE_ERROR_DELAYED_LINK);
+
+
+    TGstParseFlags = (
+      GST_PARSE_FLAG_NONE := 0,
+      GST_PARSE_FLAG_FATAL_ERRORS := 1 shl 0,
+      GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS := 1 shl 1,
+      GST_PARSE_FLAG_PLACE_IN_BIN := 1 shl 2
+    );
+
+    TGstParseContext = record end;
+    T_GstParseContext = TGstParseContext;
+
+  TGstParseContext_autoptr = PGstParseContext;
+
+  TGstParseContext_listautoptr = PGList;
+
+  TGstParseContext_slistautoptr = PGSList;
+
+  TGstParseContext_queueautoptr = PGQueue;
+
+  function gst_parse_error_quark:TGQuark;cdecl;external gstreamerlib name 'gst_parse_error_quark';
+
+  function gst_parse_context_get_type:TGType;cdecl;external gstreamerlib name 'gst_parse_context_get_type';
+
+  function gst_parse_context_new:PGstParseContext;cdecl;external gstreamerlib name 'gst_parse_context_new';
+
+  function gst_parse_context_get_missing_elements(context:PGstParseContext):PPgchar;cdecl;external gstreamerlib name 'gst_parse_context_get_missing_elements';
+
+  procedure gst_parse_context_free(context:PGstParseContext);cdecl;external gstreamerlib name 'gst_parse_context_free';
+
+(* Const before type ignored *)
+  function gst_parse_context_copy(context:PGstParseContext):PGstParseContext;cdecl;external gstreamerlib name 'gst_parse_context_copy';
+
+(* Const before type ignored *)
+  function gst_parse_launch(pipeline_description:Pgchar; error:PPGError):PGstElement;cdecl;external gstreamerlib name 'gst_parse_launch';
+
+(* Const before type ignored *)
+  function gst_parse_launchv(argv:PPgchar; error:PPGError):PGstElement;cdecl;external gstreamerlib name 'gst_parse_launchv';
+
+(* Const before type ignored *)
+  function gst_parse_launch_full(pipeline_description:Pgchar; context:PGstParseContext; flags:TGstParseFlags; error:PPGError):PGstElement;cdecl;external gstreamerlib name 'gst_parse_launch_full';
+
+(* Const before type ignored *)
+  function gst_parse_launchv_full(argv:PPgchar; context:PGstParseContext; flags:TGstParseFlags; error:PPGError):PGstElement;cdecl;external gstreamerlib name 'gst_parse_launchv_full';
+
+
+

+ 99 - 0
packages/gstreamer/src/gstpipeline.inc

@@ -0,0 +1,99 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *
+ * gstpipeline.h: Header for GstPipeline element
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstPipeline  = ^T_GstPipeline;
+    P_GstPipelineClass  = ^T_GstPipelineClass;
+    PGstPipeline  = ^TGstPipeline;
+    PGstPipeline_autoptr  = ^TGstPipeline_autoptr;
+    PGstPipeline_listautoptr  = ^TGstPipeline_listautoptr;
+    PGstPipeline_queueautoptr  = ^TGstPipeline_queueautoptr;
+    PGstPipeline_slistautoptr  = ^TGstPipeline_slistautoptr;
+    PGstPipelineFlags  = ^TGstPipelineFlags;
+    PGstPipelinePrivate  = ^TGstPipelinePrivate;
+
+    TGstPipelinePrivate = record end;
+    T_GstPipelinePrivate = TGstPipelinePrivate;
+
+    TGstPipelineFlags = (
+      GST_PIPELINE_FLAG_FIXED_CLOCK := Ord(GST_BIN_FLAG_LAST) shl 0,
+      GST_PIPELINE_FLAG_LAST := Ord(GST_BIN_FLAG_LAST) shl 4
+    );
+
+    T_GstPipeline = record
+        bin : TGstBin;
+        fixed_clock : PGstClock;
+        stream_time : TGstClockTime;
+        delay : TGstClockTime;
+        priv : PGstPipelinePrivate;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstPipeline = T_GstPipeline;
+
+    T_GstPipelineClass = record
+        parent_class : TGstBinClass;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstPipelineClass = T_GstPipelineClass;
+
+
+        TGstPipeline_autoptr = PGstPipeline;
+
+        TGstPipeline_listautoptr = PGList;
+
+        TGstPipeline_slistautoptr = PGSList;
+
+        TGstPipeline_queueautoptr = PGQueue;
+
+
+  function gst_pipeline_get_type:TGType;cdecl;external gstreamerlib name 'gst_pipeline_get_type';
+
+(* Const before type ignored *)
+  function gst_pipeline_new(name:Pgchar):PGstElement;cdecl;external gstreamerlib name 'gst_pipeline_new';
+
+  function gst_pipeline_get_bus(pipeline:PGstPipeline):PGstBus;cdecl;external gstreamerlib name 'gst_pipeline_get_bus';
+
+  procedure gst_pipeline_use_clock(pipeline:PGstPipeline; clock:PGstClock);cdecl;external gstreamerlib name 'gst_pipeline_use_clock';
+
+  function gst_pipeline_set_clock(pipeline:PGstPipeline; clock:PGstClock):Tgboolean;cdecl;external gstreamerlib name 'gst_pipeline_set_clock';
+
+  function gst_pipeline_get_clock(pipeline:PGstPipeline):PGstClock;cdecl;external gstreamerlib name 'gst_pipeline_get_clock';
+
+  function gst_pipeline_get_pipeline_clock(pipeline:PGstPipeline):PGstClock;cdecl;external gstreamerlib name 'gst_pipeline_get_pipeline_clock';
+
+  procedure gst_pipeline_auto_clock(pipeline:PGstPipeline);cdecl;external gstreamerlib name 'gst_pipeline_auto_clock';
+
+  procedure gst_pipeline_set_delay(pipeline:PGstPipeline; delay:TGstClockTime);cdecl;external gstreamerlib name 'gst_pipeline_set_delay';
+
+  function gst_pipeline_get_delay(pipeline:PGstPipeline):TGstClockTime;cdecl;external gstreamerlib name 'gst_pipeline_get_delay';
+
+  procedure gst_pipeline_set_latency(pipeline:PGstPipeline; latency:TGstClockTime);cdecl;external gstreamerlib name 'gst_pipeline_set_latency';
+
+  function gst_pipeline_get_latency(pipeline:PGstPipeline):TGstClockTime;cdecl;external gstreamerlib name 'gst_pipeline_get_latency';
+
+  procedure gst_pipeline_set_auto_flush_bus(pipeline:PGstPipeline; auto_flush:Tgboolean);cdecl;external gstreamerlib name 'gst_pipeline_set_auto_flush_bus';
+
+  function gst_pipeline_get_auto_flush_bus(pipeline:PGstPipeline):Tgboolean;cdecl;external gstreamerlib name 'gst_pipeline_get_auto_flush_bus';
+
+

+ 179 - 0
packages/gstreamer/src/gstplugin.inc

@@ -0,0 +1,179 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *
+ * gstplugin.h: Header for plugin subsystem
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstPluginDesc  = ^T_GstPluginDesc;
+    PGError  = ^TGError;
+    PGstPlugin  = ^TGstPlugin;
+    PGstPlugin_autoptr  = ^TGstPlugin_autoptr;
+    PGstPlugin_listautoptr  = ^TGstPlugin_listautoptr;
+    PGstPlugin_queueautoptr  = ^TGstPlugin_queueautoptr;
+    PGstPlugin_slistautoptr  = ^TGstPlugin_slistautoptr;
+    PGstPluginDependencyFlags  = ^TGstPluginDependencyFlags;
+    PGstPluginError  = ^TGstPluginError;
+    PGstPluginFlags  = ^TGstPluginFlags;
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+    TGstPlugin = record end;
+    T_GstPlugin = TGstPlugin;
+    TGstPluginClass = record end;
+    T_GstPluginClass = TGstPluginClass;
+
+
+
+    TGstPluginError = (
+      GST_PLUGIN_ERROR_MODULE,
+      GST_PLUGIN_ERROR_DEPENDENCIES,
+      GST_PLUGIN_ERROR_NAME_MISMATCH);
+
+    TGstPluginFlags = (
+      GST_PLUGIN_FLAG_CACHED := GST_OBJECT_FLAG_LAST shl 0,
+      GST_PLUGIN_FLAG_BLACKLISTED := GST_OBJECT_FLAG_LAST shl 1
+      );
+
+    TGstPluginDependencyFlags = (GST_PLUGIN_DEPENDENCY_FLAG_NONE := 0,
+      GST_PLUGIN_DEPENDENCY_FLAG_RECURSE := 1 shl 0,
+      GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY := 1 shl 1,
+      GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX := 1 shl 2,
+      GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_PREFIX := 1 shl 3,
+      GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE := 1 shl 4
+      );
+
+    TGstPluginInitFunc = function (plugin:PGstPlugin):Tgboolean;cdecl;
+
+    TGstPluginInitFullFunc = function (plugin:PGstPlugin; user_data:Tgpointer):Tgboolean;cdecl;
+
+    T_GstPluginDesc = record
+        major_version : Tgint;
+        minor_version : Tgint;
+        name : Pgchar;
+        description : Pgchar;
+        plugin_init : TGstPluginInitFunc;
+        version : Pgchar;
+        license : Pgchar;
+        source : Pgchar;
+        package : Pgchar;
+        origin : Pgchar;
+        release_datetime : Pgchar;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstPluginDesc = T_GstPluginDesc;
+
+
+  TGstPluginFilter = function (plugin:PGstPlugin; user_data:Tgpointer):Tgboolean;cdecl;
+
+  TGstPlugin_autoptr = PGstPlugin;
+
+  TGstPlugin_listautoptr = PGList;
+
+  TGstPlugin_slistautoptr = PGSList;
+
+  TGstPlugin_queueautoptr = PGQueue;
+
+
+  function gst_plugin_error_quark:TGQuark;cdecl;external gstreamerlib name 'gst_plugin_error_quark';
+
+  function gst_plugin_get_type:TGType;cdecl;external gstreamerlib name 'gst_plugin_get_type';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_plugin_register_static(major_version:Tgint; minor_version:Tgint; name:Pgchar; description:Pgchar; init_func:TGstPluginInitFunc; 
+             version:Pgchar; license:Pgchar; source:Pgchar; package:Pgchar; origin:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_plugin_register_static';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_plugin_register_static_full(major_version:Tgint; minor_version:Tgint; name:Pgchar; description:Pgchar; init_full_func:TGstPluginInitFullFunc; 
+             version:Pgchar; license:Pgchar; source:Pgchar; package:Pgchar; origin:Pgchar; 
+             user_data:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_plugin_register_static_full';
+
+(* Const before type ignored *)
+  function gst_plugin_get_name(plugin:PGstPlugin):Pgchar;cdecl;external gstreamerlib name 'gst_plugin_get_name';
+
+(* Const before type ignored *)
+  function gst_plugin_get_description(plugin:PGstPlugin):Pgchar;cdecl;external gstreamerlib name 'gst_plugin_get_description';
+
+(* Const before type ignored *)
+  function gst_plugin_get_filename(plugin:PGstPlugin):Pgchar;cdecl;external gstreamerlib name 'gst_plugin_get_filename';
+
+(* Const before type ignored *)
+  function gst_plugin_get_version(plugin:PGstPlugin):Pgchar;cdecl;external gstreamerlib name 'gst_plugin_get_version';
+
+(* Const before type ignored *)
+  function gst_plugin_get_license(plugin:PGstPlugin):Pgchar;cdecl;external gstreamerlib name 'gst_plugin_get_license';
+
+(* Const before type ignored *)
+  function gst_plugin_get_source(plugin:PGstPlugin):Pgchar;cdecl;external gstreamerlib name 'gst_plugin_get_source';
+
+(* Const before type ignored *)
+  function gst_plugin_get_package(plugin:PGstPlugin):Pgchar;cdecl;external gstreamerlib name 'gst_plugin_get_package';
+
+(* Const before type ignored *)
+  function gst_plugin_get_origin(plugin:PGstPlugin):Pgchar;cdecl;external gstreamerlib name 'gst_plugin_get_origin';
+
+(* Const before type ignored *)
+  function gst_plugin_get_release_date_string(plugin:PGstPlugin):Pgchar;cdecl;external gstreamerlib name 'gst_plugin_get_release_date_string';
+
+(* Const before type ignored *)
+  function gst_plugin_get_cache_data(plugin:PGstPlugin):PGstStructure;cdecl;external gstreamerlib name 'gst_plugin_get_cache_data';
+
+  procedure gst_plugin_set_cache_data(plugin:PGstPlugin; cache_data:PGstStructure);cdecl;external gstreamerlib name 'gst_plugin_set_cache_data';
+
+  function gst_plugin_is_loaded(plugin:PGstPlugin):Tgboolean;cdecl;external gstreamerlib name 'gst_plugin_is_loaded';
+
+(* Const before type ignored *)
+  function gst_plugin_load_file(filename:Pgchar; error:PPGError):PGstPlugin;cdecl;external gstreamerlib name 'gst_plugin_load_file';
+
+  function gst_plugin_load(plugin:PGstPlugin):PGstPlugin;cdecl;external gstreamerlib name 'gst_plugin_load';
+
+(* Const before type ignored *)
+  function gst_plugin_load_by_name(name:Pgchar):PGstPlugin;cdecl;external gstreamerlib name 'gst_plugin_load_by_name';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_plugin_add_dependency(plugin:PGstPlugin; env_vars:PPgchar; paths:PPgchar; names:PPgchar; flags:TGstPluginDependencyFlags);cdecl;external gstreamerlib name 'gst_plugin_add_dependency';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_plugin_add_dependency_simple(plugin:PGstPlugin; env_vars:Pgchar; paths:Pgchar; names:Pgchar; flags:TGstPluginDependencyFlags);cdecl;external gstreamerlib name 'gst_plugin_add_dependency_simple';
+
+  procedure gst_plugin_list_free(list:PGList);cdecl;external gstreamerlib name 'gst_plugin_list_free';
+
+
+

+ 80 - 0
packages/gstreamer/src/gstpluginfeature.inc

@@ -0,0 +1,80 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *
+ * gstpluginfeature.h: Header for base GstPluginFeature
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+
+  Type
+    PGstPluginFeature  = ^TGstPluginFeature;
+    PGstPluginFeature_autoptr  = ^TGstPluginFeature_autoptr;
+    PGstPluginFeature_listautoptr  = ^TGstPluginFeature_listautoptr;
+    PGstPluginFeature_queueautoptr  = ^TGstPluginFeature_queueautoptr;
+    PGstPluginFeature_slistautoptr  = ^TGstPluginFeature_slistautoptr;
+    PGstRank  = ^TGstRank;
+
+
+    TGstPluginFeature = record end;
+    T_GstPluginFeature = TGstPluginFeature;
+    TGstPluginFeatureClass = record end;
+    T_GstPluginFeatureClass = TGstPluginFeatureClass;
+
+    TGstRank = (
+      GST_RANK_NONE := 0,
+      GST_RANK_MARGINAL := 64,
+      GST_RANK_SECONDARY := 128,
+      GST_RANK_PRIMARY := 256
+    );
+
+  TGstPluginFeature_autoptr = PGstPluginFeature;
+
+  TGstPluginFeature_listautoptr = PGList;
+
+  TGstPluginFeature_slistautoptr = PGSList;
+
+  TGstPluginFeature_queueautoptr = PGQueue;
+
+  TGstPluginFeatureFilter = function (feature:PGstPluginFeature; user_data:Tgpointer):Tgboolean;cdecl;
+
+  function gst_plugin_feature_get_type:TGType;cdecl;external gstreamerlib name 'gst_plugin_feature_get_type';
+
+  function gst_plugin_feature_load(feature:PGstPluginFeature):PGstPluginFeature;cdecl;external gstreamerlib name 'gst_plugin_feature_load';
+
+  procedure gst_plugin_feature_set_rank(feature:PGstPluginFeature; rank:Tguint);cdecl;external gstreamerlib name 'gst_plugin_feature_set_rank';
+
+  function gst_plugin_feature_get_rank(feature:PGstPluginFeature):Tguint;cdecl;external gstreamerlib name 'gst_plugin_feature_get_rank';
+
+  function gst_plugin_feature_get_plugin(feature:PGstPluginFeature):PGstPlugin;cdecl;external gstreamerlib name 'gst_plugin_feature_get_plugin';
+
+
+  function gst_plugin_feature_get_plugin_name(feature:PGstPluginFeature):Pgchar;cdecl;external gstreamerlib name 'gst_plugin_feature_get_plugin_name';
+
+  procedure gst_plugin_feature_list_free(list:PGList);cdecl;external gstreamerlib name 'gst_plugin_feature_list_free';
+
+  function gst_plugin_feature_list_copy(list:PGList):PGList;cdecl;external gstreamerlib name 'gst_plugin_feature_list_copy';
+
+  procedure gst_plugin_feature_list_debug(list:PGList);cdecl;external gstreamerlib name 'gst_plugin_feature_list_debug';
+
+  function gst_plugin_feature_check_version(feature:PGstPluginFeature; min_major:Tguint; min_minor:Tguint; min_micro:Tguint):Tgboolean;cdecl;external gstreamerlib name 'gst_plugin_feature_check_version';
+
+  function gst_plugin_feature_rank_compare_func(p1:Tgconstpointer; p2:Tgconstpointer):Tgint;cdecl;external gstreamerlib name 'gst_plugin_feature_rank_compare_func';
+
+

+ 88 - 0
packages/gstreamer/src/gstpoll.inc

@@ -0,0 +1,88 @@
+{
+/* GStreamer
+ * Copyright (C) 1999 Erik Walthinsen <[email protected]>
+ * Copyright (C) 2004 Wim Taymans <[email protected]>
+ * Copyright (C) 2007 Peter Kjellerstedt <[email protected]>
+ *
+ * gstpoll.h: File descriptor set
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    PGstPoll  = ^TGstPoll;
+    PGstPollFD  = ^TGstPollFD;
+
+    TGstPoll = record end;
+    T_GstPoll = TGstPoll;
+
+
+    TGstPollFD = record
+        fd : longint;
+        idx : Tgint;
+      end;
+
+  function gst_poll_new(controllable:Tgboolean):PGstPoll;cdecl;external gstreamerlib name 'gst_poll_new';
+
+  function gst_poll_new_timer:PGstPoll;cdecl;external gstreamerlib name 'gst_poll_new_timer';
+
+  procedure gst_poll_free(aset:PGstPoll);cdecl;external gstreamerlib name 'gst_poll_free';
+
+  procedure gst_poll_get_read_gpollfd(aset:PGstPoll; fd:PGPollFD);cdecl;external gstreamerlib name 'gst_poll_get_read_gpollfd';
+
+  procedure gst_poll_fd_init(fd:PGstPollFD);cdecl;external gstreamerlib name 'gst_poll_fd_init';
+
+  function gst_poll_add_fd(aset:PGstPoll; fd:PGstPollFD):Tgboolean;cdecl;external gstreamerlib name 'gst_poll_add_fd';
+
+  function gst_poll_remove_fd(aset:PGstPoll; fd:PGstPollFD):Tgboolean;cdecl;external gstreamerlib name 'gst_poll_remove_fd';
+
+  function gst_poll_fd_ctl_write(aset:PGstPoll; fd:PGstPollFD; active:Tgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_poll_fd_ctl_write';
+
+  function gst_poll_fd_ctl_read(aset:PGstPoll; fd:PGstPollFD; active:Tgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_poll_fd_ctl_read';
+
+  function gst_poll_fd_ctl_pri(aset:PGstPoll; fd:PGstPollFD; active:Tgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_poll_fd_ctl_pri';
+
+  procedure gst_poll_fd_ignored(aset:PGstPoll; fd:PGstPollFD);cdecl;external gstreamerlib name 'gst_poll_fd_ignored';
+
+(* Const before type ignored *)
+  function gst_poll_fd_has_closed(aset:PGstPoll; fd:PGstPollFD):Tgboolean;cdecl;external gstreamerlib name 'gst_poll_fd_has_closed';
+
+(* Const before type ignored *)
+  function gst_poll_fd_has_error(aset:PGstPoll; fd:PGstPollFD):Tgboolean;cdecl;external gstreamerlib name 'gst_poll_fd_has_error';
+
+(* Const before type ignored *)
+  function gst_poll_fd_can_read(aset:PGstPoll; fd:PGstPollFD):Tgboolean;cdecl;external gstreamerlib name 'gst_poll_fd_can_read';
+
+(* Const before type ignored *)
+  function gst_poll_fd_can_write(aset:PGstPoll; fd:PGstPollFD):Tgboolean;cdecl;external gstreamerlib name 'gst_poll_fd_can_write';
+
+(* Const before type ignored *)
+  function gst_poll_fd_has_pri(aset:PGstPoll; fd:PGstPollFD):Tgboolean;cdecl;external gstreamerlib name 'gst_poll_fd_has_pri';
+
+  function gst_poll_wait(aset:PGstPoll; timeout:TGstClockTime):Tgint;cdecl;external gstreamerlib name 'gst_poll_wait';
+
+  function gst_poll_set_controllable(aset:PGstPoll; controllable:Tgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_poll_set_controllable';
+
+  procedure gst_poll_restart(aset:PGstPoll);cdecl;external gstreamerlib name 'gst_poll_restart';
+
+  procedure gst_poll_set_flushing(aset:PGstPoll; flushing:Tgboolean);cdecl;external gstreamerlib name 'gst_poll_set_flushing';
+
+  function gst_poll_write_control(aset:PGstPoll):Tgboolean;cdecl;external gstreamerlib name 'gst_poll_write_control';
+
+  function gst_poll_read_control(aset:PGstPoll):Tgboolean;cdecl;external gstreamerlib name 'gst_poll_read_control';
+
+

+ 82 - 0
packages/gstreamer/src/gstpreset.inc

@@ -0,0 +1,82 @@
+{
+/* GStreamer
+ * Copyright (C) 2006 Stefan Kost <[email protected]>
+ *
+ * gstpreset.h: helper interface header for element presets
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstPresetInterface  = ^T_GstPresetInterface;
+    PGstPreset  = ^TGstPreset;
+
+    TGstPreset = record end;
+    T_GstPreset = TGstPreset;
+
+    T_GstPresetInterface = record
+        parent : TGTypeInterface;
+        get_preset_names : function (preset:PGstPreset):PPgchar;cdecl;
+        get_property_names : function (preset:PGstPreset):PPgchar;cdecl;
+        load_preset : function (preset:PGstPreset; name:Pgchar):Tgboolean;cdecl;
+        save_preset : function (preset:PGstPreset; name:Pgchar):Tgboolean;cdecl;
+        rename_preset : function (preset:PGstPreset; old_name:Pgchar; new_name:Pgchar):Tgboolean;cdecl;
+        delete_preset : function (preset:PGstPreset; name:Pgchar):Tgboolean;cdecl;
+        set_meta : function (preset:PGstPreset; name:Pgchar; tag:Pgchar; value:Pgchar):Tgboolean;cdecl;
+        get_meta : function (preset:PGstPreset; name:Pgchar; tag:Pgchar; value:PPgchar):Tgboolean;cdecl;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstPresetInterface = T_GstPresetInterface ;
+
+
+  function gst_preset_get_type:TGType;cdecl;external gstreamerlib name 'gst_preset_get_type';
+
+  function gst_preset_get_preset_names(preset:PGstPreset):PPgchar;cdecl;external gstreamerlib name 'gst_preset_get_preset_names';
+
+  function gst_preset_get_property_names(preset:PGstPreset):PPgchar;cdecl;external gstreamerlib name 'gst_preset_get_property_names';
+
+(* Const before type ignored *)
+  function gst_preset_load_preset(preset:PGstPreset; name:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_preset_load_preset';
+
+(* Const before type ignored *)
+  function gst_preset_save_preset(preset:PGstPreset; name:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_preset_save_preset';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_preset_rename_preset(preset:PGstPreset; old_name:Pgchar; new_name:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_preset_rename_preset';
+
+(* Const before type ignored *)
+  function gst_preset_delete_preset(preset:PGstPreset; name:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_preset_delete_preset';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_preset_set_meta(preset:PGstPreset; name:Pgchar; tag:Pgchar; value:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_preset_set_meta';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_preset_get_meta(preset:PGstPreset; name:Pgchar; tag:Pgchar; value:PPgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_preset_get_meta';
+
+(* Const before type ignored *)
+  function gst_preset_set_app_dir(app_dir:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_preset_set_app_dir';
+
+(* Const before type ignored *)
+  function gst_preset_get_app_dir:Pgchar;cdecl;external gstreamerlib name 'gst_preset_get_app_dir';
+
+  function gst_preset_is_editable(preset:PGstPreset):Tgboolean;cdecl;external gstreamerlib name 'gst_preset_is_editable';
+
+

+ 87 - 0
packages/gstreamer/src/gstpromise.inc

@@ -0,0 +1,87 @@
+{* GStreamer
+ * Copyright (C) 2017 Matthew Waters <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *}
+
+  Type
+    P_GstPromise  = ^T_GstPromise;
+
+    PGstPromise  = ^TGstPromise;
+    PGstPromise_autoptr  = ^TGstPromise_autoptr;
+    PGstPromise_listautoptr  = ^TGstPromise_listautoptr;
+    PGstPromise_queueautoptr  = ^TGstPromise_queueautoptr;
+    PGstPromise_slistautoptr  = ^TGstPromise_slistautoptr;
+    PGstPromiseResult  = ^TGstPromiseResult;
+
+
+
+
+
+    TGstPromiseResult = (GST_PROMISE_RESULT_PENDING,GST_PROMISE_RESULT_INTERRUPTED,
+      GST_PROMISE_RESULT_REPLIED,GST_PROMISE_RESULT_EXPIRED
+      );
+
+    TGstPromiseChangeFunc = procedure (promise:PGstPromise; user_data:Tgpointer);cdecl;
+
+    T_GstPromise = record
+        parent : TGstMiniObject;
+      end;
+    TGstPromise = T_GstPromise;
+
+  TGstPromise_autoptr = PGstPromise;
+
+  TGstPromise_listautoptr = PGList;
+
+  TGstPromise_slistautoptr = PGSList;
+
+  TGstPromise_queueautoptr = PGQueue;
+
+
+  function gst_promise_get_type:TGType;cdecl;external gstreamerlib name 'gst_promise_get_type';
+
+  function gst_promise_new:PGstPromise;cdecl;external gstreamerlib name 'gst_promise_new';
+
+  function gst_promise_new_with_change_func(func:TGstPromiseChangeFunc; user_data:Tgpointer; notify:TGDestroyNotify):PGstPromise;cdecl;external gstreamerlib name 'gst_promise_new_with_change_func';
+
+  function gst_promise_wait(promise:PGstPromise):TGstPromiseResult;cdecl;external gstreamerlib name 'gst_promise_wait';
+
+  procedure gst_promise_reply(promise:PGstPromise; s:PGstStructure);cdecl;external gstreamerlib name 'gst_promise_reply';
+
+  procedure gst_promise_interrupt(promise:PGstPromise);cdecl;external gstreamerlib name 'gst_promise_interrupt';
+
+  procedure gst_promise_expire(promise:PGstPromise);cdecl;external gstreamerlib name 'gst_promise_expire';
+
+(* Const before type ignored *)
+  function gst_promise_get_reply(promise:PGstPromise):PGstStructure;cdecl;external gstreamerlib name 'gst_promise_get_reply';
+
+  {
+  static inline GstPromise *
+  gst_promise_ref (GstPromise * promise)
+  
+    return (GstPromise *) gst_mini_object_ref (((GstMiniObject*)(promise)));
+  
+  # 121 "gstpromise.h"
+  
+  static inline void
+  gst_promise_unref (GstPromise * promise)
+  
+    gst_mini_object_unref (((GstMiniObject*)(promise)));
+  
+  
+   }
+
+

+ 52 - 0
packages/gstreamer/src/gstprotection.inc

@@ -0,0 +1,52 @@
+{
+/* GStreamer
+ * Copyright (C) <2015> YouView TV Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+}
+  Type
+    P_GstProtectionMeta  = ^T_GstProtectionMeta;
+    PGstProtectionMeta  = ^TGstProtectionMeta;
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+
+    T_GstProtectionMeta = record
+        meta : TGstMeta;
+        info : PGstStructure;
+      end;
+    TGstProtectionMeta  = T_GstProtectionMeta;
+
+
+  function gst_protection_meta_api_get_type:TGType;cdecl;external gstreamerlib name 'gst_protection_meta_api_get_type';
+
+(* Const before type ignored *)
+  function gst_protection_meta_get_info:PGstMetaInfo;cdecl;external gstreamerlib name 'gst_protection_meta_get_info';
+
+  function gst_buffer_add_protection_meta(buffer:PGstBuffer; info:PGstStructure):PGstProtectionMeta;cdecl;external gstreamerlib name 'gst_buffer_add_protection_meta';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_protection_select_system(system_identifiers:PPgchar):Pgchar;cdecl;external gstreamerlib name 'gst_protection_select_system';
+
+(* Const before type ignored *)
+  function gst_protection_filter_systems_by_available_decryptors(system_identifiers:PPgchar):PPgchar;cdecl;external gstreamerlib name 'gst_protection_filter_systems_by_available_decryptors';
+
+

+ 326 - 0
packages/gstreamer/src/gstquery.inc

@@ -0,0 +1,326 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *                    2005 Wim Taymans <[email protected]>
+ *                    2011 Wim Taymans <[email protected]>
+ *
+ * gstquery.h: GstQuery API declaration
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    PGstQuery  = ^TGstQuery;
+    PGstQuery_autoptr  = ^TGstQuery_autoptr;
+    PGstQuery_listautoptr  = ^TGstQuery_listautoptr;
+    PGstQuery_queueautoptr  = ^TGstQuery_queueautoptr;
+    PGstQuery_slistautoptr  = ^TGstQuery_slistautoptr;
+    PGstSchedulingFlags  = ^TGstSchedulingFlags;
+
+    PGstQueryType  = ^TGstQueryType;
+    PGstQueryTypeFlags  = ^TGstQueryTypeFlags;
+
+    TGstQueryTypeFlags = (GST_QUERY_TYPE_UPSTREAM := 1 shl 0,GST_QUERY_TYPE_DOWNSTREAM := 1 shl 1,
+      GST_QUERY_TYPE_SERIALIZED := 1 shl 2);
+
+    TGstQueryType = (
+      GST_QUERY_UNKNOWN := (0 shl 8) or 0,
+      GST_QUERY_POSITION := (10 shl 8) or (Ord(GST_QUERY_TYPE_UPSTREAM) or Ord(GST_QUERY_TYPE_DOWNSTREAM)),
+      GST_QUERY_DURATION := (20 shl 8) or (Ord(GST_QUERY_TYPE_UPSTREAM) or Ord(GST_QUERY_TYPE_DOWNSTREAM)),
+      GST_QUERY_LATENCY := (30 shl 8) or (Ord(GST_QUERY_TYPE_UPSTREAM) or Ord(GST_QUERY_TYPE_DOWNSTREAM)),
+      GST_QUERY_JITTER := (40 shl 8) or (Ord(GST_QUERY_TYPE_UPSTREAM) or Ord(GST_QUERY_TYPE_DOWNSTREAM)),
+      GST_QUERY_RATE := (50 shl 8) or (Ord(GST_QUERY_TYPE_UPSTREAM) or Ord(GST_QUERY_TYPE_DOWNSTREAM)),
+      GST_QUERY_SEEKING := (60 shl 8) or (Ord(GST_QUERY_TYPE_UPSTREAM) or Ord(GST_QUERY_TYPE_DOWNSTREAM)),
+      GST_QUERY_SEGMENT := (70 shl 8) or (Ord(GST_QUERY_TYPE_UPSTREAM) or Ord(GST_QUERY_TYPE_DOWNSTREAM)),
+      GST_QUERY_CONVERT := (80 shl 8) or (Ord(GST_QUERY_TYPE_UPSTREAM) or Ord(GST_QUERY_TYPE_DOWNSTREAM)),
+      GST_QUERY_FORMATS := (90 shl 8) or (Ord(GST_QUERY_TYPE_UPSTREAM) or Ord(GST_QUERY_TYPE_DOWNSTREAM)),
+      GST_QUERY_BUFFERING := (110 shl 8) or (Ord(GST_QUERY_TYPE_UPSTREAM) or Ord(GST_QUERY_TYPE_DOWNSTREAM)),
+      GST_QUERY_CUSTOM := (120 shl 8) or (Ord(GST_QUERY_TYPE_UPSTREAM) or Ord(GST_QUERY_TYPE_DOWNSTREAM)),
+      GST_QUERY_URI := (130 shl 8) or (Ord(GST_QUERY_TYPE_UPSTREAM) or Ord(GST_QUERY_TYPE_DOWNSTREAM)),
+      GST_QUERY_ALLOCATION := (140 shl 8) or Ord(GST_QUERY_TYPE_DOWNSTREAM) or Ord(GST_QUERY_TYPE_SERIALIZED),
+      GST_QUERY_SCHEDULING := (150 shl 8) or Ord(GST_QUERY_TYPE_UPSTREAM),
+      GST_QUERY_ACCEPT_CAPS := (160 shl 8) or (Ord(GST_QUERY_TYPE_UPSTREAM) or Ord(GST_QUERY_TYPE_DOWNSTREAM)),
+      GST_QUERY_CAPS := (170 shl 8) or (Ord(GST_QUERY_TYPE_UPSTREAM) or Ord(GST_QUERY_TYPE_DOWNSTREAM)),
+      GST_QUERY_DRAIN := (180 shl 8) or Ord(GST_QUERY_TYPE_DOWNSTREAM) or Ord(GST_QUERY_TYPE_SERIALIZED),
+      GST_QUERY_CONTEXT := (190 shl 8) or Ord(GST_QUERY_TYPE_UPSTREAM) or Ord(GST_QUERY_TYPE_DOWNSTREAM),
+      GST_QUERY_BITRATE := (200 shl 8) or Ord(GST_QUERY_TYPE_DOWNSTREAM)
+    );
+
+    P_GstQuery = ^T_GstQuery;
+    T_GstQuery = record
+        mini_object : TGstMiniObject;
+        _type : TGstQueryType;
+      end;
+    TGstQuery = T_GstQuery;
+
+    TGstQuery_autoptr = PGstQuery;
+
+    TGstQuery_listautoptr = PGList;
+
+    TGstQuery_slistautoptr = PGSList;
+
+    TGstQuery_queueautoptr = PGQueue;
+
+
+  TGstSchedulingFlags = (
+    GST_SCHEDULING_FLAG_SEEKABLE := 1 shl 0,
+    GST_SCHEDULING_FLAG_SEQUENTIAL := 1 shl 1,
+    GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED := 1 shl 2
+  );
+
+
+
+(* Const before type ignored *)
+
+  function gst_query_type_get_name(_type:TGstQueryType):Pgchar;cdecl;external gstreamerlib name 'gst_query_type_get_name';
+
+  function gst_query_type_to_quark(_type:TGstQueryType):TGQuark;cdecl;external gstreamerlib name 'gst_query_type_to_quark';
+
+  function gst_query_type_get_flags(_type:TGstQueryType):TGstQueryTypeFlags;cdecl;external gstreamerlib name 'gst_query_type_get_flags';
+
+  function gst_query_get_type:TGType;cdecl;external gstreamerlib name 'gst_query_get_type';
+
+
+  {
+  static inline GstQuery *
+  gst_query_ref (GstQuery * q)
+  
+    return ((GstQuery*)(gst_mini_object_ref (((GstMiniObject*)(q)))));
+  
+  # 253 "gstquery.h"
+  static inline void
+  gst_query_unref (GstQuery * q)
+  
+    gst_mini_object_unref (((GstMiniObject*)(q)));
+  
+  # 272 "gstquery.h"
+  static inline void
+  gst_clear_query (GstQuery ** query_ptr)
+  
+    do  _Static_assert (sizeof *(((GstMiniObject **) query_ptr)) == sizeof (gpointer), "Expression evaluates to false"); __typeof__((((GstMiniObject **) query_ptr))) _pp = (((GstMiniObject **) query_ptr)); __typeof__(*(((GstMiniObject **) query_ptr))) _ptr = *_pp; *_pp = 
+  # 275 "gstquery.h" 3 4
+   ((void *)0)
+  # 275 "gstquery.h"
+   ; if (_ptr) (gst_mini_object_unref) (_ptr);  while (0) ;
+  
+  # 289 "gstquery.h"
+  static inline GstQuery *
+  gst_query_copy (const GstQuery * q)
+  
+    return ((GstQuery*)(gst_mini_object_copy (((const GstMiniObject*)(q)))));
+  
+  # 327 "gstquery.h"
+  static inline gboolean
+  gst_query_replace (GstQuery **old_query, GstQuery *new_query)
+  
+    return gst_mini_object_replace ((GstMiniObject **) old_query, (GstMiniObject *) new_query);
+  
+  # 350 "gstquery.h"
+  static inline gboolean
+  gst_query_take (GstQuery **old_query, GstQuery *new_query)
+  
+    return gst_mini_object_take ((GstMiniObject **) old_query,
+        (GstMiniObject *) new_query);
+  
+   }
+  function gst_query_new_custom(_type:TGstQueryType; structure:PGstStructure):PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_custom';
+
+(* Const before type ignored *)
+  function gst_query_get_structure(query:PGstQuery):PGstStructure;cdecl;external gstreamerlib name 'gst_query_get_structure';
+
+  function gst_query_writable_structure(query:PGstQuery):PGstStructure;cdecl;external gstreamerlib name 'gst_query_writable_structure';
+
+  function gst_query_new_position(format:TGstFormat):PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_position';
+
+  procedure gst_query_set_position(query:PGstQuery; format:TGstFormat; cur:Tgint64);cdecl;external gstreamerlib name 'gst_query_set_position';
+
+  procedure gst_query_parse_position(query:PGstQuery; format:PGstFormat; cur:Pgint64);cdecl;external gstreamerlib name 'gst_query_parse_position';
+
+  function gst_query_new_duration(format:TGstFormat):PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_duration';
+
+  procedure gst_query_set_duration(query:PGstQuery; format:TGstFormat; duration:Tgint64);cdecl;external gstreamerlib name 'gst_query_set_duration';
+
+  procedure gst_query_parse_duration(query:PGstQuery; format:PGstFormat; duration:Pgint64);cdecl;external gstreamerlib name 'gst_query_parse_duration';
+
+  function gst_query_new_latency:PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_latency';
+
+  procedure gst_query_set_latency(query:PGstQuery; live:Tgboolean; min_latency:TGstClockTime; max_latency:TGstClockTime);cdecl;external gstreamerlib name 'gst_query_set_latency';
+
+  procedure gst_query_parse_latency(query:PGstQuery; live:Pgboolean; min_latency:PGstClockTime; max_latency:PGstClockTime);cdecl;external gstreamerlib name 'gst_query_parse_latency';
+
+  function gst_query_new_convert(src_format:TGstFormat; value:Tgint64; dest_format:TGstFormat):PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_convert';
+
+  procedure gst_query_set_convert(query:PGstQuery; src_format:TGstFormat; src_value:Tgint64; dest_format:TGstFormat; dest_value:Tgint64);cdecl;external gstreamerlib name 'gst_query_set_convert';
+
+  procedure gst_query_parse_convert(query:PGstQuery; src_format:PGstFormat; src_value:Pgint64; dest_format:PGstFormat; dest_value:Pgint64);cdecl;external gstreamerlib name 'gst_query_parse_convert';
+
+  function gst_query_new_segment(format:TGstFormat):PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_segment';
+
+  procedure gst_query_set_segment(query:PGstQuery; rate:Tgdouble; format:TGstFormat; start_value:Tgint64; stop_value:Tgint64);cdecl;external gstreamerlib name 'gst_query_set_segment';
+
+  procedure gst_query_parse_segment(query:PGstQuery; rate:Pgdouble; format:PGstFormat; start_value:Pgint64; stop_value:Pgint64);cdecl;external gstreamerlib name 'gst_query_parse_segment';
+
+  function gst_query_new_seeking(format:TGstFormat):PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_seeking';
+
+  procedure gst_query_set_seeking(query:PGstQuery; format:TGstFormat; seekable:Tgboolean; segment_start:Tgint64; segment_end:Tgint64);cdecl;external gstreamerlib name 'gst_query_set_seeking';
+
+  procedure gst_query_parse_seeking(query:PGstQuery; format:PGstFormat; seekable:Pgboolean; segment_start:Pgint64; segment_end:Pgint64);cdecl;external gstreamerlib name 'gst_query_parse_seeking';
+
+  function gst_query_new_formats:PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_formats';
+
+  procedure gst_query_set_formats(query:PGstQuery; n_formats:Tgint; args:array of const);cdecl;external gstreamerlib name 'gst_query_set_formats';
+
+  procedure gst_query_set_formats(query:PGstQuery; n_formats:Tgint);cdecl;external gstreamerlib name 'gst_query_set_formats';
+
+(* Const before type ignored *)
+  procedure gst_query_set_formatsv(query:PGstQuery; n_formats:Tgint; formats:PGstFormat);cdecl;external gstreamerlib name 'gst_query_set_formatsv';
+
+  procedure gst_query_parse_n_formats(query:PGstQuery; n_formats:Pguint);cdecl;external gstreamerlib name 'gst_query_parse_n_formats';
+
+  procedure gst_query_parse_nth_format(query:PGstQuery; nth:Tguint; format:PGstFormat);cdecl;external gstreamerlib name 'gst_query_parse_nth_format';
+
+  function gst_query_new_buffering(format:TGstFormat):PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_buffering';
+
+  procedure gst_query_set_buffering_percent(query:PGstQuery; busy:Tgboolean; percent:Tgint);cdecl;external gstreamerlib name 'gst_query_set_buffering_percent';
+
+  procedure gst_query_parse_buffering_percent(query:PGstQuery; busy:Pgboolean; percent:Pgint);cdecl;external gstreamerlib name 'gst_query_parse_buffering_percent';
+
+  procedure gst_query_set_buffering_stats(query:PGstQuery; mode:TGstBufferingMode; avg_in:Tgint; avg_out:Tgint; buffering_left:Tgint64);cdecl;external gstreamerlib name 'gst_query_set_buffering_stats';
+
+  procedure gst_query_parse_buffering_stats(query:PGstQuery; mode:PGstBufferingMode; avg_in:Pgint; avg_out:Pgint; buffering_left:Pgint64);cdecl;external gstreamerlib name 'gst_query_parse_buffering_stats';
+
+  procedure gst_query_set_buffering_range(query:PGstQuery; format:TGstFormat; start:Tgint64; stop:Tgint64; estimated_total:Tgint64);cdecl;external gstreamerlib name 'gst_query_set_buffering_range';
+
+  procedure gst_query_parse_buffering_range(query:PGstQuery; format:PGstFormat; start:Pgint64; stop:Pgint64; estimated_total:Pgint64);cdecl;external gstreamerlib name 'gst_query_parse_buffering_range';
+
+  function gst_query_add_buffering_range(query:PGstQuery; start:Tgint64; stop:Tgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_query_add_buffering_range';
+
+  function gst_query_get_n_buffering_ranges(query:PGstQuery):Tguint;cdecl;external gstreamerlib name 'gst_query_get_n_buffering_ranges';
+
+  function gst_query_parse_nth_buffering_range(query:PGstQuery; index:Tguint; start:Pgint64; stop:Pgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_query_parse_nth_buffering_range';
+
+  function gst_query_new_uri:PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_uri';
+
+  procedure gst_query_parse_uri(query:PGstQuery; uri:PPgchar);cdecl;external gstreamerlib name 'gst_query_parse_uri';
+
+(* Const before type ignored *)
+  procedure gst_query_set_uri(query:PGstQuery; uri:Pgchar);cdecl;external gstreamerlib name 'gst_query_set_uri';
+
+  procedure gst_query_parse_uri_redirection(query:PGstQuery; uri:PPgchar);cdecl;external gstreamerlib name 'gst_query_parse_uri_redirection';
+
+(* Const before type ignored *)
+  procedure gst_query_set_uri_redirection(query:PGstQuery; uri:Pgchar);cdecl;external gstreamerlib name 'gst_query_set_uri_redirection';
+
+  procedure gst_query_parse_uri_redirection_permanent(query:PGstQuery; permanent:Pgboolean);cdecl;external gstreamerlib name 'gst_query_parse_uri_redirection_permanent';
+
+  procedure gst_query_set_uri_redirection_permanent(query:PGstQuery; permanent:Tgboolean);cdecl;external gstreamerlib name 'gst_query_set_uri_redirection_permanent';
+
+  function gst_query_new_allocation(caps:PGstCaps; need_pool:Tgboolean):PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_allocation';
+
+  procedure gst_query_parse_allocation(query:PGstQuery; caps:PPGstCaps; need_pool:Pgboolean);cdecl;external gstreamerlib name 'gst_query_parse_allocation';
+
+  procedure gst_query_add_allocation_pool(query:PGstQuery; pool:PGstBufferPool; size:Tguint; min_buffers:Tguint; max_buffers:Tguint);cdecl;external gstreamerlib name 'gst_query_add_allocation_pool';
+
+  function gst_query_get_n_allocation_pools(query:PGstQuery):Tguint;cdecl;external gstreamerlib name 'gst_query_get_n_allocation_pools';
+
+  procedure gst_query_parse_nth_allocation_pool(query:PGstQuery; index:Tguint; pool: PPGstBufferPool; size:Pguint; min_buffers:Pguint;
+              max_buffers:Pguint);cdecl;external gstreamerlib name 'gst_query_parse_nth_allocation_pool';
+
+  procedure gst_query_set_nth_allocation_pool(query:PGstQuery; index:Tguint; pool:PGstBufferPool; size:Tguint; min_buffers:Tguint; 
+              max_buffers:Tguint);cdecl;external gstreamerlib name 'gst_query_set_nth_allocation_pool';
+
+  procedure gst_query_remove_nth_allocation_pool(query:PGstQuery; index:Tguint);cdecl;external gstreamerlib name 'gst_query_remove_nth_allocation_pool';
+
+(* Const before type ignored *)
+  procedure gst_query_add_allocation_param(query:PGstQuery; allocator:PGstAllocator; params:PGstAllocationParams);cdecl;external gstreamerlib name 'gst_query_add_allocation_param';
+
+  function gst_query_get_n_allocation_params(query:PGstQuery):Tguint;cdecl;external gstreamerlib name 'gst_query_get_n_allocation_params';
+
+  procedure gst_query_parse_nth_allocation_param(query:PGstQuery; index:Tguint; allocator:PPGstAllocator; params:PGstAllocationParams);cdecl;external gstreamerlib name 'gst_query_parse_nth_allocation_param';
+
+(* Const before type ignored *)
+  procedure gst_query_set_nth_allocation_param(query:PGstQuery; index:Tguint; allocator:PGstAllocator; params:PGstAllocationParams);cdecl;external gstreamerlib name 'gst_query_set_nth_allocation_param';
+
+  procedure gst_query_remove_nth_allocation_param(query:PGstQuery; index:Tguint);cdecl;external gstreamerlib name 'gst_query_remove_nth_allocation_param';
+
+(* Const before type ignored *)
+  procedure gst_query_add_allocation_meta(query:PGstQuery; api:TGType; params:PGstStructure);cdecl;external gstreamerlib name 'gst_query_add_allocation_meta';
+
+  function gst_query_get_n_allocation_metas(query:PGstQuery):Tguint;cdecl;external gstreamerlib name 'gst_query_get_n_allocation_metas';
+
+(* Const before type ignored *)
+  function gst_query_parse_nth_allocation_meta(query:PGstQuery; index:Tguint; params:PPGstStructure):TGType;cdecl;external gstreamerlib name 'gst_query_parse_nth_allocation_meta';
+
+  procedure gst_query_remove_nth_allocation_meta(query:PGstQuery; index:Tguint);cdecl;external gstreamerlib name 'gst_query_remove_nth_allocation_meta';
+
+  function gst_query_find_allocation_meta(query:PGstQuery; api:TGType; index:Pguint):Tgboolean;cdecl;external gstreamerlib name 'gst_query_find_allocation_meta';
+
+
+  function gst_query_new_scheduling:PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_scheduling';
+
+  procedure gst_query_set_scheduling(query:PGstQuery; flags:TGstSchedulingFlags; minsize:Tgint; maxsize:Tgint; align:Tgint);cdecl;external gstreamerlib name 'gst_query_set_scheduling';
+
+  procedure gst_query_parse_scheduling(query:PGstQuery; flags:PGstSchedulingFlags; minsize:Pgint; maxsize:Pgint; align:Pgint);cdecl;external gstreamerlib name 'gst_query_parse_scheduling';
+
+  procedure gst_query_add_scheduling_mode(query:PGstQuery; mode:TGstPadMode);cdecl;external gstreamerlib name 'gst_query_add_scheduling_mode';
+
+  function gst_query_get_n_scheduling_modes(query:PGstQuery):Tguint;cdecl;external gstreamerlib name 'gst_query_get_n_scheduling_modes';
+
+  function gst_query_parse_nth_scheduling_mode(query:PGstQuery; index:Tguint):TGstPadMode;cdecl;external gstreamerlib name 'gst_query_parse_nth_scheduling_mode';
+
+  function gst_query_has_scheduling_mode(query:PGstQuery; mode:TGstPadMode):Tgboolean;cdecl;external gstreamerlib name 'gst_query_has_scheduling_mode';
+
+  function gst_query_has_scheduling_mode_with_flags(query:PGstQuery; mode:TGstPadMode; flags:TGstSchedulingFlags):Tgboolean;cdecl;external gstreamerlib name 'gst_query_has_scheduling_mode_with_flags';
+
+  function gst_query_new_accept_caps(caps:PGstCaps):PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_accept_caps';
+
+  procedure gst_query_parse_accept_caps(query:PGstQuery; caps:PPGstCaps);cdecl;external gstreamerlib name 'gst_query_parse_accept_caps';
+
+  procedure gst_query_set_accept_caps_result(query:PGstQuery; result:Tgboolean);cdecl;external gstreamerlib name 'gst_query_set_accept_caps_result';
+
+  procedure gst_query_parse_accept_caps_result(query:PGstQuery; result:Pgboolean);cdecl;external gstreamerlib name 'gst_query_parse_accept_caps_result';
+
+  function gst_query_new_caps(filter:PGstCaps):PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_caps';
+
+  procedure gst_query_parse_caps(query:PGstQuery; filter:PPGstCaps);cdecl;external gstreamerlib name 'gst_query_parse_caps';
+
+  procedure gst_query_set_caps_result(query:PGstQuery; caps:PGstCaps);cdecl;external gstreamerlib name 'gst_query_set_caps_result';
+
+  procedure gst_query_parse_caps_result(query:PGstQuery; caps:PPGstCaps);cdecl;external gstreamerlib name 'gst_query_parse_caps_result';
+
+  function gst_query_new_drain:PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_drain';
+
+(* Const before type ignored *)
+  function gst_query_new_context(context_type:Pgchar):PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_context';
+
+(* Const before type ignored *)
+  function gst_query_parse_context_type(query:PGstQuery; context_type:PPgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_query_parse_context_type';
+
+  procedure gst_query_set_context(query:PGstQuery; context:PGstContext);cdecl;external gstreamerlib name 'gst_query_set_context';
+
+  procedure gst_query_parse_context(query:PGstQuery; context:PPGstContext);cdecl;external gstreamerlib name 'gst_query_parse_context';
+
+  function gst_query_new_bitrate:PGstQuery;cdecl;external gstreamerlib name 'gst_query_new_bitrate';
+
+  procedure gst_query_set_bitrate(query:PGstQuery; nominal_bitrate:Tguint);cdecl;external gstreamerlib name 'gst_query_set_bitrate';
+
+  procedure gst_query_parse_bitrate(query:PGstQuery; nominal_bitrate:Pguint);cdecl;external gstreamerlib name 'gst_query_parse_bitrate';
+  var
+    _gst_query_type : TGType;cvar;external;
+
+

+ 175 - 0
packages/gstreamer/src/gstrec.inc

@@ -0,0 +1,175 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2022 by Michael Van Canneyt ([email protected]) member of the Free Pascal development team
+
+    Record types needed in several include files
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+
+Type
+  PGstMiniObject = ^TGstMiniObject;
+
+  TGstMiniObjectCopyFunction = function (obj:PGstMiniObject):PGstMiniObject;cdecl;
+  TGstMiniObjectDisposeFunction = function (obj:PGstMiniObject):Tgboolean;cdecl;
+  TGstMiniObjectFreeFunction = procedure (obj:PGstMiniObject);cdecl;
+  TGstMiniObjectNotify = procedure (user_data:Tgpointer; obj:PGstMiniObject);cdecl;
+
+  T_GstMiniObject = record
+      _type : TGType;
+      refcount : Tgint;
+      lockstate : Tgint;
+      flags : Tguint;
+      copy : TGstMiniObjectCopyFunction;
+      _dispose : TGstMiniObjectDisposeFunction;
+      free : TGstMiniObjectFreeFunction;
+      priv_uint : Tguint;
+      priv_pointer : Tgpointer;
+    end;
+  TGstMiniObject = T_GstMiniObject ;
+  PPGstMiniObject = ^PGstMiniObject;
+  TGstClockTime =  guint64;
+  TGstClockTimeDiff = gint64;
+
+  P_GstBufferPoolAcquireParams = ^T_GstBufferPoolAcquireParams;
+  T_GstBufferPoolAcquireParams = record
+      format : TGstFormat;
+      start : Tgint64;
+      stop : Tgint64;
+      flags : TGstBufferPoolAcquireFlags;
+      _gst_reserved : array[0..3] of Tgpointer;
+    end;
+  TGstBufferPoolAcquireParams = T_GstBufferPoolAcquireParams;
+
+  PGstBufferPoolPrivate  = ^TGstBufferPoolPrivate;
+  TGstBufferPoolPrivate = record end;
+  T_GstBufferPoolPrivate = TGstBufferPoolPrivate;
+
+  GInitiallyUnowned = TGObject;
+  TGInitiallyUnowned = GInitiallyUnowned;
+  TGInitiallyUnownedClass = TGObjectClass;
+
+  P_GstObject = ^T_GstObject;
+  PGstObject = P_GstObject;
+
+  P_GstObjectClass = ^T_GstObjectClass;
+  T_GstObjectClass = record
+      parent_class : TGInitiallyUnownedClass;
+      path_string_separator : Pgchar;
+      deep_notify : procedure (object_:PGstObject; orig:PGstObject; pspec:PGParamSpec);cdecl;
+      _gst_reserved : array[0..3] of Tgpointer;
+    end;
+  TGstObjectClass = T_GstObjectClass;
+
+  T_GstObject = record
+      object_ : TGInitiallyUnowned;
+      lock : TGMutex;
+      name : Pgchar;
+      parent : PGstObject;
+      flags : Tguint32;
+      control_bindings : PGList;
+      control_rate : Tguint64;
+      last_sync : Tguint64;
+      _gst_reserved : Tgpointer;
+    end;
+  TGstObject = T_GstObject;
+
+  PPGstObject = ^PGstObject;
+
+  P_GstBufferPool = ^T_GstBufferPool;
+  T_GstBufferPool = record
+      object_ : TGstObject;
+      flushing : Tgint;
+      priv : PGstBufferPoolPrivate;
+      _gst_reserved : array[0..3] of Tgpointer;
+    end;
+  TGstBufferPool = T_GstBufferPool;
+  PPGstBufferPool = ^P_GstBufferPool;
+
+  PGstBufferPool = P_GstBufferPool;
+  T_GstBuffer = record
+      mini_object : TGstMiniObject;
+      pool : PGstBufferPool;
+      pts : TGstClockTime;
+      dts : TGstClockTime;
+      duration : TGstClockTime;
+      offset : Tguint64;
+      offset_end : Tguint64;
+    end;
+  TGstBuffer = T_GstBuffer;
+  PGstBuffer = ^TGstBuffer;
+  PPGstBuffer = ^PGstBuffer;
+
+  T_GstMessage = record
+      mini_object : TGstMiniObject;
+      _type : TGstMessageType;
+      timestamp : Tguint64;
+      src : PGstObject;
+      seqnum : Tguint32;
+      lock : TGMutex;
+      cond : GCond;
+    end;
+  TGstMessage = T_GstMessage;
+  P_GstMessage  = ^T_GstMessage;
+  PGstMessage  = ^TGstMessage;
+  PPGstMessage = ^PGstMessage;
+
+
+  TGStBusPrivate = record end;
+  PGstBusPrivate  = ^TGstBusPrivate;
+  T_GstBus = record
+      object_ : TGstObject;
+      priv : PGstBusPrivate;
+     _gst_reserved : array[0..3] of Tgpointer;
+  end;
+  TGstBus = T_GstBus;
+  PGstBus = ^TGstBus;
+
+  TGstClockPrivate = record
+  end;
+  PGstClockPrivate  = ^TGstClockPrivate;
+
+  T_GstClock = record
+      object_ : TGstObject;
+      priv : PGstClockPrivate;
+      _gst_reserved : array[0..3] of Tgpointer;
+    end;
+  TGstClock = T_GstClock;
+  GstClock = T_GstClock;
+  PGstClock  = ^GstClock;
+
+
+  T_GstElement = record
+      object_ : TGstObject;
+      state_lock : TGRecMutex;
+      state_cond : TGCond;
+      state_cookie : Tguint32;
+      target_state : TGstState;
+      current_state : TGstState;
+      next_state : TGstState;
+      pending_state : TGstState;
+      last_return : TGstStateChangeReturn;
+      bus : PGstBus;
+      clock : PGstClock;
+      base_time : TGstClockTimeDiff;
+      start_time : TGstClockTime;
+      numpads : Tguint16;
+      pads : PGList;
+      numsrcpads : Tguint16;
+      srcpads : PGList;
+      numsinkpads : Tguint16;
+      sinkpads : PGList;
+      pads_cookie : Tguint32;
+      contexts : PGList;
+      _gst_reserved : array[0..(4-1)-1] of Tgpointer;
+    end;
+  TGstElement = T_GstElement;
+  PGstElement = ^TGstElement;
+
+

+ 105 - 0
packages/gstreamer/src/gstregistry.inc

@@ -0,0 +1,105 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *
+ * gstregistry.h: Header for registry handling
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstRegistry  = ^T_GstRegistry;
+    P_GstRegistryClass  = ^T_GstRegistryClass;
+
+    PGstRegistry  = ^TGstRegistry;
+    PGstRegistry_autoptr  = ^TGstRegistry_autoptr;
+    PGstRegistry_listautoptr  = ^TGstRegistry_listautoptr;
+    PGstRegistry_queueautoptr  = ^TGstRegistry_queueautoptr;
+    PGstRegistry_slistautoptr  = ^TGstRegistry_slistautoptr;
+    PGstRegistryPrivate  = ^TGstRegistryPrivate;
+
+    TGstRegistryPrivate = record end;
+    T_GstRegistryPrivate = TGstRegistryPrivate;
+
+
+    T_GstRegistry = record
+        object_ : TGstObject;
+        priv : PGstRegistryPrivate;
+      end;
+    TGstRegistry = T_GstRegistry;
+
+
+    T_GstRegistryClass = record
+        parent_class : TGstObjectClass;
+      end;
+    TGstRegistryClass = T_GstRegistryClass;
+
+
+  TGstRegistry_autoptr = PGstRegistry;
+
+  TGstRegistry_listautoptr = PGList;
+
+  TGstRegistry_slistautoptr = PGSList;
+
+  TGstRegistry_queueautoptr = PGQueue;
+
+  function gst_registry_get_type:TGType;cdecl;external gstreamerlib name 'gst_registry_get_type';
+
+  function gst_registry_get:PGstRegistry;cdecl;external gstreamerlib name 'gst_registry_get';
+
+(* Const before type ignored *)
+  function gst_registry_scan_path(registry:PGstRegistry; path:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_registry_scan_path';
+
+  function gst_registry_add_plugin(registry:PGstRegistry; plugin:PGstPlugin):Tgboolean;cdecl;external gstreamerlib name 'gst_registry_add_plugin';
+
+  procedure gst_registry_remove_plugin(registry:PGstRegistry; plugin:PGstPlugin);cdecl;external gstreamerlib name 'gst_registry_remove_plugin';
+
+  function gst_registry_add_feature(registry:PGstRegistry; feature:PGstPluginFeature):Tgboolean;cdecl;external gstreamerlib name 'gst_registry_add_feature';
+
+  procedure gst_registry_remove_feature(registry:PGstRegistry; feature:PGstPluginFeature);cdecl;external gstreamerlib name 'gst_registry_remove_feature';
+
+  function gst_registry_get_plugin_list(registry:PGstRegistry):PGList;cdecl;external gstreamerlib name 'gst_registry_get_plugin_list';
+
+  function gst_registry_plugin_filter(registry:PGstRegistry; filter:TGstPluginFilter; first:Tgboolean; user_data:Tgpointer):PGList;cdecl;external gstreamerlib name 'gst_registry_plugin_filter';
+
+  function gst_registry_feature_filter(registry:PGstRegistry; filter:TGstPluginFeatureFilter; first:Tgboolean; user_data:Tgpointer):PGList;cdecl;external gstreamerlib name 'gst_registry_feature_filter';
+
+  function gst_registry_get_feature_list(registry:PGstRegistry; _type:TGType):PGList;cdecl;external gstreamerlib name 'gst_registry_get_feature_list';
+
+(* Const before type ignored *)
+  function gst_registry_get_feature_list_by_plugin(registry:PGstRegistry; name:Pgchar):PGList;cdecl;external gstreamerlib name 'gst_registry_get_feature_list_by_plugin';
+
+  function gst_registry_get_feature_list_cookie(registry:PGstRegistry):Tguint32;cdecl;external gstreamerlib name 'gst_registry_get_feature_list_cookie';
+
+(* Const before type ignored *)
+  function gst_registry_find_plugin(registry:PGstRegistry; name:Pgchar):PGstPlugin;cdecl;external gstreamerlib name 'gst_registry_find_plugin';
+
+(* Const before type ignored *)
+  function gst_registry_find_feature(registry:PGstRegistry; name:Pgchar; _type:TGType):PGstPluginFeature;cdecl;external gstreamerlib name 'gst_registry_find_feature';
+
+(* Const before type ignored *)
+  function gst_registry_lookup(registry:PGstRegistry; filename:Pchar):PGstPlugin;cdecl;external gstreamerlib name 'gst_registry_lookup';
+
+(* Const before type ignored *)
+  function gst_registry_lookup_feature(registry:PGstRegistry; name:Pchar):PGstPluginFeature;cdecl;external gstreamerlib name 'gst_registry_lookup_feature';
+
+(* Const before type ignored *)
+  function gst_registry_check_feature_version(registry:PGstRegistry; feature_name:Pgchar; min_major:Tguint; min_minor:Tguint; min_micro:Tguint):Tgboolean;cdecl;external gstreamerlib name 'gst_registry_check_feature_version';
+
+
+

+ 97 - 0
packages/gstreamer/src/gstsample.inc

@@ -0,0 +1,97 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *
+ * gstsample.h: Header for GstSample object
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+}
+  Type
+    PGstSample  = ^TGstSample;
+    PGstSample_autoptr  = ^TGstSample_autoptr;
+    PGstSample_listautoptr  = ^TGstSample_listautoptr;
+    PGstSample_queueautoptr  = ^TGstSample_queueautoptr;
+    PGstSample_slistautoptr  = ^TGstSample_slistautoptr;
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+  TGstSample = record
+    end  ;
+  T_GstSample = TGstSample;
+
+
+  TGstSample_autoptr = PGstSample;
+  TGstSample_listautoptr = PGList;
+  TGstSample_slistautoptr = PGSList;
+  TGstSample_queueautoptr = PGQueue;
+  PPGstSample = ^PGstSample;
+
+  function gst_sample_get_type:TGType;cdecl;external gstreamerlib name 'gst_sample_get_type';
+
+(* Const before type ignored *)
+  function gst_sample_new(buffer:PGstBuffer; caps:PGstCaps; segment:PGstSegment; info:PGstStructure):PGstSample;cdecl;external gstreamerlib name 'gst_sample_new';
+
+  function gst_sample_get_buffer(sample:PGstSample):PGstBuffer;cdecl;external gstreamerlib name 'gst_sample_get_buffer';
+
+  function gst_sample_get_caps(sample:PGstSample):PGstCaps;cdecl;external gstreamerlib name 'gst_sample_get_caps';
+
+  function gst_sample_get_segment(sample:PGstSample):PGstSegment;cdecl;external gstreamerlib name 'gst_sample_get_segment';
+
+(* Const before type ignored *)
+  function gst_sample_get_info(sample:PGstSample):PGstStructure;cdecl;external gstreamerlib name 'gst_sample_get_info';
+
+  function gst_sample_get_buffer_list(sample:PGstSample):PGstBufferList;cdecl;external gstreamerlib name 'gst_sample_get_buffer_list';
+
+  procedure gst_sample_set_buffer_list(sample:PGstSample; buffer_list:PGstBufferList);cdecl;external gstreamerlib name 'gst_sample_set_buffer_list';
+
+  procedure gst_sample_set_buffer(sample:PGstSample; buffer:PGstBuffer);cdecl;external gstreamerlib name 'gst_sample_set_buffer';
+
+  procedure gst_sample_set_caps(sample:PGstSample; caps:PGstCaps);cdecl;external gstreamerlib name 'gst_sample_set_caps';
+
+(* Const before type ignored *)
+  procedure gst_sample_set_segment(sample:PGstSample; segment:PGstSegment);cdecl;external gstreamerlib name 'gst_sample_set_segment';
+
+  function gst_sample_set_info(sample:PGstSample; info:PGstStructure):Tgboolean;cdecl;external gstreamerlib name 'gst_sample_set_info';
+
+  {
+  static inline GstSample *
+  gst_sample_ref (GstSample * sample)
+  
+    return ((GstSample *)gst_mini_object_ref (((GstMiniObject*)(sample))))
+                 ;
+  
+  # 113 "gstsample.h"
+  static inline void
+  gst_sample_unref (GstSample * sample)
+  
+    gst_mini_object_unref (((GstMiniObject*)(sample)));
+  
+  
+  # 170 "gstsample.h"
+  static inline GstSample *
+  gst_sample_copy (const GstSample * buf)
+  
+    return ((GstSample *)gst_mini_object_copy (((const GstMiniObject*)(buf))));
+  
+   }
+
+  var
+    _gst_sample_type : TGType;cvar;external;
+

+ 152 - 0
packages/gstreamer/src/gstsegment.inc

@@ -0,0 +1,152 @@
+{
+/* GStreamer
+ * Copyright (C) 2005 Wim Taymans <[email protected]>
+ *
+ * gstsegment.h: Header for GstSegment subsystem
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstSegment  = ^T_GstSegment;
+    PGstSeekFlags  = ^TGstSeekFlags;
+    PGstSeekType  = ^TGstSeekType;
+    PGstSegment  = ^TGstSegment;
+    PPGstSegment  = ^PGstSegment;
+    PGstSegment_autoptr  = ^TGstSegment_autoptr;
+    PGstSegment_listautoptr  = ^TGstSegment_listautoptr;
+    PGstSegment_queueautoptr  = ^TGstSegment_queueautoptr;
+    PGstSegment_slistautoptr  = ^TGstSegment_slistautoptr;
+    PGstSegmentFlags  = ^TGstSegmentFlags;
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+    TGstSeekType = (
+      GST_SEEK_TYPE_NONE := 0,
+      GST_SEEK_TYPE_SET := 1,
+      GST_SEEK_TYPE_END := 2
+    );
+
+    TGstSeekFlags = (
+      GST_SEEK_FLAG_NONE := 0,
+      GST_SEEK_FLAG_FLUSH := 1 shl 0,
+      GST_SEEK_FLAG_ACCURATE := 1 shl 1,
+      GST_SEEK_FLAG_KEY_UNIT := 1 shl 2,
+      GST_SEEK_FLAG_SEGMENT := 1 shl 3,
+      GST_SEEK_FLAG_TRICKMODE := 1 shl 4,
+      GST_SEEK_FLAG_SKIP := 1 shl 4,
+      GST_SEEK_FLAG_SNAP_BEFORE := 1 shl 5,
+      GST_SEEK_FLAG_SNAP_AFTER := 1 shl 6,
+      GST_SEEK_FLAG_SNAP_NEAREST := Ord(GST_SEEK_FLAG_SNAP_BEFORE) or ord(GST_SEEK_FLAG_SNAP_AFTER),
+      GST_SEEK_FLAG_TRICKMODE_KEY_UNITS := 1 shl 7,
+      GST_SEEK_FLAG_TRICKMODE_NO_AUDIO := 1 shl 8
+      );
+
+    TGstSegmentFlags = (
+      GST_SEGMENT_FLAG_NONE := Ord(GST_SEEK_FLAG_NONE),
+      GST_SEGMENT_FLAG_RESET := Ord(GST_SEEK_FLAG_FLUSH),
+      GST_SEGMENT_FLAG_TRICKMODE := Ord(GST_SEEK_FLAG_TRICKMODE),
+      GST_SEGMENT_FLAG_SKIP := Ord(GST_SEEK_FLAG_TRICKMODE),
+      GST_SEGMENT_FLAG_SEGMENT := Ord(GST_SEEK_FLAG_SEGMENT),
+      GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS := Ord(GST_SEEK_FLAG_TRICKMODE_KEY_UNITS),
+      GST_SEGMENT_FLAG_TRICKMODE_NO_AUDIO := Ord(GST_SEEK_FLAG_TRICKMODE_NO_AUDIO)
+     );
+    T_GstSegment = record
+        flags : TGstSegmentFlags;
+        rate : Tgdouble;
+        applied_rate : Tgdouble;
+        format : TGstFormat;
+        base : Tguint64;
+        offset : Tguint64;
+        start : Tguint64;
+        stop : Tguint64;
+        time : Tguint64;
+        position : Tguint64;
+        duration : Tguint64;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstSegment  = T_GstSegment;
+
+  TGstSegment_autoptr = PGstSegment;
+
+  TGstSegment_listautoptr = PGList;
+
+  TGstSegment_slistautoptr = PGSList;
+
+  TGstSegment_queueautoptr = PGQueue;
+
+  function gst_segment_get_type:TGType;cdecl;external gstreamerlib name 'gst_segment_get_type';
+
+  function gst_segment_new:PGstSegment;cdecl;external gstreamerlib name 'gst_segment_new';
+
+(* Const before type ignored *)
+  function gst_segment_copy(segment:PGstSegment):PGstSegment;cdecl;external gstreamerlib name 'gst_segment_copy';
+
+(* Const before type ignored *)
+  procedure gst_segment_copy_into(src:PGstSegment; dest:PGstSegment);cdecl;external gstreamerlib name 'gst_segment_copy_into';
+
+  procedure gst_segment_free(segment:PGstSegment);cdecl;external gstreamerlib name 'gst_segment_free';
+
+  procedure gst_segment_init(segment:PGstSegment; format:TGstFormat);cdecl;external gstreamerlib name 'gst_segment_init';
+
+(* Const before type ignored *)
+  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';
+
+(* Const before type ignored *)
+  function gst_segment_to_stream_time(segment:PGstSegment; format:TGstFormat; position:Tguint64):Tguint64;cdecl;external gstreamerlib name 'gst_segment_to_stream_time';
+
+(* Const before type ignored *)
+  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';
+
+(* Const before type ignored *)
+  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';
+
+(* Const before type ignored *)
+  function gst_segment_to_running_time(segment:PGstSegment; format:TGstFormat; position:Tguint64):Tguint64;cdecl;external gstreamerlib name 'gst_segment_to_running_time';
+
+(* Const before type ignored *)
+  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';
+
+(* Const before type ignored *)
+  function gst_segment_to_position(segment:PGstSegment; format:TGstFormat; running_time:Tguint64):Tguint64;cdecl;external gstreamerlib name 'gst_segment_to_position';
+
+(* Const before type ignored *)
+  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';
+
+(* Const before type ignored *)
+  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';
+
+  function gst_segment_set_running_time(segment:PGstSegment; format:TGstFormat; running_time:Tguint64):Tgboolean;cdecl;external gstreamerlib name 'gst_segment_set_running_time';
+
+  function gst_segment_offset_running_time(segment:PGstSegment; format:TGstFormat; offset:Tgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_segment_offset_running_time';
+
+(* Const before type ignored *)
+  function gst_segment_clip(segment:PGstSegment; format:TGstFormat; start:Tguint64; stop:Tguint64; clip_start:Pguint64; 
+             clip_stop:Pguint64):Tgboolean;cdecl;external gstreamerlib name 'gst_segment_clip';
+
+  function gst_segment_do_seek(segment:PGstSegment; rate:Tgdouble; format:TGstFormat; flags:TGstSeekFlags; start_type:TGstSeekType; 
+             start:Tguint64; stop_type:TGstSeekType; stop:Tguint64; update:Pgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_segment_do_seek';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_segment_is_equal(s0:PGstSegment; s1:PGstSegment):Tgboolean;cdecl;external gstreamerlib name 'gst_segment_is_equal';
+
+
+

+ 77 - 0
packages/gstreamer/src/gststreamcollection.inc

@@ -0,0 +1,77 @@
+{
+/* GStreamer
+ * Copyright (C) 2015 Centricular Ltd
+ *  @author: Edward Hervey <[email protected]>
+ *  @author: Jan Schmidt <[email protected]>
+ *
+ * gststreams.h : Header for GstStreamCollection subsystem
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+}
+  Type
+    P_GstStreamCollection  = ^T_GstStreamCollection;
+    P_GstStreamCollectionClass  = ^T_GstStreamCollectionClass;
+    PGstStreamCollection  = ^TGstStreamCollection;
+    PPGstStreamCollection  = ^PGstStreamCollection;
+    PGstStreamCollection_autoptr  = ^TGstStreamCollection_autoptr;
+    PGstStreamCollection_listautoptr  = ^TGstStreamCollection_listautoptr;
+    PGstStreamCollection_queueautoptr  = ^TGstStreamCollection_queueautoptr;
+    PGstStreamCollection_slistautoptr  = ^TGstStreamCollection_slistautoptr;
+    PGstStreamCollectionPrivate  = ^TGstStreamCollectionPrivate;
+
+    TGstStreamCollectionPrivate = record
+    end;
+    T_GstStreamCollectionPrivate = TGstStreamCollectionPrivate;
+
+    T_GstStreamCollection = record
+        object_ : TGstObject;
+        upstream_id : Pgchar;
+        priv : PGstStreamCollectionPrivate;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstStreamCollection = T_GstStreamCollection;
+
+    T_GstStreamCollectionClass = record
+        parent_class : TGstObjectClass;
+        stream_notify : procedure (collection:PGstStreamCollection; stream:PGstStream; pspec:PGParamSpec);cdecl;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+
+  TGstStreamCollection_autoptr = PGstStreamCollection;
+
+  TGstStreamCollection_listautoptr = PGList;
+
+  TGstStreamCollection_slistautoptr = PGSList;
+
+  TGstStreamCollection_queueautoptr = PGQueue;
+
+  function gst_stream_collection_get_type:TGType;cdecl;external gstreamerlib name 'gst_stream_collection_get_type';
+
+(* Const before type ignored *)
+  function gst_stream_collection_new(upstream_id:Pgchar):PGstStreamCollection;cdecl;external gstreamerlib name 'gst_stream_collection_new';
+
+(* Const before type ignored *)
+  function gst_stream_collection_get_upstream_id(collection:PGstStreamCollection):Pgchar;cdecl;external gstreamerlib name 'gst_stream_collection_get_upstream_id';
+
+  function gst_stream_collection_get_size(collection:PGstStreamCollection):Tguint;cdecl;external gstreamerlib name 'gst_stream_collection_get_size';
+
+  function gst_stream_collection_get_stream(collection:PGstStreamCollection; index:Tguint):PGstStream;cdecl;external gstreamerlib name 'gst_stream_collection_get_stream';
+
+  function gst_stream_collection_add_stream(collection:PGstStreamCollection; stream:PGstStream):Tgboolean;cdecl;external gstreamerlib name 'gst_stream_collection_add_stream';
+
+
+

+ 107 - 0
packages/gstreamer/src/gststreams.inc

@@ -0,0 +1,107 @@
+{
+/* GStreamer
+ * Copyright (C) 2015 Centricular Ltd
+ *  @author: Edward Hervey <[email protected]>
+ *  @author: Jan Schmidt <[email protected]>
+ *
+ * gststreams.h : Header for GstStream subsystem
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    PGstStream  = ^TGstStream;
+    PPGstStream  = ^PGstStream;
+    PGstStream_autoptr  = ^TGstStream_autoptr;
+    PGstStream_listautoptr  = ^TGstStream_listautoptr;
+    PGstStream_queueautoptr  = ^TGstStream_queueautoptr;
+    PGstStream_slistautoptr  = ^TGstStream_slistautoptr;
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+    PGstStreamType = ^TGstStreamType;
+    TGstStreamType = (
+      GST_STREAM_TYPE_UNKNOWN := 1 shl 0,
+      GST_STREAM_TYPE_AUDIO := 1 shl 1,
+      GST_STREAM_TYPE_VIDEO := 1 shl 2,
+      GST_STREAM_TYPE_CONTAINER := 1 shl 3,
+      GST_STREAM_TYPE_TEXT := 1 shl 4
+    );
+    TGstStreamPrivate = record end;
+    T_GstStreamPrivate = TGstStreamPrivate;
+    PGstStreamPrivate = ^TGstStreamPrivate;
+(* Const before type ignored *)
+    P_GstStream = ^T_GstStream;
+    T_GstStream = record
+        object_ : TGstObject;
+        stream_id : Pgchar;
+        priv : PGstStreamPrivate;
+        _gst_reserved : array[0..(GST_PADDING)-1] of Tgpointer;
+      end;
+    TGstStream  = T_GstStream ;
+
+    P_GstStreamClass = ^T_GstStreamClass;
+    T_GstStreamClass = record
+        parent_class : TGstObjectClass;
+        _gst_reserved : array[0..(GST_PADDING)-1] of Tgpointer;
+     end;
+   TGstStreamClass = T_GstStreamClass;
+
+
+
+
+  TGstStream_autoptr = PGstStream;
+
+  TGstStream_listautoptr = PGList;
+
+  TGstStream_slistautoptr = PGSList;
+
+  TGstStream_queueautoptr = PGQueue;
+
+
+
+(* Const before type ignored *)
+
+  function gst_stream_new(stream_id:Pgchar; caps:PGstCaps; _type:TGstStreamType; flags:TGstStreamFlags):PGstStream;cdecl;external gstreamerlib name 'gst_stream_new';
+
+(* Const before type ignored *)
+  function gst_stream_get_stream_id(stream:PGstStream):Pgchar;cdecl;external gstreamerlib name 'gst_stream_get_stream_id';
+
+  procedure gst_stream_set_stream_flags(stream:PGstStream; flags:TGstStreamFlags);cdecl;external gstreamerlib name 'gst_stream_set_stream_flags';
+
+  function gst_stream_get_stream_flags(stream:PGstStream):TGstStreamFlags;cdecl;external gstreamerlib name 'gst_stream_get_stream_flags';
+
+  procedure gst_stream_set_stream_type(stream:PGstStream; stream_type:TGstStreamType);cdecl;external gstreamerlib name 'gst_stream_set_stream_type';
+
+  function gst_stream_get_stream_type(stream:PGstStream):TGstStreamType;cdecl;external gstreamerlib name 'gst_stream_get_stream_type';
+
+  procedure gst_stream_set_tags(stream:PGstStream; tags:PGstTagList);cdecl;external gstreamerlib name 'gst_stream_set_tags';
+
+  function gst_stream_get_tags(stream:PGstStream):PGstTagList;cdecl;external gstreamerlib name 'gst_stream_get_tags';
+
+  procedure gst_stream_set_caps(stream:PGstStream; caps:PGstCaps);cdecl;external gstreamerlib name 'gst_stream_set_caps';
+
+  function gst_stream_get_caps(stream:PGstStream):PGstCaps;cdecl;external gstreamerlib name 'gst_stream_get_caps';
+
+(* Const before type ignored *)
+  function gst_stream_type_get_name(stype:TGstStreamType):Pgchar;cdecl;external gstreamerlib name 'gst_stream_type_get_name';
+
+
+

+ 327 - 0
packages/gstreamer/src/gststructure.inc

@@ -0,0 +1,327 @@
+{
+/* GStreamer
+ * Copyright (C) 2003 David A. Schleef <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstStructure  = ^T_GstStructure;
+    Pgboolean  = ^Tgboolean;
+    PGDate  = ^TGDate;
+
+//    PGstClockTime  = ^TGstClockTime;
+//    PGstDateTime  = ^TGstDateTime;
+    PGstStructure  = ^TGstStructure;
+    PPGstStructure  = ^PGstStructure;
+    PGstStructure_autoptr  = ^TGstStructure_autoptr;
+    PGstStructure_listautoptr  = ^TGstStructure_listautoptr;
+    PGstStructure_queueautoptr  = ^TGstStructure_queueautoptr;
+    PGstStructure_slistautoptr  = ^TGstStructure_slistautoptr;
+    Pguint  = ^Tguint;
+    Pguint64  = ^Tguint64;
+    PGValue  = ^TGValue;
+    PGValueArray  = ^TGValueArray;
+    PGstClockTime_ = Pointer;
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+   PPGValueArray_ = Pointer;
+
+
+(* Const before type ignored *)
+
+    TGstStructureForeachFunc = function (field_id:TGQuark; value:PGValue; user_data:Tgpointer):Tgboolean;cdecl;
+
+    TGstStructureMapFunc = function (field_id:TGQuark; value:PGValue; user_data:Tgpointer):Tgboolean;cdecl;
+
+    TGstStructureFilterMapFunc = function (field_id:TGQuark; value:PGValue; user_data:Tgpointer):Tgboolean;cdecl;
+    T_GstStructure = record
+        _type : TGType;
+        name : TGQuark;
+      end;
+    TGstStructure = T_GstStructure;
+
+  TGstStructure_autoptr = PGstStructure;
+  TGstStructure_listautoptr = PGList;
+  TGstStructure_slistautoptr = PGSList;
+  TGstStructure_queueautoptr = PGQueue;
+
+
+  function gst_structure_get_type:TGType;cdecl;external gstreamerlib name 'gst_structure_get_type';
+
+(* Const before type ignored *)
+  function gst_structure_new_empty(name:Pgchar):PGstStructure;cdecl;external gstreamerlib name 'gst_structure_new_empty';
+
+  function gst_structure_new_id_empty(quark:TGQuark):PGstStructure;cdecl;external gstreamerlib name 'gst_structure_new_id_empty';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_new(name:Pgchar; firstfield:Pgchar; args:array of const):PGstStructure;cdecl;external gstreamerlib name 'gst_structure_new';
+
+  function gst_structure_new(name:Pgchar; firstfield:Pgchar):PGstStructure;cdecl;external gstreamerlib name 'gst_structure_new';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_new_valist(name:Pgchar; firstfield:Pgchar; varargs:Tva_list):PGstStructure;cdecl;external gstreamerlib name 'gst_structure_new_valist';
+
+  function gst_structure_new_id(name_quark:TGQuark; field_quark:TGQuark; args:array of const):PGstStructure;cdecl;external gstreamerlib name 'gst_structure_new_id';
+
+  function gst_structure_new_id(name_quark:TGQuark; field_quark:TGQuark):PGstStructure;cdecl;external gstreamerlib name 'gst_structure_new_id';
+
+(* Const before type ignored *)
+  function gst_structure_new_from_string(_string:Pgchar):PGstStructure;cdecl;external gstreamerlib name 'gst_structure_new_from_string';
+
+(* Const before type ignored *)
+  function gst_structure_copy(structure:PGstStructure):PGstStructure;cdecl;external gstreamerlib name 'gst_structure_copy';
+
+  function gst_structure_set_parent_refcount(structure:PGstStructure; refcount:Pgint):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_set_parent_refcount';
+
+  procedure gst_structure_free(structure:PGstStructure);cdecl;external gstreamerlib name 'gst_structure_free';
+
+  procedure gst_clear_structure(structure_ptr:PPGstStructure);cdecl;external gstreamerlib name 'gst_clear_structure';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_name(structure:PGstStructure):Pgchar;cdecl;external gstreamerlib name 'gst_structure_get_name';
+
+(* Const before type ignored *)
+  function gst_structure_get_name_id(structure:PGstStructure):TGQuark;cdecl;external gstreamerlib name 'gst_structure_get_name_id';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_has_name(structure:PGstStructure; name:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_has_name';
+
+(* Const before type ignored *)
+  procedure gst_structure_set_name(structure:PGstStructure; name:Pgchar);cdecl;external gstreamerlib name 'gst_structure_set_name';
+
+(* Const before type ignored *)
+  procedure gst_structure_id_set_value(structure:PGstStructure; field:TGQuark; value:PGValue);cdecl;external gstreamerlib name 'gst_structure_id_set_value';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_structure_set_value(structure:PGstStructure; fieldname:Pgchar; value:PGValue);cdecl;external gstreamerlib name 'gst_structure_set_value';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_structure_set_array(structure:PGstStructure; fieldname:Pgchar; array_:PGValueArray);cdecl;external gstreamerlib name 'gst_structure_set_array';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_structure_set_list(structure:PGstStructure; fieldname:Pgchar; array_:PGValueArray);cdecl;external gstreamerlib name 'gst_structure_set_list';
+
+  procedure gst_structure_id_take_value(structure:PGstStructure; field:TGQuark; value:PGValue);cdecl;external gstreamerlib name 'gst_structure_id_take_value';
+
+(* Const before type ignored *)
+  procedure gst_structure_take_value(structure:PGstStructure; fieldname:Pgchar; value:PGValue);cdecl;external gstreamerlib name 'gst_structure_take_value';
+
+(* Const before type ignored *)
+  procedure gst_structure_set(structure:PGstStructure; fieldname:Pgchar; args:array of const);cdecl;external gstreamerlib name 'gst_structure_set';
+
+  procedure gst_structure_set(structure:PGstStructure; fieldname:Pgchar);cdecl;external gstreamerlib name 'gst_structure_set';
+
+(* Const before type ignored *)
+  procedure gst_structure_set_valist(structure:PGstStructure; fieldname:Pgchar; varargs:Tva_list);cdecl;external gstreamerlib name 'gst_structure_set_valist';
+
+  procedure gst_structure_id_set(structure:PGstStructure; fieldname:TGQuark; args:array of const);cdecl;external gstreamerlib name 'gst_structure_id_set';
+
+  procedure gst_structure_id_set(structure:PGstStructure; fieldname:TGQuark);cdecl;external gstreamerlib name 'gst_structure_id_set';
+
+  procedure gst_structure_id_set_valist(structure:PGstStructure; fieldname:TGQuark; varargs:Tva_list);cdecl;external gstreamerlib name 'gst_structure_id_set_valist';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_valist(structure:PGstStructure; first_fieldname:Pchar; args:Tva_list):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get_valist';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get(structure:PGstStructure; first_fieldname:Pchar; args:array of const):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get';
+
+  function gst_structure_get(structure:PGstStructure; first_fieldname:Pchar):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get';
+
+(* Const before type ignored *)
+  function gst_structure_id_get_valist(structure:PGstStructure; first_field_id:TGQuark; args:Tva_list):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_id_get_valist';
+
+(* Const before type ignored *)
+  function gst_structure_id_get(structure:PGstStructure; first_field_id:TGQuark; args:array of const):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_id_get';
+
+  function gst_structure_id_get(structure:PGstStructure; first_field_id:TGQuark):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_id_get';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_id_get_value(structure:PGstStructure; field:TGQuark):PGValue;cdecl;external gstreamerlib name 'gst_structure_id_get_value';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_value(structure:PGstStructure; fieldname:Pgchar):PGValue;cdecl;external gstreamerlib name 'gst_structure_get_value';
+
+(* Const before type ignored *)
+  procedure gst_structure_remove_field(structure:PGstStructure; fieldname:Pgchar);cdecl;external gstreamerlib name 'gst_structure_remove_field';
+
+(* Const before type ignored *)
+  procedure gst_structure_remove_fields(structure:PGstStructure; fieldname:Pgchar; args:array of const);cdecl;external gstreamerlib name 'gst_structure_remove_fields';
+
+  procedure gst_structure_remove_fields(structure:PGstStructure; fieldname:Pgchar);cdecl;external gstreamerlib name 'gst_structure_remove_fields';
+
+(* Const before type ignored *)
+  procedure gst_structure_remove_fields_valist(structure:PGstStructure; fieldname:Pgchar; varargs:Tva_list);cdecl;external gstreamerlib name 'gst_structure_remove_fields_valist';
+
+  procedure gst_structure_remove_all_fields(structure:PGstStructure);cdecl;external gstreamerlib name 'gst_structure_remove_all_fields';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_field_type(structure:PGstStructure; fieldname:Pgchar):TGType;cdecl;external gstreamerlib name 'gst_structure_get_field_type';
+
+(* Const before type ignored *)
+  function gst_structure_foreach(structure:PGstStructure; func:TGstStructureForeachFunc; user_data:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_foreach';
+
+  function gst_structure_map_in_place(structure:PGstStructure; func:TGstStructureMapFunc; user_data:Tgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_map_in_place';
+
+  procedure gst_structure_filter_and_map_in_place(structure:PGstStructure; func:TGstStructureFilterMapFunc; user_data:Tgpointer);cdecl;external gstreamerlib name 'gst_structure_filter_and_map_in_place';
+
+(* Const before type ignored *)
+  function gst_structure_n_fields(structure:PGstStructure):Tgint;cdecl;external gstreamerlib name 'gst_structure_n_fields';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_nth_field_name(structure:PGstStructure; index:Tguint):Pgchar;cdecl;external gstreamerlib name 'gst_structure_nth_field_name';
+
+(* Const before type ignored *)
+  function gst_structure_id_has_field(structure:PGstStructure; field:TGQuark):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_id_has_field';
+
+(* Const before type ignored *)
+  function gst_structure_id_has_field_typed(structure:PGstStructure; field:TGQuark; _type:TGType):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_id_has_field_typed';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_has_field(structure:PGstStructure; fieldname:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_has_field';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_has_field_typed(structure:PGstStructure; fieldname:Pgchar; _type:TGType):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_has_field_typed';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_boolean(structure:PGstStructure; fieldname:Pgchar; value:Pgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get_boolean';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_int(structure:PGstStructure; fieldname:Pgchar; value:Pgint):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get_int';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_uint(structure:PGstStructure; fieldname:Pgchar; value:Pguint):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get_uint';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_int64(structure:PGstStructure; fieldname:Pgchar; value:Pgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get_int64';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_uint64(structure:PGstStructure; fieldname:Pgchar; value:Pguint64):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get_uint64';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_double(structure:PGstStructure; fieldname:Pgchar; value:Pgdouble):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get_double';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_date(structure:PGstStructure; fieldname:Pgchar; value:PPGDate):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get_date';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_date_time(structure:PGstStructure; fieldname:Pgchar; value:PPGstDateTime):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get_date_time';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_clock_time(structure:PGstStructure; fieldname:Pgchar; value:PGstClockTime_):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get_clock_time';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_string(structure:PGstStructure; fieldname:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_structure_get_string';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_enum(structure:PGstStructure; fieldname:Pgchar; enumtype:TGType; value:Pgint):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get_enum';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_fraction(structure:PGstStructure; fieldname:Pgchar; value_numerator:Pgint; value_denominator:Pgint):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get_fraction';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_get_flagset(structure:PGstStructure; fieldname:Pgchar; value_flags:Pguint; value_mask:Pguint):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get_flagset';
+
+(* Const before type ignored *)
+  function gst_structure_get_array(structure:PGstStructure; fieldname:Pgchar; array_:PPGValueArray_):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get_array';
+
+(* Const before type ignored *)
+  function gst_structure_get_list(structure:PGstStructure; fieldname:Pgchar; array_:PPGValueArray_):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_get_list';
+
+(* Const before type ignored *)
+  function gst_structure_to_string(structure:PGstStructure):Pgchar;cdecl;external gstreamerlib name 'gst_structure_to_string';
+
+(* Const before type ignored *)
+  function gst_structure_from_string(_string:Pgchar; end_:PPgchar):PGstStructure;cdecl;external gstreamerlib name 'gst_structure_from_string';
+
+(* Const before type ignored *)
+  function gst_structure_fixate_field_nearest_int(structure:PGstStructure; field_name:Pchar; target:longint):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_fixate_field_nearest_int';
+
+(* Const before type ignored *)
+  function gst_structure_fixate_field_nearest_double(structure:PGstStructure; field_name:Pchar; target:double):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_fixate_field_nearest_double';
+
+(* Const before type ignored *)
+  function gst_structure_fixate_field_boolean(structure:PGstStructure; field_name:Pchar; target:Tgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_fixate_field_boolean';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_fixate_field_string(structure:PGstStructure; field_name:Pchar; target:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_fixate_field_string';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_fixate_field_nearest_fraction(structure:PGstStructure; field_name:Pchar; target_numerator:Tgint; target_denominator:Tgint):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_fixate_field_nearest_fraction';
+
+(* Const before type ignored *)
+  function gst_structure_fixate_field(structure:PGstStructure; field_name:Pchar):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_fixate_field';
+
+  procedure gst_structure_fixate(structure:PGstStructure);cdecl;external gstreamerlib name 'gst_structure_fixate';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_is_equal(structure1:PGstStructure; structure2:PGstStructure):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_is_equal';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_is_subset(subset:PGstStructure; superset:PGstStructure):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_is_subset';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_can_intersect(struct1:PGstStructure; struct2:PGstStructure):Tgboolean;cdecl;external gstreamerlib name 'gst_structure_can_intersect';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_structure_intersect(struct1:PGstStructure; struct2:PGstStructure):PGstStructure;cdecl;external gstreamerlib name 'gst_structure_intersect';
+
+
+  var
+    _gst_structure_type : TGType;cvar;external;
+

+ 69 - 0
packages/gstreamer/src/gstsystemclock.inc

@@ -0,0 +1,69 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *                    2005 Wim Taymans <[email protected]>
+ *
+ * gstsystemclock.h: A clock implementation based on system time
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstSystemClock  = ^T_GstSystemClock;
+    P_GstSystemClockClass  = ^T_GstSystemClockClass;
+    PGstClockType  = ^TGstClockType;
+    PGstSystemClock  = ^TGstSystemClock;
+    PGstSystemClock_autoptr  = ^TGstSystemClock_autoptr;
+    PGstSystemClock_listautoptr  = ^TGstSystemClock_listautoptr;
+    PGstSystemClock_queueautoptr  = ^TGstSystemClock_queueautoptr;
+    PGstSystemClock_slistautoptr  = ^TGstSystemClock_slistautoptr;
+    PGstSystemClockPrivate  = ^TGstSystemClockPrivate;
+
+    TGstSystemClockPrivate = record end;
+    T_GstSystemClockPrivate = TGstSystemClockPrivate;
+
+    TGstClockType = (
+      GST_CLOCK_TYPE_REALTIME := 0,
+      GST_CLOCK_TYPE_MONOTONIC := 1,
+      GST_CLOCK_TYPE_OTHER := 2);
+    T_GstSystemClock = record
+        clock : TGstClock;
+        priv : PGstSystemClockPrivate;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstSystemClock = T_GstSystemClock ;
+
+    T_GstSystemClockClass = record
+        parent_class : TGstClockClass;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstSystemClockClass = T_GstSystemClockClass ;
+
+        TGstSystemClock_autoptr = PGstSystemClock;
+
+        TGstSystemClock_listautoptr = PGList;
+
+        TGstSystemClock_slistautoptr = PGSList;
+
+        TGstSystemClock_queueautoptr = PGQueue;
+
+  function gst_system_clock_get_type:TGType;cdecl;external gstreamerlib name 'gst_system_clock_get_type';
+  function gst_system_clock_obtain:PGstClock;cdecl;external gstreamerlib name 'gst_system_clock_obtain';
+  procedure gst_system_clock_set_default(new_clock:PGstClock);cdecl;external gstreamerlib name 'gst_system_clock_set_default';
+
+

+ 436 - 0
packages/gstreamer/src/gsttaglist.inc

@@ -0,0 +1,436 @@
+{
+/* GStreamer
+ * Copyright (C) 2003 Benjamin Otte <[email protected]>
+ *
+ * gsttaglist.h: Header for tag support
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+const
+  GST_TAG_TITLE = 'title';
+  GST_TAG_TITLE_SORTNAME = 'title-sortname';
+  GST_TAG_ARTIST = 'artist';
+  GST_TAG_ARTIST_SORTNAME = 'artist-sortname';
+  GST_TAG_ALBUM = 'album';
+  GST_TAG_ALBUM_SORTNAME = 'album-sortname';
+  GST_TAG_ALBUM_ARTIST = 'album-artist';
+  GST_TAG_ALBUM_ARTIST_SORTNAME = 'album-artist-sortname';
+  GST_TAG_COMPOSER = 'composer';
+  GST_TAG_CONDUCTOR = 'conductor';
+  GST_TAG_DATE = 'date';
+  GST_TAG_DATE_TIME = 'datetime';
+  GST_TAG_GENRE = 'genre';
+  GST_TAG_COMMENT = 'comment';
+  GST_TAG_EXTENDED_COMMENT = 'extended-comment';
+  GST_TAG_TRACK_NUMBER = 'track-number';
+  GST_TAG_TRACK_COUNT = 'track-count';
+  GST_TAG_ALBUM_VOLUME_NUMBER = 'album-disc-number';
+  GST_TAG_ALBUM_VOLUME_COUNT = 'album-disc-count';
+  GST_TAG_LOCATION = 'location';
+  GST_TAG_HOMEPAGE = 'homepage';
+  GST_TAG_DESCRIPTION = 'description';
+  GST_TAG_VERSION = 'version';
+  GST_TAG_ISRC = 'isrc';
+  GST_TAG_ORGANIZATION = 'organization';
+  GST_TAG_COPYRIGHT = 'copyright';
+  GST_TAG_COPYRIGHT_URI = 'copyright-uri';
+  GST_TAG_ENCODED_BY = 'encoded-by';
+  GST_TAG_CONTACT = 'contact';
+  GST_TAG_LICENSE = 'license';
+  GST_TAG_LICENSE_URI = 'license-uri';
+  GST_TAG_PERFORMER = 'performer';
+  GST_TAG_DURATION = 'duration';
+  GST_TAG_CODEC = 'codec';
+  GST_TAG_VIDEO_CODEC = 'video-codec';
+  GST_TAG_AUDIO_CODEC = 'audio-codec';
+  GST_TAG_SUBTITLE_CODEC = 'subtitle-codec';
+  GST_TAG_CONTAINER_FORMAT = 'container-format';
+  GST_TAG_BITRATE = 'bitrate';
+  GST_TAG_NOMINAL_BITRATE = 'nominal-bitrate';
+  GST_TAG_MINIMUM_BITRATE = 'minimum-bitrate';
+  GST_TAG_MAXIMUM_BITRATE = 'maximum-bitrate';
+  GST_TAG_SERIAL = 'serial';
+  GST_TAG_ENCODER = 'encoder';
+  GST_TAG_ENCODER_VERSION = 'encoder-version';
+  GST_TAG_TRACK_GAIN = 'replaygain-track-gain';
+  GST_TAG_TRACK_PEAK = 'replaygain-track-peak';
+  GST_TAG_ALBUM_GAIN = 'replaygain-album-gain';
+  GST_TAG_ALBUM_PEAK = 'replaygain-album-peak';
+  GST_TAG_REFERENCE_LEVEL = 'replaygain-reference-level';
+  GST_TAG_LANGUAGE_CODE = 'language-code';
+  GST_TAG_LANGUAGE_NAME = 'language-name';
+  GST_TAG_IMAGE = 'image';
+  GST_TAG_PREVIEW_IMAGE = 'preview-image';
+  GST_TAG_ATTACHMENT = 'attachment';
+  GST_TAG_BEATS_PER_MINUTE = 'beats-per-minute';
+  GST_TAG_KEYWORDS = 'keywords';
+  GST_TAG_GEO_LOCATION_NAME = 'geo-location-name';
+  GST_TAG_GEO_LOCATION_LATITUDE = 'geo-location-latitude';
+  GST_TAG_GEO_LOCATION_LONGITUDE = 'geo-location-longitude';
+  GST_TAG_GEO_LOCATION_ELEVATION = 'geo-location-elevation';
+  GST_TAG_GEO_LOCATION_COUNTRY = 'geo-location-country';
+  GST_TAG_GEO_LOCATION_CITY = 'geo-location-city';
+  GST_TAG_GEO_LOCATION_SUBLOCATION = 'geo-location-sublocation';
+  GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR = 'geo-location-horizontal-error';
+  GST_TAG_GEO_LOCATION_MOVEMENT_SPEED = 'geo-location-movement-speed';
+  GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION = 'geo-location-movement-direction';
+  GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION = 'geo-location-capture-direction';
+  GST_TAG_SHOW_NAME = 'show-name';
+  GST_TAG_SHOW_SORTNAME = 'show-sortname';
+  GST_TAG_SHOW_EPISODE_NUMBER = 'show-episode-number';
+  GST_TAG_SHOW_SEASON_NUMBER = 'show-season-number';
+  GST_TAG_LYRICS = 'lyrics';
+  GST_TAG_COMPOSER_SORTNAME = 'composer-sortname';
+  GST_TAG_GROUPING = 'grouping';
+  GST_TAG_USER_RATING = 'user-rating';
+  GST_TAG_DEVICE_MANUFACTURER = 'device-manufacturer';
+  GST_TAG_DEVICE_MODEL = 'device-model';
+  GST_TAG_APPLICATION_NAME = 'application-name';
+  GST_TAG_APPLICATION_DATA = 'application-data';
+  GST_TAG_IMAGE_ORIENTATION = 'image-orientation';
+  GST_TAG_PUBLISHER = 'publisher';
+  GST_TAG_INTERPRETED_BY = 'interpreted-by';
+  GST_TAG_MIDI_BASE_NOTE = 'midi-base-note';
+  GST_TAG_PRIVATE_DATA = 'private-data';
+
+  Type
+    P_GstTagList  = ^T_GstTagList;
+    PGstTagFlag  = ^TGstTagFlag;
+    PGstTagList  = ^TGstTagList;
+    PPGstTagList  = ^PGstTagList;
+    PGstTagList_autoptr  = ^TGstTagList_autoptr;
+    PGstTagList_listautoptr  = ^TGstTagList_listautoptr;
+    PGstTagList_queueautoptr  = ^TGstTagList_queueautoptr;
+    PGstTagList_slistautoptr  = ^TGstTagList_slistautoptr;
+    PGstTagMergeMode  = ^TGstTagMergeMode;
+    PGstTagScope  = ^TGstTagScope;
+
+    TGstTagMergeMode = (GST_TAG_MERGE_UNDEFINED,
+      GST_TAG_MERGE_REPLACE_ALL,
+      GST_TAG_MERGE_REPLACE,GST_TAG_MERGE_APPEND,
+      GST_TAG_MERGE_PREPEND,GST_TAG_MERGE_KEEP,
+      GST_TAG_MERGE_KEEP_ALL,GST_TAG_MERGE_COUNT
+      );
+
+    TGstTagFlag = (
+      GST_TAG_FLAG_UNDEFINED,
+      GST_TAG_FLAG_META,
+      GST_TAG_FLAG_ENCODED,
+      GST_TAG_FLAG_DECODED,
+      GST_TAG_FLAG_COUNT
+    );
+
+    T_GstTagList = record
+        mini_object : TGstMiniObject;
+    end;
+    TGstTagList = T_GstTagList;
+
+
+  TGstTagList_autoptr = PGstTagList;
+
+  TGstTagList_listautoptr = PGList;
+
+  TGstTagList_slistautoptr = PGSList;
+
+  TGstTagList_queueautoptr = PGQueue;
+
+
+    TGstTagForeachFunc = procedure (list:PGstTagList; tag:Pgchar; user_data:Tgpointer);cdecl;
+(* Const before type ignored *)
+
+    TGstTagMergeFunc = procedure (dest:PGValue; src:PGValue);cdecl;
+
+  TGstTagScope = (GST_TAG_SCOPE_STREAM,GST_TAG_SCOPE_GLOBAL);
+
+  function gst_tag_list_get_type:TGType;cdecl;external gstreamerlib name 'gst_tag_list_get_type';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_tag_register(name:Pgchar; flag:TGstTagFlag; _type:TGType; nick:Pgchar; blurb:Pgchar; 
+              func:TGstTagMergeFunc);cdecl;external gstreamerlib name 'gst_tag_register';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_tag_register_static(name:Pgchar; flag:TGstTagFlag; _type:TGType; nick:Pgchar; blurb:Pgchar; 
+              func:TGstTagMergeFunc);cdecl;external gstreamerlib name 'gst_tag_register_static';
+
+(* Const before type ignored *)
+  procedure gst_tag_merge_use_first(dest:PGValue; src:PGValue);cdecl;external gstreamerlib name 'gst_tag_merge_use_first';
+
+(* Const before type ignored *)
+  procedure gst_tag_merge_strings_with_comma(dest:PGValue; src:PGValue);cdecl;external gstreamerlib name 'gst_tag_merge_strings_with_comma';
+
+(* Const before type ignored *)
+  function gst_tag_exists(tag:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_exists';
+
+(* Const before type ignored *)
+  function gst_tag_get_type(tag:Pgchar):TGType;cdecl;external gstreamerlib name 'gst_tag_get_type';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_get_nick(tag:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_tag_get_nick';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_get_description(tag:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_tag_get_description';
+
+(* Const before type ignored *)
+  function gst_tag_get_flag(tag:Pgchar):TGstTagFlag;cdecl;external gstreamerlib name 'gst_tag_get_flag';
+
+(* Const before type ignored *)
+  function gst_tag_is_fixed(tag:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_is_fixed';
+
+
+
+  function gst_tag_list_new_empty:PGstTagList;cdecl;external gstreamerlib name 'gst_tag_list_new_empty';
+
+(* Const before type ignored *)
+  function gst_tag_list_new(tag:Pgchar; args:array of const):PGstTagList;cdecl;external gstreamerlib name 'gst_tag_list_new';
+
+  function gst_tag_list_new(tag:Pgchar):PGstTagList;cdecl;external gstreamerlib name 'gst_tag_list_new';
+
+  function gst_tag_list_new_valist(var_args:Tva_list):PGstTagList;cdecl;external gstreamerlib name 'gst_tag_list_new_valist';
+
+  procedure gst_tag_list_set_scope(list:PGstTagList; scope:TGstTagScope);cdecl;external gstreamerlib name 'gst_tag_list_set_scope';
+
+(* Const before type ignored *)
+  function gst_tag_list_get_scope(list:PGstTagList):TGstTagScope;cdecl;external gstreamerlib name 'gst_tag_list_get_scope';
+
+(* Const before type ignored *)
+  function gst_tag_list_to_string(list:PGstTagList):Pgchar;cdecl;external gstreamerlib name 'gst_tag_list_to_string';
+
+(* Const before type ignored *)
+  function gst_tag_list_new_from_string(str:Pgchar):PGstTagList;cdecl;external gstreamerlib name 'gst_tag_list_new_from_string';
+
+(* Const before type ignored *)
+  function gst_tag_list_n_tags(list:PGstTagList):Tgint;cdecl;external gstreamerlib name 'gst_tag_list_n_tags';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_nth_tag_name(list:PGstTagList; index:Tguint):Pgchar;cdecl;external gstreamerlib name 'gst_tag_list_nth_tag_name';
+
+(* Const before type ignored *)
+  function gst_tag_list_is_empty(list:PGstTagList):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_is_empty';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_is_equal(list1:PGstTagList; list2:PGstTagList):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_is_equal';
+
+(* Const before type ignored *)
+  procedure gst_tag_list_insert(into:PGstTagList; from:PGstTagList; mode:TGstTagMergeMode);cdecl;external gstreamerlib name 'gst_tag_list_insert';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_merge(list1:PGstTagList; list2:PGstTagList; mode:TGstTagMergeMode):PGstTagList;cdecl;external gstreamerlib name 'gst_tag_list_merge';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_tag_size(list:PGstTagList; tag:Pgchar):Tguint;cdecl;external gstreamerlib name 'gst_tag_list_get_tag_size';
+
+(* Const before type ignored *)
+  procedure gst_tag_list_add(list:PGstTagList; mode:TGstTagMergeMode; tag:Pgchar; args:array of const);cdecl;external gstreamerlib name 'gst_tag_list_add';
+
+  procedure gst_tag_list_add(list:PGstTagList; mode:TGstTagMergeMode; tag:Pgchar);cdecl;external gstreamerlib name 'gst_tag_list_add';
+
+(* Const before type ignored *)
+  procedure gst_tag_list_add_values(list:PGstTagList; mode:TGstTagMergeMode; tag:Pgchar; args:array of const);cdecl;external gstreamerlib name 'gst_tag_list_add_values';
+
+  procedure gst_tag_list_add_values(list:PGstTagList; mode:TGstTagMergeMode; tag:Pgchar);cdecl;external gstreamerlib name 'gst_tag_list_add_values';
+
+(* Const before type ignored *)
+  procedure gst_tag_list_add_valist(list:PGstTagList; mode:TGstTagMergeMode; tag:Pgchar; var_args:Tva_list);cdecl;external gstreamerlib name 'gst_tag_list_add_valist';
+
+(* Const before type ignored *)
+  procedure gst_tag_list_add_valist_values(list:PGstTagList; mode:TGstTagMergeMode; tag:Pgchar; var_args:Tva_list);cdecl;external gstreamerlib name 'gst_tag_list_add_valist_values';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_tag_list_add_value(list:PGstTagList; mode:TGstTagMergeMode; tag:Pgchar; value:PGValue);cdecl;external gstreamerlib name 'gst_tag_list_add_value';
+
+(* Const before type ignored *)
+  procedure gst_tag_list_remove_tag(list:PGstTagList; tag:Pgchar);cdecl;external gstreamerlib name 'gst_tag_list_remove_tag';
+
+(* Const before type ignored *)
+  procedure gst_tag_list_foreach(list:PGstTagList; func:TGstTagForeachFunc; user_data:Tgpointer);cdecl;external gstreamerlib name 'gst_tag_list_foreach';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_value_index(list:PGstTagList; tag:Pgchar; index:Tguint):PGValue;cdecl;external gstreamerlib name 'gst_tag_list_get_value_index';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_copy_value(dest:PGValue; list:PGstTagList; tag:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_copy_value';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_boolean(list:PGstTagList; tag:Pgchar; value:Pgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_boolean';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_boolean_index(list:PGstTagList; tag:Pgchar; index:Tguint; value:Pgboolean):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_boolean_index';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_int(list:PGstTagList; tag:Pgchar; value:Pgint):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_int';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_int_index(list:PGstTagList; tag:Pgchar; index:Tguint; value:Pgint):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_int_index';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_uint(list:PGstTagList; tag:Pgchar; value:Pguint):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_uint';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_uint_index(list:PGstTagList; tag:Pgchar; index:Tguint; value:Pguint):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_uint_index';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_int64(list:PGstTagList; tag:Pgchar; value:Pgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_int64';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_int64_index(list:PGstTagList; tag:Pgchar; index:Tguint; value:Pgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_int64_index';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_uint64(list:PGstTagList; tag:Pgchar; value:Pguint64):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_uint64';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_uint64_index(list:PGstTagList; tag:Pgchar; index:Tguint; value:Pguint64):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_uint64_index';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_float(list:PGstTagList; tag:Pgchar; value:Pgfloat):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_float';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_float_index(list:PGstTagList; tag:Pgchar; index:Tguint; value:Pgfloat):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_float_index';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_double(list:PGstTagList; tag:Pgchar; value:Pgdouble):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_double';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_double_index(list:PGstTagList; tag:Pgchar; index:Tguint; value:Pgdouble):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_double_index';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_string(list:PGstTagList; tag:Pgchar; value:PPgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_string';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_string_index(list:PGstTagList; tag:Pgchar; index:Tguint; value:PPgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_string_index';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_peek_string_index(list:PGstTagList; tag:Pgchar; index:Tguint; value:PPgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_peek_string_index';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_pointer(list:PGstTagList; tag:Pgchar; value:Pgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_pointer';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_pointer_index(list:PGstTagList; tag:Pgchar; index:Tguint; value:Pgpointer):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_pointer_index';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_date(list:PGstTagList; tag:Pgchar; value:PPGDate):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_date';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_date_index(list:PGstTagList; tag:Pgchar; index:Tguint; value:PPGDate):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_date_index';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_date_time(list:PGstTagList; tag:Pgchar; value:PPGstDateTime):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_date_time';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_date_time_index(list:PGstTagList; tag:Pgchar; index:Tguint; value:PPGstDateTime):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_date_time_index';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_sample(list:PGstTagList; tag:Pgchar; sample:PPGstSample):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_sample';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_tag_list_get_sample_index(list:PGstTagList; tag:Pgchar; index:Tguint; sample:PPGstSample):Tgboolean;cdecl;external gstreamerlib name 'gst_tag_list_get_sample_index';
+
+  {
+  static inline GstTagList *
+  gst_tag_list_ref (GstTagList * taglist)
+  
+    return (GstTagList *) gst_mini_object_ref (((GstMiniObject*)(taglist)));
+  
+  
+  
+  
+  
+  
+  
+  
+  static inline void
+  gst_tag_list_unref (GstTagList * taglist)
+  
+    gst_mini_object_unref (((GstMiniObject*)(taglist)));
+  
+  # 497 "gsttaglist.h"
+  static inline void
+  gst_clear_tag_list (GstTagList ** taglist_ptr)
+  
+    do  _Static_assert (sizeof *(((GstMiniObject **) taglist_ptr)) == sizeof (gpointer), "Expression evaluates to false"); __typeof__((((GstMiniObject **) taglist_ptr))) _pp = (((GstMiniObject **) taglist_ptr)); __typeof__(*(((GstMiniObject **) taglist_ptr))) _ptr = *_pp; *_pp = 
+  # 500 "gsttaglist.h" 3 4
+   ((void *)0)
+  # 500 "gsttaglist.h"
+   ; if (_ptr) (gst_mini_object_unref) (_ptr);  while (0) ;
+  
+  # 519 "gsttaglist.h"
+  static inline GstTagList *
+  gst_tag_list_copy (const GstTagList * taglist)
+  
+    return ((GstTagList *) (gst_mini_object_copy (((GstMiniObject*)(taglist)))));
+  
+  # 544 "gsttaglist.h"
+  static inline gboolean
+  gst_tag_list_replace (GstTagList **old_taglist, GstTagList *new_taglist)
+  
+      return gst_mini_object_replace ((GstMiniObject **) old_taglist,
+          (GstMiniObject *) new_taglist);
+  
+  # 566 "gsttaglist.h"
+  static inline gboolean
+  gst_tag_list_take (GstTagList **old_taglist, GstTagList *new_taglist)
+  
+    return gst_mini_object_take ((GstMiniObject **) old_taglist,
+        (GstMiniObject *) new_taglist);
+  
+  
+   }
+
+  var
+    _gst_tag_list_type : TGType;cvar;external;
+

+ 70 - 0
packages/gstreamer/src/gsttagsetter.inc

@@ -0,0 +1,70 @@
+{
+/* GStreamer
+ * Copyright (C) 2003 Benjamin Otte <[email protected]>
+ *
+ * gsttagsetter.h: Interfaces for tagging
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+}
+  Type
+    P_GstTagSetterInterface  = ^T_GstTagSetterInterface;
+    PGstTagSetter  = ^TGstTagSetter;
+
+    TGstTagSetter = record end;
+    T_GstTagSetter = TGstTagSetter;
+
+
+    T_GstTagSetterInterface = record
+        g_iface : TGTypeInterface;
+      end;
+    TGstTagSetterInterface = T_GstTagSetterInterface ;
+
+  function gst_tag_setter_get_type:TGType;cdecl;external gstreamerlib name 'gst_tag_setter_get_type';
+
+  procedure gst_tag_setter_reset_tags(setter:PGstTagSetter);cdecl;external gstreamerlib name 'gst_tag_setter_reset_tags';
+
+(* Const before type ignored *)
+  procedure gst_tag_setter_merge_tags(setter:PGstTagSetter; list:PGstTagList; mode:TGstTagMergeMode);cdecl;external gstreamerlib name 'gst_tag_setter_merge_tags';
+
+(* Const before type ignored *)
+  procedure gst_tag_setter_add_tags(setter:PGstTagSetter; mode:TGstTagMergeMode; tag:Pgchar; args:array of const);cdecl;external gstreamerlib name 'gst_tag_setter_add_tags';
+
+  procedure gst_tag_setter_add_tags(setter:PGstTagSetter; mode:TGstTagMergeMode; tag:Pgchar);cdecl;external gstreamerlib name 'gst_tag_setter_add_tags';
+
+(* Const before type ignored *)
+  procedure gst_tag_setter_add_tag_values(setter:PGstTagSetter; mode:TGstTagMergeMode; tag:Pgchar; args:array of const);cdecl;external gstreamerlib name 'gst_tag_setter_add_tag_values';
+
+  procedure gst_tag_setter_add_tag_values(setter:PGstTagSetter; mode:TGstTagMergeMode; tag:Pgchar);cdecl;external gstreamerlib name 'gst_tag_setter_add_tag_values';
+
+(* Const before type ignored *)
+  procedure gst_tag_setter_add_tag_valist(setter:PGstTagSetter; mode:TGstTagMergeMode; tag:Pgchar; var_args:Tva_list);cdecl;external gstreamerlib name 'gst_tag_setter_add_tag_valist';
+
+(* Const before type ignored *)
+  procedure gst_tag_setter_add_tag_valist_values(setter:PGstTagSetter; mode:TGstTagMergeMode; tag:Pgchar; var_args:Tva_list);cdecl;external gstreamerlib name 'gst_tag_setter_add_tag_valist_values';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_tag_setter_add_tag_value(setter:PGstTagSetter; mode:TGstTagMergeMode; tag:Pgchar; value:PGValue);cdecl;external gstreamerlib name 'gst_tag_setter_add_tag_value';
+
+(* Const before type ignored *)
+  function gst_tag_setter_get_tag_list(setter:PGstTagSetter):PGstTagList;cdecl;external gstreamerlib name 'gst_tag_setter_get_tag_list';
+
+  procedure gst_tag_setter_set_tag_merge_mode(setter:PGstTagSetter; mode:TGstTagMergeMode);cdecl;external gstreamerlib name 'gst_tag_setter_set_tag_merge_mode';
+
+  function gst_tag_setter_get_tag_merge_mode(setter:PGstTagSetter):TGstTagMergeMode;cdecl;external gstreamerlib name 'gst_tag_setter_get_tag_merge_mode';
+
+

+ 113 - 0
packages/gstreamer/src/gsttask.inc

@@ -0,0 +1,113 @@
+{
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <[email protected]>
+ *               <2005> Wim Taymans <[email protected]>
+ *
+ * gsttask.h: Streaming tasks
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstTask  = ^T_GstTask;
+    P_GstTaskClass  = ^T_GstTaskClass;
+    PGRecMutex  = ^TGRecMutex;
+    PGstTask  = ^TGstTask;
+    PGstTask_autoptr  = ^TGstTask_autoptr;
+    PGstTask_listautoptr  = ^TGstTask_listautoptr;
+    PGstTask_queueautoptr  = ^TGstTask_queueautoptr;
+    PGstTask_slistautoptr  = ^TGstTask_slistautoptr;
+    PGstTaskPrivate  = ^TGstTaskPrivate;
+    PGstTaskState  = ^TGstTaskState;
+    PGThread  = ^TGThread;
+
+    TGstTaskFunction = procedure (user_data:Tgpointer);cdecl;
+
+    TGstTaskPrivate = record end;
+
+    T_GstTaskPrivate = TGstTaskPrivate;
+
+
+    TGstTaskState = (GST_TASK_STARTED,GST_TASK_STOPPED,GST_TASK_PAUSED
+      );
+
+    TGstTaskThreadFunc = procedure (task:PGstTask; thread:PGThread; user_data:Tgpointer);cdecl;
+
+    T_GstTask = record
+        object_ : TGstObject;
+        state : TGstTaskState;
+        cond : TGCond;
+        lock : PGRecMutex;
+        func : TGstTaskFunction;
+        user_data : Tgpointer;
+        notify : TGDestroyNotify;
+        running : Tgboolean;
+        thread : PGThread;
+        priv : PGstTaskPrivate;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstTask = T_GstTask;
+
+
+    T_GstTaskClass = record
+        parent_class : TGstObjectClass;
+        pool : PGstTaskPool;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstTaskClass = T_GstTaskClass;
+
+  TGstTask_autoptr = PGstTask;
+
+
+  TGstTask_listautoptr = PGList;
+
+
+  TGstTask_slistautoptr = PGSList;
+
+
+  TGstTask_queueautoptr = PGQueue;
+
+  procedure gst_task_cleanup_all;cdecl;external gstreamerlib name 'gst_task_cleanup_all';
+
+  function gst_task_get_type:TGType;cdecl;external gstreamerlib name 'gst_task_get_type';
+
+  function gst_task_new(func:TGstTaskFunction; user_data:Tgpointer; notify:TGDestroyNotify):PGstTask;cdecl;external gstreamerlib name 'gst_task_new';
+
+  procedure gst_task_set_lock(task:PGstTask; mutex:PGRecMutex);cdecl;external gstreamerlib name 'gst_task_set_lock';
+
+  function gst_task_get_pool(task:PGstTask):PGstTaskPool;cdecl;external gstreamerlib name 'gst_task_get_pool';
+
+  procedure gst_task_set_pool(task:PGstTask; pool:PGstTaskPool);cdecl;external gstreamerlib name 'gst_task_set_pool';
+
+  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';
+
+  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';
+
+  function gst_task_get_state(task:PGstTask):TGstTaskState;cdecl;external gstreamerlib name 'gst_task_get_state';
+
+  function gst_task_set_state(task:PGstTask; state:TGstTaskState):Tgboolean;cdecl;external gstreamerlib name 'gst_task_set_state';
+
+  function gst_task_start(task:PGstTask):Tgboolean;cdecl;external gstreamerlib name 'gst_task_start';
+
+  function gst_task_stop(task:PGstTask):Tgboolean;cdecl;external gstreamerlib name 'gst_task_stop';
+
+  function gst_task_pause(task:PGstTask):Tgboolean;cdecl;external gstreamerlib name 'gst_task_pause';
+
+  function gst_task_join(task:PGstTask):Tgboolean;cdecl;external gstreamerlib name 'gst_task_join';
+
+
+

+ 80 - 0
packages/gstreamer/src/gsttaskpool.inc

@@ -0,0 +1,80 @@
+{
+/* GStreamer
+ * Copyright (C) <2009> Wim Taymans <[email protected]>
+ *
+ * gsttaskpool.h: Pool for creating streaming threads
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstTaskPool  = ^T_GstTaskPool;
+    P_GstTaskPoolClass  = ^T_GstTaskPoolClass;
+    PGstTaskPool  = ^TGstTaskPool;
+    PGstTaskPool_autoptr  = ^TGstTaskPool_autoptr;
+    PGstTaskPool_listautoptr  = ^TGstTaskPool_listautoptr;
+    PGstTaskPool_queueautoptr  = ^TGstTaskPool_queueautoptr;
+    PGstTaskPool_slistautoptr  = ^TGstTaskPool_slistautoptr;
+    PGThreadPool  = ^TGThreadPool;
+
+    TGstTaskPoolFunction = procedure (user_data:pointer);cdecl;
+
+    T_GstTaskPool = record
+        object_ : TGstObject;
+        pool : PGThreadPool;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstTaskPool = T_GstTaskPool;
+
+
+    T_GstTaskPoolClass = record
+        parent_class : TGstObjectClass;
+        prepare : procedure (pool:PGstTaskPool; error:PPGError);cdecl;
+        cleanup : procedure (pool:PGstTaskPool);cdecl;
+        push : function (pool:PGstTaskPool; func:TGstTaskPoolFunction; user_data:Tgpointer; error:PPGError):Tgpointer;cdecl;
+        join : procedure (pool:PGstTaskPool; id:Tgpointer);cdecl;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstTaskPoolClass = T_GstTaskPoolClass;
+
+
+
+  TGstTaskPool_autoptr = PGstTaskPool;
+
+
+  TGstTaskPool_listautoptr = PGList;
+
+
+  TGstTaskPool_slistautoptr = PGSList;
+
+
+  TGstTaskPool_queueautoptr = PGQueue;
+
+  function gst_task_pool_get_type:TGType;cdecl;external gstreamerlib name 'gst_task_pool_get_type';
+
+  function gst_task_pool_new:PGstTaskPool;cdecl;external gstreamerlib name 'gst_task_pool_new';
+
+  procedure gst_task_pool_prepare(pool:PGstTaskPool; error:PPGError);cdecl;external gstreamerlib name 'gst_task_pool_prepare';
+
+  function gst_task_pool_push(pool:PGstTaskPool; func:TGstTaskPoolFunction; user_data:Tgpointer; error:PPGError):Tgpointer;cdecl;external gstreamerlib name 'gst_task_pool_push';
+
+  procedure gst_task_pool_join(pool:PGstTaskPool; id:Tgpointer);cdecl;external gstreamerlib name 'gst_task_pool_join';
+
+  procedure gst_task_pool_cleanup(pool:PGstTaskPool);cdecl;external gstreamerlib name 'gst_task_pool_cleanup';
+
+
+

+ 172 - 0
packages/gstreamer/src/gsttoc.inc

@@ -0,0 +1,172 @@
+{
+/* GStreamer
+ * (c) 2010, 2012 Alexander Saprykin <[email protected]>
+ *
+ * gsttoc.h: generic TOC API declaration
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+}
+  Type
+    Pgint64  = ^Tgint64;
+    PGstToc  = ^TGstToc;
+    PPGstToc = ^PGstToc;
+    PGstToc_autoptr  = ^TGstToc_autoptr;
+    PGstToc_listautoptr  = ^TGstToc_listautoptr;
+    PGstToc_queueautoptr  = ^TGstToc_queueautoptr;
+    PGstToc_slistautoptr  = ^TGstToc_slistautoptr;
+    PGstTocEntry  = ^TGstTocEntry;
+    PGstTocEntry_autoptr  = ^TGstTocEntry_autoptr;
+    PGstTocEntry_listautoptr  = ^TGstTocEntry_listautoptr;
+    PGstTocEntry_queueautoptr  = ^TGstTocEntry_queueautoptr;
+    PGstTocEntry_slistautoptr  = ^TGstTocEntry_slistautoptr;
+    PGstTocEntryType  = ^TGstTocEntryType;
+    PGstTocLoopType  = ^TGstTocLoopType;
+    PGstTocScope  = ^TGstTocScope;
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+
+    TGstTocEntry = record end;
+
+    T_GstTocEntry = TGstTocEntry;
+
+    TGstToc = record end;
+    T_GstToc = TGstToc;
+
+    TGstTocScope = (GST_TOC_SCOPE_GLOBAL := 1,GST_TOC_SCOPE_CURRENT := 2
+      );
+
+    TGstTocEntryType = (GST_TOC_ENTRY_TYPE_ANGLE := -(3),GST_TOC_ENTRY_TYPE_VERSION := -(2),
+      GST_TOC_ENTRY_TYPE_EDITION := -(1),GST_TOC_ENTRY_TYPE_INVALID := 0,
+      GST_TOC_ENTRY_TYPE_TITLE := 1,GST_TOC_ENTRY_TYPE_TRACK := 2,
+      GST_TOC_ENTRY_TYPE_CHAPTER := 3);
+
+    TGstTocLoopType = (GST_TOC_LOOP_NONE := 0,GST_TOC_LOOP_FORWARD,
+      GST_TOC_LOOP_REVERSE,GST_TOC_LOOP_PING_PONG
+      );
+
+
+  TGstToc_autoptr = PGstToc;
+
+  TGstToc_listautoptr = PGList;
+
+  TGstToc_slistautoptr = PGSList;
+
+  TGstToc_queueautoptr = PGQueue;
+
+  TGstTocEntry_autoptr = PGstTocEntry;
+
+  TGstTocEntry_listautoptr = PGList;
+
+  TGstTocEntry_slistautoptr = PGSList;
+
+  TGstTocEntry_queueautoptr = PGQueue;
+
+
+  function gst_toc_get_type:TGType;cdecl;external gstreamerlib name 'gst_toc_get_type';
+
+  function gst_toc_entry_get_type:TGType;cdecl;external gstreamerlib name 'gst_toc_entry_get_type';
+
+  function gst_toc_new(scope:TGstTocScope):PGstToc;cdecl;external gstreamerlib name 'gst_toc_new';
+
+(* Const before type ignored *)
+  function gst_toc_get_scope(toc:PGstToc):TGstTocScope;cdecl;external gstreamerlib name 'gst_toc_get_scope';
+
+  procedure gst_toc_set_tags(toc:PGstToc; tags:PGstTagList);cdecl;external gstreamerlib name 'gst_toc_set_tags';
+
+  procedure gst_toc_merge_tags(toc:PGstToc; tags:PGstTagList; mode:TGstTagMergeMode);cdecl;external gstreamerlib name 'gst_toc_merge_tags';
+
+(* Const before type ignored *)
+  function gst_toc_get_tags(toc:PGstToc):PGstTagList;cdecl;external gstreamerlib name 'gst_toc_get_tags';
+
+  procedure gst_toc_append_entry(toc:PGstToc; entry:PGstTocEntry);cdecl;external gstreamerlib name 'gst_toc_append_entry';
+
+(* Const before type ignored *)
+  function gst_toc_get_entries(toc:PGstToc):PGList;cdecl;external gstreamerlib name 'gst_toc_get_entries';
+
+  procedure gst_toc_dump(toc:PGstToc);cdecl;external gstreamerlib name 'gst_toc_dump';
+
+(* Const before type ignored *)
+  function gst_toc_entry_new(_type:TGstTocEntryType; uid:Pgchar):PGstTocEntry;cdecl;external gstreamerlib name 'gst_toc_entry_new';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_toc_find_entry(toc:PGstToc; uid:Pgchar):PGstTocEntry;cdecl;external gstreamerlib name 'gst_toc_find_entry';
+
+(* Const before type ignored *)
+  function gst_toc_entry_get_entry_type(entry:PGstTocEntry):TGstTocEntryType;cdecl;external gstreamerlib name 'gst_toc_entry_get_entry_type';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_toc_entry_get_uid(entry:PGstTocEntry):Pgchar;cdecl;external gstreamerlib name 'gst_toc_entry_get_uid';
+
+  procedure gst_toc_entry_append_sub_entry(entry:PGstTocEntry; subentry:PGstTocEntry);cdecl;external gstreamerlib name 'gst_toc_entry_append_sub_entry';
+
+(* Const before type ignored *)
+  function gst_toc_entry_get_sub_entries(entry:PGstTocEntry):PGList;cdecl;external gstreamerlib name 'gst_toc_entry_get_sub_entries';
+
+  procedure gst_toc_entry_set_tags(entry:PGstTocEntry; tags:PGstTagList);cdecl;external gstreamerlib name 'gst_toc_entry_set_tags';
+
+  procedure gst_toc_entry_merge_tags(entry:PGstTocEntry; tags:PGstTagList; mode:TGstTagMergeMode);cdecl;external gstreamerlib name 'gst_toc_entry_merge_tags';
+
+(* Const before type ignored *)
+  function gst_toc_entry_get_tags(entry:PGstTocEntry):PGstTagList;cdecl;external gstreamerlib name 'gst_toc_entry_get_tags';
+
+(* Const before type ignored *)
+  function gst_toc_entry_is_alternative(entry:PGstTocEntry):Tgboolean;cdecl;external gstreamerlib name 'gst_toc_entry_is_alternative';
+
+(* Const before type ignored *)
+  function gst_toc_entry_is_sequence(entry:PGstTocEntry):Tgboolean;cdecl;external gstreamerlib name 'gst_toc_entry_is_sequence';
+
+  procedure gst_toc_entry_set_start_stop_times(entry:PGstTocEntry; start:Tgint64; stop:Tgint64);cdecl;external gstreamerlib name 'gst_toc_entry_set_start_stop_times';
+
+(* Const before type ignored *)
+  function gst_toc_entry_get_start_stop_times(entry:PGstTocEntry; start:Pgint64; stop:Pgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_toc_entry_get_start_stop_times';
+
+  procedure gst_toc_entry_set_loop(entry:PGstTocEntry; loop_type:TGstTocLoopType; repeat_count:Tgint);cdecl;external gstreamerlib name 'gst_toc_entry_set_loop';
+
+(* Const before type ignored *)
+  function gst_toc_entry_get_loop(entry:PGstTocEntry; loop_type:PGstTocLoopType; repeat_count:Pgint):Tgboolean;cdecl;external gstreamerlib name 'gst_toc_entry_get_loop';
+
+  function gst_toc_entry_get_toc(entry:PGstTocEntry):PGstToc;cdecl;external gstreamerlib name 'gst_toc_entry_get_toc';
+
+  function gst_toc_entry_get_parent(entry:PGstTocEntry):PGstTocEntry;cdecl;external gstreamerlib name 'gst_toc_entry_get_parent';
+
+(* Const before type ignored *)
+  function gst_toc_entry_type_get_nick(_type:TGstTocEntryType):Pgchar;cdecl;external gstreamerlib name 'gst_toc_entry_type_get_nick';
+
+  {
+  static inline void
+  _gst_autoptr_toc_unref (GstToc *toc)
+  
+    gst_mini_object_unref(((GstMiniObject*)(toc)));
+  
+  
+  static inline void
+  _gst_autoptr_toc_entry_unref (GstTocEntry *entry)
+  
+    gst_mini_object_unref(((GstMiniObject*)(entry)));
+  
+   }
+
+
+var
+  _gst_toc_type : TGType;cvar;external;
+  _gst_toc_entry_type : TGType;cvar;external;
+

+ 46 - 0
packages/gstreamer/src/gsttocsetter.inc

@@ -0,0 +1,46 @@
+{
+/* GStreamer
+ * Copyright (C) 2010, 2012 Alexander Saprykin <[email protected]>
+ *
+ * gsttocsetter.h: Interfaces for TOC
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+}
+
+  Type
+    P_GstTocSetterInterface  = ^T_GstTocSetterInterface;
+    PGstTocSetter  = ^TGstTocSetter;
+
+    TGstTocSetter = record end;
+    T_GstTocSetter = TGstTocSetter;
+
+
+    T_GstTocSetterInterface = record
+        g_iface : TGTypeInterface;
+      end;
+    TGstTocSetterInterface = T_GstTocSetterInterface;
+
+
+  function gst_toc_setter_get_type:TGType;cdecl;external gstreamerlib name 'gst_toc_setter_get_type';
+
+  procedure gst_toc_setter_reset(setter:PGstTocSetter);cdecl;external gstreamerlib name 'gst_toc_setter_reset';
+
+  function gst_toc_setter_get_toc(setter:PGstTocSetter):PGstToc;cdecl;external gstreamerlib name 'gst_toc_setter_get_toc';
+
+  procedure gst_toc_setter_set_toc(setter:PGstTocSetter; toc:PGstToc);cdecl;external gstreamerlib name 'gst_toc_setter_set_toc';
+
+

+ 61 - 0
packages/gstreamer/src/gsttracer.inc

@@ -0,0 +1,61 @@
+{
+/* GStreamer
+ * Copyright (C) 2013 Stefan Sauer <[email protected]>
+ *
+ * gsttracer.h: tracer base class
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstTracer  = ^T_GstTracer;
+    P_GstTracerClass  = ^T_GstTracerClass;
+    PGstTracer  = ^TGstTracer;
+    PGstTracer_autoptr  = ^TGstTracer_autoptr;
+    PGstTracer_listautoptr  = ^TGstTracer_listautoptr;
+    PGstTracer_queueautoptr  = ^TGstTracer_queueautoptr;
+    PGstTracer_slistautoptr  = ^TGstTracer_slistautoptr;
+    PGstTracerPrivate  = ^TGstTracerPrivate;
+
+    TGstTracerPrivate = record end;
+    T_GstTracerPrivate = TGstTracerPrivate;
+
+    T_GstTracer = record
+        parent : TGstObject;
+        priv : PGstTracerPrivate;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstTracer = T_GstTracer ;
+
+    T_GstTracerClass = record
+        parent_class : TGstObjectClass;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstTracerClass =T_GstTracerClass ;
+
+  TGstTracer_autoptr = PGstTracer;
+
+  TGstTracer_listautoptr = PGList;
+
+  TGstTracer_slistautoptr = PGSList;
+
+  TGstTracer_queueautoptr = PGQueue;
+
+
+function gst_tracer_get_type:TGType;cdecl;external gstreamerlib name 'gst_tracer_get_type';
+
+

+ 56 - 0
packages/gstreamer/src/gsttracerfactory.inc

@@ -0,0 +1,56 @@
+{
+/* GStreamer
+ * Copyright (C) 2013 Stefan Sauer <[email protected]>
+ *
+ * gsttracerfactory.h: tracing subsystem
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+}
+  Type
+    PGstTracerFactory  = ^TGstTracerFactory;
+    PGstTracerFactory_autoptr  = ^TGstTracerFactory_autoptr;
+    PGstTracerFactory_listautoptr  = ^TGstTracerFactory_listautoptr;
+    PGstTracerFactory_queueautoptr  = ^TGstTracerFactory_queueautoptr;
+    PGstTracerFactory_slistautoptr  = ^TGstTracerFactory_slistautoptr;
+
+
+
+    TGstTracerFactory = record end;
+    TGstTracerFactoryClass = record end;
+
+    T_GstTracerFactory = TGstTracerFactory;
+    T_GstTracerFactoryClass = TGstTracerFactoryClass;
+
+
+    TGstTracerFactory_autoptr = PGstTracerFactory;
+
+    TGstTracerFactory_listautoptr = PGList;
+
+    TGstTracerFactory_slistautoptr = PGSList;
+
+    TGstTracerFactory_queueautoptr = PGQueue;
+
+
+  function gst_tracer_factory_get_type:TGType;cdecl;external gstreamerlib name 'gst_tracer_factory_get_type';
+
+  function gst_tracer_factory_get_list:PGList;cdecl;external gstreamerlib name 'gst_tracer_factory_get_list';
+
+  function gst_tracer_factory_get_tracer_type(factory:PGstTracerFactory):TGType;cdecl;external gstreamerlib name 'gst_tracer_factory_get_tracer_type';
+
+

+ 67 - 0
packages/gstreamer/src/gsttracerrecord.inc

@@ -0,0 +1,67 @@
+{
+/* GStreamer
+ * Copyright (C) 2016 Stefan Sauer <[email protected]>
+ *
+ * gsttracerrecord.h: tracer log record class
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    PGstTracerRecord  = ^TGstTracerRecord;
+    PGstTracerRecord_autoptr  = ^TGstTracerRecord_autoptr;
+    PGstTracerRecord_listautoptr  = ^TGstTracerRecord_listautoptr;
+    PGstTracerRecord_queueautoptr  = ^TGstTracerRecord_queueautoptr;
+    PGstTracerRecord_slistautoptr  = ^TGstTracerRecord_slistautoptr;
+    PGstTracerValueFlags  = ^TGstTracerValueFlags;
+    PGstTracerValueScope  = ^TGstTracerValueScope;
+
+
+
+
+    TGstTracerRecord = record end;
+    TGstTracerRecordClass = record end;
+
+    T_GstTracerRecord = TGstTracerRecord;
+    T_GstTracerRecordClass = TGstTracerRecordClass;
+
+  TGstTracerRecord_autoptr = PGstTracerRecord;
+
+  TGstTracerRecord_listautoptr = PGList;
+
+  TGstTracerRecord_slistautoptr = PGSList;
+
+  TGstTracerRecord_queueautoptr = PGQueue;
+
+
+
+  TGstTracerValueScope = (
+    GST_TRACER_VALUE_SCOPE_PROCESS,
+    GST_TRACER_VALUE_SCOPE_THREAD,
+    GST_TRACER_VALUE_SCOPE_ELEMENT,
+    GST_TRACER_VALUE_SCOPE_PAD
+  );
+
+
+  TGstTracerValueFlags = (
+    GST_TRACER_VALUE_FLAGS_NONE := 0,
+    GST_TRACER_VALUE_FLAGS_OPTIONAL := 1 shl 0,
+    GST_TRACER_VALUE_FLAGS_AGGREGATED := 1 shl 1
+   );
+
+function gst_tracer_record_get_type:TGType;cdecl;external gstreamerlib name 'gst_tracer_record_get_type';
+

+ 71 - 0
packages/gstreamer/src/gsttypefind.inc

@@ -0,0 +1,71 @@
+{
+/* GStreamer
+ * Copyright (C) 2003 Benjamin Otte <[email protected]>
+ *
+ * gsttypefind.h: typefinding subsystem
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstTypeFind  = ^T_GstTypeFind;
+    PGstTypeFind  = ^TGstTypeFind;
+    PGstTypeFindProbability  = ^TGstTypeFindProbability;
+
+
+    TGstTypeFindFunction = procedure (find:PGstTypeFind; user_data:Tgpointer);cdecl;
+
+    TGstTypeFindProbability = (
+      GST_TYPE_FIND_NONE := 0,
+      GST_TYPE_FIND_MINIMUM := 1,
+      GST_TYPE_FIND_POSSIBLE := 50,
+      GST_TYPE_FIND_LIKELY := 80,
+      GST_TYPE_FIND_NEARLY_CERTAIN := 99,
+      GST_TYPE_FIND_MAXIMUM := 100
+    );
+
+    T_GstTypeFind = record
+        peek : function (data:Tgpointer; offset:Tgint64; size:Tguint):Pguint8;cdecl;
+        suggest : procedure (data:Tgpointer; probability:Tguint; caps:PGstCaps);cdecl;
+        data : Tgpointer;
+        get_length : function (data:Tgpointer):Tguint64;cdecl;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstTypeFind = T_GstTypeFind ;
+
+
+  function gst_type_find_get_type:TGType;cdecl;external gstreamerlib name 'gst_type_find_get_type';
+
+(* Const before type ignored *)
+  function gst_type_find_peek(find:PGstTypeFind; offset:Tgint64; size:Tguint):Pguint8;cdecl;external gstreamerlib name 'gst_type_find_peek';
+
+  procedure gst_type_find_suggest(find:PGstTypeFind; probability:Tguint; caps:PGstCaps);cdecl;external gstreamerlib name 'gst_type_find_suggest';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_type_find_suggest_simple(find:PGstTypeFind; probability:Tguint; media_type:Pchar; fieldname:Pchar; args:array of const);cdecl;external gstreamerlib name 'gst_type_find_suggest_simple';
+
+  procedure gst_type_find_suggest_simple(find:PGstTypeFind; probability:Tguint; media_type:Pchar; fieldname:Pchar);cdecl;external gstreamerlib name 'gst_type_find_suggest_simple';
+
+  function gst_type_find_get_length(find:PGstTypeFind):Tguint64;cdecl;external gstreamerlib name 'gst_type_find_get_length';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_type_find_register(plugin:PGstPlugin; name:Pgchar; rank:Tguint; func:TGstTypeFindFunction; extensions:Pgchar; 
+             possible_caps:PGstCaps; data:Tgpointer; data_notify:TGDestroyNotify):Tgboolean;cdecl;external gstreamerlib name 'gst_type_find_register';
+
+

+ 59 - 0
packages/gstreamer/src/gsttypefindfactory.inc

@@ -0,0 +1,59 @@
+{
+/* GStreamer
+ * Copyright (C) 2003 Benjamin Otte <[email protected]>
+ *
+ * gsttypefindfactory.h: typefinding subsystem
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    PGstTypeFindFactory  = ^TGstTypeFindFactory;
+    PGstTypeFindFactory_autoptr  = ^TGstTypeFindFactory_autoptr;
+    PGstTypeFindFactory_listautoptr  = ^TGstTypeFindFactory_listautoptr;
+    PGstTypeFindFactory_queueautoptr  = ^TGstTypeFindFactory_queueautoptr;
+    PGstTypeFindFactory_slistautoptr  = ^TGstTypeFindFactory_slistautoptr;
+
+    TGstTypeFindFactory = record end;
+    TGstTypeFindFactoryClass = record end;
+
+    T_GstTypeFindFactory = TGstTypeFindFactory;
+    T_GstTypeFindFactoryClass = TGstTypeFindFactoryClass;
+
+
+  TGstTypeFindFactory_autoptr = PGstTypeFindFactory;
+
+  TGstTypeFindFactory_listautoptr = PGList;
+
+  TGstTypeFindFactory_slistautoptr = PGSList;
+
+  TGstTypeFindFactory_queueautoptr = PGQueue;
+
+
+  function gst_type_find_factory_get_type:TGType;cdecl;external gstreamerlib name 'gst_type_find_factory_get_type';
+
+  function gst_type_find_factory_get_list:PGList;cdecl;external gstreamerlib name 'gst_type_find_factory_get_list';
+
+  function gst_type_find_factory_get_extensions(factory:PGstTypeFindFactory):PPgchar;cdecl;external gstreamerlib name 'gst_type_find_factory_get_extensions';
+
+  function gst_type_find_factory_get_caps(factory:PGstTypeFindFactory):PGstCaps;cdecl;external gstreamerlib name 'gst_type_find_factory_get_caps';
+
+  function gst_type_find_factory_has_function(factory:PGstTypeFindFactory):Tgboolean;cdecl;external gstreamerlib name 'gst_type_find_factory_has_function';
+
+  procedure gst_type_find_factory_call_function(factory:PGstTypeFindFactory; find:PGstTypeFind);cdecl;external gstreamerlib name 'gst_type_find_factory_call_function';
+
+

+ 282 - 0
packages/gstreamer/src/gsturi.inc

@@ -0,0 +1,282 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *                    2014 David Waring, British Broadcasting Corporation
+ *                             <[email protected]>
+ *
+ * gsturi.h: Header for uri to element mappings and URI manipulation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstUri  = ^T_GstUri;
+    P_GstURIHandlerInterface  = ^T_GstURIHandlerInterface;
+    PGHashTable  = ^TGHashTable;
+    PGstUri  = ^TGstUri;
+    PGstUri_autoptr  = ^TGstUri_autoptr;
+    PGstUri_listautoptr  = ^TGstUri_listautoptr;
+    PGstUri_queueautoptr  = ^TGstUri_queueautoptr;
+    PGstUri_slistautoptr  = ^TGstUri_slistautoptr;
+    PGstURIHandler  = ^TGstURIHandler;
+
+    TGstURIError = (
+      GST_URI_ERROR_UNSUPPORTED_PROTOCOL,
+      GST_URI_ERROR_BAD_URI,
+      GST_URI_ERROR_BAD_STATE,
+      GST_URI_ERROR_BAD_REFERENCE
+    );
+
+    TGstURIType = (
+      GST_URI_UNKNOWN,
+      GST_URI_SINK,
+      GST_URI_SRC
+    );
+
+    T_GstURIHandler = record end;
+    TGstURIHandler = T_GstURIHandler;
+
+    T_GstURIHandlerInterface = record
+        parent : TGTypeInterface;
+        get_type : function (_type:TGType):TGstURIType;cdecl;
+        get_protocols : function (_type:TGType):PPgchar;cdecl;
+        get_uri : function (handler:PGstURIHandler):Pgchar;cdecl;
+        set_uri : function (handler:PGstURIHandler; uri:Pgchar; error:PPGError):Tgboolean;cdecl;
+      end;
+
+      
+    T_GstUri = record
+        {undefined structure}
+      end;
+
+    TGstUri = T_GstUri;
+
+  TGstUri_autoptr = PGstUri;
+
+  TGstUri_listautoptr = PGList;
+
+  TGstUri_slistautoptr = PGSList;
+
+  TGstUri_queueautoptr = PGQueue;
+
+(* Const before type ignored *)
+
+  function gst_uri_protocol_is_valid(protocol:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_protocol_is_valid';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_uri_protocol_is_supported(_type:TGstURIType; protocol:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_protocol_is_supported';
+
+(* Const before type ignored *)
+  function gst_uri_is_valid(uri:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_is_valid';
+
+(* Const before type ignored *)
+  function gst_uri_get_protocol(uri:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_protocol';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_uri_has_protocol(uri:Pgchar; protocol:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_has_protocol';
+
+(* Const before type ignored *)
+  function gst_uri_get_location(uri:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_location';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_uri_construct(protocol:Pgchar; location:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_uri_construct';
+
+(* Const before type ignored *)
+  function gst_filename_to_uri(filename:Pgchar; error:PPGError):Pgchar;cdecl;external gstreamerlib name 'gst_filename_to_uri';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_element_make_from_uri(_type:TGstURIType; uri:Pgchar; elementname:Pgchar; error:PPGError):PGstElement;cdecl;external gstreamerlib name 'gst_element_make_from_uri';
+
+  function gst_uri_handler_get_type:TGType;cdecl;external gstreamerlib name 'gst_uri_handler_get_type';
+
+  function gst_uri_handler_get_uri_type(handler:PGstURIHandler):TGstURIType;cdecl;external gstreamerlib name 'gst_uri_handler_get_uri_type';
+
+(* Const before type ignored *)
+(* Const before declarator ignored *)
+  function gst_uri_handler_get_protocols(handler:PGstURIHandler):PPgchar;cdecl;external gstreamerlib name 'gst_uri_handler_get_protocols';
+
+  function gst_uri_handler_get_uri(handler:PGstURIHandler):Pgchar;cdecl;external gstreamerlib name 'gst_uri_handler_get_uri';
+
+(* Const before type ignored *)
+  function gst_uri_handler_set_uri(handler:PGstURIHandler; uri:Pgchar; error:PPGError):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_handler_set_uri';
+
+
+  function gst_uri_get_type:TGType;cdecl;external gstreamerlib name 'gst_uri_get_type';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_uri_new(scheme:Pgchar; userinfo:Pgchar; host:Pgchar; port:Tguint; path:Pgchar; 
+             query:Pgchar; fragment:Pgchar):PGstUri;cdecl;external gstreamerlib name 'gst_uri_new';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_uri_new_with_base(base:PGstUri; scheme:Pgchar; userinfo:Pgchar; host:Pgchar; port:Tguint; 
+             path:Pgchar; query:Pgchar; fragment:Pgchar):PGstUri;cdecl;external gstreamerlib name 'gst_uri_new_with_base';
+
+(* Const before type ignored *)
+  function gst_uri_from_string(uri:Pgchar):PGstUri;cdecl;external gstreamerlib name 'gst_uri_from_string';
+
+(* Const before type ignored *)
+  function gst_uri_from_string_with_base(base:PGstUri; uri:Pgchar):PGstUri;cdecl;external gstreamerlib name 'gst_uri_from_string_with_base';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_uri_equal(first:PGstUri; second:PGstUri):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_equal';
+
+  function gst_uri_join(base_uri:PGstUri; ref_uri:PGstUri):PGstUri;cdecl;external gstreamerlib name 'gst_uri_join';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_uri_join_strings(base_uri:Pgchar; ref_uri:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_uri_join_strings';
+
+(* Const before type ignored *)
+  function gst_uri_is_writable(uri:PGstUri):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_is_writable';
+
+  function gst_uri_make_writable(uri:PGstUri):PGstUri;cdecl;external gstreamerlib name 'gst_uri_make_writable';
+
+(* Const before type ignored *)
+  function gst_uri_to_string(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_to_string';
+
+(* Const before type ignored *)
+  function gst_uri_is_normalized(uri:PGstUri):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_is_normalized';
+
+  function gst_uri_normalize(uri:PGstUri):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_normalize';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_uri_get_scheme(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_scheme';
+
+(* Const before type ignored *)
+  function gst_uri_set_scheme(uri:PGstUri; scheme:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_scheme';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_uri_get_userinfo(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_userinfo';
+
+(* Const before type ignored *)
+  function gst_uri_set_userinfo(uri:PGstUri; userinfo:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_userinfo';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_uri_get_host(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_host';
+
+(* Const before type ignored *)
+  function gst_uri_set_host(uri:PGstUri; host:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_host';
+
+(* Const before type ignored *)
+  function gst_uri_get_port(uri:PGstUri):Tguint;cdecl;external gstreamerlib name 'gst_uri_get_port';
+
+  function gst_uri_set_port(uri:PGstUri; port:Tguint):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_port';
+
+(* Const before type ignored *)
+  function gst_uri_get_path(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_path';
+
+(* Const before type ignored *)
+  function gst_uri_set_path(uri:PGstUri; path:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_path';
+
+(* Const before type ignored *)
+  function gst_uri_get_path_string(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_path_string';
+
+(* Const before type ignored *)
+  function gst_uri_set_path_string(uri:PGstUri; path:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_path_string';
+
+(* Const before type ignored *)
+  function gst_uri_get_path_segments(uri:PGstUri):PGList;cdecl;external gstreamerlib name 'gst_uri_get_path_segments';
+
+  function gst_uri_set_path_segments(uri:PGstUri; path_segments:PGList):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_path_segments';
+
+(* Const before type ignored *)
+  function gst_uri_append_path(uri:PGstUri; relative_path:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_append_path';
+
+(* Const before type ignored *)
+  function gst_uri_append_path_segment(uri:PGstUri; path_segment:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_append_path_segment';
+
+(* Const before type ignored *)
+  function gst_uri_get_query_string(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_query_string';
+
+(* Const before type ignored *)
+  function gst_uri_set_query_string(uri:PGstUri; query:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_query_string';
+
+(* Const before type ignored *)
+  function gst_uri_get_query_table(uri:PGstUri):PGHashTable;cdecl;external gstreamerlib name 'gst_uri_get_query_table';
+
+  function gst_uri_set_query_table(uri:PGstUri; query_table:PGHashTable):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_query_table';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_uri_set_query_value(uri:PGstUri; query_key:Pgchar; query_value:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_query_value';
+
+(* Const before type ignored *)
+  function gst_uri_remove_query_key(uri:PGstUri; query_key:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_remove_query_key';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_uri_query_has_key(uri:PGstUri; query_key:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_query_has_key';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_uri_get_query_value(uri:PGstUri; query_key:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_query_value';
+
+(* Const before type ignored *)
+  function gst_uri_get_query_keys(uri:PGstUri):PGList;cdecl;external gstreamerlib name 'gst_uri_get_query_keys';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_uri_get_fragment(uri:PGstUri):Pgchar;cdecl;external gstreamerlib name 'gst_uri_get_fragment';
+
+(* Const before type ignored *)
+  function gst_uri_set_fragment(uri:PGstUri; fragment:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_uri_set_fragment';
+
+(* Const before type ignored *)
+  function gst_uri_get_media_fragment_table(uri:PGstUri):PGHashTable;cdecl;external gstreamerlib name 'gst_uri_get_media_fragment_table';
+
+  {
+  static inline GstUri *
+  gst_uri_copy (const GstUri * uri)
+  
+    return ((GstUri *)(gst_mini_object_copy (((const GstMiniObject*)(uri)))));
+  
+  # 373 "gsturi.h"
+  static inline GstUri *
+  gst_uri_ref (GstUri * uri)
+  
+    return ((GstUri *)(gst_mini_object_ref (((GstMiniObject*)(uri)))));
+  
+  # 389 "gsturi.h"
+  static inline void
+  gst_uri_unref (GstUri * uri)
+  
+    gst_mini_object_unref (((GstMiniObject*)(uri)));
+  
+   }
+
+

+ 423 - 0
packages/gstreamer/src/gstutils.inc

@@ -0,0 +1,423 @@
+{
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *                    2002 Thomas Vander Stichele <[email protected]>
+ *
+ * gstutils.h: Header for various utility functions
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+Type
+  PPGValueArray = ^PGValueArray;
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+type
+  PGstSearchMode = ^TGstSearchMode;
+  TGstSearchMode = (GST_SEARCH_MODE_EXACT := 0,GST_SEARCH_MODE_BEFORE,
+    GST_SEARCH_MODE_AFTER);
+
+
+
+(* Const before type ignored *)
+
+  procedure gst_util_set_value_from_string(value:PGValue; value_str:Pgchar);cdecl;external gstreamerlib name 'gst_util_set_value_from_string';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_util_set_object_arg(object_:PGObject; name:Pgchar; value:Pgchar);cdecl;external gstreamerlib name 'gst_util_set_object_arg';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_util_set_object_array(object_:PGObject; name:Pgchar; array_:PGValueArray):Tgboolean;cdecl;external gstreamerlib name 'gst_util_set_object_array';
+
+(* Const before type ignored *)
+  function gst_util_get_object_array(object_:PGObject; name:Pgchar; array_:PPGValueArray):Tgboolean;cdecl;external gstreamerlib name 'gst_util_get_object_array';
+
+(* Const before type ignored *)
+  procedure gst_util_dump_mem(mem:Pguchar; size:Tguint);cdecl;external gstreamerlib name 'gst_util_dump_mem';
+
+  procedure gst_util_dump_buffer(buf:PGstBuffer);cdecl;external gstreamerlib name 'gst_util_dump_buffer';
+
+  function gst_util_gdouble_to_guint64(value:Tgdouble):Tguint64;cdecl;external gstreamerlib name 'gst_util_gdouble_to_guint64';
+
+  function gst_util_guint64_to_gdouble(value:Tguint64):Tgdouble;cdecl;external gstreamerlib name 'gst_util_guint64_to_gdouble';
+
+  function gst_util_uint64_scale(val:Tguint64; num:Tguint64; denom:Tguint64):Tguint64;cdecl;external gstreamerlib name 'gst_util_uint64_scale';
+
+  function gst_util_uint64_scale_round(val:Tguint64; num:Tguint64; denom:Tguint64):Tguint64;cdecl;external gstreamerlib name 'gst_util_uint64_scale_round';
+
+  function gst_util_uint64_scale_ceil(val:Tguint64; num:Tguint64; denom:Tguint64):Tguint64;cdecl;external gstreamerlib name 'gst_util_uint64_scale_ceil';
+
+  function gst_util_uint64_scale_int(val:Tguint64; num:Tgint; denom:Tgint):Tguint64;cdecl;external gstreamerlib name 'gst_util_uint64_scale_int';
+
+  function gst_util_uint64_scale_int_round(val:Tguint64; num:Tgint; denom:Tgint):Tguint64;cdecl;external gstreamerlib name 'gst_util_uint64_scale_int_round';
+
+  function gst_util_uint64_scale_int_ceil(val:Tguint64; num:Tgint; denom:Tgint):Tguint64;cdecl;external gstreamerlib name 'gst_util_uint64_scale_int_ceil';
+
+  function gst_util_seqnum_next:Tguint32;cdecl;external gstreamerlib name 'gst_util_seqnum_next';
+
+  function gst_util_seqnum_compare(s1:Tguint32; s2:Tguint32):Tgint32;cdecl;external gstreamerlib name 'gst_util_seqnum_compare';
+
+  function gst_util_group_id_next:Tguint;cdecl;external gstreamerlib name 'gst_util_group_id_next';
+
+  {
+  static inline guint16 __gst_fast_read16(const guint8 *v) 
+    return *(const guint16*)(const void*)(v);
+  
+  static inline guint32 __gst_fast_read32(const guint8 *v) 
+    return *(const guint32*)(const void*)(v);
+  
+  static inline guint64 __gst_fast_read64(const guint8 *v) 
+    return *(const guint64*)(const void*)(v);
+  
+  static inline guint16 __gst_fast_read_swap16(const guint8 *v) 
+    return (((guint16) ( (guint16) ((guint16) (*(const guint16*)(const void*)(v)) >> 8) | (guint16) ((guint16) (*(const guint16*)(const void*)(v)) << 8))));
+  
+  static inline guint32 __gst_fast_read_swap32(const guint8 *v) 
+    return (((guint32) ( (((guint32) (*(const guint32*)(const void*)(v)) & (guint32) 0x000000ffU) << 24) | (((guint32) (*(const guint32*)(const void*)(v)) & (guint32) 0x0000ff00U) << 8) | (((guint32) (*(const guint32*)(const void*)(v)) & (guint32) 0x00ff0000U) >> 8) | (((guint32) (*(const guint32*)(const void*)(v)) & (guint32) 0xff000000U) >> 24))));
+  
+  static inline guint64 __gst_fast_read_swap64(const guint8 *v) 
+    return (((guint64) ( (((guint64) (*(const guint64*)(const void*)(v)) & (guint64) (0x00000000000000ffUL)) << 56) | (((guint64) (*(const guint64*)(const void*)(v)) & (guint64) (0x000000000000ff00UL)) << 40) | (((guint64) (*(const guint64*)(const void*)(v)) & (guint64) (0x0000000000ff0000UL)) << 24) | (((guint64) (*(const guint64*)(const void*)(v)) & (guint64) (0x00000000ff000000UL)) << 8) | (((guint64) (*(const guint64*)(const void*)(v)) & (guint64) (0x000000ff00000000UL)) >> 8) | (((guint64) (*(const guint64*)(const void*)(v)) & (guint64) (0x0000ff0000000000UL)) >> 24) | (((guint64) (*(const guint64*)(const void*)(v)) & (guint64) (0x00ff000000000000UL)) >> 40) | (((guint64) (*(const guint64*)(const void*)(v)) & (guint64) (0xff00000000000000UL)) >> 56))));
+  
+  
+  
+  
+  static inline void __gst_fast_write16 (guint8 *p, guint16 v) 
+    *(guint16*)(void*)(p) = v;
+  
+  static inline void __gst_fast_write32 (guint8 *p, guint32 v) 
+    *(guint32*)(void*)(p) = v;
+  
+  static inline void __gst_fast_write64 (guint8 *p, guint64 v) 
+    *(guint64*)(void*)(p) = v;
+  
+  static inline void __gst_fast_write_swap16 (guint8 *p, guint16 v) 
+    *(guint16*)(void*)(p) = (((guint16) ( (guint16) ((guint16) (v) >> 8) | (guint16) ((guint16) (v) << 8))));
+  
+  static inline void __gst_fast_write_swap32 (guint8 *p, guint32 v) 
+    *(guint32*)(void*)(p) = (((guint32) ( (((guint32) (v) & (guint32) 0x000000ffU) << 24) | (((guint32) (v) & (guint32) 0x0000ff00U) << 8) | (((guint32) (v) & (guint32) 0x00ff0000U) >> 8) | (((guint32) (v) & (guint32) 0xff000000U) >> 24))));
+  
+  static inline void __gst_fast_write_swap64 (guint8 *p, guint64 v) 
+    *(guint64*)(void*)(p) = (((guint64) ( (((guint64) (v) & (guint64) (0x00000000000000ffUL)) << 56) | (((guint64) (v) & (guint64) (0x000000000000ff00UL)) << 40) | (((guint64) (v) & (guint64) (0x0000000000ff0000UL)) << 24) | (((guint64) (v) & (guint64) (0x00000000ff000000UL)) << 8) | (((guint64) (v) & (guint64) (0x000000ff00000000UL)) >> 8) | (((guint64) (v) & (guint64) (0x0000ff0000000000UL)) >> 24) | (((guint64) (v) & (guint64) (0x00ff000000000000UL)) >> 40) | (((guint64) (v) & (guint64) (0xff00000000000000UL)) >> 56))));
+  
+  # 321 "gstutils.h"
+  static inline guint32 __gst_slow_read24_be (const guint8 * data) 
+    return ((((guint32) (((const guint8 *) (data))[0])) << (16)) | (((guint32) (((const guint8 *) (data))[1])) << (8)) | (((guint32) (((const guint8 *) (data))[2])) << (0)));
+  
+  # 336 "gstutils.h"
+  static inline guint32 __gst_slow_read24_le (const guint8 * data) 
+    return ((((guint32) (((const guint8 *) (data))[2])) << (16)) | (((guint32) (((const guint8 *) (data))[1])) << (8)) | (((guint32) (((const guint8 *) (data))[0])) << (0)));
+  
+  # 568 "gstutils.h"
+  static inline gfloat
+  GFLOAT_SWAP_LE_BE(gfloat in)
+  
+    union
+    
+      guint32 i;
+      gfloat f;
+     u;
+  
+    u.f = in;
+    u.i = (((guint32) ( (((guint32) (u.i) & (guint32) 0x000000ffU) << 24) | (((guint32) (u.i) & (guint32) 0x0000ff00U) << 8) | (((guint32) (u.i) & (guint32) 0x00ff0000U) >> 8) | (((guint32) (u.i) & (guint32) 0xff000000U) >> 24))));
+    return u.f;
+  
+  # 590 "gstutils.h"
+  static inline gdouble
+  GDOUBLE_SWAP_LE_BE(gdouble in)
+  
+    union
+    
+      guint64 i;
+      gdouble d;
+     u;
+  
+    u.d = in;
+    u.i = (((guint64) ( (((guint64) (u.i) & (guint64) (0x00000000000000ffUL)) << 56) | (((guint64) (u.i) & (guint64) (0x000000000000ff00UL)) << 40) | (((guint64) (u.i) & (guint64) (0x0000000000ff0000UL)) << 24) | (((guint64) (u.i) & (guint64) (0x00000000ff000000UL)) << 8) | (((guint64) (u.i) & (guint64) (0x000000ff00000000UL)) >> 8) | (((guint64) (u.i) & (guint64) (0x0000ff0000000000UL)) >> 24) | (((guint64) (u.i) & (guint64) (0x00ff000000000000UL)) >> 40) | (((guint64) (u.i) & (guint64) (0xff00000000000000UL)) >> 56))));
+    return u.d;
+  
+  # 693 "gstutils.h"
+  static inline gfloat
+  GST_READ_FLOAT_LE(const guint8 *data)
+  
+    union
+    
+      guint32 i;
+      gfloat f;
+     u;
+  
+    u.i = __gst_fast_read32((const guint8 *)(data));
+    return u.f;
+  
+  # 714 "gstutils.h"
+  static inline gfloat
+  GST_READ_FLOAT_BE(const guint8 *data)
+  
+    union
+    
+      guint32 i;
+      gfloat f;
+     u;
+  
+    u.i = __gst_fast_read_swap32((const guint8 *)(data));
+    return u.f;
+  
+  # 735 "gstutils.h"
+  static inline gdouble
+  GST_READ_DOUBLE_LE(const guint8 *data)
+  
+    union
+    
+      guint64 i;
+      gdouble d;
+     u;
+  
+    u.i = __gst_fast_read64((const guint8 *)(data));
+    return u.d;
+  
+  # 756 "gstutils.h"
+  static inline gdouble
+  GST_READ_DOUBLE_BE(const guint8 *data)
+  
+    union
+    
+      guint64 i;
+      gdouble d;
+     u;
+  
+    u.i = __gst_fast_read_swap64((const guint8 *)(data));
+    return u.d;
+  
+  # 776 "gstutils.h"
+  static inline void
+  GST_WRITE_FLOAT_LE(guint8 *data, gfloat num)
+  
+    union
+    
+      guint32 i;
+      gfloat f;
+     u;
+  
+    u.f = num;
+    __gst_fast_write32((guint8 *)(data), (u.i));
+  
+  # 796 "gstutils.h"
+  static inline void
+  GST_WRITE_FLOAT_BE(guint8 *data, gfloat num)
+  
+    union
+    
+      guint32 i;
+      gfloat f;
+     u;
+  
+    u.f = num;
+    __gst_fast_write_swap32((guint8 *)(data), (u.i));
+  
+  # 816 "gstutils.h"
+  static inline void
+  GST_WRITE_DOUBLE_LE(guint8 *data, gdouble num)
+  
+    union
+    
+      guint64 i;
+      gdouble d;
+     u;
+  
+    u.d = num;
+    __gst_fast_write64((guint8 *)(data), (u.i));
+  
+  # 836 "gstutils.h"
+  static inline void
+  GST_WRITE_DOUBLE_BE(guint8 *data, gdouble num)
+  
+    union
+    
+      guint64 i;
+      gdouble d;
+     u;
+  
+    u.d = num;
+    __gst_fast_write_swap64((guint8 *)(data), (u.i));
+  
+   }
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_object_default_error(source:PGstObject; error:PGError; debug:Pgchar);cdecl;external gstreamerlib name 'gst_object_default_error';
+
+  procedure gst_element_create_all_pads(element:PGstElement);cdecl;external gstreamerlib name 'gst_element_create_all_pads';
+
+  function gst_element_get_compatible_pad(element:PGstElement; pad:PGstPad; caps:PGstCaps):PGstPad;cdecl;external gstreamerlib name 'gst_element_get_compatible_pad';
+
+  function gst_element_get_compatible_pad_template(element:PGstElement; compattempl:PGstPadTemplate):PGstPadTemplate;cdecl;external gstreamerlib name 'gst_element_get_compatible_pad_template';
+
+(* Const before type ignored *)
+  function gst_element_state_get_name(state:TGstState):Pgchar;cdecl;external gstreamerlib name 'gst_element_state_get_name';
+
+(* Const before type ignored *)
+  function gst_element_state_change_return_get_name(state_ret:TGstStateChangeReturn):Pgchar;cdecl;external gstreamerlib name 'gst_element_state_change_return_get_name';
+
+(* Const before type ignored *)
+  function gst_state_change_get_name(transition:TGstStateChange):Pgchar;cdecl;external gstreamerlib name 'gst_state_change_get_name';
+
+  function gst_element_link(src:PGstElement; dest:PGstElement):Tgboolean;cdecl;external gstreamerlib name 'gst_element_link';
+
+  function gst_element_link_many(element_1:PGstElement; element_2:PGstElement; args:array of const):Tgboolean;cdecl;external gstreamerlib name 'gst_element_link_many';
+
+  function gst_element_link_many(element_1:PGstElement; element_2:PGstElement):Tgboolean;cdecl;external gstreamerlib name 'gst_element_link_many';
+
+  function gst_element_link_filtered(src:PGstElement; dest:PGstElement; filter:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_element_link_filtered';
+
+  procedure gst_element_unlink(src:PGstElement; dest:PGstElement);cdecl;external gstreamerlib name 'gst_element_unlink';
+
+  procedure gst_element_unlink_many(element_1:PGstElement; element_2:PGstElement; args:array of const);cdecl;external gstreamerlib name 'gst_element_unlink_many';
+
+  procedure gst_element_unlink_many(element_1:PGstElement; element_2:PGstElement);cdecl;external gstreamerlib name 'gst_element_unlink_many';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_element_link_pads(src:PGstElement; srcpadname:Pgchar; dest:PGstElement; destpadname:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_element_link_pads';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_element_link_pads_full(src:PGstElement; srcpadname:Pgchar; dest:PGstElement; destpadname:Pgchar; flags:TGstPadLinkCheck):Tgboolean;cdecl;external gstreamerlib name 'gst_element_link_pads_full';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  procedure gst_element_unlink_pads(src:PGstElement; srcpadname:Pgchar; dest:PGstElement; destpadname:Pgchar);cdecl;external gstreamerlib name 'gst_element_unlink_pads';
+
+(* Const before type ignored *)
+(* Const before type ignored *)
+  function gst_element_link_pads_filtered(src:PGstElement; srcpadname:Pgchar; dest:PGstElement; destpadname:Pgchar; filter:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_element_link_pads_filtered';
+
+  function gst_element_seek_simple(element:PGstElement; format:TGstFormat; seek_flags:TGstSeekFlags; seek_pos:Tgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_element_seek_simple';
+
+(* Const before type ignored *)
+  function gst_element_factory_can_sink_all_caps(factory:PGstElementFactory; caps:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_element_factory_can_sink_all_caps';
+
+(* Const before type ignored *)
+  function gst_element_factory_can_src_all_caps(factory:PGstElementFactory; caps:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_element_factory_can_src_all_caps';
+
+(* Const before type ignored *)
+  function gst_element_factory_can_sink_any_caps(factory:PGstElementFactory; caps:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_element_factory_can_sink_any_caps';
+
+(* Const before type ignored *)
+  function gst_element_factory_can_src_any_caps(factory:PGstElementFactory; caps:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_element_factory_can_src_any_caps';
+
+  function gst_element_query_position(element:PGstElement; format:TGstFormat; cur:Pgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_element_query_position';
+
+  function gst_element_query_duration(element:PGstElement; format:TGstFormat; duration:Pgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_element_query_duration';
+
+  function gst_element_query_convert(element:PGstElement; src_format:TGstFormat; src_val:Tgint64; dest_format:TGstFormat; dest_val:Pgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_element_query_convert';
+
+  procedure gst_pad_use_fixed_caps(pad:PGstPad);cdecl;external gstreamerlib name 'gst_pad_use_fixed_caps';
+
+  function gst_pad_get_parent_element(pad:PGstPad):PGstElement;cdecl;external gstreamerlib name 'gst_pad_get_parent_element';
+
+  function gst_pad_proxy_query_accept_caps(pad:PGstPad; query:PGstQuery):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_proxy_query_accept_caps';
+
+  function gst_pad_proxy_query_caps(pad:PGstPad; query:PGstQuery):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_proxy_query_caps';
+
+  function gst_pad_query_position(pad:PGstPad; format:TGstFormat; cur:Pgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_query_position';
+
+  function gst_pad_query_duration(pad:PGstPad; format:TGstFormat; duration:Pgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_query_duration';
+
+  function gst_pad_query_convert(pad:PGstPad; src_format:TGstFormat; src_val:Tgint64; dest_format:TGstFormat; dest_val:Pgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_query_convert';
+
+  function gst_pad_query_caps(pad:PGstPad; filter:PGstCaps):PGstCaps;cdecl;external gstreamerlib name 'gst_pad_query_caps';
+
+  function gst_pad_query_accept_caps(pad:PGstPad; caps:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_query_accept_caps';
+
+  function gst_pad_link_maybe_ghosting(src:PGstPad; sink:PGstPad):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_link_maybe_ghosting';
+
+  function gst_pad_link_maybe_ghosting_full(src:PGstPad; sink:PGstPad; flags:TGstPadLinkCheck):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_link_maybe_ghosting_full';
+
+  function gst_pad_peer_query_position(pad:PGstPad; format:TGstFormat; cur:Pgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_peer_query_position';
+
+  function gst_pad_peer_query_duration(pad:PGstPad; format:TGstFormat; duration:Pgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_peer_query_duration';
+
+  function gst_pad_peer_query_convert(pad:PGstPad; src_format:TGstFormat; src_val:Tgint64; dest_format:TGstFormat; dest_val:Pgint64):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_peer_query_convert';
+
+  function gst_pad_peer_query_caps(pad:PGstPad; filter:PGstCaps):PGstCaps;cdecl;external gstreamerlib name 'gst_pad_peer_query_caps';
+
+  function gst_pad_peer_query_accept_caps(pad:PGstPad; caps:PGstCaps):Tgboolean;cdecl;external gstreamerlib name 'gst_pad_peer_query_accept_caps';
+
+(* Const before type ignored *)
+  function gst_pad_create_stream_id(pad:PGstPad; parent:PGstElement; stream_id:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_pad_create_stream_id';
+
+(* Const before type ignored *)
+  function gst_pad_create_stream_id_printf(pad:PGstPad; parent:PGstElement; stream_id:Pgchar; args:array of const):Pgchar;cdecl;external gstreamerlib name 'gst_pad_create_stream_id_printf';
+
+  function gst_pad_create_stream_id_printf(pad:PGstPad; parent:PGstElement; stream_id:Pgchar):Pgchar;cdecl;external gstreamerlib name 'gst_pad_create_stream_id_printf';
+
+(* Const before type ignored *)
+  function gst_pad_create_stream_id_printf_valist(pad:PGstPad; parent:PGstElement; stream_id:Pgchar; var_args:Tva_list):Pgchar;cdecl;external gstreamerlib name 'gst_pad_create_stream_id_printf_valist';
+
+  function gst_pad_get_stream_id(pad:PGstPad):Pgchar;cdecl;external gstreamerlib name 'gst_pad_get_stream_id';
+
+  function gst_pad_get_stream(pad:PGstPad):PGstStream;cdecl;external gstreamerlib name 'gst_pad_get_stream';
+
+  procedure gst_bin_add_many(bin:PGstBin; element_1:PGstElement; args:array of const);cdecl;external gstreamerlib name 'gst_bin_add_many';
+
+  procedure gst_bin_add_many(bin:PGstBin; element_1:PGstElement);cdecl;external gstreamerlib name 'gst_bin_add_many';
+
+  procedure gst_bin_remove_many(bin:PGstBin; element_1:PGstElement; args:array of const);cdecl;external gstreamerlib name 'gst_bin_remove_many';
+
+  procedure gst_bin_remove_many(bin:PGstBin; element_1:PGstElement);cdecl;external gstreamerlib name 'gst_bin_remove_many';
+
+  function gst_bin_find_unlinked_pad(bin:PGstBin; direction:TGstPadDirection):PGstPad;cdecl;external gstreamerlib name 'gst_bin_find_unlinked_pad';
+
+  function gst_bin_sync_children_states(bin:PGstBin):Tgboolean;cdecl;external gstreamerlib name 'gst_bin_sync_children_states';
+
+(* Const before type ignored *)
+  function gst_parse_bin_from_description(bin_description:Pgchar; ghost_unlinked_pads:Tgboolean; err:PPGError):PGstElement;cdecl;external gstreamerlib name 'gst_parse_bin_from_description';
+
+(* Const before type ignored *)
+  function gst_parse_bin_from_description_full(bin_description:Pgchar; ghost_unlinked_pads:Tgboolean; context:PGstParseContext; flags:TGstParseFlags; err:PPGError):PGstElement;cdecl;external gstreamerlib name 'gst_parse_bin_from_description_full';
+
+  function gst_util_get_timestamp:TGstClockTime;cdecl;external gstreamerlib name 'gst_util_get_timestamp';
+
+
+  function gst_util_array_binary_search(array_:Tgpointer; num_elements:Tguint; element_size:Tgsize; search_func:TGCompareDataFunc; mode:TGstSearchMode;
+             search_data:Tgconstpointer; user_data:Tgpointer):Tgpointer;cdecl;external gstreamerlib name 'gst_util_array_binary_search';
+
+  function gst_util_greatest_common_divisor(a:Tgint; b:Tgint):Tgint;cdecl;external gstreamerlib name 'gst_util_greatest_common_divisor';
+
+  function gst_util_greatest_common_divisor_int64(a:Tgint64; b:Tgint64):Tgint64;cdecl;external gstreamerlib name 'gst_util_greatest_common_divisor_int64';
+
+  procedure gst_util_fraction_to_double(src_n:Tgint; src_d:Tgint; dest:Pgdouble);cdecl;external gstreamerlib name 'gst_util_fraction_to_double';
+
+  procedure gst_util_double_to_fraction(src:Tgdouble; dest_n:Pgint; dest_d:Pgint);cdecl;external gstreamerlib name 'gst_util_double_to_fraction';
+
+  function gst_util_fraction_multiply(a_n:Tgint; a_d:Tgint; b_n:Tgint; b_d:Tgint; res_n:Pgint; 
+             res_d:Pgint):Tgboolean;cdecl;external gstreamerlib name 'gst_util_fraction_multiply';
+
+  function gst_util_fraction_add(a_n:Tgint; a_d:Tgint; b_n:Tgint; b_d:Tgint; res_n:Pgint; 
+             res_d:Pgint):Tgboolean;cdecl;external gstreamerlib name 'gst_util_fraction_add';
+
+  function gst_util_fraction_compare(a_n:Tgint; a_d:Tgint; b_n:Tgint; b_d:Tgint):Tgint;cdecl;external gstreamerlib name 'gst_util_fraction_compare';
+
+(* Const before type ignored *)
+  function gst_calculate_linear_regression(xy:PGstClockTime; temp:PGstClockTime; n:Tguint; m_num:PGstClockTime; m_denom:PGstClockTime; 
+             b:PGstClockTime; xbase:PGstClockTime; r_squared:Pgdouble):Tgboolean;cdecl;external gstreamerlib name 'gst_calculate_linear_regression';
+
+

+ 272 - 0
packages/gstreamer/src/gstvalue.inc

@@ -0,0 +1,272 @@
+{
+/* GStreamer
+ * Copyright (C) <2003> David A. Schleef <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+}
+  Type
+    P_GstValueTable  = ^T_GstValueTable;
+    PGstValueSerializeFunc  = ^TGstValueSerializeFunc;
+    PGstValueTable  = ^TGstValueTable;
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+
+    TGstValueCompareFunc = function (value1:PGValue; value2:PGValue):Tgint;cdecl;
+(* Const before type ignored *)
+
+    TGstValueSerializeFunc = function (value1:PGValue):Pgchar;cdecl;
+(* Const before type ignored *)
+
+    TGstValueDeserializeFunc = function (dest:PGValue; s:Pgchar):Tgboolean;cdecl;
+    T_GstValueTable = record
+        _type : TGType;
+        compare : TGstValueCompareFunc;
+        serialize : TGstValueSerializeFunc;
+        deserialize : TGstValueDeserializeFunc;
+        _gst_reserved : array[0..3] of Tgpointer;
+      end;
+    TGstValueTable  = T_GstValueTable;
+
+
+  function gst_int_range_get_type:TGType;cdecl;external gstreamerlib name 'gst_int_range_get_type';
+
+  function gst_int64_range_get_type:TGType;cdecl;external gstreamerlib name 'gst_int64_range_get_type';
+
+  function gst_double_range_get_type:TGType;cdecl;external gstreamerlib name 'gst_double_range_get_type';
+
+  function gst_fraction_range_get_type:TGType;cdecl;external gstreamerlib name 'gst_fraction_range_get_type';
+
+  function gst_fraction_get_type:TGType;cdecl;external gstreamerlib name 'gst_fraction_get_type';
+
+  function gst_value_list_get_type:TGType;cdecl;external gstreamerlib name 'gst_value_list_get_type';
+
+  function gst_value_array_get_type:TGType;cdecl;external gstreamerlib name 'gst_value_array_get_type';
+
+  function gst_bitmask_get_type:TGType;cdecl;external gstreamerlib name 'gst_bitmask_get_type';
+
+  function gst_flagset_get_type:TGType;cdecl;external gstreamerlib name 'gst_flagset_get_type';
+
+  function gst_g_thread_get_type:TGType;cdecl;external gstreamerlib name 'gst_g_thread_get_type';
+
+
+  procedure gst_value_register(table:PGstValueTable);cdecl;external gstreamerlib name 'gst_value_register';
+
+
+  procedure gst_value_init_and_copy(dest:PGValue; src:PGValue);cdecl;external gstreamerlib name 'gst_value_init_and_copy';
+
+
+  function gst_value_serialize(value:PGValue):Pgchar;cdecl;external gstreamerlib name 'gst_value_serialize';
+
+
+  function gst_value_deserialize(dest:PGValue; src:Pgchar):Tgboolean;cdecl;external gstreamerlib name 'gst_value_deserialize';
+
+
+  procedure gst_value_list_append_value(value:PGValue; append_value:PGValue);cdecl;external gstreamerlib name 'gst_value_list_append_value';
+
+  procedure gst_value_list_append_and_take_value(value:PGValue; append_value:PGValue);cdecl;external gstreamerlib name 'gst_value_list_append_and_take_value';
+
+
+  procedure gst_value_list_prepend_value(value:PGValue; prepend_value:PGValue);cdecl;external gstreamerlib name 'gst_value_list_prepend_value';
+
+
+
+  procedure gst_value_list_concat(dest:PGValue; value1:PGValue; value2:PGValue);cdecl;external gstreamerlib name 'gst_value_list_concat';
+
+
+
+  procedure gst_value_list_merge(dest:PGValue; value1:PGValue; value2:PGValue);cdecl;external gstreamerlib name 'gst_value_list_merge';
+
+
+  function gst_value_list_get_size(value:PGValue):Tguint;cdecl;external gstreamerlib name 'gst_value_list_get_size';
+
+
+
+  function gst_value_list_get_value(value:PGValue; index:Tguint):PGValue;cdecl;external gstreamerlib name 'gst_value_list_get_value';
+
+
+  procedure gst_value_array_append_value(value:PGValue; append_value:PGValue);cdecl;external gstreamerlib name 'gst_value_array_append_value';
+
+  procedure gst_value_array_append_and_take_value(value:PGValue; append_value:PGValue);cdecl;external gstreamerlib name 'gst_value_array_append_and_take_value';
+
+
+  procedure gst_value_array_prepend_value(value:PGValue; prepend_value:PGValue);cdecl;external gstreamerlib name 'gst_value_array_prepend_value';
+
+
+  function gst_value_array_get_size(value:PGValue):Tguint;cdecl;external gstreamerlib name 'gst_value_array_get_size';
+
+
+
+  function gst_value_array_get_value(value:PGValue; index:Tguint):PGValue;cdecl;external gstreamerlib name 'gst_value_array_get_value';
+
+  procedure gst_value_set_int_range(value:PGValue; start:Tgint; end_:Tgint);cdecl;external gstreamerlib name 'gst_value_set_int_range';
+
+  procedure gst_value_set_int_range_step(value:PGValue; start:Tgint; end_:Tgint; step:Tgint);cdecl;external gstreamerlib name 'gst_value_set_int_range_step';
+
+
+  function gst_value_get_int_range_min(value:PGValue):Tgint;cdecl;external gstreamerlib name 'gst_value_get_int_range_min';
+
+
+  function gst_value_get_int_range_max(value:PGValue):Tgint;cdecl;external gstreamerlib name 'gst_value_get_int_range_max';
+
+
+  function gst_value_get_int_range_step(value:PGValue):Tgint;cdecl;external gstreamerlib name 'gst_value_get_int_range_step';
+
+  procedure gst_value_set_int64_range(value:PGValue; start:Tgint64; end_:Tgint64);cdecl;external gstreamerlib name 'gst_value_set_int64_range';
+
+  procedure gst_value_set_int64_range_step(value:PGValue; start:Tgint64; end_:Tgint64; step:Tgint64);cdecl;external gstreamerlib name 'gst_value_set_int64_range_step';
+
+
+  function gst_value_get_int64_range_min(value:PGValue):Tgint64;cdecl;external gstreamerlib name 'gst_value_get_int64_range_min';
+
+
+  function gst_value_get_int64_range_max(value:PGValue):Tgint64;cdecl;external gstreamerlib name 'gst_value_get_int64_range_max';
+
+
+  function gst_value_get_int64_range_step(value:PGValue):Tgint64;cdecl;external gstreamerlib name 'gst_value_get_int64_range_step';
+
+  procedure gst_value_set_double_range(value:PGValue; start:Tgdouble; end_:Tgdouble);cdecl;external gstreamerlib name 'gst_value_set_double_range';
+
+
+  function gst_value_get_double_range_min(value:PGValue):Tgdouble;cdecl;external gstreamerlib name 'gst_value_get_double_range_min';
+
+
+  function gst_value_get_double_range_max(value:PGValue):Tgdouble;cdecl;external gstreamerlib name 'gst_value_get_double_range_max';
+
+
+
+  function gst_value_get_caps(value:PGValue):PGstCaps;cdecl;external gstreamerlib name 'gst_value_get_caps';
+
+
+  procedure gst_value_set_caps(value:PGValue; caps:PGstCaps);cdecl;external gstreamerlib name 'gst_value_set_caps';
+
+
+
+  function gst_value_get_structure(value:PGValue):PGstStructure;cdecl;external gstreamerlib name 'gst_value_get_structure';
+
+
+  procedure gst_value_set_structure(value:PGValue; structure:PGstStructure);cdecl;external gstreamerlib name 'gst_value_set_structure';
+
+
+
+  function gst_value_get_caps_features(value:PGValue):PGstCapsFeatures;cdecl;external gstreamerlib name 'gst_value_get_caps_features';
+
+
+  procedure gst_value_set_caps_features(value:PGValue; features:PGstCapsFeatures);cdecl;external gstreamerlib name 'gst_value_set_caps_features';
+
+  procedure gst_value_set_fraction(value:PGValue; numerator:Tgint; denominator:Tgint);cdecl;external gstreamerlib name 'gst_value_set_fraction';
+
+
+  function gst_value_get_fraction_numerator(value:PGValue):Tgint;cdecl;external gstreamerlib name 'gst_value_get_fraction_numerator';
+
+
+  function gst_value_get_fraction_denominator(value:PGValue):Tgint;cdecl;external gstreamerlib name 'gst_value_get_fraction_denominator';
+
+
+
+  function gst_value_fraction_multiply(product:PGValue; factor1:PGValue; factor2:PGValue):Tgboolean;cdecl;external gstreamerlib name 'gst_value_fraction_multiply';
+
+
+
+  function gst_value_fraction_subtract(dest:PGValue; minuend:PGValue; subtrahend:PGValue):Tgboolean;cdecl;external gstreamerlib name 'gst_value_fraction_subtract';
+
+
+
+  procedure gst_value_set_fraction_range(value:PGValue; start:PGValue; end_:PGValue);cdecl;external gstreamerlib name 'gst_value_set_fraction_range';
+
+  procedure gst_value_set_fraction_range_full(value:PGValue; numerator_start:Tgint; denominator_start:Tgint; numerator_end:Tgint; denominator_end:Tgint);cdecl;external gstreamerlib name 'gst_value_set_fraction_range_full';
+
+
+
+  function gst_value_get_fraction_range_min(value:PGValue):PGValue;cdecl;external gstreamerlib name 'gst_value_get_fraction_range_min';
+
+
+
+  function gst_value_get_fraction_range_max(value:PGValue):PGValue;cdecl;external gstreamerlib name 'gst_value_get_fraction_range_max';
+
+
+  function gst_value_get_bitmask(value:PGValue):Tguint64;cdecl;external gstreamerlib name 'gst_value_get_bitmask';
+
+  procedure gst_value_set_bitmask(value:PGValue; bitmask:Tguint64);cdecl;external gstreamerlib name 'gst_value_set_bitmask';
+
+  procedure gst_value_set_flagset(value:PGValue; flags:Tguint; mask:Tguint);cdecl;external gstreamerlib name 'gst_value_set_flagset';
+
+
+  function gst_value_get_flagset_flags(value:PGValue):Tguint;cdecl;external gstreamerlib name 'gst_value_get_flagset_flags';
+
+
+  function gst_value_get_flagset_mask(value:PGValue):Tguint;cdecl;external gstreamerlib name 'gst_value_get_flagset_mask';
+
+
+
+  function gst_value_compare(value1:PGValue; value2:PGValue):Tgint;cdecl;external gstreamerlib name 'gst_value_compare';
+
+
+
+  function gst_value_can_compare(value1:PGValue; value2:PGValue):Tgboolean;cdecl;external gstreamerlib name 'gst_value_can_compare';
+
+
+
+  function gst_value_is_subset(value1:PGValue; value2:PGValue):Tgboolean;cdecl;external gstreamerlib name 'gst_value_is_subset';
+
+
+
+  function gst_value_union(dest:PGValue; value1:PGValue; value2:PGValue):Tgboolean;cdecl;external gstreamerlib name 'gst_value_union';
+
+
+
+  function gst_value_can_union(value1:PGValue; value2:PGValue):Tgboolean;cdecl;external gstreamerlib name 'gst_value_can_union';
+
+
+
+  function gst_value_intersect(dest:PGValue; value1:PGValue; value2:PGValue):Tgboolean;cdecl;external gstreamerlib name 'gst_value_intersect';
+
+
+
+  function gst_value_can_intersect(value1:PGValue; value2:PGValue):Tgboolean;cdecl;external gstreamerlib name 'gst_value_can_intersect';
+
+
+
+  function gst_value_subtract(dest:PGValue; minuend:PGValue; subtrahend:PGValue):Tgboolean;cdecl;external gstreamerlib name 'gst_value_subtract';
+
+
+
+  function gst_value_can_subtract(minuend:PGValue; subtrahend:PGValue):Tgboolean;cdecl;external gstreamerlib name 'gst_value_can_subtract';
+
+
+  function gst_value_is_fixed(value:PGValue):Tgboolean;cdecl;external gstreamerlib name 'gst_value_is_fixed';
+
+
+  function gst_value_fixate(dest:PGValue; src:PGValue):Tgboolean;cdecl;external gstreamerlib name 'gst_value_fixate';
+
+  function gst_flagset_register(flags_type:TGType):TGType;cdecl;external gstreamerlib name 'gst_flagset_register';
+
+      var
+      _gst_int_range_type : TGType;cvar;external;
+      _gst_int64_range_type : TGType;cvar;external;
+      _gst_double_range_type : TGType;cvar;external;
+      _gst_fraction_range_type : TGType;cvar;external;
+      _gst_value_list_type : TGType;cvar;external;
+      _gst_value_array_type : TGType;cvar;external;
+      _gst_fraction_type : TGType;cvar;external;
+      _gst_bitmask_type : TGType;cvar;external;
+      _gst_flagset_type : TGType;cvar;external;
+
+
+

+ 71 - 0
packages/gstreamer/src/gstversion.inc

@@ -0,0 +1,71 @@
+{
+
+ /* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
+ *                    2000 Wim Taymans <[email protected]>
+ *
+ * gstversion.h: Version information for GStreamer
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+}
+Const
+
+{*
+ * GST_VERSION_MAJOR:
+ *
+ * The major version of GStreamer at compile time:
+ }
+ GST_VERSION_MAJOR = 1;
+{*
+ * GST_VERSION_MINOR:
+ *
+ * The minor version of GStreamer at compile time:
+ }
+ GST_VERSION_MINOR = 16;
+{*
+ * GST_VERSION_MICRO:
+ *
+ * The micro version of GStreamer at compile time:
+ }
+ GST_VERSION_MICRO = 3;
+{*
+ * GST_VERSION_NANO:
+ *
+ * The nano version of GStreamer at compile time:
+ * Actual releases have 0, GIT versions have 1, prerelease versions have 2-...
+ }
+ GST_VERSION_NANO = 0;
+
+{*
+ * GST_CHECK_VERSION:
+ * @major: a number indicating the major version
+ * @minor: a number indicating the minor version
+ * @micro: a number indicating the micro version
+ *
+ * Check whether a GStreamer version equal to or greater than
+ * major.minor.micro is present.
+}
+
+{
+  GST_CHECK_VERSION(major,minor,micro)    \
+    (GST_VERSION_MAJOR > (major) || \
+     (GST_VERSION_MAJOR == (major) && GST_VERSION_MINOR > (minor)) || \
+     (GST_VERSION_MAJOR == (major) && GST_VERSION_MINOR == (minor) && \
+      GST_VERSION_MICRO >= (micro)) || \
+     (GST_VERSION_MAJOR == (major) && GST_VERSION_MINOR == (minor) && \
+      GST_VERSION_MICRO + 1 == (micro) && GST_VERSION_NANO > 0))
+}