diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 381dc4fae..83992e814 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -73,7 +73,8 @@ stages:
gstreamer-sys \
gstreamer-tag-sys \
gstreamer-video-sys \
- gstreamer-webrtc-sys; \
+ gstreamer-webrtc-sys \
+ gstreamer-controller-sys; \
do \
cargo test --locked -p $crate; \
done
diff --git a/Cargo.toml b/Cargo.toml
index e846c9918..43286d90e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,4 +19,5 @@ members = [
"gstreamer-editing-services-sys",
"gstreamer-check-sys",
"gstreamer-rtp-sys",
+ "gstreamer-controller-sys",
]
diff --git a/Gir_GstController.toml b/Gir_GstController.toml
new file mode 100644
index 000000000..7689ecfdf
--- /dev/null
+++ b/Gir_GstController.toml
@@ -0,0 +1,25 @@
+[options]
+girs_dir = "gir-files"
+library = "GstController"
+version = "1.0"
+min_cfg_version = "1.8"
+target_path = "gstreamer-controller-sys"
+work_mode = "sys"
+
+external_libraries = [
+ "GLib",
+ "GObject",
+]
+
+extra_versions = [
+ "1.18",
+ "1.16",
+ "1.14",
+ "1.12",
+ "1.10",
+ "1.8",
+]
+
+[external_libraries]
+gstreamer="Gst"
+gstreamer_base="GstBase"
diff --git a/gir-files/GstController-1.0.gir b/gir-files/GstController-1.0.gir
new file mode 100644
index 000000000..bd8460f3a
--- /dev/null
+++ b/gir-files/GstController-1.0.gir
@@ -0,0 +1,1075 @@
+
+
+
+
+
+
+
+
+
+
+
+ A value mapping object that attaches multiple control sources to a guint
+gobject properties representing a color. A control value of 0.0 will turn the
+color component off and a value of 1.0 will be the color level.
+
+
+ Create a new control-binding that attaches the given #GstControlSource to the
+#GObject property.
+
+
+ the new #GstARGBControlBinding
+
+
+
+
+ the object of the property
+
+
+
+ the property-name to attach the control source
+
+
+
+ the control source for the alpha channel
+
+
+
+ the control source for the red channel
+
+
+
+ the control source for the green channel
+
+
+
+ the control source for the blue channel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The class structure of #GstARGBControlBinding.
+
+
+ Parent class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ An internal structure for value+time and various temporary
+values used for interpolation. This "inherits" from
+GstTimedValue.
+
+
+ timestamp of the value change
+
+
+
+ the new value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Copies a #GstControlPoint
+
+
+ A copy of @cp
+
+
+
+
+ The control point to copy
+
+
+
+
+
+ Frees all data allocated by a #GstControlPoint instance.
+
+
+
+
+
+
+ the object to free
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A value mapping object that attaches control sources to gobject properties. It
+will map the control values directly to the target property range. If a
+non-absolute direct control binding is used, the value range [0.0 ... 1.0]
+is mapped to full target property range, and all values outside the range
+will be clipped. An absolute control binding will not do any value
+transformations.
+
+
+ Create a new control-binding that attaches the #GstControlSource to the
+#GObject property. It will map the control source range [0.0 ... 1.0] to
+the full target property range, and clip all values outside this range.
+
+
+ the new #GstDirectControlBinding
+
+
+
+
+ the object of the property
+
+
+
+ the property-name to attach the control source
+
+
+
+ the control source
+
+
+
+
+
+ Create a new control-binding that attaches the #GstControlSource to the
+#GObject property. It will directly map the control source values to the
+target property range without any transformations.
+
+
+ the new #GstDirectControlBinding
+
+
+
+
+ the object of the property
+
+
+
+ the property-name to attach the control source
+
+
+
+ the control source
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The class structure of #GstDirectControlBinding.
+
+
+ Parent class
+
+
+
+
+
+
+
+
+
+ Function to map a control-value to the target GValue.
+
+
+
+
+
+
+ the #GstDirectControlBinding instance
+
+
+
+ the value returned by the cotnrol source
+
+
+
+ the target GValue
+
+
+
+
+
+ Function to map a control-value to the target plain data type.
+
+
+
+
+
+
+ the #GstDirectControlBinding instance
+
+
+
+ the value returned by the cotnrol source
+
+
+
+ the target location
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #GstInterpolationControlSource is a #GstControlSource, that interpolates values between user-given
+control points. It supports several interpolation modes and property types.
+
+To use #GstInterpolationControlSource get a new instance by calling
+gst_interpolation_control_source_new(), bind it to a #GParamSpec and set some
+control points by calling gst_timed_value_control_source_set().
+
+All functions are MT-safe.
+
+
+ This returns a new, unbound #GstInterpolationControlSource.
+
+
+ a new, unbound #GstInterpolationControlSource.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The various interpolation modes available.
+
+ steps-like interpolation, default
+
+
+ linear interpolation
+
+
+ cubic interpolation (natural), may overshoot
+ the min or max values set by the control point, but is more 'curvy'
+
+
+ monotonic cubic interpolation, will not
+ produce any values outside of the min-max range set by the control points
+ (Since: 1.8)
+
+
+
+ #GstLFOControlSource is a #GstControlSource, that provides several periodic
+waveforms as control values.
+
+To use #GstLFOControlSource get a new instance by calling
+gst_lfo_control_source_new(), bind it to a #GParamSpec and set the relevant
+properties.
+
+All functions are MT-safe.
+
+
+ This returns a new, unbound #GstLFOControlSource.
+
+
+ a new, unbound #GstLFOControlSource.
+
+
+
+
+ Specifies the amplitude for the waveform of this #GstLFOControlSource.
+
+
+
+ Specifies the frequency that should be used for the waveform
+of this #GstLFOControlSource. It should be large enough
+so that the period is longer than one nanosecond.
+
+
+
+ Specifies the value offset for the waveform of this #GstLFOControlSource.
+
+
+
+ Specifies the timeshift to the right that should be used for the waveform
+of this #GstLFOControlSource in nanoseconds.
+
+To get a n nanosecond shift to the left use
+"(GST_SECOND / frequency) - n".
+
+
+
+ Specifies the waveform that should be used for this #GstLFOControlSource.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The various waveform modes available.
+
+ sine waveform
+
+
+ square waveform
+
+
+ saw waveform
+
+
+ reverse saw waveform
+
+
+ triangle waveform
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A #GstControlBinding that forwards requests to another #GstControlBinding
+
+
+ #GstProxyControlBinding forwards all access to data or `sync_values()`
+requests from @property_name on @object to the control binding at
+@ref_property_name on @ref_object.
+
+
+ a new #GstControlBinding that proxies the control interface between
+properties on different #GstObject's
+
+
+
+
+ a #GstObject
+
+
+
+ the property name in @object to control
+
+
+
+ a #GstObject to forward all
+ #GstControlBinding requests to
+
+
+
+ the property_name in @ref_object to control
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Opaque #GstProxyControlBindingClass struct
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Base class for #GstControlSource that use time-stamped values.
+
+When overriding bind, chain up first to give this bind implementation a
+chance to setup things.
+
+All functions are MT-safe.
+
+
+ Find last value before given timestamp in control point list.
+If all values in the control point list come after the given
+timestamp or no values exist, %NULL is returned.
+
+For use in control source implementations.
+
+
+ the found #GSequenceIter or %NULL
+
+
+
+
+ the control source to search in
+
+
+
+ the search key
+
+
+
+
+
+ Returns a read-only copy of the list of #GstTimedValue for the given property.
+Free the list after done with it.
+
+
+ a copy
+of the list, or %NULL if the property isn't handled by the controller
+
+
+
+
+
+
+ the #GstTimedValueControlSource to get the list from
+
+
+
+
+
+ Get the number of control points that are set.
+
+
+ the number of control points that are set.
+
+
+
+
+ the #GstTimedValueControlSource to get the number of values from
+
+
+
+
+
+ Set the value of given controller-handled property at a certain time.
+
+
+ FALSE if the values couldn't be set, TRUE otherwise.
+
+
+
+
+ the #GstTimedValueControlSource object
+
+
+
+ the time the control-change is scheduled for
+
+
+
+ the control-value
+
+
+
+
+
+ Sets multiple timed values at once.
+
+
+ FALSE if the values couldn't be set, TRUE otherwise.
+
+
+
+
+ the #GstTimedValueControlSource object
+
+
+
+ a list
+with #GstTimedValue items
+
+
+
+
+
+
+
+ Used to remove the value of given controller-handled property at a certain
+time.
+
+
+ FALSE if the value couldn't be unset (i.e. not found, TRUE otherwise.
+
+
+
+
+ the #GstTimedValueControlSource object
+
+
+
+ the time the control-change should be removed from
+
+
+
+
+
+ Used to remove all time-stamped values of given controller-handled property
+
+
+
+
+
+
+ the #GstTimedValueControlSource object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Emitted right after the new value has been added to @self
+
+
+
+
+
+ The newly added #GstTimedValue
+
+
+
+
+
+ Emitted right after the new value has been set on @timed_signals
+
+
+
+
+
+ The #GstTimedValue where the value changed
+
+
+
+
+
+ Emitted when @timed_value is removed from @self
+
+
+
+
+
+ The removed #GstTimedValue
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #GstTriggerControlSource is a #GstControlSource, that returns values from user-given
+control points. It allows for a tolerance on the time-stamps.
+
+To use #GstTriggerControlSource get a new instance by calling
+gst_trigger_control_source_new(), bind it to a #GParamSpec and set some
+control points by calling gst_timed_value_control_source_set().
+
+All functions are MT-safe.
+
+
+ This returns a new, unbound #GstTriggerControlSource.
+
+
+ a new, unbound #GstTriggerControlSource.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Reset the controlled value cache.
+
+
+
+
+
+
+ the #GstTimedValueControlSource
+
+
+
+
+
+
diff --git a/gstreamer-controller-sys/CHANGELOG.md b/gstreamer-controller-sys/CHANGELOG.md
new file mode 100644
index 000000000..ca04a635e
--- /dev/null
+++ b/gstreamer-controller-sys/CHANGELOG.md
@@ -0,0 +1,181 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html),
+specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field).
+
+## [0.9.1] - 2020-09-08
+### Changed
+- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any
+ API behind the "v1_18" feature is considered stable now.
+
+## [0.9.0] - 2020-07-05
+### Added
+- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be
+ opted-in via the "v1_18" feature flag but there might still be API changes
+ in the newly added API.
+
+### Changed
+- Minimum supported GStreamer version is 1.8 now.
+- The `system-deps` crate is now used for declaring the dependency on the C
+ libraries instead of directly using `pkg-config`.
+
+### Fixed
+- Various missing version markers were added, which should allow compilation
+ against GStreamer 1.8 on Windows again. On Windows missing symbols are
+ apparently an error even if they're not used.
+- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent.
+
+## [0.8.1] - 2019-12-16
+### Added
+- GStreamer RTP bindings
+
+### Changed
+- Update minimum supported Rust version to 1.36
+- Update introspection data to GStreamer 1.16.2 release
+
+## [0.8.0] - 2019-06-24
+### Added
+- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in
+ addition to GstGLDisplayEGL that existed before
+
+### Changed
+- Updated to GStreamer 1.16.0 .gir files, plus backported fixes
+- Updated to latest gir
+- Run all code through rustfmt after code generation
+
+## [0.7.0] - 2019-02-22
+### Added
+- GstGL (OpenGL/GLES) bindings
+
+### Changed
+- Switch to Rust 1.31 as minimum supported version
+- Generate GstVideoOverlayFormatFlags as flags type instead of enum
+- Updates GstMpegts with various annotation fixes from GStreamer git master
+
+## [0.6.1] - 2018-11-10
+### Added
+- GstCheck and GES (gstreamer editing services) bindings
+
+### Changed
+- Updated .gir files to 1.14.4 release
+- All references were updated from GitHub to freedesktop.org GitLab
+- Various functions take \*const instead of \*mut as parameters now
+
+### Fixed
+- Various functions and structs having pointer-of-array parameters/fields have
+ now fixed types. They were previously flat arrays instead of
+ pointer-of-arrays.
+- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before
+ that
+
+## [0.6.0] - 2018-09-08
+### Changed
+- Updated everything to GStreamer 1.14.2
+- Various fixes to how the code generator is used
+- Regenerate with latest GIR code generator
+
+### Fixed
+- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class
+ struct
+- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys
+- Removed unneeded dependencies from the code generator configuration files
+
+## [0.5.0] - 2018-03-20
+### Changed
+- Updated everything to GStreamer 1.14.0
+
+### Added
+- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings
+
+### Fixed
+- Use external_libraries feature of gir to require less manual editing
+- Remove some unused crates from dependencies
+- Disale print_system_libs in calls to pkg-config to work better with
+ non-system installs of GStreamer
+
+## [0.4.1] - 2018-02-18
+### Fixed
+- Fix native library name of GstNet bindings
+
+## [0.4.0] - 2017-12-23
+### Added
+- GstNet bindings
+- Debug impls for basically every type
+- Script to automatically regenerate everything
+
+### Changed
+- gst_player_[sg]et_multiview_mode() argument types were changed from
+ GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset
+ of the former that is allowed here
+- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead
+ of *mut *const c_char
+
+## [0.3.0] - 2017-11-26
+### Added
+- GstMpegTs bindings
+
+### Changed
+- GstDebugColorFlags from an enum to a bitfield
+- Updated to bitflags 1.0
+- Added support for the "dox" feature to generate documentation for all
+ possible versions
+- Depend on glib-sys/gobject-sys 0.5
+
+### Fixes
+- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since
+ 1.12 and 1.12.1 respectively
+- All C enums are represented as integers + constants now to prevent undefined
+ behaviour when out-of-range values are received
+
+## [0.2.1] - 2017-09-10
+### Changed
+- Add README.md to all crates directly
+
+### Fixed
+- Fix various compiler warnings
+- Fix versioning/feature mess. Now each library has features for all major
+ versions and for the correct minor versions that added API.
+- Removed Cargo.lock from GIT
+
+## [0.2.0] - 2017-08-28
+### Added
+- Add GstPlayer bindings
+
+### Changed
+- Depend on bitflags 0.9
+- Update GIR files to 1.12.1 release
+- Fix various errors in the GIR files, backported from GStreamer GIT master
+- Depend on gobject-sys/glib-sys 0.4.0 for various improvements
+- Regenerated everything with latest GIR
+
+## [0.1.1] - 2017-05-10
+### Added
+- Add GstTag and GstApp bindings
+- Add lots of missing fields to all the structs thanks to GIR improvements
+
+### Changed
+- Update GIR files to 1.12.0 release
+- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs
+- Regenerated everything with latest GIR
+
+## 0.1.0 - 2017-04-09
+
+- Initial release of the autogenerated GStreamer FFI bindings.
+
+[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD
+[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1
+[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0
+[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1
+[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0
+[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0
+[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1
+[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0
+[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0
+[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1
+[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0
+[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0
+[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1
+[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0
+[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1
diff --git a/gstreamer-controller-sys/Cargo.toml b/gstreamer-controller-sys/Cargo.toml
new file mode 100644
index 000000000..8037ac3d9
--- /dev/null
+++ b/gstreamer-controller-sys/Cargo.toml
@@ -0,0 +1,63 @@
+[build-dependencies]
+pkg-config = "0.3.7"
+system-deps = "1.3"
+
+[dependencies]
+libc = "0.2"
+
+[dependencies.glib-sys]
+git = "https://github.com/gtk-rs/sys"
+
+[dependencies.gobject-sys]
+git = "https://github.com/gtk-rs/sys"
+
+[dependencies.gstreamer-base-sys]
+path = "../gstreamer-base-sys"
+
+[dependencies.gstreamer-sys]
+path = "../gstreamer-sys"
+
+[dev-dependencies]
+shell-words = "0.1.0"
+tempfile = "3"
+
+[features]
+v1_2 = []
+v1_4 = ["v1_2"]
+v1_6 = ["v1_4"]
+v1_8 = []
+v1_10 = ["v1_8"]
+v1_12 = ["v1_10"]
+v1_14 = ["v1_12"]
+v1_16 = ["v1_14"]
+v1_18 = ["v1_16"]
+dox = []
+
+[lib]
+name = "gstreamer_controller_sys"
+
+[package]
+authors = ["Alexey Galakhov "]
+build = "build.rs"
+description = "FFI bindings to libgstcontroller-1.0"
+documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_app_sys/"
+homepage = "https://gstreamer.freedesktop.org"
+keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
+license = "MIT"
+links = "gstcontroller-1.0"
+name = "gstreamer-controller-sys"
+readme = "README.md"
+repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys"
+version = "0.10.0"
+[package.metadata.docs.rs]
+features = ["dox"]
+[package.metadata.system-deps.gstreamer_controller_1_0]
+name = "gstreamer-controller-1.0"
+version = "1.8"
+
+[package.metadata.system-deps.gstreamer_controller_1_0.feature-versions]
+v1_10 = "1.10"
+v1_12 = "1.12"
+v1_14 = "1.14"
+v1_16 = "1.16"
+v1_18 = "1.18"
diff --git a/gstreamer-controller-sys/README.md b/gstreamer-controller-sys/README.md
new file mode 100644
index 000000000..45e2e7977
--- /dev/null
+++ b/gstreamer-controller-sys/README.md
@@ -0,0 +1,33 @@
+# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)!
+
+# gstreamer-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-audio-sys.svg)](https://crates.io/crates/gstreamer-audio-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master)
+
+[GStreamer](https://gstreamer.freedesktop.org/) (Audio library) FFI bindings for Rust.
+
+These bindings are providing unsafe FFI API that can be used to interface with
+GStreamer. Generally they are meant to be used as the building block for
+higher-level abstractions like:
+
+ * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs
+ * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs
+
+The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/)
+based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/)
+API metadata provided by the GStreamer project.
+
+## LICENSE
+
+gstreamer-sys and all crates contained here are licensed under the MIT
+license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT).
+
+GStreamer itself is licensed under the Lesser General Public License version
+2.1 or (at your option) any later version:
+https://www.gnu.org/licenses/lgpl-2.1.html
+
+## Contribution
+
+Any kinds of contributions are welcome as a pull request.
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above,
+without any additional terms or conditions.
diff --git a/gstreamer-controller-sys/build.rs b/gstreamer-controller-sys/build.rs
new file mode 100644
index 000000000..9bc1bf9be
--- /dev/null
+++ b/gstreamer-controller-sys/build.rs
@@ -0,0 +1,24 @@
+// This file was generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
+// from gir-files (https://github.com/gtk-rs/gir-files @ 91e1ef0)
+// DO NOT EDIT
+
+#[cfg(not(feature = "dox"))]
+extern crate system_deps;
+
+#[cfg(not(feature = "dox"))]
+use std::io;
+#[cfg(not(feature = "dox"))]
+use std::io::prelude::*;
+#[cfg(not(feature = "dox"))]
+use std::process;
+
+#[cfg(feature = "dox")]
+fn main() {} // prevent linking libraries to avoid documentation failure
+
+#[cfg(not(feature = "dox"))]
+fn main() {
+ if let Err(s) = system_deps::Config::new().probe() {
+ let _ = eprintln!("{}", s);
+ process::exit(1);
+ }
+}
diff --git a/gstreamer-controller-sys/src/lib.rs b/gstreamer-controller-sys/src/lib.rs
new file mode 100644
index 000000000..1a0bfb9fa
--- /dev/null
+++ b/gstreamer-controller-sys/src/lib.rs
@@ -0,0 +1,555 @@
+// This file was generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
+// from gir-files (https://github.com/gtk-rs/gir-files @ 91e1ef0)
+// DO NOT EDIT
+
+#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
+#![allow(
+ clippy::approx_constant,
+ clippy::type_complexity,
+ clippy::unreadable_literal
+)]
+
+extern crate glib_sys as glib;
+extern crate gobject_sys as gobject;
+extern crate gstreamer_base_sys as gst_base;
+extern crate gstreamer_sys as gst;
+extern crate libc;
+
+#[allow(unused_imports)]
+use libc::{
+ c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
+ intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE,
+};
+
+#[allow(unused_imports)]
+use glib::{gboolean, gconstpointer, gpointer, GType};
+
+// Enums
+pub type GstInterpolationMode = c_int;
+pub const GST_INTERPOLATION_MODE_NONE: GstInterpolationMode = 0;
+pub const GST_INTERPOLATION_MODE_LINEAR: GstInterpolationMode = 1;
+pub const GST_INTERPOLATION_MODE_CUBIC: GstInterpolationMode = 2;
+pub const GST_INTERPOLATION_MODE_CUBIC_MONOTONIC: GstInterpolationMode = 3;
+
+pub type GstLFOWaveform = c_int;
+pub const GST_LFO_WAVEFORM_SINE: GstLFOWaveform = 0;
+pub const GST_LFO_WAVEFORM_SQUARE: GstLFOWaveform = 1;
+pub const GST_LFO_WAVEFORM_SAW: GstLFOWaveform = 2;
+pub const GST_LFO_WAVEFORM_REVERSE_SAW: GstLFOWaveform = 3;
+pub const GST_LFO_WAVEFORM_TRIANGLE: GstLFOWaveform = 4;
+
+// Unions
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union GstControlPoint_cache {
+ pub cubic: GstControlPoint_cache_cubic,
+ pub cubic_monotonic: GstControlPoint_cache_cubic_monotonic,
+ pub _gst_reserved: [u8; 64],
+}
+
+impl ::std::fmt::Debug for GstControlPoint_cache {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!("GstControlPoint_cache @ {:?}", self as *const _))
+ .field("cubic", unsafe { &self.cubic })
+ .field("cubic_monotonic", unsafe { &self.cubic_monotonic })
+ .finish()
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union GstDirectControlBinding_ABI {
+ pub _gst_reserved: [gpointer; 4],
+ pub abi: GstDirectControlBinding_ABI_abi,
+}
+
+impl ::std::fmt::Debug for GstDirectControlBinding_ABI {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!(
+ "GstDirectControlBinding_ABI @ {:?}",
+ self as *const _
+ ))
+ .field("_gst_reserved", unsafe { &self._gst_reserved })
+ .field("abi", unsafe { &self.abi })
+ .finish()
+ }
+}
+
+// Callbacks
+pub type GstDirectControlBindingConvertGValue =
+ Option;
+pub type GstDirectControlBindingConvertValue =
+ Option;
+
+// Records
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstARGBControlBindingClass {
+ pub parent_class: gst::GstControlBindingClass,
+ pub _gst_reserved: [gpointer; 4],
+}
+
+impl ::std::fmt::Debug for GstARGBControlBindingClass {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!(
+ "GstARGBControlBindingClass @ {:?}",
+ self as *const _
+ ))
+ .field("parent_class", &self.parent_class)
+ .finish()
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstControlPoint {
+ pub timestamp: gst::GstClockTime,
+ pub value: c_double,
+ pub cache: GstControlPoint_cache,
+}
+
+impl ::std::fmt::Debug for GstControlPoint {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!("GstControlPoint @ {:?}", self as *const _))
+ .field("timestamp", &self.timestamp)
+ .field("value", &self.value)
+ .field("cache", &self.cache)
+ .finish()
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstControlPoint_cache_cubic {
+ pub h: c_double,
+ pub z: c_double,
+}
+
+impl ::std::fmt::Debug for GstControlPoint_cache_cubic {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!(
+ "GstControlPoint_cache_cubic @ {:?}",
+ self as *const _
+ ))
+ .field("h", &self.h)
+ .field("z", &self.z)
+ .finish()
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstControlPoint_cache_cubic_monotonic {
+ pub c1s: c_double,
+ pub c2s: c_double,
+ pub c3s: c_double,
+}
+
+impl ::std::fmt::Debug for GstControlPoint_cache_cubic_monotonic {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!(
+ "GstControlPoint_cache_cubic_monotonic @ {:?}",
+ self as *const _
+ ))
+ .field("c1s", &self.c1s)
+ .field("c2s", &self.c2s)
+ .field("c3s", &self.c3s)
+ .finish()
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstDirectControlBindingClass {
+ pub parent_class: gst::GstControlBindingClass,
+ pub _gst_reserved: [gpointer; 4],
+}
+
+impl ::std::fmt::Debug for GstDirectControlBindingClass {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!(
+ "GstDirectControlBindingClass @ {:?}",
+ self as *const _
+ ))
+ .field("parent_class", &self.parent_class)
+ .finish()
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstDirectControlBinding_ABI_abi {
+ pub want_absolute: gboolean,
+}
+
+impl ::std::fmt::Debug for GstDirectControlBinding_ABI_abi {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!(
+ "GstDirectControlBinding_ABI_abi @ {:?}",
+ self as *const _
+ ))
+ .field("want_absolute", &self.want_absolute)
+ .finish()
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstInterpolationControlSourceClass {
+ pub parent_class: GstTimedValueControlSourceClass,
+ pub _gst_reserved: [gpointer; 4],
+}
+
+impl ::std::fmt::Debug for GstInterpolationControlSourceClass {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!(
+ "GstInterpolationControlSourceClass @ {:?}",
+ self as *const _
+ ))
+ .field("parent_class", &self.parent_class)
+ .finish()
+ }
+}
+
+#[repr(C)]
+pub struct _GstInterpolationControlSourcePrivate(c_void);
+
+pub type GstInterpolationControlSourcePrivate = *mut _GstInterpolationControlSourcePrivate;
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstLFOControlSourceClass {
+ pub parent_class: gst::GstControlSourceClass,
+ pub _gst_reserved: [gpointer; 4],
+}
+
+impl ::std::fmt::Debug for GstLFOControlSourceClass {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!(
+ "GstLFOControlSourceClass @ {:?}",
+ self as *const _
+ ))
+ .field("parent_class", &self.parent_class)
+ .finish()
+ }
+}
+
+#[repr(C)]
+pub struct _GstLFOControlSourcePrivate(c_void);
+
+pub type GstLFOControlSourcePrivate = *mut _GstLFOControlSourcePrivate;
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstProxyControlBindingClass {
+ pub parent_class: gst::GstControlBindingClass,
+ pub _padding: [gpointer; 4],
+}
+
+impl ::std::fmt::Debug for GstProxyControlBindingClass {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!(
+ "GstProxyControlBindingClass @ {:?}",
+ self as *const _
+ ))
+ .finish()
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstTimedValueControlSourceClass {
+ pub parent_class: gst::GstControlSourceClass,
+ pub _gst_reserved: [gpointer; 4],
+}
+
+impl ::std::fmt::Debug for GstTimedValueControlSourceClass {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!(
+ "GstTimedValueControlSourceClass @ {:?}",
+ self as *const _
+ ))
+ .field("parent_class", &self.parent_class)
+ .finish()
+ }
+}
+
+#[repr(C)]
+pub struct _GstTimedValueControlSourcePrivate(c_void);
+
+pub type GstTimedValueControlSourcePrivate = *mut _GstTimedValueControlSourcePrivate;
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstTriggerControlSourceClass {
+ pub parent_class: GstTimedValueControlSourceClass,
+ pub _gst_reserved: [gpointer; 4],
+}
+
+impl ::std::fmt::Debug for GstTriggerControlSourceClass {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!(
+ "GstTriggerControlSourceClass @ {:?}",
+ self as *const _
+ ))
+ .field("parent_class", &self.parent_class)
+ .finish()
+ }
+}
+
+#[repr(C)]
+pub struct _GstTriggerControlSourcePrivate(c_void);
+
+pub type GstTriggerControlSourcePrivate = *mut _GstTriggerControlSourcePrivate;
+
+// Classes
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstARGBControlBinding {
+ pub parent: gst::GstControlBinding,
+ pub cs_a: *mut gst::GstControlSource,
+ pub cs_r: *mut gst::GstControlSource,
+ pub cs_g: *mut gst::GstControlSource,
+ pub cs_b: *mut gst::GstControlSource,
+ pub cur_value: gobject::GValue,
+ pub last_value: u32,
+ pub _gst_reserved: [gpointer; 4],
+}
+
+impl ::std::fmt::Debug for GstARGBControlBinding {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!("GstARGBControlBinding @ {:?}", self as *const _))
+ .field("parent", &self.parent)
+ .finish()
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstDirectControlBinding {
+ pub parent: gst::GstControlBinding,
+ pub cs: *mut gst::GstControlSource,
+ pub cur_value: gobject::GValue,
+ pub last_value: c_double,
+ pub byte_size: c_int,
+ pub convert_value: GstDirectControlBindingConvertValue,
+ pub convert_g_value: GstDirectControlBindingConvertGValue,
+ pub ABI: GstDirectControlBinding_ABI,
+}
+
+impl ::std::fmt::Debug for GstDirectControlBinding {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!("GstDirectControlBinding @ {:?}", self as *const _))
+ .field("parent", &self.parent)
+ .field("ABI", &self.ABI)
+ .finish()
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstInterpolationControlSource {
+ pub parent: GstTimedValueControlSource,
+ pub priv_: *mut GstInterpolationControlSourcePrivate,
+ pub _gst_reserved: [gpointer; 4],
+}
+
+impl ::std::fmt::Debug for GstInterpolationControlSource {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!(
+ "GstInterpolationControlSource @ {:?}",
+ self as *const _
+ ))
+ .field("parent", &self.parent)
+ .finish()
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstLFOControlSource {
+ pub parent: gst::GstControlSource,
+ pub priv_: *mut GstLFOControlSourcePrivate,
+ pub lock: glib::GMutex,
+ pub _gst_reserved: [gpointer; 4],
+}
+
+impl ::std::fmt::Debug for GstLFOControlSource {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!("GstLFOControlSource @ {:?}", self as *const _))
+ .field("parent", &self.parent)
+ .finish()
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstProxyControlBinding {
+ pub parent: gst::GstControlBinding,
+ pub ref_object: gobject::GWeakRef,
+ pub property_name: *mut c_char,
+ pub _padding: [gpointer; 4],
+}
+
+impl ::std::fmt::Debug for GstProxyControlBinding {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!("GstProxyControlBinding @ {:?}", self as *const _))
+ .finish()
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstTimedValueControlSource {
+ pub parent: gst::GstControlSource,
+ pub lock: glib::GMutex,
+ pub values: *mut glib::GSequence,
+ pub nvalues: c_int,
+ pub valid_cache: gboolean,
+ pub priv_: *mut GstTimedValueControlSourcePrivate,
+ pub _gst_reserved: [gpointer; 4],
+}
+
+impl ::std::fmt::Debug for GstTimedValueControlSource {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!(
+ "GstTimedValueControlSource @ {:?}",
+ self as *const _
+ ))
+ .field("parent", &self.parent)
+ .field("lock", &self.lock)
+ .field("values", &self.values)
+ .field("nvalues", &self.nvalues)
+ .field("valid_cache", &self.valid_cache)
+ .finish()
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GstTriggerControlSource {
+ pub parent: GstTimedValueControlSource,
+ pub priv_: *mut GstTriggerControlSourcePrivate,
+ pub _gst_reserved: [gpointer; 4],
+}
+
+impl ::std::fmt::Debug for GstTriggerControlSource {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!("GstTriggerControlSource @ {:?}", self as *const _))
+ .field("parent", &self.parent)
+ .finish()
+ }
+}
+
+extern "C" {
+
+ //=========================================================================
+ // GstInterpolationMode
+ //=========================================================================
+ pub fn gst_interpolation_mode_get_type() -> GType;
+
+ //=========================================================================
+ // GstLFOWaveform
+ //=========================================================================
+ pub fn gst_lfo_waveform_get_type() -> GType;
+
+ //=========================================================================
+ // GstControlPoint
+ //=========================================================================
+ pub fn gst_control_point_get_type() -> GType;
+ pub fn gst_control_point_copy(cp: *mut GstControlPoint) -> *mut GstControlPoint;
+ pub fn gst_control_point_free(cp: *mut GstControlPoint);
+
+ //=========================================================================
+ // GstARGBControlBinding
+ //=========================================================================
+ pub fn gst_argb_control_binding_get_type() -> GType;
+ pub fn gst_argb_control_binding_new(
+ object: *mut gst::GstObject,
+ property_name: *const c_char,
+ cs_a: *mut gst::GstControlSource,
+ cs_r: *mut gst::GstControlSource,
+ cs_g: *mut gst::GstControlSource,
+ cs_b: *mut gst::GstControlSource,
+ ) -> *mut gst::GstControlBinding;
+
+ //=========================================================================
+ // GstDirectControlBinding
+ //=========================================================================
+ pub fn gst_direct_control_binding_get_type() -> GType;
+ pub fn gst_direct_control_binding_new(
+ object: *mut gst::GstObject,
+ property_name: *const c_char,
+ cs: *mut gst::GstControlSource,
+ ) -> *mut gst::GstControlBinding;
+ pub fn gst_direct_control_binding_new_absolute(
+ object: *mut gst::GstObject,
+ property_name: *const c_char,
+ cs: *mut gst::GstControlSource,
+ ) -> *mut gst::GstControlBinding;
+
+ //=========================================================================
+ // GstInterpolationControlSource
+ //=========================================================================
+ pub fn gst_interpolation_control_source_get_type() -> GType;
+ pub fn gst_interpolation_control_source_new() -> *mut gst::GstControlSource;
+
+ //=========================================================================
+ // GstLFOControlSource
+ //=========================================================================
+ pub fn gst_lfo_control_source_get_type() -> GType;
+ pub fn gst_lfo_control_source_new() -> *mut gst::GstControlSource;
+
+ //=========================================================================
+ // GstProxyControlBinding
+ //=========================================================================
+ pub fn gst_proxy_control_binding_get_type() -> GType;
+ #[cfg(any(feature = "v1_12", feature = "dox"))]
+ pub fn gst_proxy_control_binding_new(
+ object: *mut gst::GstObject,
+ property_name: *const c_char,
+ ref_object: *mut gst::GstObject,
+ ref_property_name: *const c_char,
+ ) -> *mut gst::GstControlBinding;
+
+ //=========================================================================
+ // GstTimedValueControlSource
+ //=========================================================================
+ pub fn gst_timed_value_control_source_get_type() -> GType;
+ pub fn gst_timed_value_control_source_find_control_point_iter(
+ self_: *mut GstTimedValueControlSource,
+ timestamp: gst::GstClockTime,
+ ) -> *mut glib::GSequenceIter;
+ pub fn gst_timed_value_control_source_get_all(
+ self_: *mut GstTimedValueControlSource,
+ ) -> *mut glib::GList;
+ pub fn gst_timed_value_control_source_get_count(
+ self_: *mut GstTimedValueControlSource,
+ ) -> c_int;
+ pub fn gst_timed_value_control_source_set(
+ self_: *mut GstTimedValueControlSource,
+ timestamp: gst::GstClockTime,
+ value: c_double,
+ ) -> gboolean;
+ pub fn gst_timed_value_control_source_set_from_list(
+ self_: *mut GstTimedValueControlSource,
+ timedvalues: *const glib::GSList,
+ ) -> gboolean;
+ pub fn gst_timed_value_control_source_unset(
+ self_: *mut GstTimedValueControlSource,
+ timestamp: gst::GstClockTime,
+ ) -> gboolean;
+ pub fn gst_timed_value_control_source_unset_all(self_: *mut GstTimedValueControlSource);
+
+ //=========================================================================
+ // GstTriggerControlSource
+ //=========================================================================
+ pub fn gst_trigger_control_source_get_type() -> GType;
+ pub fn gst_trigger_control_source_new() -> *mut gst::GstControlSource;
+
+ //=========================================================================
+ // Other functions
+ //=========================================================================
+ pub fn gst_timed_value_control_invalidate_cache(self_: *mut GstTimedValueControlSource);
+
+}
diff --git a/gstreamer-controller-sys/tests/abi.rs b/gstreamer-controller-sys/tests/abi.rs
new file mode 100644
index 000000000..074df1f1b
--- /dev/null
+++ b/gstreamer-controller-sys/tests/abi.rs
@@ -0,0 +1,386 @@
+// This file was generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
+// from gir-files (https://github.com/gtk-rs/gir-files @ 91e1ef0)
+// DO NOT EDIT
+
+extern crate gstreamer_controller_sys;
+extern crate shell_words;
+extern crate tempfile;
+use gstreamer_controller_sys::*;
+use std::env;
+use std::error::Error;
+use std::mem::{align_of, size_of};
+use std::path::Path;
+use std::process::Command;
+use std::str;
+use tempfile::Builder;
+
+static PACKAGES: &[&str] = &["gstreamer-controller-1.0"];
+
+#[derive(Clone, Debug)]
+struct Compiler {
+ pub args: Vec,
+}
+
+impl Compiler {
+ pub fn new() -> Result> {
+ let mut args = get_var("CC", "cc")?;
+ args.push("-Wno-deprecated-declarations".to_owned());
+ // For %z support in printf when using MinGW.
+ args.push("-D__USE_MINGW_ANSI_STDIO".to_owned());
+ args.extend(get_var("CFLAGS", "")?);
+ args.extend(get_var("CPPFLAGS", "")?);
+ args.extend(pkg_config_cflags(PACKAGES)?);
+ Ok(Compiler { args })
+ }
+
+ pub fn define<'a, V: Into