mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-26 19:41:09 +00:00
Add generation files for gstreamer-controller-sys
This commit is contained in:
parent
8825a27c3e
commit
57c58f255e
13 changed files with 2387 additions and 1 deletions
|
@ -73,7 +73,8 @@ stages:
|
||||||
gstreamer-sys \
|
gstreamer-sys \
|
||||||
gstreamer-tag-sys \
|
gstreamer-tag-sys \
|
||||||
gstreamer-video-sys \
|
gstreamer-video-sys \
|
||||||
gstreamer-webrtc-sys; \
|
gstreamer-webrtc-sys \
|
||||||
|
gstreamer-controller-sys; \
|
||||||
do \
|
do \
|
||||||
cargo test --locked -p $crate; \
|
cargo test --locked -p $crate; \
|
||||||
done
|
done
|
||||||
|
|
|
@ -19,4 +19,5 @@ members = [
|
||||||
"gstreamer-editing-services-sys",
|
"gstreamer-editing-services-sys",
|
||||||
"gstreamer-check-sys",
|
"gstreamer-check-sys",
|
||||||
"gstreamer-rtp-sys",
|
"gstreamer-rtp-sys",
|
||||||
|
"gstreamer-controller-sys",
|
||||||
]
|
]
|
||||||
|
|
25
Gir_GstController.toml
Normal file
25
Gir_GstController.toml
Normal file
|
@ -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"
|
1075
gir-files/GstController-1.0.gir
Normal file
1075
gir-files/GstController-1.0.gir
Normal file
File diff suppressed because it is too large
Load diff
181
gstreamer-controller-sys/CHANGELOG.md
Normal file
181
gstreamer-controller-sys/CHANGELOG.md
Normal file
|
@ -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
|
63
gstreamer-controller-sys/Cargo.toml
Normal file
63
gstreamer-controller-sys/Cargo.toml
Normal file
|
@ -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 <agalakhov@gmail.com>"]
|
||||||
|
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"
|
33
gstreamer-controller-sys/README.md
Normal file
33
gstreamer-controller-sys/README.md
Normal file
|
@ -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.
|
24
gstreamer-controller-sys/build.rs
Normal file
24
gstreamer-controller-sys/build.rs
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
555
gstreamer-controller-sys/src/lib.rs
Normal file
555
gstreamer-controller-sys/src/lib.rs
Normal file
|
@ -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<unsafe extern "C" fn(*mut GstDirectControlBinding, c_double, *mut gobject::GValue)>;
|
||||||
|
pub type GstDirectControlBindingConvertValue =
|
||||||
|
Option<unsafe extern "C" fn(*mut GstDirectControlBinding, c_double, gpointer)>;
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
|
||||||
|
}
|
386
gstreamer-controller-sys/tests/abi.rs
Normal file
386
gstreamer-controller-sys/tests/abi.rs
Normal file
|
@ -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<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Compiler {
|
||||||
|
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||||
|
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<Option<&'a str>>>(&mut self, var: &str, val: V) {
|
||||||
|
let arg = match val.into() {
|
||||||
|
None => format!("-D{}", var),
|
||||||
|
Some(val) => format!("-D{}={}", var, val),
|
||||||
|
};
|
||||||
|
self.args.push(arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||||
|
let mut cmd = self.to_command();
|
||||||
|
cmd.arg(src);
|
||||||
|
cmd.arg("-o");
|
||||||
|
cmd.arg(out);
|
||||||
|
let status = cmd.spawn()?.wait()?;
|
||||||
|
if !status.success() {
|
||||||
|
return Err(format!("compilation command {:?} failed, {}", &cmd, status).into());
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn to_command(&self) -> Command {
|
||||||
|
let mut cmd = Command::new(&self.args[0]);
|
||||||
|
cmd.args(&self.args[1..]);
|
||||||
|
cmd
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||||
|
match env::var(name) {
|
||||||
|
Ok(value) => Ok(shell_words::split(&value)?),
|
||||||
|
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||||
|
Err(err) => Err(format!("{} {}", name, err).into()),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||||
|
if packages.is_empty() {
|
||||||
|
return Ok(Vec::new());
|
||||||
|
}
|
||||||
|
let mut cmd = Command::new("pkg-config");
|
||||||
|
cmd.arg("--cflags");
|
||||||
|
cmd.args(packages);
|
||||||
|
let out = cmd.output()?;
|
||||||
|
if !out.status.success() {
|
||||||
|
return Err(format!("command {:?} returned {}", &cmd, out.status).into());
|
||||||
|
}
|
||||||
|
let stdout = str::from_utf8(&out.stdout)?;
|
||||||
|
Ok(shell_words::split(stdout.trim())?)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||||
|
struct Layout {
|
||||||
|
size: usize,
|
||||||
|
alignment: usize,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)]
|
||||||
|
struct Results {
|
||||||
|
/// Number of successfully completed tests.
|
||||||
|
passed: usize,
|
||||||
|
/// Total number of failed tests (including those that failed to compile).
|
||||||
|
failed: usize,
|
||||||
|
/// Number of tests that failed to compile.
|
||||||
|
failed_to_compile: usize,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Results {
|
||||||
|
fn record_passed(&mut self) {
|
||||||
|
self.passed += 1;
|
||||||
|
}
|
||||||
|
fn record_failed(&mut self) {
|
||||||
|
self.failed += 1;
|
||||||
|
}
|
||||||
|
fn record_failed_to_compile(&mut self) {
|
||||||
|
self.failed += 1;
|
||||||
|
self.failed_to_compile += 1;
|
||||||
|
}
|
||||||
|
fn summary(&self) -> String {
|
||||||
|
format!(
|
||||||
|
"{} passed; {} failed (compilation errors: {})",
|
||||||
|
self.passed, self.failed, self.failed_to_compile
|
||||||
|
)
|
||||||
|
}
|
||||||
|
fn expect_total_success(&self) {
|
||||||
|
if self.failed == 0 {
|
||||||
|
println!("OK: {}", self.summary());
|
||||||
|
} else {
|
||||||
|
panic!("FAILED: {}", self.summary());
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn cross_validate_constants_with_c() {
|
||||||
|
let tmpdir = Builder::new()
|
||||||
|
.prefix("abi")
|
||||||
|
.tempdir()
|
||||||
|
.expect("temporary directory");
|
||||||
|
let cc = Compiler::new().expect("configured compiler");
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
"1",
|
||||||
|
get_c_value(tmpdir.path(), &cc, "1").expect("C constant"),
|
||||||
|
"failed to obtain correct constant value for 1"
|
||||||
|
);
|
||||||
|
|
||||||
|
let mut results: Results = Default::default();
|
||||||
|
for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() {
|
||||||
|
match get_c_value(tmpdir.path(), &cc, name) {
|
||||||
|
Err(e) => {
|
||||||
|
results.record_failed_to_compile();
|
||||||
|
eprintln!("{}", e);
|
||||||
|
}
|
||||||
|
Ok(ref c_value) => {
|
||||||
|
if rust_value == c_value {
|
||||||
|
results.record_passed();
|
||||||
|
} else {
|
||||||
|
results.record_failed();
|
||||||
|
eprintln!(
|
||||||
|
"Constant value mismatch for {}\nRust: {:?}\nC: {:?}",
|
||||||
|
name, rust_value, c_value
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if (i + 1) % 25 == 0 {
|
||||||
|
println!("constants ... {}", results.summary());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
results.expect_total_success();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn cross_validate_layout_with_c() {
|
||||||
|
let tmpdir = Builder::new()
|
||||||
|
.prefix("abi")
|
||||||
|
.tempdir()
|
||||||
|
.expect("temporary directory");
|
||||||
|
let cc = Compiler::new().expect("configured compiler");
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
Layout {
|
||||||
|
size: 1,
|
||||||
|
alignment: 1
|
||||||
|
},
|
||||||
|
get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"),
|
||||||
|
"failed to obtain correct layout for char type"
|
||||||
|
);
|
||||||
|
|
||||||
|
let mut results: Results = Default::default();
|
||||||
|
for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() {
|
||||||
|
match get_c_layout(tmpdir.path(), &cc, name) {
|
||||||
|
Err(e) => {
|
||||||
|
results.record_failed_to_compile();
|
||||||
|
eprintln!("{}", e);
|
||||||
|
}
|
||||||
|
Ok(c_layout) => {
|
||||||
|
if rust_layout == c_layout {
|
||||||
|
results.record_passed();
|
||||||
|
} else {
|
||||||
|
results.record_failed();
|
||||||
|
eprintln!(
|
||||||
|
"Layout mismatch for {}\nRust: {:?}\nC: {:?}",
|
||||||
|
name, rust_layout, &c_layout
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if (i + 1) % 25 == 0 {
|
||||||
|
println!("layout ... {}", results.summary());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
results.expect_total_success();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||||
|
let exe = dir.join("layout");
|
||||||
|
let mut cc = cc.clone();
|
||||||
|
cc.define("ABI_TYPE_NAME", name);
|
||||||
|
cc.compile(Path::new("tests/layout.c"), &exe)?;
|
||||||
|
|
||||||
|
let mut abi_cmd = Command::new(exe);
|
||||||
|
let output = abi_cmd.output()?;
|
||||||
|
if !output.status.success() {
|
||||||
|
return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into());
|
||||||
|
}
|
||||||
|
|
||||||
|
let stdout = str::from_utf8(&output.stdout)?;
|
||||||
|
let mut words = stdout.trim().split_whitespace();
|
||||||
|
let size = words.next().unwrap().parse().unwrap();
|
||||||
|
let alignment = words.next().unwrap().parse().unwrap();
|
||||||
|
Ok(Layout { size, alignment })
|
||||||
|
}
|
||||||
|
|
||||||
|
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||||
|
let exe = dir.join("constant");
|
||||||
|
let mut cc = cc.clone();
|
||||||
|
cc.define("ABI_CONSTANT_NAME", name);
|
||||||
|
cc.compile(Path::new("tests/constant.c"), &exe)?;
|
||||||
|
|
||||||
|
let mut abi_cmd = Command::new(exe);
|
||||||
|
let output = abi_cmd.output()?;
|
||||||
|
if !output.status.success() {
|
||||||
|
return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into());
|
||||||
|
}
|
||||||
|
|
||||||
|
let output = str::from_utf8(&output.stdout)?.trim();
|
||||||
|
if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") {
|
||||||
|
return Err(format!(
|
||||||
|
"command {:?} return invalid output, {:?}",
|
||||||
|
&abi_cmd, &output
|
||||||
|
)
|
||||||
|
.into());
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(String::from(&output[14..(output.len() - 14)]))
|
||||||
|
}
|
||||||
|
|
||||||
|
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
||||||
|
(
|
||||||
|
"GstARGBControlBinding",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstARGBControlBinding>(),
|
||||||
|
alignment: align_of::<GstARGBControlBinding>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstARGBControlBindingClass",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstARGBControlBindingClass>(),
|
||||||
|
alignment: align_of::<GstARGBControlBindingClass>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstControlPoint",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstControlPoint>(),
|
||||||
|
alignment: align_of::<GstControlPoint>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstDirectControlBinding",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstDirectControlBinding>(),
|
||||||
|
alignment: align_of::<GstDirectControlBinding>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstDirectControlBindingClass",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstDirectControlBindingClass>(),
|
||||||
|
alignment: align_of::<GstDirectControlBindingClass>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstInterpolationControlSource",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstInterpolationControlSource>(),
|
||||||
|
alignment: align_of::<GstInterpolationControlSource>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstInterpolationControlSourceClass",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstInterpolationControlSourceClass>(),
|
||||||
|
alignment: align_of::<GstInterpolationControlSourceClass>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstInterpolationMode",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstInterpolationMode>(),
|
||||||
|
alignment: align_of::<GstInterpolationMode>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstLFOControlSource",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstLFOControlSource>(),
|
||||||
|
alignment: align_of::<GstLFOControlSource>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstLFOControlSourceClass",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstLFOControlSourceClass>(),
|
||||||
|
alignment: align_of::<GstLFOControlSourceClass>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstLFOWaveform",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstLFOWaveform>(),
|
||||||
|
alignment: align_of::<GstLFOWaveform>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstProxyControlBinding",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstProxyControlBinding>(),
|
||||||
|
alignment: align_of::<GstProxyControlBinding>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstProxyControlBindingClass",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstProxyControlBindingClass>(),
|
||||||
|
alignment: align_of::<GstProxyControlBindingClass>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstTimedValueControlSource",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstTimedValueControlSource>(),
|
||||||
|
alignment: align_of::<GstTimedValueControlSource>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstTimedValueControlSourceClass",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstTimedValueControlSourceClass>(),
|
||||||
|
alignment: align_of::<GstTimedValueControlSourceClass>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstTriggerControlSource",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstTriggerControlSource>(),
|
||||||
|
alignment: align_of::<GstTriggerControlSource>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"GstTriggerControlSourceClass",
|
||||||
|
Layout {
|
||||||
|
size: size_of::<GstTriggerControlSourceClass>(),
|
||||||
|
alignment: align_of::<GstTriggerControlSourceClass>(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
];
|
||||||
|
|
||||||
|
const RUST_CONSTANTS: &[(&str, &str)] = &[
|
||||||
|
("(gint) GST_INTERPOLATION_MODE_CUBIC", "2"),
|
||||||
|
("(gint) GST_INTERPOLATION_MODE_CUBIC_MONOTONIC", "3"),
|
||||||
|
("(gint) GST_INTERPOLATION_MODE_LINEAR", "1"),
|
||||||
|
("(gint) GST_INTERPOLATION_MODE_NONE", "0"),
|
||||||
|
("(gint) GST_LFO_WAVEFORM_REVERSE_SAW", "3"),
|
||||||
|
("(gint) GST_LFO_WAVEFORM_SAW", "2"),
|
||||||
|
("(gint) GST_LFO_WAVEFORM_SINE", "0"),
|
||||||
|
("(gint) GST_LFO_WAVEFORM_SQUARE", "1"),
|
||||||
|
("(gint) GST_LFO_WAVEFORM_TRIANGLE", "4"),
|
||||||
|
];
|
27
gstreamer-controller-sys/tests/constant.c
Normal file
27
gstreamer-controller-sys/tests/constant.c
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
// 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
|
||||||
|
|
||||||
|
#include "manual.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
printf(_Generic((ABI_CONSTANT_NAME),
|
||||||
|
char *: "###gir test###%s###gir test###\n",
|
||||||
|
const char *: "###gir test###%s###gir test###\n",
|
||||||
|
char: "###gir test###%c###gir test###\n",
|
||||||
|
signed char: "###gir test###%hhd###gir test###\n",
|
||||||
|
unsigned char: "###gir test###%hhu###gir test###\n",
|
||||||
|
short int: "###gir test###%hd###gir test###\n",
|
||||||
|
unsigned short int: "###gir test###%hu###gir test###\n",
|
||||||
|
int: "###gir test###%d###gir test###\n",
|
||||||
|
unsigned int: "###gir test###%u###gir test###\n",
|
||||||
|
long: "###gir test###%ld###gir test###\n",
|
||||||
|
unsigned long: "###gir test###%lu###gir test###\n",
|
||||||
|
long long: "###gir test###%lld###gir test###\n",
|
||||||
|
unsigned long long: "###gir test###%llu###gir test###\n",
|
||||||
|
double: "###gir test###%f###gir test###\n",
|
||||||
|
long double: "###gir test###%ld###gir test###\n"),
|
||||||
|
ABI_CONSTANT_NAME);
|
||||||
|
return 0;
|
||||||
|
}
|
12
gstreamer-controller-sys/tests/layout.c
Normal file
12
gstreamer-controller-sys/tests/layout.c
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
// 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
|
||||||
|
|
||||||
|
#include "manual.h"
|
||||||
|
#include <stdalign.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME));
|
||||||
|
return 0;
|
||||||
|
}
|
3
gstreamer-controller-sys/tests/manual.h
Normal file
3
gstreamer-controller-sys/tests/manual.h
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
// Feel free to edit this file, it won't be regenerated by gir generator unless removed.
|
||||||
|
|
||||||
|
#include <gst/controller/controller.h>
|
Loading…
Reference in a new issue