mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 19:11:06 +00:00
Merge gstreamer-sys into the main repository
More often than not both need to be modified in sync and they share the gir-files subdirectory anyway. As such it's easier to keep them inside the same repository.
This commit is contained in:
commit
ff64c6606a
215 changed files with 59441 additions and 0 deletions
3
sys/.gitignore
vendored
Normal file
3
sys/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
/target/
|
||||
**/*.rs.bk
|
||||
Cargo.lock
|
118
sys/.gitlab-ci.yml
Normal file
118
sys/.gitlab-ci.yml
Normal file
|
@ -0,0 +1,118 @@
|
|||
include:
|
||||
- remote: "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/raw/master/ci/images_template.yml"
|
||||
|
||||
stages:
|
||||
- "lint"
|
||||
- "test"
|
||||
- "extras"
|
||||
|
||||
.base:
|
||||
image: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/10:$RUST_VERSION-$GST_RS_IMG_TAG"
|
||||
variables:
|
||||
G_DEBUG: "fatal_warnings"
|
||||
before_script:
|
||||
- source ./ci/env.sh
|
||||
- mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config
|
||||
# If cargo exists assume we probably will want to update the lockfile
|
||||
- |
|
||||
if command -v cargo; then
|
||||
cargo generate-lockfile
|
||||
cargo update
|
||||
fi
|
||||
|
||||
.img-stable:
|
||||
extends: .base
|
||||
variables:
|
||||
RUST_VERSION: "stable"
|
||||
|
||||
.img-1-41:
|
||||
extends: .base
|
||||
variables:
|
||||
RUST_VERSION: "1.41.0"
|
||||
|
||||
.img-nightly:
|
||||
extends: .base
|
||||
variables:
|
||||
RUST_VERSION: "nightly"
|
||||
|
||||
.cargo test:
|
||||
stage: "test"
|
||||
script:
|
||||
- rustc --version
|
||||
- cargo --version
|
||||
- cargo build --locked --all --color=always
|
||||
# FIXME: tests are broken
|
||||
# https://github.com/sdroege/gstreamer-sys/issues/16
|
||||
# - cargo test --locked --all --color=always
|
||||
- cargo build --locked --all --all-features --color=always
|
||||
# FIXME: tests are broken
|
||||
# https://github.com/sdroege/gstreamer-sys/issues/16
|
||||
# - cargo test --locked --all --all-features --color=always
|
||||
|
||||
# Run tests for crates we can currently run. The others
|
||||
# need a new release of the C library first
|
||||
- |
|
||||
for crate in gstreamer-app-sys \
|
||||
gstreamer-audio-sys \
|
||||
gstreamer-base-sys \
|
||||
gstreamer-check-sys \
|
||||
gstreamer-gl-sys \
|
||||
gstreamer-mpegts-sys \
|
||||
gstreamer-net-sys \
|
||||
gstreamer-pbutils-sys \
|
||||
gstreamer-player-sys \
|
||||
gstreamer-rtsp-sys \
|
||||
gstreamer-sdp-sys \
|
||||
gstreamer-sys \
|
||||
gstreamer-tag-sys \
|
||||
gstreamer-video-sys \
|
||||
gstreamer-webrtc-sys \
|
||||
gstreamer-controller-sys; \
|
||||
do \
|
||||
cargo test --locked -p $crate; \
|
||||
done
|
||||
|
||||
test stable:
|
||||
extends:
|
||||
- '.cargo test'
|
||||
- .img-stable
|
||||
|
||||
test 1.41:
|
||||
extends:
|
||||
- '.cargo test'
|
||||
- .img-1-41
|
||||
|
||||
test nightly:
|
||||
extends:
|
||||
- '.cargo test'
|
||||
- .img-nightly
|
||||
|
||||
rustfmt:
|
||||
extends: .img-stable
|
||||
stage: "lint"
|
||||
script:
|
||||
- cargo fmt --version
|
||||
- cargo fmt -- --color=always --check
|
||||
|
||||
check commits:
|
||||
extends: .img-stable
|
||||
stage: "lint"
|
||||
script:
|
||||
- ci-fairy check-commits --textwidth 0 --no-signed-off-by
|
||||
|
||||
outdated:
|
||||
extends: .img-stable
|
||||
allow_failure: true
|
||||
stage: 'extras'
|
||||
only:
|
||||
- schedules
|
||||
script:
|
||||
- cargo outdated --root-deps-only --exit-code 1 -v
|
||||
|
||||
deny:
|
||||
extends: .img-stable
|
||||
stage: 'extras'
|
||||
only:
|
||||
- schedules
|
||||
script:
|
||||
- cargo deny check
|
23
sys/Cargo.toml
Normal file
23
sys/Cargo.toml
Normal file
|
@ -0,0 +1,23 @@
|
|||
[workspace]
|
||||
|
||||
members = [
|
||||
"gstreamer-sys",
|
||||
"gstreamer-base-sys",
|
||||
"gstreamer-tag-sys",
|
||||
"gstreamer-audio-sys",
|
||||
"gstreamer-video-sys",
|
||||
"gstreamer-pbutils-sys",
|
||||
"gstreamer-app-sys",
|
||||
"gstreamer-player-sys",
|
||||
"gstreamer-mpegts-sys",
|
||||
"gstreamer-net-sys",
|
||||
"gstreamer-sdp-sys",
|
||||
"gstreamer-rtsp-sys",
|
||||
"gstreamer-rtsp-server-sys",
|
||||
"gstreamer-webrtc-sys",
|
||||
"gstreamer-gl-sys",
|
||||
"gstreamer-editing-services-sys",
|
||||
"gstreamer-check-sys",
|
||||
"gstreamer-rtp-sys",
|
||||
"gstreamer-controller-sys",
|
||||
]
|
13
sys/DEVELOPMENT.md
Normal file
13
sys/DEVELOPMENT.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# How to update the bindings
|
||||
|
||||
* Take the updated .gir files (e.g. from your gst-build checkout) and put
|
||||
them in the gir-files directory
|
||||
* In the gir-files directory, run ./fix.sh
|
||||
* In the GstVideo-1.0.gir file, the `GST_VIDEO_BUFFER_FLAG_ONEFIELD` and
|
||||
`GST_VIDEO_FRAME_FLAG_ONEFIELD` flags are twice. This is a gir bug. Delete
|
||||
the second one.
|
||||
* If there is a new GStreamer version: Manually update `gst*/Cargo.toml` and
|
||||
`gst*/build.rs` files. generator.py will mess these up.
|
||||
* Run generator.py
|
||||
* `git checkout gst*/Cargo.toml gst*/build.rs`
|
||||
* Investigate the diff and fix any mess-ups
|
198
sys/Gir_Gst.toml
Normal file
198
sys/Gir_Gst.toml
Normal file
|
@ -0,0 +1,198 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "Gst"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.8"
|
||||
target_path = "gstreamer-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
"1.12",
|
||||
"1.10",
|
||||
"1.8",
|
||||
"1.6",
|
||||
"1.4",
|
||||
"1.2",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
]
|
||||
|
||||
ignore = [
|
||||
"Gst.VERSION_MAJOR",
|
||||
"Gst.VERSION_MINOR",
|
||||
"Gst.VERSION_MICRO",
|
||||
"Gst.VERSION_NANO",
|
||||
"Gst.ERROR_SYSTEM",
|
||||
"Gst.TIME_FORMAT",
|
||||
"Gst.STIME_FORMAT",
|
||||
"Gst.TIMEP_FORMAT",
|
||||
"Gst.STIMEP_FORMAT",
|
||||
"Gst.PTR_FORMAT",
|
||||
"Gst.SEGMENT_FORMAT",
|
||||
"Gst.FOURCC_FORMAT",
|
||||
]
|
||||
|
||||
[[object]]
|
||||
name = "Gst.Buffer"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "ref"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "unref"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "replace"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "copy"
|
||||
version = "1.18"
|
||||
|
||||
[[object]]
|
||||
name = "Gst.BufferList"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "ref"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "unref"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "copy"
|
||||
version = "1.18"
|
||||
|
||||
[[object]]
|
||||
name = "Gst.ParamArray"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "get_type"
|
||||
version = "1.12"
|
||||
|
||||
[[object]]
|
||||
name = "Gst.*"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "reference_timestamp_meta_api_get_type"
|
||||
version = "1.14"
|
||||
|
||||
[[object]]
|
||||
name = "Gst.Caps"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "copy"
|
||||
version = "1.16"
|
||||
[[object.function]]
|
||||
name = "ref"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "unref"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "replace"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "take"
|
||||
version = "1.18"
|
||||
|
||||
[[object]]
|
||||
name = "Gst.Event"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "copy"
|
||||
version = "1.16"
|
||||
[[object.function]]
|
||||
name = "ref"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "unref"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "replace"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "take"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "steal"
|
||||
version = "1.18"
|
||||
|
||||
[[object]]
|
||||
name = "Gst.Memory"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "ref"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "unref"
|
||||
version = "1.18"
|
||||
|
||||
[[object]]
|
||||
name = "Gst.Message"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "copy"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "ref"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "unref"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "replace"
|
||||
version = "1.18"
|
||||
|
||||
[[object]]
|
||||
name = "Gst.Query"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "copy"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "ref"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "unref"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "replace"
|
||||
version = "1.18"
|
||||
|
||||
[[object]]
|
||||
name = "Gst.Sample"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "copy"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "ref"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "unref"
|
||||
version = "1.18"
|
||||
|
||||
[[object]]
|
||||
name = "Gst.TagList"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "copy"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "ref"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "unref"
|
||||
version = "1.18"
|
||||
|
||||
[[object]]
|
||||
name = "Gst.Tracer"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "register"
|
||||
version = "1.18"
|
27
sys/Gir_GstApp.toml
Normal file
27
sys/Gir_GstApp.toml
Normal file
|
@ -0,0 +1,27 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstApp"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.8"
|
||||
target_path = "gstreamer-app-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
]
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
"1.12",
|
||||
"1.10",
|
||||
"1.8",
|
||||
"1.6",
|
||||
"1.4",
|
||||
"1.2",
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
||||
gstreamer_base="GstBase"
|
56
sys/Gir_GstAudio.toml
Normal file
56
sys/Gir_GstAudio.toml
Normal file
|
@ -0,0 +1,56 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstAudio"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.8"
|
||||
target_path = "gstreamer-audio-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
"1.12",
|
||||
"1.10",
|
||||
"1.8",
|
||||
"1.6",
|
||||
"1.4",
|
||||
"1.2",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
]
|
||||
|
||||
ignore = [
|
||||
"GstAudio.AUDIO_FORMATS_ALL",
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
||||
gstreamer_base="GstBase"
|
||||
|
||||
[[object]]
|
||||
name = "GstAudio.AudioBuffer"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "clip"
|
||||
version = "1.0"
|
||||
[[object.function]]
|
||||
name = "reorder_channels"
|
||||
version = "1.0"
|
||||
|
||||
[[object]]
|
||||
name = "GstAudio.AudioConverter"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "get_type"
|
||||
version = "1.14"
|
||||
|
||||
[[object]]
|
||||
name = "GstAudio.*"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "audio_meta_api_get_type"
|
||||
version = "1.16"
|
27
sys/Gir_GstBase.toml
Normal file
27
sys/Gir_GstBase.toml
Normal file
|
@ -0,0 +1,27 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstBase"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.8"
|
||||
target_path = "gstreamer-base-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
"1.12",
|
||||
"1.10",
|
||||
"1.8",
|
||||
"1.6",
|
||||
"1.4",
|
||||
"1.2",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
27
sys/Gir_GstCheck.toml
Normal file
27
sys/Gir_GstCheck.toml
Normal file
|
@ -0,0 +1,27 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstCheck"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.8"
|
||||
target_path = "gstreamer-check-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
"1.12",
|
||||
"1.10",
|
||||
"1.8",
|
||||
"1.6",
|
||||
"1.4",
|
||||
"1.2",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
25
sys/Gir_GstController.toml
Normal file
25
sys/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"
|
30
sys/Gir_GstEditingServices.toml
Normal file
30
sys/Gir_GstEditingServices.toml
Normal file
|
@ -0,0 +1,30 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GES"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.8"
|
||||
target_path = "gstreamer-editing-services-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
"1.12",
|
||||
"1.10",
|
||||
"1.8",
|
||||
"1.6",
|
||||
"1.4",
|
||||
"1.2",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
"Gio",
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
||||
gstreamer_base="GstBase"
|
||||
gstreamer_pbutils="GstPbutils"
|
80
sys/Gir_GstGL.toml
Normal file
80
sys/Gir_GstGL.toml
Normal file
|
@ -0,0 +1,80 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstGL"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.14"
|
||||
target_path = "gstreamer-gl-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
]
|
||||
|
||||
ignore = [
|
||||
"GstGL.GL_DISPLAY_EGL_NAME",
|
||||
"GstGL.GL_COLOR_CONVERT_VIDEO_CAPS",
|
||||
"GstGL.GL_COLOR_CONVERT_FORMATS",
|
||||
"GstGL.GL_MEMORY_VIDEO_FORMATS_STR",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
||||
gstreamer-base="GstBase"
|
||||
gstreamer-video="GstVideo"
|
||||
|
||||
[[object]]
|
||||
name = "GstGL.GLDisplayEGL"
|
||||
status = "generate"
|
||||
cfg_condition = "feature = \"egl\""
|
||||
[[object.function]]
|
||||
pattern = ".*"
|
||||
cfg_condition = "feature = \"egl\""
|
||||
|
||||
[[object]]
|
||||
name = "GstGL.GLDisplayEGLClass"
|
||||
status = "generate"
|
||||
cfg_condition = "feature = \"egl\""
|
||||
|
||||
#[[object]]
|
||||
#name = "GstGL.GL_DISPLAY_EGL_NAME"
|
||||
#status = "manual"
|
||||
#cfg_condition = "feature = \"egl\""
|
||||
# [[object.constant]]
|
||||
# pattern = ".*"
|
||||
# cfg_condition = "feature = \"egl\""
|
||||
|
||||
#[[object]]
|
||||
#name = "GstGL.GL_COLOR_CONVERT_VIDEO_CAPS"
|
||||
#status = "manual"
|
||||
|
||||
[[object]]
|
||||
name = "GstGL.GLDisplayX11"
|
||||
status = "generate"
|
||||
cfg_condition = "feature = \"x11\""
|
||||
[[object.function]]
|
||||
pattern = ".*"
|
||||
cfg_condition = "feature = \"x11\""
|
||||
|
||||
[[object]]
|
||||
name = "GstGL.GLDisplayX11Class"
|
||||
status = "generate"
|
||||
cfg_condition = "feature = \"x11\""
|
||||
|
||||
[[object]]
|
||||
name = "GstGL.GLDisplayWayland"
|
||||
status = "generate"
|
||||
cfg_condition = "feature = \"wayland\""
|
||||
[[object.function]]
|
||||
pattern = ".*"
|
||||
cfg_condition = "feature = \"wayland\""
|
||||
|
||||
[[object]]
|
||||
name = "GstGL.GLDisplayWaylandClass"
|
||||
status = "generate"
|
||||
cfg_condition = "feature = \"wayland\""
|
27
sys/Gir_GstMpegts.toml
Normal file
27
sys/Gir_GstMpegts.toml
Normal file
|
@ -0,0 +1,27 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstMpegts"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.12"
|
||||
target_path = "gstreamer-mpegts-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
"1.12",
|
||||
"1.10",
|
||||
"1.8",
|
||||
"1.6",
|
||||
"1.4",
|
||||
"1.2",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
28
sys/Gir_GstNet.toml
Normal file
28
sys/Gir_GstNet.toml
Normal file
|
@ -0,0 +1,28 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstNet"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.8"
|
||||
target_path = "gstreamer-net-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
"1.12",
|
||||
"1.10",
|
||||
"1.8",
|
||||
"1.6",
|
||||
"1.4",
|
||||
"1.2",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
"Gio",
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
36
sys/Gir_GstPbutils.toml
Normal file
36
sys/Gir_GstPbutils.toml
Normal file
|
@ -0,0 +1,36 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstPbutils"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.8"
|
||||
target_path = "gstreamer-pbutils-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
"1.12",
|
||||
"1.10",
|
||||
"1.8",
|
||||
"1.6",
|
||||
"1.4",
|
||||
"1.2",
|
||||
]
|
||||
|
||||
ignore = [
|
||||
"GstPbutils.PLUGINS_BASE_VERSION_MAJOR",
|
||||
"GstPbutils.PLUGINS_BASE_VERSION_MINOR",
|
||||
"GstPbutils.PLUGINS_BASE_VERSION_MICRO",
|
||||
"GstPbutils.PLUGINS_BASE_VERSION_NANO"
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
||||
gstreamer_audio="GstAudio"
|
||||
gstreamer_video="GstVideo"
|
22
sys/Gir_GstPlayer.toml
Normal file
22
sys/Gir_GstPlayer.toml
Normal file
|
@ -0,0 +1,22 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstPlayer"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.12"
|
||||
target_path = "gstreamer-player-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
||||
gstreamer_video="GstVideo"
|
35
sys/Gir_GstRtp.toml
Normal file
35
sys/Gir_GstRtp.toml
Normal file
|
@ -0,0 +1,35 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstRtp"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.8"
|
||||
target_path = "gstreamer-rtp-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
"1.12",
|
||||
"1.10",
|
||||
"1.8",
|
||||
"1.6",
|
||||
"1.4",
|
||||
"1.2",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject"
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
||||
gstreamer_base="GstBase"
|
||||
|
||||
[[object]]
|
||||
name = "GstRtp.*"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "rtp_source_meta_api_get_type"
|
||||
version = "1.16"
|
36
sys/Gir_GstRtsp.toml
Normal file
36
sys/Gir_GstRtsp.toml
Normal file
|
@ -0,0 +1,36 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstRtsp"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.8"
|
||||
target_path = "gstreamer-rtsp-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
"1.12",
|
||||
"1.10",
|
||||
"1.8",
|
||||
"1.6",
|
||||
"1.4",
|
||||
"1.2",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
"Gio"
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
||||
gstreamer_sdp="GstSdp"
|
||||
|
||||
[[object]]
|
||||
name = "GstRtsp.RTSPMessage"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "get_type"
|
||||
version = "1.14"
|
31
sys/Gir_GstRtspServer.toml
Normal file
31
sys/Gir_GstRtspServer.toml
Normal file
|
@ -0,0 +1,31 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstRtspServer"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.8"
|
||||
target_path = "gstreamer-rtsp-server-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
"1.12",
|
||||
"1.10",
|
||||
"1.8",
|
||||
"1.6",
|
||||
"1.4",
|
||||
"1.2",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
"Gio"
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
||||
gstreamer_net="GstNet"
|
||||
gstreamer_sdp="GstSdp"
|
||||
gstreamer_rtsp="GstRtsp"
|
27
sys/Gir_GstSdp.toml
Normal file
27
sys/Gir_GstSdp.toml
Normal file
|
@ -0,0 +1,27 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstSdp"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.8"
|
||||
target_path = "gstreamer-sdp-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
"1.12",
|
||||
"1.10",
|
||||
"1.8",
|
||||
"1.6",
|
||||
"1.4",
|
||||
"1.2",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject"
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
28
sys/Gir_GstTag.toml
Normal file
28
sys/Gir_GstTag.toml
Normal file
|
@ -0,0 +1,28 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstTag"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.8"
|
||||
target_path = "gstreamer-tag-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
"1.12",
|
||||
"1.10",
|
||||
"1.8",
|
||||
"1.6",
|
||||
"1.4",
|
||||
"1.2",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
||||
gstreamer_base="GstBase"
|
62
sys/Gir_GstVideo.toml
Normal file
62
sys/Gir_GstVideo.toml
Normal file
|
@ -0,0 +1,62 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstVideo"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.8"
|
||||
target_path = "gstreamer-video-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
"1.14",
|
||||
"1.12",
|
||||
"1.10",
|
||||
"1.8",
|
||||
"1.6",
|
||||
"1.4",
|
||||
"1.2",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
]
|
||||
|
||||
ignore = [
|
||||
"GstVideo.VIDEO_FORMATS_ALL",
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
||||
gstreamer_base="GstBase"
|
||||
|
||||
[[object]]
|
||||
name = "GstVideo.VideoOverlayFormatFlags"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "get_type"
|
||||
version = "1.16"
|
||||
|
||||
[[object]]
|
||||
name = "GstVideo.VideoTimeCodeFlags"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "get_type"
|
||||
version = "1.18"
|
||||
|
||||
[[object]]
|
||||
name = "GstVideo.*"
|
||||
status = "generate"
|
||||
[[object.function]]
|
||||
name = "video_time_code_meta_api_get_type"
|
||||
version = "1.10"
|
||||
[[object.function]]
|
||||
name = "video_caption_meta_api_get_type"
|
||||
version = "1.16"
|
||||
[[object.function]]
|
||||
name = "video_afd_meta_api_get_type"
|
||||
version = "1.18"
|
||||
[[object.function]]
|
||||
name = "video_bar_meta_api_get_type"
|
||||
version = "1.18"
|
21
sys/Gir_GstWebRTC.toml
Normal file
21
sys/Gir_GstWebRTC.toml
Normal file
|
@ -0,0 +1,21 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstWebRTC"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.14"
|
||||
target_path = "gstreamer-webrtc-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
extra_versions = [
|
||||
"1.18",
|
||||
"1.16",
|
||||
]
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
]
|
||||
|
||||
[external_libraries]
|
||||
gstreamer="Gst"
|
||||
gstreamer_sdp="GstSdp"
|
23
sys/LICENSE
Normal file
23
sys/LICENSE
Normal file
|
@ -0,0 +1,23 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Sebastian Dröge <sebastian@centricular.com>.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
33
sys/README.md
Normal file
33
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-sys.svg)](https://crates.io/crates/gstreamer-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/) 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.
|
8
sys/ci/env.sh
Normal file
8
sys/ci/env.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
export RUSTUP_HOME='/usr/local/rustup'
|
||||
export PATH=$PATH:/usr/local/cargo/bin
|
||||
|
||||
export PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-gnu/pkgconfig
|
||||
export GST_PLUGIN_SYSTEM_PATH=/usr/local/lib/x86_64-linux-gnu/gstreamer-1.0
|
||||
export GST_PLUGIN_SCANNER=/usr/local/libexec/gstreamer-1.0/gst-plugin-scanner
|
||||
export PATH=$PATH:/usr/local/bin
|
||||
export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
|
34
sys/deny.toml
Normal file
34
sys/deny.toml
Normal file
|
@ -0,0 +1,34 @@
|
|||
[advisories]
|
||||
db-path = "~/.cargo/advisory-db"
|
||||
db-url = "https://github.com/rustsec/advisory-db"
|
||||
vulnerability = "deny"
|
||||
unmaintained = "warn"
|
||||
notice = "warn"
|
||||
ignore = []
|
||||
|
||||
[licenses]
|
||||
unlicensed = "deny"
|
||||
allow = [
|
||||
"Apache-2.0",
|
||||
]
|
||||
deny = [
|
||||
"GPL-1.0",
|
||||
"GPL-2.0",
|
||||
"GPL-3.0",
|
||||
"AGPL-1.0",
|
||||
"AGPL-3.0",
|
||||
]
|
||||
copyleft = "deny"
|
||||
allow-osi-fsf-free = "either"
|
||||
confidence-threshold = 0.8
|
||||
|
||||
[bans]
|
||||
multiple-versions = "deny"
|
||||
highlight = "all"
|
||||
|
||||
[sources]
|
||||
unknown-registry = "deny"
|
||||
unknown-git = "deny"
|
||||
allow-git = [
|
||||
"https://github.com/gtk-rs/sys",
|
||||
]
|
61
sys/generator.py
Executable file
61
sys/generator.py
Executable file
|
@ -0,0 +1,61 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from os import listdir
|
||||
from os.path import isfile, join
|
||||
from subprocess import call
|
||||
import sys
|
||||
|
||||
need_rebuild = False
|
||||
|
||||
def update_workspace():
|
||||
with open('Cargo.toml', 'r') as f:
|
||||
old_lines = f.readlines()
|
||||
lines = old_lines[:]
|
||||
with open('Cargo.toml', 'w') as f:
|
||||
lines.insert(len(lines) - 2, '"gir",')
|
||||
f.write(''.join(lines))
|
||||
success = True
|
||||
try:
|
||||
call(['bash', '-c', 'cd gir && cargo build --release'])
|
||||
except:
|
||||
success = False
|
||||
with open('Cargo.toml', 'w') as f:
|
||||
f.write(''.join(old_lines))
|
||||
return success
|
||||
|
||||
|
||||
if not isfile('./gir/src'):
|
||||
need_rebuild = True
|
||||
print('=> Initializing gir submodule...')
|
||||
call(['bash', '-c', 'git submodule update --init'])
|
||||
print('<= Done!')
|
||||
|
||||
question = 'Do you want to update gir submodule? [y/N]'
|
||||
if sys.version_info[0] < 3:
|
||||
line = raw_input(question)
|
||||
else:
|
||||
line = input(question)
|
||||
line = line.strip()
|
||||
if line.lower() == 'y':
|
||||
need_rebuild = True
|
||||
print('=> Updating gir submodule...')
|
||||
call(['bash', '-c', 'cd gir && git reset --hard HEAD && git pull -f origin master'])
|
||||
print('<= Done!')
|
||||
|
||||
if need_rebuild is True or not os.path.isfile('./gir/target/release/gir'):
|
||||
print('=> Building gir...')
|
||||
if update_workspace() is True:
|
||||
print('<= Done!')
|
||||
else:
|
||||
print('<= Failed...')
|
||||
sys.exit(1)
|
||||
|
||||
print('=> Regenerating crates...')
|
||||
for entry in [f for f in listdir('.') if isfile(join('.', f))]:
|
||||
if entry.startswith('Gir_Gst') and entry.endswith('.toml'):
|
||||
print('==> Regenerating "{}"...'.format(entry))
|
||||
call(['./target/release/gir', '-c', entry])
|
||||
print('<== Done!')
|
||||
call(['cargo', 'fmt'])
|
||||
print('<= Done!')
|
||||
print("Don't forget to check if everything has been correctly generated!")
|
181
sys/gstreamer-app-sys/CHANGELOG.md
Normal file
181
sys/gstreamer-app-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
|
59
sys/gstreamer-app-sys/Cargo.toml
Normal file
59
sys/gstreamer-app-sys/Cargo.toml
Normal file
|
@ -0,0 +1,59 @@
|
|||
[build-dependencies]
|
||||
system-deps = "1.3"
|
||||
|
||||
[dependencies]
|
||||
libc = "0.2"
|
||||
|
||||
[dependencies.glib-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 = "1.0.0"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
v1_2 = []
|
||||
v1_4 = ["v1_2"]
|
||||
v1_6 = ["v1_4"]
|
||||
v1_8 = ["v1_6"]
|
||||
v1_10 = ["v1_8"]
|
||||
v1_12 = ["v1_10"]
|
||||
v1_14 = ["v1_12"]
|
||||
v1_16 = ["v1_14"]
|
||||
v1_18 = ["v1_16"]
|
||||
dox = []
|
||||
|
||||
[lib]
|
||||
name = "gstreamer_app_sys"
|
||||
|
||||
[package]
|
||||
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
|
||||
build = "build.rs"
|
||||
description = "FFI bindings to libgstapp-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 = "gstapp-1.0"
|
||||
name = "gstreamer-app-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_app_1_0]
|
||||
name = "gstreamer-app-1.0"
|
||||
version = "1.8"
|
||||
|
||||
[package.metadata.system-deps.gstreamer_app_1_0.feature-versions]
|
||||
v1_10 = "1.10"
|
||||
v1_12 = "1.12"
|
||||
v1_14 = "1.14"
|
||||
v1_16 = "1.16"
|
||||
v1_18 = "1.18"
|
23
sys/gstreamer-app-sys/LICENSE
Normal file
23
sys/gstreamer-app-sys/LICENSE
Normal file
|
@ -0,0 +1,23 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Sebastian Dröge <sebastian@centricular.com>.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
33
sys/gstreamer-app-sys/README.md
Normal file
33
sys/gstreamer-app-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-app-sys.svg)](https://crates.io/crates/gstreamer-app-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/) (App 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.
|
20
sys/gstreamer-app-sys/build.rs
Normal file
20
sys/gstreamer-app-sys/build.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
extern crate system_deps;
|
||||
|
||||
#[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);
|
||||
}
|
||||
}
|
265
sys/gstreamer-app-sys/src/lib.rs
Normal file
265
sys/gstreamer-app-sys/src/lib.rs
Normal file
|
@ -0,0 +1,265 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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 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 GstAppStreamType = c_int;
|
||||
pub const GST_APP_STREAM_TYPE_STREAM: GstAppStreamType = 0;
|
||||
pub const GST_APP_STREAM_TYPE_SEEKABLE: GstAppStreamType = 1;
|
||||
pub const GST_APP_STREAM_TYPE_RANDOM_ACCESS: GstAppStreamType = 2;
|
||||
|
||||
// Records
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct GstAppSinkCallbacks {
|
||||
pub eos: Option<unsafe extern "C" fn(*mut GstAppSink, gpointer)>,
|
||||
pub new_preroll: Option<unsafe extern "C" fn(*mut GstAppSink, gpointer) -> gst::GstFlowReturn>,
|
||||
pub new_sample: Option<unsafe extern "C" fn(*mut GstAppSink, gpointer) -> gst::GstFlowReturn>,
|
||||
pub _gst_reserved: [gpointer; 4],
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for GstAppSinkCallbacks {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
f.debug_struct(&format!("GstAppSinkCallbacks @ {:?}", self as *const _))
|
||||
.field("eos", &self.eos)
|
||||
.field("new_preroll", &self.new_preroll)
|
||||
.field("new_sample", &self.new_sample)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct GstAppSinkClass {
|
||||
pub basesink_class: gst_base::GstBaseSinkClass,
|
||||
pub eos: Option<unsafe extern "C" fn(*mut GstAppSink)>,
|
||||
pub new_preroll: Option<unsafe extern "C" fn(*mut GstAppSink) -> gst::GstFlowReturn>,
|
||||
pub new_sample: Option<unsafe extern "C" fn(*mut GstAppSink) -> gst::GstFlowReturn>,
|
||||
pub pull_preroll: Option<unsafe extern "C" fn(*mut GstAppSink) -> *mut gst::GstSample>,
|
||||
pub pull_sample: Option<unsafe extern "C" fn(*mut GstAppSink) -> *mut gst::GstSample>,
|
||||
pub try_pull_preroll:
|
||||
Option<unsafe extern "C" fn(*mut GstAppSink, gst::GstClockTime) -> *mut gst::GstSample>,
|
||||
pub try_pull_sample:
|
||||
Option<unsafe extern "C" fn(*mut GstAppSink, gst::GstClockTime) -> *mut gst::GstSample>,
|
||||
pub _gst_reserved: [gpointer; 2],
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for GstAppSinkClass {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
f.debug_struct(&format!("GstAppSinkClass @ {:?}", self as *const _))
|
||||
.field("basesink_class", &self.basesink_class)
|
||||
.field("eos", &self.eos)
|
||||
.field("new_preroll", &self.new_preroll)
|
||||
.field("new_sample", &self.new_sample)
|
||||
.field("pull_preroll", &self.pull_preroll)
|
||||
.field("pull_sample", &self.pull_sample)
|
||||
.field("try_pull_preroll", &self.try_pull_preroll)
|
||||
.field("try_pull_sample", &self.try_pull_sample)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
pub struct _GstAppSinkPrivate(c_void);
|
||||
|
||||
pub type GstAppSinkPrivate = *mut _GstAppSinkPrivate;
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct GstAppSrcCallbacks {
|
||||
pub need_data: Option<unsafe extern "C" fn(*mut GstAppSrc, c_uint, gpointer)>,
|
||||
pub enough_data: Option<unsafe extern "C" fn(*mut GstAppSrc, gpointer)>,
|
||||
pub seek_data: Option<unsafe extern "C" fn(*mut GstAppSrc, u64, gpointer) -> gboolean>,
|
||||
pub _gst_reserved: [gpointer; 4],
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for GstAppSrcCallbacks {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
f.debug_struct(&format!("GstAppSrcCallbacks @ {:?}", self as *const _))
|
||||
.field("need_data", &self.need_data)
|
||||
.field("enough_data", &self.enough_data)
|
||||
.field("seek_data", &self.seek_data)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct GstAppSrcClass {
|
||||
pub basesrc_class: gst_base::GstBaseSrcClass,
|
||||
pub need_data: Option<unsafe extern "C" fn(*mut GstAppSrc, c_uint)>,
|
||||
pub enough_data: Option<unsafe extern "C" fn(*mut GstAppSrc)>,
|
||||
pub seek_data: Option<unsafe extern "C" fn(*mut GstAppSrc, u64) -> gboolean>,
|
||||
pub push_buffer:
|
||||
Option<unsafe extern "C" fn(*mut GstAppSrc, *mut gst::GstBuffer) -> gst::GstFlowReturn>,
|
||||
pub end_of_stream: Option<unsafe extern "C" fn(*mut GstAppSrc) -> gst::GstFlowReturn>,
|
||||
pub push_sample:
|
||||
Option<unsafe extern "C" fn(*mut GstAppSrc, *mut gst::GstSample) -> gst::GstFlowReturn>,
|
||||
pub push_buffer_list:
|
||||
Option<unsafe extern "C" fn(*mut GstAppSrc, *mut gst::GstBufferList) -> gst::GstFlowReturn>,
|
||||
pub _gst_reserved: [gpointer; 2],
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for GstAppSrcClass {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
f.debug_struct(&format!("GstAppSrcClass @ {:?}", self as *const _))
|
||||
.field("basesrc_class", &self.basesrc_class)
|
||||
.field("need_data", &self.need_data)
|
||||
.field("enough_data", &self.enough_data)
|
||||
.field("seek_data", &self.seek_data)
|
||||
.field("push_buffer", &self.push_buffer)
|
||||
.field("end_of_stream", &self.end_of_stream)
|
||||
.field("push_sample", &self.push_sample)
|
||||
.field("push_buffer_list", &self.push_buffer_list)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
pub struct _GstAppSrcPrivate(c_void);
|
||||
|
||||
pub type GstAppSrcPrivate = *mut _GstAppSrcPrivate;
|
||||
|
||||
// Classes
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct GstAppSink {
|
||||
pub basesink: gst_base::GstBaseSink,
|
||||
pub priv_: *mut GstAppSinkPrivate,
|
||||
pub _gst_reserved: [gpointer; 4],
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for GstAppSink {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
f.debug_struct(&format!("GstAppSink @ {:?}", self as *const _))
|
||||
.field("basesink", &self.basesink)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct GstAppSrc {
|
||||
pub basesrc: gst_base::GstBaseSrc,
|
||||
pub priv_: *mut GstAppSrcPrivate,
|
||||
pub _gst_reserved: [gpointer; 4],
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for GstAppSrc {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
f.debug_struct(&format!("GstAppSrc @ {:?}", self as *const _))
|
||||
.field("basesrc", &self.basesrc)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[link(name = "gstapp-1.0")]
|
||||
extern "C" {
|
||||
|
||||
//=========================================================================
|
||||
// GstAppStreamType
|
||||
//=========================================================================
|
||||
pub fn gst_app_stream_type_get_type() -> GType;
|
||||
|
||||
//=========================================================================
|
||||
// GstAppSink
|
||||
//=========================================================================
|
||||
pub fn gst_app_sink_get_type() -> GType;
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
pub fn gst_app_sink_get_buffer_list_support(appsink: *mut GstAppSink) -> gboolean;
|
||||
pub fn gst_app_sink_get_caps(appsink: *mut GstAppSink) -> *mut gst::GstCaps;
|
||||
pub fn gst_app_sink_get_drop(appsink: *mut GstAppSink) -> gboolean;
|
||||
pub fn gst_app_sink_get_emit_signals(appsink: *mut GstAppSink) -> gboolean;
|
||||
pub fn gst_app_sink_get_max_buffers(appsink: *mut GstAppSink) -> c_uint;
|
||||
pub fn gst_app_sink_get_wait_on_eos(appsink: *mut GstAppSink) -> gboolean;
|
||||
pub fn gst_app_sink_is_eos(appsink: *mut GstAppSink) -> gboolean;
|
||||
pub fn gst_app_sink_pull_preroll(appsink: *mut GstAppSink) -> *mut gst::GstSample;
|
||||
pub fn gst_app_sink_pull_sample(appsink: *mut GstAppSink) -> *mut gst::GstSample;
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
pub fn gst_app_sink_set_buffer_list_support(appsink: *mut GstAppSink, enable_lists: gboolean);
|
||||
pub fn gst_app_sink_set_callbacks(
|
||||
appsink: *mut GstAppSink,
|
||||
callbacks: *mut GstAppSinkCallbacks,
|
||||
user_data: gpointer,
|
||||
notify: glib::GDestroyNotify,
|
||||
);
|
||||
pub fn gst_app_sink_set_caps(appsink: *mut GstAppSink, caps: *const gst::GstCaps);
|
||||
pub fn gst_app_sink_set_drop(appsink: *mut GstAppSink, drop: gboolean);
|
||||
pub fn gst_app_sink_set_emit_signals(appsink: *mut GstAppSink, emit: gboolean);
|
||||
pub fn gst_app_sink_set_max_buffers(appsink: *mut GstAppSink, max: c_uint);
|
||||
pub fn gst_app_sink_set_wait_on_eos(appsink: *mut GstAppSink, wait: gboolean);
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
pub fn gst_app_sink_try_pull_preroll(
|
||||
appsink: *mut GstAppSink,
|
||||
timeout: gst::GstClockTime,
|
||||
) -> *mut gst::GstSample;
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
pub fn gst_app_sink_try_pull_sample(
|
||||
appsink: *mut GstAppSink,
|
||||
timeout: gst::GstClockTime,
|
||||
) -> *mut gst::GstSample;
|
||||
|
||||
//=========================================================================
|
||||
// GstAppSrc
|
||||
//=========================================================================
|
||||
pub fn gst_app_src_get_type() -> GType;
|
||||
pub fn gst_app_src_end_of_stream(appsrc: *mut GstAppSrc) -> gst::GstFlowReturn;
|
||||
pub fn gst_app_src_get_caps(appsrc: *mut GstAppSrc) -> *mut gst::GstCaps;
|
||||
pub fn gst_app_src_get_current_level_bytes(appsrc: *mut GstAppSrc) -> u64;
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
pub fn gst_app_src_get_duration(appsrc: *mut GstAppSrc) -> gst::GstClockTime;
|
||||
pub fn gst_app_src_get_emit_signals(appsrc: *mut GstAppSrc) -> gboolean;
|
||||
pub fn gst_app_src_get_latency(appsrc: *mut GstAppSrc, min: *mut u64, max: *mut u64);
|
||||
pub fn gst_app_src_get_max_bytes(appsrc: *mut GstAppSrc) -> u64;
|
||||
pub fn gst_app_src_get_size(appsrc: *mut GstAppSrc) -> i64;
|
||||
pub fn gst_app_src_get_stream_type(appsrc: *mut GstAppSrc) -> GstAppStreamType;
|
||||
pub fn gst_app_src_push_buffer(
|
||||
appsrc: *mut GstAppSrc,
|
||||
buffer: *mut gst::GstBuffer,
|
||||
) -> gst::GstFlowReturn;
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn gst_app_src_push_buffer_list(
|
||||
appsrc: *mut GstAppSrc,
|
||||
buffer_list: *mut gst::GstBufferList,
|
||||
) -> gst::GstFlowReturn;
|
||||
pub fn gst_app_src_push_sample(
|
||||
appsrc: *mut GstAppSrc,
|
||||
sample: *mut gst::GstSample,
|
||||
) -> gst::GstFlowReturn;
|
||||
pub fn gst_app_src_set_callbacks(
|
||||
appsrc: *mut GstAppSrc,
|
||||
callbacks: *mut GstAppSrcCallbacks,
|
||||
user_data: gpointer,
|
||||
notify: glib::GDestroyNotify,
|
||||
);
|
||||
pub fn gst_app_src_set_caps(appsrc: *mut GstAppSrc, caps: *const gst::GstCaps);
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
pub fn gst_app_src_set_duration(appsrc: *mut GstAppSrc, duration: gst::GstClockTime);
|
||||
pub fn gst_app_src_set_emit_signals(appsrc: *mut GstAppSrc, emit: gboolean);
|
||||
pub fn gst_app_src_set_latency(appsrc: *mut GstAppSrc, min: u64, max: u64);
|
||||
pub fn gst_app_src_set_max_bytes(appsrc: *mut GstAppSrc, max: u64);
|
||||
pub fn gst_app_src_set_size(appsrc: *mut GstAppSrc, size: i64);
|
||||
pub fn gst_app_src_set_stream_type(appsrc: *mut GstAppSrc, type_: GstAppStreamType);
|
||||
|
||||
}
|
310
sys/gstreamer-app-sys/tests/abi.rs
Normal file
310
sys/gstreamer-app-sys/tests/abi.rs
Normal file
|
@ -0,0 +1,310 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_app_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempfile;
|
||||
use gstreamer_app_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-app-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)] = &[
|
||||
(
|
||||
"GstAppSink",
|
||||
Layout {
|
||||
size: size_of::<GstAppSink>(),
|
||||
alignment: align_of::<GstAppSink>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAppSinkCallbacks",
|
||||
Layout {
|
||||
size: size_of::<GstAppSinkCallbacks>(),
|
||||
alignment: align_of::<GstAppSinkCallbacks>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAppSinkClass",
|
||||
Layout {
|
||||
size: size_of::<GstAppSinkClass>(),
|
||||
alignment: align_of::<GstAppSinkClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAppSrc",
|
||||
Layout {
|
||||
size: size_of::<GstAppSrc>(),
|
||||
alignment: align_of::<GstAppSrc>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAppSrcCallbacks",
|
||||
Layout {
|
||||
size: size_of::<GstAppSrcCallbacks>(),
|
||||
alignment: align_of::<GstAppSrcCallbacks>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAppSrcClass",
|
||||
Layout {
|
||||
size: size_of::<GstAppSrcClass>(),
|
||||
alignment: align_of::<GstAppSrcClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAppStreamType",
|
||||
Layout {
|
||||
size: size_of::<GstAppStreamType>(),
|
||||
alignment: align_of::<GstAppStreamType>(),
|
||||
},
|
||||
),
|
||||
];
|
||||
|
||||
const RUST_CONSTANTS: &[(&str, &str)] = &[
|
||||
("(gint) GST_APP_STREAM_TYPE_RANDOM_ACCESS", "2"),
|
||||
("(gint) GST_APP_STREAM_TYPE_SEEKABLE", "1"),
|
||||
("(gint) GST_APP_STREAM_TYPE_STREAM", "0"),
|
||||
];
|
27
sys/gstreamer-app-sys/tests/constant.c
Normal file
27
sys/gstreamer-app-sys/tests/constant.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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
sys/gstreamer-app-sys/tests/layout.c
Normal file
12
sys/gstreamer-app-sys/tests/layout.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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
sys/gstreamer-app-sys/tests/manual.h
Normal file
3
sys/gstreamer-app-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/app/app.h>
|
181
sys/gstreamer-audio-sys/CHANGELOG.md
Normal file
181
sys/gstreamer-audio-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
|
62
sys/gstreamer-audio-sys/Cargo.toml
Normal file
62
sys/gstreamer-audio-sys/Cargo.toml
Normal file
|
@ -0,0 +1,62 @@
|
|||
[build-dependencies]
|
||||
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 = "1.0.0"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
v1_2 = []
|
||||
v1_4 = ["v1_2"]
|
||||
v1_6 = ["v1_4"]
|
||||
v1_8 = ["v1_6"]
|
||||
v1_10 = ["v1_8"]
|
||||
v1_12 = ["v1_10"]
|
||||
v1_14 = ["v1_12"]
|
||||
v1_16 = ["v1_14"]
|
||||
v1_18 = ["v1_16"]
|
||||
dox = []
|
||||
|
||||
[lib]
|
||||
name = "gstreamer_audio_sys"
|
||||
|
||||
[package]
|
||||
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
|
||||
build = "build.rs"
|
||||
description = "FFI bindings to libgstaudio-1.0"
|
||||
documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_audio_sys/"
|
||||
homepage = "https://gstreamer.freedesktop.org"
|
||||
keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
|
||||
license = "MIT"
|
||||
links = "gstaudio-1.0"
|
||||
name = "gstreamer-audio-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_audio_1_0]
|
||||
name = "gstreamer-audio-1.0"
|
||||
version = "1.8"
|
||||
|
||||
[package.metadata.system-deps.gstreamer_audio_1_0.feature-versions]
|
||||
v1_10 = "1.10"
|
||||
v1_12 = "1.12"
|
||||
v1_14 = "1.14"
|
||||
v1_16 = "1.16"
|
||||
v1_18 = "1.18"
|
23
sys/gstreamer-audio-sys/LICENSE
Normal file
23
sys/gstreamer-audio-sys/LICENSE
Normal file
|
@ -0,0 +1,23 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Sebastian Dröge <sebastian@centricular.com>.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
33
sys/gstreamer-audio-sys/README.md
Normal file
33
sys/gstreamer-audio-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.
|
20
sys/gstreamer-audio-sys/build.rs
Normal file
20
sys/gstreamer-audio-sys/build.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
extern crate system_deps;
|
||||
|
||||
#[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);
|
||||
}
|
||||
}
|
2287
sys/gstreamer-audio-sys/src/lib.rs
Normal file
2287
sys/gstreamer-audio-sys/src/lib.rs
Normal file
File diff suppressed because it is too large
Load diff
931
sys/gstreamer-audio-sys/tests/abi.rs
Normal file
931
sys/gstreamer-audio-sys/tests/abi.rs
Normal file
|
@ -0,0 +1,931 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_audio_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempfile;
|
||||
use gstreamer_audio_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-audio-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)] = &[
|
||||
(
|
||||
"GstAudioAggregator",
|
||||
Layout {
|
||||
size: size_of::<GstAudioAggregator>(),
|
||||
alignment: align_of::<GstAudioAggregator>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioAggregatorClass",
|
||||
Layout {
|
||||
size: size_of::<GstAudioAggregatorClass>(),
|
||||
alignment: align_of::<GstAudioAggregatorClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioAggregatorConvertPad",
|
||||
Layout {
|
||||
size: size_of::<GstAudioAggregatorConvertPad>(),
|
||||
alignment: align_of::<GstAudioAggregatorConvertPad>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioAggregatorConvertPadClass",
|
||||
Layout {
|
||||
size: size_of::<GstAudioAggregatorConvertPadClass>(),
|
||||
alignment: align_of::<GstAudioAggregatorConvertPadClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioAggregatorPad",
|
||||
Layout {
|
||||
size: size_of::<GstAudioAggregatorPad>(),
|
||||
alignment: align_of::<GstAudioAggregatorPad>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioAggregatorPadClass",
|
||||
Layout {
|
||||
size: size_of::<GstAudioAggregatorPadClass>(),
|
||||
alignment: align_of::<GstAudioAggregatorPadClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioBaseSink",
|
||||
Layout {
|
||||
size: size_of::<GstAudioBaseSink>(),
|
||||
alignment: align_of::<GstAudioBaseSink>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioBaseSinkClass",
|
||||
Layout {
|
||||
size: size_of::<GstAudioBaseSinkClass>(),
|
||||
alignment: align_of::<GstAudioBaseSinkClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioBaseSinkDiscontReason",
|
||||
Layout {
|
||||
size: size_of::<GstAudioBaseSinkDiscontReason>(),
|
||||
alignment: align_of::<GstAudioBaseSinkDiscontReason>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioBaseSinkSlaveMethod",
|
||||
Layout {
|
||||
size: size_of::<GstAudioBaseSinkSlaveMethod>(),
|
||||
alignment: align_of::<GstAudioBaseSinkSlaveMethod>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioBaseSrc",
|
||||
Layout {
|
||||
size: size_of::<GstAudioBaseSrc>(),
|
||||
alignment: align_of::<GstAudioBaseSrc>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioBaseSrcClass",
|
||||
Layout {
|
||||
size: size_of::<GstAudioBaseSrcClass>(),
|
||||
alignment: align_of::<GstAudioBaseSrcClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioBaseSrcSlaveMethod",
|
||||
Layout {
|
||||
size: size_of::<GstAudioBaseSrcSlaveMethod>(),
|
||||
alignment: align_of::<GstAudioBaseSrcSlaveMethod>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioBuffer",
|
||||
Layout {
|
||||
size: size_of::<GstAudioBuffer>(),
|
||||
alignment: align_of::<GstAudioBuffer>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioCdSrc",
|
||||
Layout {
|
||||
size: size_of::<GstAudioCdSrc>(),
|
||||
alignment: align_of::<GstAudioCdSrc>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioCdSrcClass",
|
||||
Layout {
|
||||
size: size_of::<GstAudioCdSrcClass>(),
|
||||
alignment: align_of::<GstAudioCdSrcClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioCdSrcMode",
|
||||
Layout {
|
||||
size: size_of::<GstAudioCdSrcMode>(),
|
||||
alignment: align_of::<GstAudioCdSrcMode>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioCdSrcTrack",
|
||||
Layout {
|
||||
size: size_of::<GstAudioCdSrcTrack>(),
|
||||
alignment: align_of::<GstAudioCdSrcTrack>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioChannelMixerFlags",
|
||||
Layout {
|
||||
size: size_of::<GstAudioChannelMixerFlags>(),
|
||||
alignment: align_of::<GstAudioChannelMixerFlags>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioChannelPosition",
|
||||
Layout {
|
||||
size: size_of::<GstAudioChannelPosition>(),
|
||||
alignment: align_of::<GstAudioChannelPosition>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioClippingMeta",
|
||||
Layout {
|
||||
size: size_of::<GstAudioClippingMeta>(),
|
||||
alignment: align_of::<GstAudioClippingMeta>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioClock",
|
||||
Layout {
|
||||
size: size_of::<GstAudioClock>(),
|
||||
alignment: align_of::<GstAudioClock>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioClockClass",
|
||||
Layout {
|
||||
size: size_of::<GstAudioClockClass>(),
|
||||
alignment: align_of::<GstAudioClockClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioConverterFlags",
|
||||
Layout {
|
||||
size: size_of::<GstAudioConverterFlags>(),
|
||||
alignment: align_of::<GstAudioConverterFlags>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioDecoder",
|
||||
Layout {
|
||||
size: size_of::<GstAudioDecoder>(),
|
||||
alignment: align_of::<GstAudioDecoder>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioDecoderClass",
|
||||
Layout {
|
||||
size: size_of::<GstAudioDecoderClass>(),
|
||||
alignment: align_of::<GstAudioDecoderClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioDitherMethod",
|
||||
Layout {
|
||||
size: size_of::<GstAudioDitherMethod>(),
|
||||
alignment: align_of::<GstAudioDitherMethod>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioDownmixMeta",
|
||||
Layout {
|
||||
size: size_of::<GstAudioDownmixMeta>(),
|
||||
alignment: align_of::<GstAudioDownmixMeta>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioEncoder",
|
||||
Layout {
|
||||
size: size_of::<GstAudioEncoder>(),
|
||||
alignment: align_of::<GstAudioEncoder>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioEncoderClass",
|
||||
Layout {
|
||||
size: size_of::<GstAudioEncoderClass>(),
|
||||
alignment: align_of::<GstAudioEncoderClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioFilter",
|
||||
Layout {
|
||||
size: size_of::<GstAudioFilter>(),
|
||||
alignment: align_of::<GstAudioFilter>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioFilterClass",
|
||||
Layout {
|
||||
size: size_of::<GstAudioFilterClass>(),
|
||||
alignment: align_of::<GstAudioFilterClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioFlags",
|
||||
Layout {
|
||||
size: size_of::<GstAudioFlags>(),
|
||||
alignment: align_of::<GstAudioFlags>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioFormat",
|
||||
Layout {
|
||||
size: size_of::<GstAudioFormat>(),
|
||||
alignment: align_of::<GstAudioFormat>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioFormatFlags",
|
||||
Layout {
|
||||
size: size_of::<GstAudioFormatFlags>(),
|
||||
alignment: align_of::<GstAudioFormatFlags>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioFormatInfo",
|
||||
Layout {
|
||||
size: size_of::<GstAudioFormatInfo>(),
|
||||
alignment: align_of::<GstAudioFormatInfo>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioInfo",
|
||||
Layout {
|
||||
size: size_of::<GstAudioInfo>(),
|
||||
alignment: align_of::<GstAudioInfo>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioLayout",
|
||||
Layout {
|
||||
size: size_of::<GstAudioLayout>(),
|
||||
alignment: align_of::<GstAudioLayout>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioMeta",
|
||||
Layout {
|
||||
size: size_of::<GstAudioMeta>(),
|
||||
alignment: align_of::<GstAudioMeta>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioNoiseShapingMethod",
|
||||
Layout {
|
||||
size: size_of::<GstAudioNoiseShapingMethod>(),
|
||||
alignment: align_of::<GstAudioNoiseShapingMethod>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioPackFlags",
|
||||
Layout {
|
||||
size: size_of::<GstAudioPackFlags>(),
|
||||
alignment: align_of::<GstAudioPackFlags>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioQuantizeFlags",
|
||||
Layout {
|
||||
size: size_of::<GstAudioQuantizeFlags>(),
|
||||
alignment: align_of::<GstAudioQuantizeFlags>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioResamplerFilterInterpolation",
|
||||
Layout {
|
||||
size: size_of::<GstAudioResamplerFilterInterpolation>(),
|
||||
alignment: align_of::<GstAudioResamplerFilterInterpolation>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioResamplerFilterMode",
|
||||
Layout {
|
||||
size: size_of::<GstAudioResamplerFilterMode>(),
|
||||
alignment: align_of::<GstAudioResamplerFilterMode>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioResamplerFlags",
|
||||
Layout {
|
||||
size: size_of::<GstAudioResamplerFlags>(),
|
||||
alignment: align_of::<GstAudioResamplerFlags>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioResamplerMethod",
|
||||
Layout {
|
||||
size: size_of::<GstAudioResamplerMethod>(),
|
||||
alignment: align_of::<GstAudioResamplerMethod>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioRingBuffer",
|
||||
Layout {
|
||||
size: size_of::<GstAudioRingBuffer>(),
|
||||
alignment: align_of::<GstAudioRingBuffer>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioRingBufferClass",
|
||||
Layout {
|
||||
size: size_of::<GstAudioRingBufferClass>(),
|
||||
alignment: align_of::<GstAudioRingBufferClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioRingBufferFormatType",
|
||||
Layout {
|
||||
size: size_of::<GstAudioRingBufferFormatType>(),
|
||||
alignment: align_of::<GstAudioRingBufferFormatType>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioRingBufferSpec",
|
||||
Layout {
|
||||
size: size_of::<GstAudioRingBufferSpec>(),
|
||||
alignment: align_of::<GstAudioRingBufferSpec>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioRingBufferState",
|
||||
Layout {
|
||||
size: size_of::<GstAudioRingBufferState>(),
|
||||
alignment: align_of::<GstAudioRingBufferState>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioSink",
|
||||
Layout {
|
||||
size: size_of::<GstAudioSink>(),
|
||||
alignment: align_of::<GstAudioSink>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioSinkClass",
|
||||
Layout {
|
||||
size: size_of::<GstAudioSinkClass>(),
|
||||
alignment: align_of::<GstAudioSinkClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioSinkClassExtension",
|
||||
Layout {
|
||||
size: size_of::<GstAudioSinkClassExtension>(),
|
||||
alignment: align_of::<GstAudioSinkClassExtension>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioSrc",
|
||||
Layout {
|
||||
size: size_of::<GstAudioSrc>(),
|
||||
alignment: align_of::<GstAudioSrc>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAudioSrcClass",
|
||||
Layout {
|
||||
size: size_of::<GstAudioSrcClass>(),
|
||||
alignment: align_of::<GstAudioSrcClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstStreamVolumeFormat",
|
||||
Layout {
|
||||
size: size_of::<GstStreamVolumeFormat>(),
|
||||
alignment: align_of::<GstStreamVolumeFormat>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstStreamVolumeInterface",
|
||||
Layout {
|
||||
size: size_of::<GstStreamVolumeInterface>(),
|
||||
alignment: align_of::<GstStreamVolumeInterface>(),
|
||||
},
|
||||
),
|
||||
];
|
||||
|
||||
const RUST_CONSTANTS: &[(&str, &str)] = &[
|
||||
("(gint) GST_AUDIO_BASE_SINK_DISCONT_REASON_ALIGNMENT", "4"),
|
||||
(
|
||||
"(gint) GST_AUDIO_BASE_SINK_DISCONT_REASON_DEVICE_FAILURE",
|
||||
"5",
|
||||
),
|
||||
("(gint) GST_AUDIO_BASE_SINK_DISCONT_REASON_FLUSH", "2"),
|
||||
("(gint) GST_AUDIO_BASE_SINK_DISCONT_REASON_NEW_CAPS", "1"),
|
||||
("(gint) GST_AUDIO_BASE_SINK_DISCONT_REASON_NO_DISCONT", "0"),
|
||||
(
|
||||
"(gint) GST_AUDIO_BASE_SINK_DISCONT_REASON_SYNC_LATENCY",
|
||||
"3",
|
||||
),
|
||||
("(gint) GST_AUDIO_BASE_SINK_SLAVE_CUSTOM", "3"),
|
||||
("(gint) GST_AUDIO_BASE_SINK_SLAVE_NONE", "2"),
|
||||
("(gint) GST_AUDIO_BASE_SINK_SLAVE_RESAMPLE", "0"),
|
||||
("(gint) GST_AUDIO_BASE_SINK_SLAVE_SKEW", "1"),
|
||||
("(gint) GST_AUDIO_BASE_SRC_SLAVE_NONE", "3"),
|
||||
("(gint) GST_AUDIO_BASE_SRC_SLAVE_RESAMPLE", "0"),
|
||||
("(gint) GST_AUDIO_BASE_SRC_SLAVE_RE_TIMESTAMP", "1"),
|
||||
("(gint) GST_AUDIO_BASE_SRC_SLAVE_SKEW", "2"),
|
||||
("(gint) GST_AUDIO_CD_SRC_MODE_CONTINUOUS", "1"),
|
||||
("(gint) GST_AUDIO_CD_SRC_MODE_NORMAL", "0"),
|
||||
("GST_AUDIO_CHANNELS_RANGE", "(int) [ 1, max ]"),
|
||||
("(guint) GST_AUDIO_CHANNEL_MIXER_FLAGS_NONE", "0"),
|
||||
(
|
||||
"(guint) GST_AUDIO_CHANNEL_MIXER_FLAGS_NON_INTERLEAVED_IN",
|
||||
"1",
|
||||
),
|
||||
(
|
||||
"(guint) GST_AUDIO_CHANNEL_MIXER_FLAGS_NON_INTERLEAVED_OUT",
|
||||
"2",
|
||||
),
|
||||
("(guint) GST_AUDIO_CHANNEL_MIXER_FLAGS_UNPOSITIONED_IN", "4"),
|
||||
(
|
||||
"(guint) GST_AUDIO_CHANNEL_MIXER_FLAGS_UNPOSITIONED_OUT",
|
||||
"8",
|
||||
),
|
||||
(
|
||||
"(gint) GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_CENTER",
|
||||
"21",
|
||||
),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_LEFT", "22"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_RIGHT", "23"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER", "2"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT", "0"),
|
||||
(
|
||||
"(gint) GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER",
|
||||
"6",
|
||||
),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT", "1"),
|
||||
(
|
||||
"(gint) GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER",
|
||||
"7",
|
||||
),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_INVALID", "-1"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_LFE1", "3"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_LFE2", "9"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_MONO", "-2"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_NONE", "-3"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_REAR_CENTER", "8"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_REAR_LEFT", "4"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT", "5"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT", "10"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT", "11"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_SURROUND_LEFT", "26"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_SURROUND_RIGHT", "27"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_CENTER", "15"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_CENTER", "14"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_LEFT", "12"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_RIGHT", "13"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_REAR_CENTER", "20"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_REAR_LEFT", "16"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_REAR_RIGHT", "17"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_LEFT", "18"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_RIGHT", "19"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_WIDE_LEFT", "24"),
|
||||
("(gint) GST_AUDIO_CHANNEL_POSITION_WIDE_RIGHT", "25"),
|
||||
("(guint) GST_AUDIO_CONVERTER_FLAG_IN_WRITABLE", "1"),
|
||||
("(guint) GST_AUDIO_CONVERTER_FLAG_NONE", "0"),
|
||||
("(guint) GST_AUDIO_CONVERTER_FLAG_VARIABLE_RATE", "2"),
|
||||
(
|
||||
"GST_AUDIO_CONVERTER_OPT_DITHER_METHOD",
|
||||
"GstAudioConverter.dither-method",
|
||||
),
|
||||
(
|
||||
"GST_AUDIO_CONVERTER_OPT_MIX_MATRIX",
|
||||
"GstAudioConverter.mix-matrix",
|
||||
),
|
||||
(
|
||||
"GST_AUDIO_CONVERTER_OPT_NOISE_SHAPING_METHOD",
|
||||
"GstAudioConverter.noise-shaping-method",
|
||||
),
|
||||
(
|
||||
"GST_AUDIO_CONVERTER_OPT_QUANTIZATION",
|
||||
"GstAudioConverter.quantization",
|
||||
),
|
||||
(
|
||||
"GST_AUDIO_CONVERTER_OPT_RESAMPLER_METHOD",
|
||||
"GstAudioConverter.resampler-method",
|
||||
),
|
||||
("GST_AUDIO_DECODER_MAX_ERRORS", "10"),
|
||||
("GST_AUDIO_DECODER_SINK_NAME", "sink"),
|
||||
("GST_AUDIO_DECODER_SRC_NAME", "src"),
|
||||
("GST_AUDIO_DEF_CHANNELS", "2"),
|
||||
("GST_AUDIO_DEF_FORMAT", "S16LE"),
|
||||
("GST_AUDIO_DEF_RATE", "44100"),
|
||||
("(gint) GST_AUDIO_DITHER_NONE", "0"),
|
||||
("(gint) GST_AUDIO_DITHER_RPDF", "1"),
|
||||
("(gint) GST_AUDIO_DITHER_TPDF", "2"),
|
||||
("(gint) GST_AUDIO_DITHER_TPDF_HF", "3"),
|
||||
("GST_AUDIO_ENCODER_SINK_NAME", "sink"),
|
||||
("GST_AUDIO_ENCODER_SRC_NAME", "src"),
|
||||
("(guint) GST_AUDIO_FLAG_NONE", "0"),
|
||||
("(guint) GST_AUDIO_FLAG_UNPOSITIONED", "1"),
|
||||
("(gint) GST_AUDIO_FORMAT_ENCODED", "1"),
|
||||
("(gint) GST_AUDIO_FORMAT_F32", "28"),
|
||||
("(gint) GST_AUDIO_FORMAT_F32BE", "29"),
|
||||
("(gint) GST_AUDIO_FORMAT_F32LE", "28"),
|
||||
("(gint) GST_AUDIO_FORMAT_F64", "30"),
|
||||
("(gint) GST_AUDIO_FORMAT_F64BE", "31"),
|
||||
("(gint) GST_AUDIO_FORMAT_F64LE", "30"),
|
||||
("(guint) GST_AUDIO_FORMAT_FLAG_COMPLEX", "16"),
|
||||
("(guint) GST_AUDIO_FORMAT_FLAG_FLOAT", "2"),
|
||||
("(guint) GST_AUDIO_FORMAT_FLAG_INTEGER", "1"),
|
||||
("(guint) GST_AUDIO_FORMAT_FLAG_SIGNED", "4"),
|
||||
("(guint) GST_AUDIO_FORMAT_FLAG_UNPACK", "32"),
|
||||
("(gint) GST_AUDIO_FORMAT_S16", "4"),
|
||||
("(gint) GST_AUDIO_FORMAT_S16BE", "5"),
|
||||
("(gint) GST_AUDIO_FORMAT_S16LE", "4"),
|
||||
("(gint) GST_AUDIO_FORMAT_S18", "24"),
|
||||
("(gint) GST_AUDIO_FORMAT_S18BE", "25"),
|
||||
("(gint) GST_AUDIO_FORMAT_S18LE", "24"),
|
||||
("(gint) GST_AUDIO_FORMAT_S20", "20"),
|
||||
("(gint) GST_AUDIO_FORMAT_S20BE", "21"),
|
||||
("(gint) GST_AUDIO_FORMAT_S20LE", "20"),
|
||||
("(gint) GST_AUDIO_FORMAT_S24", "16"),
|
||||
("(gint) GST_AUDIO_FORMAT_S24BE", "17"),
|
||||
("(gint) GST_AUDIO_FORMAT_S24LE", "16"),
|
||||
("(gint) GST_AUDIO_FORMAT_S24_32", "8"),
|
||||
("(gint) GST_AUDIO_FORMAT_S24_32BE", "9"),
|
||||
("(gint) GST_AUDIO_FORMAT_S24_32LE", "8"),
|
||||
("(gint) GST_AUDIO_FORMAT_S32", "12"),
|
||||
("(gint) GST_AUDIO_FORMAT_S32BE", "13"),
|
||||
("(gint) GST_AUDIO_FORMAT_S32LE", "12"),
|
||||
("(gint) GST_AUDIO_FORMAT_S8", "2"),
|
||||
("(gint) GST_AUDIO_FORMAT_U16", "6"),
|
||||
("(gint) GST_AUDIO_FORMAT_U16BE", "7"),
|
||||
("(gint) GST_AUDIO_FORMAT_U16LE", "6"),
|
||||
("(gint) GST_AUDIO_FORMAT_U18", "26"),
|
||||
("(gint) GST_AUDIO_FORMAT_U18BE", "27"),
|
||||
("(gint) GST_AUDIO_FORMAT_U18LE", "26"),
|
||||
("(gint) GST_AUDIO_FORMAT_U20", "22"),
|
||||
("(gint) GST_AUDIO_FORMAT_U20BE", "23"),
|
||||
("(gint) GST_AUDIO_FORMAT_U20LE", "22"),
|
||||
("(gint) GST_AUDIO_FORMAT_U24", "18"),
|
||||
("(gint) GST_AUDIO_FORMAT_U24BE", "19"),
|
||||
("(gint) GST_AUDIO_FORMAT_U24LE", "18"),
|
||||
("(gint) GST_AUDIO_FORMAT_U24_32", "10"),
|
||||
("(gint) GST_AUDIO_FORMAT_U24_32BE", "11"),
|
||||
("(gint) GST_AUDIO_FORMAT_U24_32LE", "10"),
|
||||
("(gint) GST_AUDIO_FORMAT_U32", "14"),
|
||||
("(gint) GST_AUDIO_FORMAT_U32BE", "15"),
|
||||
("(gint) GST_AUDIO_FORMAT_U32LE", "14"),
|
||||
("(gint) GST_AUDIO_FORMAT_U8", "3"),
|
||||
("(gint) GST_AUDIO_FORMAT_UNKNOWN", "0"),
|
||||
("(gint) GST_AUDIO_LAYOUT_INTERLEAVED", "0"),
|
||||
("(gint) GST_AUDIO_LAYOUT_NON_INTERLEAVED", "1"),
|
||||
("(gint) GST_AUDIO_NOISE_SHAPING_ERROR_FEEDBACK", "1"),
|
||||
("(gint) GST_AUDIO_NOISE_SHAPING_HIGH", "4"),
|
||||
("(gint) GST_AUDIO_NOISE_SHAPING_MEDIUM", "3"),
|
||||
("(gint) GST_AUDIO_NOISE_SHAPING_NONE", "0"),
|
||||
("(gint) GST_AUDIO_NOISE_SHAPING_SIMPLE", "2"),
|
||||
("(guint) GST_AUDIO_PACK_FLAG_NONE", "0"),
|
||||
("(guint) GST_AUDIO_PACK_FLAG_TRUNCATE_RANGE", "1"),
|
||||
("(guint) GST_AUDIO_QUANTIZE_FLAG_NONE", "0"),
|
||||
("(guint) GST_AUDIO_QUANTIZE_FLAG_NON_INTERLEAVED", "1"),
|
||||
("GST_AUDIO_RATE_RANGE", "(int) [ 1, max ]"),
|
||||
("(gint) GST_AUDIO_RESAMPLER_FILTER_INTERPOLATION_CUBIC", "2"),
|
||||
(
|
||||
"(gint) GST_AUDIO_RESAMPLER_FILTER_INTERPOLATION_LINEAR",
|
||||
"1",
|
||||
),
|
||||
("(gint) GST_AUDIO_RESAMPLER_FILTER_INTERPOLATION_NONE", "0"),
|
||||
("(gint) GST_AUDIO_RESAMPLER_FILTER_MODE_AUTO", "2"),
|
||||
("(gint) GST_AUDIO_RESAMPLER_FILTER_MODE_FULL", "1"),
|
||||
("(gint) GST_AUDIO_RESAMPLER_FILTER_MODE_INTERPOLATED", "0"),
|
||||
("(guint) GST_AUDIO_RESAMPLER_FLAG_NONE", "0"),
|
||||
("(guint) GST_AUDIO_RESAMPLER_FLAG_NON_INTERLEAVED_IN", "1"),
|
||||
("(guint) GST_AUDIO_RESAMPLER_FLAG_NON_INTERLEAVED_OUT", "2"),
|
||||
("(guint) GST_AUDIO_RESAMPLER_FLAG_VARIABLE_RATE", "4"),
|
||||
("(gint) GST_AUDIO_RESAMPLER_METHOD_BLACKMAN_NUTTALL", "3"),
|
||||
("(gint) GST_AUDIO_RESAMPLER_METHOD_CUBIC", "2"),
|
||||
("(gint) GST_AUDIO_RESAMPLER_METHOD_KAISER", "4"),
|
||||
("(gint) GST_AUDIO_RESAMPLER_METHOD_LINEAR", "1"),
|
||||
("(gint) GST_AUDIO_RESAMPLER_METHOD_NEAREST", "0"),
|
||||
(
|
||||
"GST_AUDIO_RESAMPLER_OPT_CUBIC_B",
|
||||
"GstAudioResampler.cubic-b",
|
||||
),
|
||||
(
|
||||
"GST_AUDIO_RESAMPLER_OPT_CUBIC_C",
|
||||
"GstAudioResampler.cubic-c",
|
||||
),
|
||||
("GST_AUDIO_RESAMPLER_OPT_CUTOFF", "GstAudioResampler.cutoff"),
|
||||
(
|
||||
"GST_AUDIO_RESAMPLER_OPT_FILTER_INTERPOLATION",
|
||||
"GstAudioResampler.filter-interpolation",
|
||||
),
|
||||
(
|
||||
"GST_AUDIO_RESAMPLER_OPT_FILTER_MODE",
|
||||
"GstAudioResampler.filter-mode",
|
||||
),
|
||||
(
|
||||
"GST_AUDIO_RESAMPLER_OPT_FILTER_MODE_THRESHOLD",
|
||||
"GstAudioResampler.filter-mode-threshold",
|
||||
),
|
||||
(
|
||||
"GST_AUDIO_RESAMPLER_OPT_FILTER_OVERSAMPLE",
|
||||
"GstAudioResampler.filter-oversample",
|
||||
),
|
||||
(
|
||||
"GST_AUDIO_RESAMPLER_OPT_MAX_PHASE_ERROR",
|
||||
"GstAudioResampler.max-phase-error",
|
||||
),
|
||||
("GST_AUDIO_RESAMPLER_OPT_N_TAPS", "GstAudioResampler.n-taps"),
|
||||
(
|
||||
"GST_AUDIO_RESAMPLER_OPT_STOP_ATTENUATION",
|
||||
"GstAudioResampler.stop-attenutation",
|
||||
),
|
||||
(
|
||||
"GST_AUDIO_RESAMPLER_OPT_TRANSITION_BANDWIDTH",
|
||||
"GstAudioResampler.transition-bandwidth",
|
||||
),
|
||||
("GST_AUDIO_RESAMPLER_QUALITY_DEFAULT", "4"),
|
||||
("GST_AUDIO_RESAMPLER_QUALITY_MAX", "10"),
|
||||
("GST_AUDIO_RESAMPLER_QUALITY_MIN", "0"),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_AC3", "7"),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_A_LAW", "2"),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_DTS", "9"),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_EAC3", "8"),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_FLAC", "14"),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_GSM", "5"),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_IEC958", "6"),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_IMA_ADPCM", "3"),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG", "4"),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC", "10"),
|
||||
(
|
||||
"(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC_RAW",
|
||||
"12",
|
||||
),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC", "11"),
|
||||
(
|
||||
"(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC_RAW",
|
||||
"13",
|
||||
),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MU_LAW", "1"),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW", "0"),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_STATE_ERROR", "3"),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_STATE_PAUSED", "1"),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_STATE_STARTED", "2"),
|
||||
("(gint) GST_AUDIO_RING_BUFFER_STATE_STOPPED", "0"),
|
||||
("GST_META_TAG_AUDIO_CHANNELS_STR", "channels"),
|
||||
("GST_META_TAG_AUDIO_RATE_STR", "rate"),
|
||||
("GST_META_TAG_AUDIO_STR", "audio"),
|
||||
("(gint) GST_STREAM_VOLUME_FORMAT_CUBIC", "1"),
|
||||
("(gint) GST_STREAM_VOLUME_FORMAT_DB", "2"),
|
||||
("(gint) GST_STREAM_VOLUME_FORMAT_LINEAR", "0"),
|
||||
];
|
27
sys/gstreamer-audio-sys/tests/constant.c
Normal file
27
sys/gstreamer-audio-sys/tests/constant.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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
sys/gstreamer-audio-sys/tests/layout.c
Normal file
12
sys/gstreamer-audio-sys/tests/layout.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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
sys/gstreamer-audio-sys/tests/manual.h
Normal file
3
sys/gstreamer-audio-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/audio/audio.h>
|
181
sys/gstreamer-base-sys/CHANGELOG.md
Normal file
181
sys/gstreamer-base-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
|
66
sys/gstreamer-base-sys/Cargo.toml
Normal file
66
sys/gstreamer-base-sys/Cargo.toml
Normal file
|
@ -0,0 +1,66 @@
|
|||
[build-dependencies]
|
||||
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-sys]
|
||||
path = "../gstreamer-sys"
|
||||
|
||||
[dev-dependencies]
|
||||
shell-words = "1.0.0"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
v1_0_1 = []
|
||||
v1_2 = []
|
||||
v1_4 = ["v1_2"]
|
||||
v1_6 = ["v1_4"]
|
||||
v1_8 = ["v1_6"]
|
||||
v1_10 = ["v1_8"]
|
||||
v1_12 = ["v1_10"]
|
||||
v1_12_1 = ["v1_12"]
|
||||
v1_14 = ["v1_12_1"]
|
||||
v1_14_1 = ["v1_14"]
|
||||
v1_14_3 = ["v1_14_1"]
|
||||
v1_16 = ["v1_14_3"]
|
||||
v1_18 = ["v1_16"]
|
||||
dox = []
|
||||
|
||||
[lib]
|
||||
name = "gstreamer_base_sys"
|
||||
|
||||
[package]
|
||||
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
|
||||
build = "build.rs"
|
||||
description = "FFI bindings to libgstbase-1.0"
|
||||
documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_base_sys/"
|
||||
homepage = "https://gstreamer.freedesktop.org"
|
||||
keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
|
||||
license = "MIT"
|
||||
links = "gstbase-1.0"
|
||||
name = "gstreamer-base-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_base_1_0]
|
||||
name = "gstreamer-base-1.0"
|
||||
version = "1.8"
|
||||
|
||||
[package.metadata.system-deps.gstreamer_base_1_0.feature-versions]
|
||||
v1_10 = "1.10"
|
||||
v1_12 = "1.12"
|
||||
v1_12_1 = "1.12.1"
|
||||
v1_14 = "1.14"
|
||||
v1_14_1 = "1.14.1"
|
||||
v1_14_3 = "1.14.3"
|
||||
v1_16 = "1.16"
|
||||
v1_18 = "1.18"
|
23
sys/gstreamer-base-sys/LICENSE
Normal file
23
sys/gstreamer-base-sys/LICENSE
Normal file
|
@ -0,0 +1,23 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Sebastian Dröge <sebastian@centricular.com>.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
33
sys/gstreamer-base-sys/README.md
Normal file
33
sys/gstreamer-base-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-base-sys.svg)](https://crates.io/crates/gstreamer-base-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/) (Base 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.
|
20
sys/gstreamer-base-sys/build.rs
Normal file
20
sys/gstreamer-base-sys/build.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
extern crate system_deps;
|
||||
|
||||
#[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);
|
||||
}
|
||||
}
|
2223
sys/gstreamer-base-sys/src/lib.rs
Normal file
2223
sys/gstreamer-base-sys/src/lib.rs
Normal file
File diff suppressed because it is too large
Load diff
489
sys/gstreamer-base-sys/tests/abi.rs
Normal file
489
sys/gstreamer-base-sys/tests/abi.rs
Normal file
|
@ -0,0 +1,489 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_base_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempfile;
|
||||
use gstreamer_base_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-base-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)] = &[
|
||||
(
|
||||
"GstAggregator",
|
||||
Layout {
|
||||
size: size_of::<GstAggregator>(),
|
||||
alignment: align_of::<GstAggregator>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAggregatorClass",
|
||||
Layout {
|
||||
size: size_of::<GstAggregatorClass>(),
|
||||
alignment: align_of::<GstAggregatorClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAggregatorPad",
|
||||
Layout {
|
||||
size: size_of::<GstAggregatorPad>(),
|
||||
alignment: align_of::<GstAggregatorPad>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAggregatorPadClass",
|
||||
Layout {
|
||||
size: size_of::<GstAggregatorPadClass>(),
|
||||
alignment: align_of::<GstAggregatorPadClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstAggregatorStartTimeSelection",
|
||||
Layout {
|
||||
size: size_of::<GstAggregatorStartTimeSelection>(),
|
||||
alignment: align_of::<GstAggregatorStartTimeSelection>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstBaseParse",
|
||||
Layout {
|
||||
size: size_of::<GstBaseParse>(),
|
||||
alignment: align_of::<GstBaseParse>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstBaseParseClass",
|
||||
Layout {
|
||||
size: size_of::<GstBaseParseClass>(),
|
||||
alignment: align_of::<GstBaseParseClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstBaseParseFrame",
|
||||
Layout {
|
||||
size: size_of::<GstBaseParseFrame>(),
|
||||
alignment: align_of::<GstBaseParseFrame>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstBaseParseFrameFlags",
|
||||
Layout {
|
||||
size: size_of::<GstBaseParseFrameFlags>(),
|
||||
alignment: align_of::<GstBaseParseFrameFlags>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstBaseSink",
|
||||
Layout {
|
||||
size: size_of::<GstBaseSink>(),
|
||||
alignment: align_of::<GstBaseSink>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstBaseSinkClass",
|
||||
Layout {
|
||||
size: size_of::<GstBaseSinkClass>(),
|
||||
alignment: align_of::<GstBaseSinkClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstBaseSrc",
|
||||
Layout {
|
||||
size: size_of::<GstBaseSrc>(),
|
||||
alignment: align_of::<GstBaseSrc>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstBaseSrcClass",
|
||||
Layout {
|
||||
size: size_of::<GstBaseSrcClass>(),
|
||||
alignment: align_of::<GstBaseSrcClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstBaseSrcFlags",
|
||||
Layout {
|
||||
size: size_of::<GstBaseSrcFlags>(),
|
||||
alignment: align_of::<GstBaseSrcFlags>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstBaseTransform",
|
||||
Layout {
|
||||
size: size_of::<GstBaseTransform>(),
|
||||
alignment: align_of::<GstBaseTransform>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstBaseTransformClass",
|
||||
Layout {
|
||||
size: size_of::<GstBaseTransformClass>(),
|
||||
alignment: align_of::<GstBaseTransformClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstBitReader",
|
||||
Layout {
|
||||
size: size_of::<GstBitReader>(),
|
||||
alignment: align_of::<GstBitReader>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstBitWriter",
|
||||
Layout {
|
||||
size: size_of::<GstBitWriter>(),
|
||||
alignment: align_of::<GstBitWriter>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstByteReader",
|
||||
Layout {
|
||||
size: size_of::<GstByteReader>(),
|
||||
alignment: align_of::<GstByteReader>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstByteWriter",
|
||||
Layout {
|
||||
size: size_of::<GstByteWriter>(),
|
||||
alignment: align_of::<GstByteWriter>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstCollectData",
|
||||
Layout {
|
||||
size: size_of::<GstCollectData>(),
|
||||
alignment: align_of::<GstCollectData>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstCollectPads",
|
||||
Layout {
|
||||
size: size_of::<GstCollectPads>(),
|
||||
alignment: align_of::<GstCollectPads>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstCollectPadsClass",
|
||||
Layout {
|
||||
size: size_of::<GstCollectPadsClass>(),
|
||||
alignment: align_of::<GstCollectPadsClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstCollectPadsStateFlags",
|
||||
Layout {
|
||||
size: size_of::<GstCollectPadsStateFlags>(),
|
||||
alignment: align_of::<GstCollectPadsStateFlags>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstDataQueue",
|
||||
Layout {
|
||||
size: size_of::<GstDataQueue>(),
|
||||
alignment: align_of::<GstDataQueue>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstDataQueueClass",
|
||||
Layout {
|
||||
size: size_of::<GstDataQueueClass>(),
|
||||
alignment: align_of::<GstDataQueueClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstDataQueueItem",
|
||||
Layout {
|
||||
size: size_of::<GstDataQueueItem>(),
|
||||
alignment: align_of::<GstDataQueueItem>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstDataQueueSize",
|
||||
Layout {
|
||||
size: size_of::<GstDataQueueSize>(),
|
||||
alignment: align_of::<GstDataQueueSize>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstPushSrc",
|
||||
Layout {
|
||||
size: size_of::<GstPushSrc>(),
|
||||
alignment: align_of::<GstPushSrc>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstPushSrcClass",
|
||||
Layout {
|
||||
size: size_of::<GstPushSrcClass>(),
|
||||
alignment: align_of::<GstPushSrcClass>(),
|
||||
},
|
||||
),
|
||||
];
|
||||
|
||||
const RUST_CONSTANTS: &[(&str, &str)] = &[
|
||||
("(gint) GST_AGGREGATOR_START_TIME_SELECTION_FIRST", "1"),
|
||||
("(gint) GST_AGGREGATOR_START_TIME_SELECTION_SET", "2"),
|
||||
("(gint) GST_AGGREGATOR_START_TIME_SELECTION_ZERO", "0"),
|
||||
("GST_BASE_PARSE_FLAG_DRAINING", "2"),
|
||||
("GST_BASE_PARSE_FLAG_LOST_SYNC", "1"),
|
||||
("(guint) GST_BASE_PARSE_FRAME_FLAG_CLIP", "4"),
|
||||
("(guint) GST_BASE_PARSE_FRAME_FLAG_DROP", "8"),
|
||||
("(guint) GST_BASE_PARSE_FRAME_FLAG_NEW_FRAME", "1"),
|
||||
("(guint) GST_BASE_PARSE_FRAME_FLAG_NONE", "0"),
|
||||
("(guint) GST_BASE_PARSE_FRAME_FLAG_NO_FRAME", "2"),
|
||||
("(guint) GST_BASE_PARSE_FRAME_FLAG_QUEUE", "16"),
|
||||
("(guint) GST_BASE_SRC_FLAG_LAST", "1048576"),
|
||||
("(guint) GST_BASE_SRC_FLAG_STARTED", "32768"),
|
||||
("(guint) GST_BASE_SRC_FLAG_STARTING", "16384"),
|
||||
("GST_BASE_TRANSFORM_SINK_NAME", "sink"),
|
||||
("GST_BASE_TRANSFORM_SRC_NAME", "src"),
|
||||
("(guint) GST_COLLECT_PADS_STATE_EOS", "1"),
|
||||
("(guint) GST_COLLECT_PADS_STATE_FLUSHING", "2"),
|
||||
("(guint) GST_COLLECT_PADS_STATE_LOCKED", "16"),
|
||||
("(guint) GST_COLLECT_PADS_STATE_NEW_SEGMENT", "4"),
|
||||
("(guint) GST_COLLECT_PADS_STATE_WAITING", "8"),
|
||||
];
|
27
sys/gstreamer-base-sys/tests/constant.c
Normal file
27
sys/gstreamer-base-sys/tests/constant.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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
sys/gstreamer-base-sys/tests/layout.c
Normal file
12
sys/gstreamer-base-sys/tests/layout.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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
sys/gstreamer-base-sys/tests/manual.h
Normal file
3
sys/gstreamer-base-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/base/base.h>
|
181
sys/gstreamer-check-sys/CHANGELOG.md
Normal file
181
sys/gstreamer-check-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
|
59
sys/gstreamer-check-sys/Cargo.toml
Normal file
59
sys/gstreamer-check-sys/Cargo.toml
Normal file
|
@ -0,0 +1,59 @@
|
|||
[build-dependencies]
|
||||
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-sys]
|
||||
path = "../gstreamer-sys"
|
||||
|
||||
[dev-dependencies]
|
||||
shell-words = "1.0.0"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
dox = []
|
||||
v1_2 = []
|
||||
v1_4 = ["v1_2"]
|
||||
v1_6 = ["v1_4"]
|
||||
v1_8 = ["v1_6"]
|
||||
v1_10 = ["v1_8"]
|
||||
v1_12 = ["v1_10"]
|
||||
v1_14 = ["v1_12"]
|
||||
v1_16 = ["v1_14"]
|
||||
v1_18 = ["v1_16"]
|
||||
|
||||
[lib]
|
||||
name = "gstreamer_check_sys"
|
||||
|
||||
[package]
|
||||
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
|
||||
build = "build.rs"
|
||||
description = "FFI bindings to libgstcheck-1.0"
|
||||
documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_check_sys/"
|
||||
homepage = "https://gstreamer.freedesktop.org"
|
||||
keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
|
||||
license = "MIT"
|
||||
links = "gstcheck-1.0"
|
||||
name = "gstreamer-check-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_check_1_0]
|
||||
name = "gstreamer-check-1.0"
|
||||
version = "1.8"
|
||||
|
||||
[package.metadata.system-deps.gstreamer_check_1_0.feature-versions]
|
||||
v1_10 = "1.10"
|
||||
v1_12 = "1.12"
|
||||
v1_14 = "1.14"
|
||||
v1_16 = "1.16"
|
||||
v1_18 = "1.18"
|
23
sys/gstreamer-check-sys/LICENSE
Normal file
23
sys/gstreamer-check-sys/LICENSE
Normal file
|
@ -0,0 +1,23 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Sebastian Dröge <sebastian@centricular.com>.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
33
sys/gstreamer-check-sys/README.md
Normal file
33
sys/gstreamer-check-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-check-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-check-sys.svg)](https://crates.io/crates/gstreamer-check-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/) (Check 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.
|
20
sys/gstreamer-check-sys/build.rs
Normal file
20
sys/gstreamer-check-sys/build.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
extern crate system_deps;
|
||||
|
||||
#[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);
|
||||
}
|
||||
}
|
401
sys/gstreamer-check-sys/src/lib.rs
Normal file
401
sys/gstreamer-check-sys/src/lib.rs
Normal file
|
@ -0,0 +1,401 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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_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};
|
||||
|
||||
// Callbacks
|
||||
pub type GstHarnessPrepareBufferFunc =
|
||||
Option<unsafe extern "C" fn(*mut GstHarness, gpointer) -> *mut gst::GstBuffer>;
|
||||
pub type GstHarnessPrepareEventFunc =
|
||||
Option<unsafe extern "C" fn(*mut GstHarness, gpointer) -> *mut gst::GstEvent>;
|
||||
|
||||
// Records
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct GstHarness {
|
||||
pub element: *mut gst::GstElement,
|
||||
pub srcpad: *mut gst::GstPad,
|
||||
pub sinkpad: *mut gst::GstPad,
|
||||
pub src_harness: *mut GstHarness,
|
||||
pub sink_harness: *mut GstHarness,
|
||||
pub priv_: *mut GstHarnessPrivate,
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for GstHarness {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
f.debug_struct(&format!("GstHarness @ {:?}", self as *const _))
|
||||
.field("element", &self.element)
|
||||
.field("srcpad", &self.srcpad)
|
||||
.field("sinkpad", &self.sinkpad)
|
||||
.field("src_harness", &self.src_harness)
|
||||
.field("sink_harness", &self.sink_harness)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
pub struct _GstHarnessPrivate(c_void);
|
||||
|
||||
pub type GstHarnessPrivate = *mut _GstHarnessPrivate;
|
||||
|
||||
#[repr(C)]
|
||||
pub struct _GstHarnessThread(c_void);
|
||||
|
||||
pub type GstHarnessThread = *mut _GstHarnessThread;
|
||||
|
||||
#[repr(C)]
|
||||
pub struct _GstStreamConsistency(c_void);
|
||||
|
||||
pub type GstStreamConsistency = *mut _GstStreamConsistency;
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct GstTestClockClass {
|
||||
pub parent_class: gst::GstClockClass,
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for GstTestClockClass {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
f.debug_struct(&format!("GstTestClockClass @ {:?}", self as *const _))
|
||||
.field("parent_class", &self.parent_class)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
pub struct _GstTestClockPrivate(c_void);
|
||||
|
||||
pub type GstTestClockPrivate = *mut _GstTestClockPrivate;
|
||||
|
||||
// Classes
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct GstTestClock {
|
||||
pub parent: gst::GstClock,
|
||||
pub priv_: *mut GstTestClockPrivate,
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for GstTestClock {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
f.debug_struct(&format!("GstTestClock @ {:?}", self as *const _))
|
||||
.field("parent", &self.parent)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[link(name = "gstcheck-1.0")]
|
||||
extern "C" {
|
||||
|
||||
//=========================================================================
|
||||
// GstHarness
|
||||
//=========================================================================
|
||||
pub fn gst_harness_add_element_full(
|
||||
h: *mut GstHarness,
|
||||
element: *mut gst::GstElement,
|
||||
hsrc: *mut gst::GstStaticPadTemplate,
|
||||
element_sinkpad_name: *const c_char,
|
||||
hsink: *mut gst::GstStaticPadTemplate,
|
||||
element_srcpad_name: *const c_char,
|
||||
);
|
||||
pub fn gst_harness_add_element_sink_pad(h: *mut GstHarness, sinkpad: *mut gst::GstPad);
|
||||
pub fn gst_harness_add_element_src_pad(h: *mut GstHarness, srcpad: *mut gst::GstPad);
|
||||
pub fn gst_harness_add_parse(h: *mut GstHarness, launchline: *const c_char);
|
||||
pub fn gst_harness_add_probe(
|
||||
h: *mut GstHarness,
|
||||
element_name: *const c_char,
|
||||
pad_name: *const c_char,
|
||||
mask: gst::GstPadProbeType,
|
||||
callback: gst::GstPadProbeCallback,
|
||||
user_data: gpointer,
|
||||
destroy_data: glib::GDestroyNotify,
|
||||
);
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
pub fn gst_harness_add_propose_allocation_meta(
|
||||
h: *mut GstHarness,
|
||||
api: GType,
|
||||
params: *const gst::GstStructure,
|
||||
);
|
||||
pub fn gst_harness_add_sink(h: *mut GstHarness, sink_element_name: *const c_char);
|
||||
pub fn gst_harness_add_sink_harness(h: *mut GstHarness, sink_harness: *mut GstHarness);
|
||||
pub fn gst_harness_add_sink_parse(h: *mut GstHarness, launchline: *const c_char);
|
||||
pub fn gst_harness_add_src(
|
||||
h: *mut GstHarness,
|
||||
src_element_name: *const c_char,
|
||||
has_clock_wait: gboolean,
|
||||
);
|
||||
pub fn gst_harness_add_src_harness(
|
||||
h: *mut GstHarness,
|
||||
src_harness: *mut GstHarness,
|
||||
has_clock_wait: gboolean,
|
||||
);
|
||||
pub fn gst_harness_add_src_parse(
|
||||
h: *mut GstHarness,
|
||||
launchline: *const c_char,
|
||||
has_clock_wait: gboolean,
|
||||
);
|
||||
pub fn gst_harness_buffers_in_queue(h: *mut GstHarness) -> c_uint;
|
||||
pub fn gst_harness_buffers_received(h: *mut GstHarness) -> c_uint;
|
||||
pub fn gst_harness_crank_multiple_clock_waits(h: *mut GstHarness, waits: c_uint) -> gboolean;
|
||||
pub fn gst_harness_crank_single_clock_wait(h: *mut GstHarness) -> gboolean;
|
||||
pub fn gst_harness_create_buffer(h: *mut GstHarness, size: size_t) -> *mut gst::GstBuffer;
|
||||
pub fn gst_harness_dump_to_file(h: *mut GstHarness, filename: *const c_char);
|
||||
pub fn gst_harness_events_in_queue(h: *mut GstHarness) -> c_uint;
|
||||
pub fn gst_harness_events_received(h: *mut GstHarness) -> c_uint;
|
||||
pub fn gst_harness_find_element(
|
||||
h: *mut GstHarness,
|
||||
element_name: *const c_char,
|
||||
) -> *mut gst::GstElement;
|
||||
pub fn gst_harness_get(
|
||||
h: *mut GstHarness,
|
||||
element_name: *const c_char,
|
||||
first_property_name: *const c_char,
|
||||
...
|
||||
);
|
||||
pub fn gst_harness_get_allocator(
|
||||
h: *mut GstHarness,
|
||||
allocator: *mut *mut gst::GstAllocator,
|
||||
params: *mut gst::GstAllocationParams,
|
||||
);
|
||||
pub fn gst_harness_get_last_pushed_timestamp(h: *mut GstHarness) -> gst::GstClockTime;
|
||||
pub fn gst_harness_get_testclock(h: *mut GstHarness) -> *mut GstTestClock;
|
||||
pub fn gst_harness_play(h: *mut GstHarness);
|
||||
pub fn gst_harness_pull(h: *mut GstHarness) -> *mut gst::GstBuffer;
|
||||
pub fn gst_harness_pull_event(h: *mut GstHarness) -> *mut gst::GstEvent;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
pub fn gst_harness_pull_until_eos(
|
||||
h: *mut GstHarness,
|
||||
buf: *mut *mut gst::GstBuffer,
|
||||
) -> gboolean;
|
||||
pub fn gst_harness_pull_upstream_event(h: *mut GstHarness) -> *mut gst::GstEvent;
|
||||
pub fn gst_harness_push(h: *mut GstHarness, buffer: *mut gst::GstBuffer) -> gst::GstFlowReturn;
|
||||
pub fn gst_harness_push_and_pull(
|
||||
h: *mut GstHarness,
|
||||
buffer: *mut gst::GstBuffer,
|
||||
) -> *mut gst::GstBuffer;
|
||||
pub fn gst_harness_push_event(h: *mut GstHarness, event: *mut gst::GstEvent) -> gboolean;
|
||||
pub fn gst_harness_push_from_src(h: *mut GstHarness) -> gst::GstFlowReturn;
|
||||
pub fn gst_harness_push_to_sink(h: *mut GstHarness) -> gst::GstFlowReturn;
|
||||
pub fn gst_harness_push_upstream_event(
|
||||
h: *mut GstHarness,
|
||||
event: *mut gst::GstEvent,
|
||||
) -> gboolean;
|
||||
pub fn gst_harness_query_latency(h: *mut GstHarness) -> gst::GstClockTime;
|
||||
pub fn gst_harness_set(
|
||||
h: *mut GstHarness,
|
||||
element_name: *const c_char,
|
||||
first_property_name: *const c_char,
|
||||
...
|
||||
);
|
||||
pub fn gst_harness_set_blocking_push_mode(h: *mut GstHarness);
|
||||
pub fn gst_harness_set_caps(h: *mut GstHarness, in_: *mut gst::GstCaps, out: *mut gst::GstCaps);
|
||||
pub fn gst_harness_set_caps_str(h: *mut GstHarness, in_: *const c_char, out: *const c_char);
|
||||
pub fn gst_harness_set_drop_buffers(h: *mut GstHarness, drop_buffers: gboolean);
|
||||
pub fn gst_harness_set_forwarding(h: *mut GstHarness, forwarding: gboolean);
|
||||
pub fn gst_harness_set_propose_allocator(
|
||||
h: *mut GstHarness,
|
||||
allocator: *mut gst::GstAllocator,
|
||||
params: *const gst::GstAllocationParams,
|
||||
);
|
||||
pub fn gst_harness_set_sink_caps(h: *mut GstHarness, caps: *mut gst::GstCaps);
|
||||
pub fn gst_harness_set_sink_caps_str(h: *mut GstHarness, str: *const c_char);
|
||||
pub fn gst_harness_set_src_caps(h: *mut GstHarness, caps: *mut gst::GstCaps);
|
||||
pub fn gst_harness_set_src_caps_str(h: *mut GstHarness, str: *const c_char);
|
||||
pub fn gst_harness_set_time(h: *mut GstHarness, time: gst::GstClockTime) -> gboolean;
|
||||
pub fn gst_harness_set_upstream_latency(h: *mut GstHarness, latency: gst::GstClockTime);
|
||||
pub fn gst_harness_sink_push_many(h: *mut GstHarness, pushes: c_int) -> gst::GstFlowReturn;
|
||||
pub fn gst_harness_src_crank_and_push_many(
|
||||
h: *mut GstHarness,
|
||||
cranks: c_int,
|
||||
pushes: c_int,
|
||||
) -> gst::GstFlowReturn;
|
||||
pub fn gst_harness_src_push_event(h: *mut GstHarness) -> gboolean;
|
||||
pub fn gst_harness_stress_custom_start(
|
||||
h: *mut GstHarness,
|
||||
init: glib::GFunc,
|
||||
callback: glib::GFunc,
|
||||
data: gpointer,
|
||||
sleep: c_ulong,
|
||||
) -> *mut GstHarnessThread;
|
||||
pub fn gst_harness_stress_property_start_full(
|
||||
h: *mut GstHarness,
|
||||
name: *const c_char,
|
||||
value: *const gobject::GValue,
|
||||
sleep: c_ulong,
|
||||
) -> *mut GstHarnessThread;
|
||||
pub fn gst_harness_stress_push_buffer_start_full(
|
||||
h: *mut GstHarness,
|
||||
caps: *mut gst::GstCaps,
|
||||
segment: *const gst::GstSegment,
|
||||
buf: *mut gst::GstBuffer,
|
||||
sleep: c_ulong,
|
||||
) -> *mut GstHarnessThread;
|
||||
pub fn gst_harness_stress_push_buffer_with_cb_start_full(
|
||||
h: *mut GstHarness,
|
||||
caps: *mut gst::GstCaps,
|
||||
segment: *const gst::GstSegment,
|
||||
func: GstHarnessPrepareBufferFunc,
|
||||
data: gpointer,
|
||||
notify: glib::GDestroyNotify,
|
||||
sleep: c_ulong,
|
||||
) -> *mut GstHarnessThread;
|
||||
pub fn gst_harness_stress_push_event_start_full(
|
||||
h: *mut GstHarness,
|
||||
event: *mut gst::GstEvent,
|
||||
sleep: c_ulong,
|
||||
) -> *mut GstHarnessThread;
|
||||
pub fn gst_harness_stress_push_event_with_cb_start_full(
|
||||
h: *mut GstHarness,
|
||||
func: GstHarnessPrepareEventFunc,
|
||||
data: gpointer,
|
||||
notify: glib::GDestroyNotify,
|
||||
sleep: c_ulong,
|
||||
) -> *mut GstHarnessThread;
|
||||
pub fn gst_harness_stress_push_upstream_event_start_full(
|
||||
h: *mut GstHarness,
|
||||
event: *mut gst::GstEvent,
|
||||
sleep: c_ulong,
|
||||
) -> *mut GstHarnessThread;
|
||||
pub fn gst_harness_stress_push_upstream_event_with_cb_start_full(
|
||||
h: *mut GstHarness,
|
||||
func: GstHarnessPrepareEventFunc,
|
||||
data: gpointer,
|
||||
notify: glib::GDestroyNotify,
|
||||
sleep: c_ulong,
|
||||
) -> *mut GstHarnessThread;
|
||||
pub fn gst_harness_stress_requestpad_start_full(
|
||||
h: *mut GstHarness,
|
||||
templ: *mut gst::GstPadTemplate,
|
||||
name: *const c_char,
|
||||
caps: *mut gst::GstCaps,
|
||||
release: gboolean,
|
||||
sleep: c_ulong,
|
||||
) -> *mut GstHarnessThread;
|
||||
pub fn gst_harness_stress_statechange_start_full(
|
||||
h: *mut GstHarness,
|
||||
sleep: c_ulong,
|
||||
) -> *mut GstHarnessThread;
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn gst_harness_take_all_data(h: *mut GstHarness, size: *mut size_t) -> *mut u8;
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn gst_harness_take_all_data_as_buffer(h: *mut GstHarness) -> *mut gst::GstBuffer;
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn gst_harness_take_all_data_as_bytes(h: *mut GstHarness) -> *mut glib::GBytes;
|
||||
pub fn gst_harness_teardown(h: *mut GstHarness);
|
||||
pub fn gst_harness_try_pull(h: *mut GstHarness) -> *mut gst::GstBuffer;
|
||||
pub fn gst_harness_try_pull_event(h: *mut GstHarness) -> *mut gst::GstEvent;
|
||||
pub fn gst_harness_try_pull_upstream_event(h: *mut GstHarness) -> *mut gst::GstEvent;
|
||||
pub fn gst_harness_upstream_events_in_queue(h: *mut GstHarness) -> c_uint;
|
||||
pub fn gst_harness_upstream_events_received(h: *mut GstHarness) -> c_uint;
|
||||
pub fn gst_harness_use_systemclock(h: *mut GstHarness);
|
||||
pub fn gst_harness_use_testclock(h: *mut GstHarness);
|
||||
pub fn gst_harness_wait_for_clock_id_waits(
|
||||
h: *mut GstHarness,
|
||||
waits: c_uint,
|
||||
timeout: c_uint,
|
||||
) -> gboolean;
|
||||
pub fn gst_harness_new(element_name: *const c_char) -> *mut GstHarness;
|
||||
pub fn gst_harness_new_empty() -> *mut GstHarness;
|
||||
pub fn gst_harness_new_full(
|
||||
element: *mut gst::GstElement,
|
||||
hsrc: *mut gst::GstStaticPadTemplate,
|
||||
element_sinkpad_name: *const c_char,
|
||||
hsink: *mut gst::GstStaticPadTemplate,
|
||||
element_srcpad_name: *const c_char,
|
||||
) -> *mut GstHarness;
|
||||
pub fn gst_harness_new_parse(launchline: *const c_char) -> *mut GstHarness;
|
||||
pub fn gst_harness_new_with_element(
|
||||
element: *mut gst::GstElement,
|
||||
element_sinkpad_name: *const c_char,
|
||||
element_srcpad_name: *const c_char,
|
||||
) -> *mut GstHarness;
|
||||
pub fn gst_harness_new_with_padnames(
|
||||
element_name: *const c_char,
|
||||
element_sinkpad_name: *const c_char,
|
||||
element_srcpad_name: *const c_char,
|
||||
) -> *mut GstHarness;
|
||||
pub fn gst_harness_new_with_templates(
|
||||
element_name: *const c_char,
|
||||
hsrc: *mut gst::GstStaticPadTemplate,
|
||||
hsink: *mut gst::GstStaticPadTemplate,
|
||||
) -> *mut GstHarness;
|
||||
pub fn gst_harness_stress_thread_stop(t: *mut GstHarnessThread) -> c_uint;
|
||||
|
||||
//=========================================================================
|
||||
// GstTestClock
|
||||
//=========================================================================
|
||||
pub fn gst_test_clock_get_type() -> GType;
|
||||
pub fn gst_test_clock_new() -> *mut gst::GstClock;
|
||||
pub fn gst_test_clock_new_with_start_time(start_time: gst::GstClockTime) -> *mut gst::GstClock;
|
||||
pub fn gst_test_clock_id_list_get_latest_time(
|
||||
pending_list: *const glib::GList,
|
||||
) -> gst::GstClockTime;
|
||||
pub fn gst_test_clock_advance_time(test_clock: *mut GstTestClock, delta: gst::GstClockTimeDiff);
|
||||
pub fn gst_test_clock_crank(test_clock: *mut GstTestClock) -> gboolean;
|
||||
pub fn gst_test_clock_get_next_entry_time(test_clock: *mut GstTestClock) -> gst::GstClockTime;
|
||||
pub fn gst_test_clock_has_id(test_clock: *mut GstTestClock, id: gst::GstClockID) -> gboolean;
|
||||
pub fn gst_test_clock_peek_id_count(test_clock: *mut GstTestClock) -> c_uint;
|
||||
pub fn gst_test_clock_peek_next_pending_id(
|
||||
test_clock: *mut GstTestClock,
|
||||
pending_id: *mut gst::GstClockID,
|
||||
) -> gboolean;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
pub fn gst_test_clock_process_id(
|
||||
test_clock: *mut GstTestClock,
|
||||
pending_id: gst::GstClockID,
|
||||
) -> gboolean;
|
||||
pub fn gst_test_clock_process_id_list(
|
||||
test_clock: *mut GstTestClock,
|
||||
pending_list: *const glib::GList,
|
||||
) -> c_uint;
|
||||
pub fn gst_test_clock_process_next_clock_id(test_clock: *mut GstTestClock) -> gst::GstClockID;
|
||||
pub fn gst_test_clock_set_time(test_clock: *mut GstTestClock, new_time: gst::GstClockTime);
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
pub fn gst_test_clock_timed_wait_for_multiple_pending_ids(
|
||||
test_clock: *mut GstTestClock,
|
||||
count: c_uint,
|
||||
timeout_ms: c_uint,
|
||||
pending_list: *mut *mut glib::GList,
|
||||
) -> gboolean;
|
||||
pub fn gst_test_clock_wait_for_multiple_pending_ids(
|
||||
test_clock: *mut GstTestClock,
|
||||
count: c_uint,
|
||||
pending_list: *mut *mut glib::GList,
|
||||
);
|
||||
pub fn gst_test_clock_wait_for_next_pending_id(
|
||||
test_clock: *mut GstTestClock,
|
||||
pending_id: *mut gst::GstClockID,
|
||||
);
|
||||
pub fn gst_test_clock_wait_for_pending_id_count(test_clock: *mut GstTestClock, count: c_uint);
|
||||
|
||||
//=========================================================================
|
||||
// Other functions
|
||||
//=========================================================================
|
||||
pub fn gst_consistency_checker_add_pad(
|
||||
consist: *mut GstStreamConsistency,
|
||||
pad: *mut gst::GstPad,
|
||||
) -> gboolean;
|
||||
pub fn gst_consistency_checker_free(consist: *mut GstStreamConsistency);
|
||||
pub fn gst_consistency_checker_new(pad: *mut gst::GstPad) -> *mut GstStreamConsistency;
|
||||
pub fn gst_consistency_checker_reset(consist: *mut GstStreamConsistency);
|
||||
|
||||
}
|
278
sys/gstreamer-check-sys/tests/abi.rs
Normal file
278
sys/gstreamer-check-sys/tests/abi.rs
Normal file
|
@ -0,0 +1,278 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_check_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempfile;
|
||||
use gstreamer_check_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-check-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)] = &[
|
||||
(
|
||||
"GstHarness",
|
||||
Layout {
|
||||
size: size_of::<GstHarness>(),
|
||||
alignment: align_of::<GstHarness>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstTestClock",
|
||||
Layout {
|
||||
size: size_of::<GstTestClock>(),
|
||||
alignment: align_of::<GstTestClock>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstTestClockClass",
|
||||
Layout {
|
||||
size: size_of::<GstTestClockClass>(),
|
||||
alignment: align_of::<GstTestClockClass>(),
|
||||
},
|
||||
),
|
||||
];
|
||||
|
||||
const RUST_CONSTANTS: &[(&str, &str)] = &[];
|
27
sys/gstreamer-check-sys/tests/constant.c
Normal file
27
sys/gstreamer-check-sys/tests/constant.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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
sys/gstreamer-check-sys/tests/layout.c
Normal file
12
sys/gstreamer-check-sys/tests/layout.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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
sys/gstreamer-check-sys/tests/manual.h
Normal file
3
sys/gstreamer-check-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/check/check.h>
|
181
sys/gstreamer-controller-sys/CHANGELOG.md
Normal file
181
sys/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
sys/gstreamer-controller-sys/Cargo.toml
Normal file
63
sys/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 = "1.0.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
sys/gstreamer-controller-sys/README.md
Normal file
33
sys/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.
|
20
sys/gstreamer-controller-sys/build.rs
Normal file
20
sys/gstreamer-controller-sys/build.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
extern crate system_deps;
|
||||
|
||||
#[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);
|
||||
}
|
||||
}
|
556
sys/gstreamer-controller-sys/src/lib.rs
Normal file
556
sys/gstreamer-controller-sys/src/lib.rs
Normal file
|
@ -0,0 +1,556 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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()
|
||||
}
|
||||
}
|
||||
|
||||
#[link(name = "gstcontroller-1.0")]
|
||||
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
sys/gstreamer-controller-sys/tests/abi.rs
Normal file
386
sys/gstreamer-controller-sys/tests/abi.rs
Normal file
|
@ -0,0 +1,386 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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
sys/gstreamer-controller-sys/tests/constant.c
Normal file
27
sys/gstreamer-controller-sys/tests/constant.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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
sys/gstreamer-controller-sys/tests/layout.c
Normal file
12
sys/gstreamer-controller-sys/tests/layout.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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
sys/gstreamer-controller-sys/tests/manual.h
Normal file
3
sys/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>
|
181
sys/gstreamer-editing-services-sys/CHANGELOG.md
Normal file
181
sys/gstreamer-editing-services-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
|
68
sys/gstreamer-editing-services-sys/Cargo.toml
Normal file
68
sys/gstreamer-editing-services-sys/Cargo.toml
Normal file
|
@ -0,0 +1,68 @@
|
|||
[build-dependencies]
|
||||
system-deps = "1.3"
|
||||
|
||||
[dependencies]
|
||||
libc = "0.2"
|
||||
|
||||
[dependencies.gio-sys]
|
||||
git = "https://github.com/gtk-rs/sys"
|
||||
|
||||
[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-pbutils-sys]
|
||||
path = "../gstreamer-pbutils-sys"
|
||||
|
||||
[dependencies.gstreamer-sys]
|
||||
path = "../gstreamer-sys"
|
||||
|
||||
[dev-dependencies]
|
||||
shell-words = "1.0.0"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
dox = []
|
||||
v1_6 = ["v1_4"]
|
||||
v1_8 = ["v1_6"]
|
||||
v1_10 = ["v1_8"]
|
||||
v1_12 = ["v1_10"]
|
||||
v1_14 = ["v1_12"]
|
||||
v1_16 = ["v1_14"]
|
||||
v1_18 = ["v1_16"]
|
||||
v1_2 = []
|
||||
v1_4 = ["v1_2"]
|
||||
|
||||
[lib]
|
||||
name = "gstreamer_editing_services_sys"
|
||||
|
||||
[package]
|
||||
authors = ["Thibault Saunier <tsaunier@igalia.com>", "Sebastian Dröge <sebastian@centricular.com>"]
|
||||
build = "build.rs"
|
||||
description = "FFI bindings to libges-1.0"
|
||||
documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_editing_services_sys/"
|
||||
homepage = "https://gstreamer.freedesktop.org"
|
||||
keywords = ["ffi", "gstreamer", "gnome", "multimedia", "nle"]
|
||||
license = "MIT"
|
||||
links = "ges-1.0"
|
||||
name = "gstreamer-editing-services-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.gst_editing_services_1_0]
|
||||
name = "gst-editing-services-1.0"
|
||||
version = "1.8"
|
||||
|
||||
[package.metadata.system-deps.gst_editing_services_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
sys/gstreamer-editing-services-sys/README.md
Normal file
33
sys/gstreamer-editing-services-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-editing-services-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-editing-services-sys.svg)](https://crates.io/crates/gstreamer-editing-services-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/) (Editing Services) 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.
|
20
sys/gstreamer-editing-services-sys/build.rs
Normal file
20
sys/gstreamer-editing-services-sys/build.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
extern crate system_deps;
|
||||
|
||||
#[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);
|
||||
}
|
||||
}
|
4144
sys/gstreamer-editing-services-sys/src/lib.rs
Normal file
4144
sys/gstreamer-editing-services-sys/src/lib.rs
Normal file
File diff suppressed because it is too large
Load diff
1389
sys/gstreamer-editing-services-sys/tests/abi.rs
Normal file
1389
sys/gstreamer-editing-services-sys/tests/abi.rs
Normal file
File diff suppressed because it is too large
Load diff
27
sys/gstreamer-editing-services-sys/tests/constant.c
Normal file
27
sys/gstreamer-editing-services-sys/tests/constant.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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
sys/gstreamer-editing-services-sys/tests/layout.c
Normal file
12
sys/gstreamer-editing-services-sys/tests/layout.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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
sys/gstreamer-editing-services-sys/tests/manual.h
Normal file
3
sys/gstreamer-editing-services-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 <ges/ges.h>
|
181
sys/gstreamer-gl-sys/CHANGELOG.md
Normal file
181
sys/gstreamer-gl-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
|
61
sys/gstreamer-gl-sys/Cargo.toml
Normal file
61
sys/gstreamer-gl-sys/Cargo.toml
Normal file
|
@ -0,0 +1,61 @@
|
|||
[build-dependencies]
|
||||
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"
|
||||
features = ["v1_14"]
|
||||
|
||||
[dependencies.gstreamer-sys]
|
||||
path = "../gstreamer-sys"
|
||||
features = ["v1_14"]
|
||||
|
||||
[dependencies.gstreamer-video-sys]
|
||||
path = "../gstreamer-video-sys"
|
||||
features = ["v1_14"]
|
||||
|
||||
[dev-dependencies]
|
||||
shell-words = "1.0.0"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
dox = []
|
||||
egl = []
|
||||
x11 = []
|
||||
wayland = []
|
||||
v1_16 = []
|
||||
v1_18 = ["v1_16"]
|
||||
|
||||
[lib]
|
||||
name = "gstreamer_gl_sys"
|
||||
|
||||
[package]
|
||||
authors = ["Sebastian Dröge <sebastian@centricular.com>", "Víctor Manuel Jáquez Leal <vjaquez@igalia.com>"]
|
||||
build = "build.rs"
|
||||
description = "FFI bindings to libgstgl-1.0"
|
||||
documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_gl_sys/"
|
||||
homepage = "https://gstreamer.freedesktop.org"
|
||||
keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
|
||||
license = "MIT"
|
||||
links = "gstgl-1.0"
|
||||
name = "gstreamer-gl-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_gl_1_0]
|
||||
name = "gstreamer-gl-1.0"
|
||||
version = "1.14"
|
||||
|
||||
[package.metadata.system-deps.gstreamer_gl_1_0.feature-versions]
|
||||
v1_16 = "1.16"
|
||||
v1_18 = "1.18"
|
33
sys/gstreamer-gl-sys/README.md
Normal file
33
sys/gstreamer-gl-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-gl-sys.svg)](https://crates.io/crates/gstreamer-gl-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/) (OpenGL 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.
|
20
sys/gstreamer-gl-sys/build.rs
Normal file
20
sys/gstreamer-gl-sys/build.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
extern crate system_deps;
|
||||
|
||||
#[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);
|
||||
}
|
||||
}
|
2887
sys/gstreamer-gl-sys/src/lib.rs
Normal file
2887
sys/gstreamer-gl-sys/src/lib.rs
Normal file
File diff suppressed because it is too large
Load diff
9
sys/gstreamer-gl-sys/src/manual.rs
Normal file
9
sys/gstreamer-gl-sys/src/manual.rs
Normal file
|
@ -0,0 +1,9 @@
|
|||
use libc::c_char;
|
||||
|
||||
// See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/497
|
||||
#[cfg(any(feature = "egl", feature = "dox"))]
|
||||
pub const GST_GL_DISPLAY_EGL_NAME: *const c_char =
|
||||
b"gst.gl.display.egl\0" as *const u8 as *const c_char;
|
||||
|
||||
// See https://gitlab.gnome.org/GNOME/gobject-introspection/issues/238
|
||||
pub const GST_GL_COLOR_CONVERT_VIDEO_CAPS: *const c_char = b"video/x-raw(memory:GLMemory), format = (string) { RGBA, RGB, RGBx, BGR, BGRx, BGRA, xRGB, xBGR, ARGB, ABGR, Y444, I420, YV12, Y42B, Y41B, NV12, NV21, YUY2, UYVY, AYUV, GRAY8, GRAY16_LE, GRAY16_BE, RGB16, BGR16 }, width = (int) [ 1, max ], height = (int) [ 1, max ], framerate = (fraction) [ 0, max ], texture-target = (string) { 2D, rectangle, external-oes } ; video/x-raw(memory:GLMemory,meta:GstVideoOverlayComposition), format = (string) { RGBA, RGB, RGBx, BGR, BGRx, BGRA, xRGB, xBGR, ARGB, ABGR, Y444, I420, YV12, Y42B, Y41B, NV12, NV21, YUY2, UYVY, AYUV, GRAY8, GRAY16_LE, GRAY16_BE, RGB16, BGR16 }, width = (int) [ 1, max ], height = (int) [ 1, max ], framerate = (fraction) [ 0, max ], texture-target = (string) { 2D, rectangle, external-oes }\0" as *const u8 as *const c_char;
|
918
sys/gstreamer-gl-sys/tests/abi.rs
Normal file
918
sys/gstreamer-gl-sys/tests/abi.rs
Normal file
|
@ -0,0 +1,918 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_gl_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempfile;
|
||||
use gstreamer_gl_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-gl-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)] = &[
|
||||
(
|
||||
"GstGLAPI",
|
||||
Layout {
|
||||
size: size_of::<GstGLAPI>(),
|
||||
alignment: align_of::<GstGLAPI>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLAllocationParams",
|
||||
Layout {
|
||||
size: size_of::<GstGLAllocationParams>(),
|
||||
alignment: align_of::<GstGLAllocationParams>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLAsyncDebug",
|
||||
Layout {
|
||||
size: size_of::<GstGLAsyncDebug>(),
|
||||
alignment: align_of::<GstGLAsyncDebug>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLBaseFilter",
|
||||
Layout {
|
||||
size: size_of::<GstGLBaseFilter>(),
|
||||
alignment: align_of::<GstGLBaseFilter>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLBaseFilterClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLBaseFilterClass>(),
|
||||
alignment: align_of::<GstGLBaseFilterClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLBaseMemory",
|
||||
Layout {
|
||||
size: size_of::<GstGLBaseMemory>(),
|
||||
alignment: align_of::<GstGLBaseMemory>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLBaseMemoryAllocator",
|
||||
Layout {
|
||||
size: size_of::<GstGLBaseMemoryAllocator>(),
|
||||
alignment: align_of::<GstGLBaseMemoryAllocator>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLBaseMemoryAllocatorClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLBaseMemoryAllocatorClass>(),
|
||||
alignment: align_of::<GstGLBaseMemoryAllocatorClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLBaseMemoryError",
|
||||
Layout {
|
||||
size: size_of::<GstGLBaseMemoryError>(),
|
||||
alignment: align_of::<GstGLBaseMemoryError>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLBaseMemoryTransfer",
|
||||
Layout {
|
||||
size: size_of::<GstGLBaseMemoryTransfer>(),
|
||||
alignment: align_of::<GstGLBaseMemoryTransfer>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLBaseSrc",
|
||||
Layout {
|
||||
size: size_of::<GstGLBaseSrc>(),
|
||||
alignment: align_of::<GstGLBaseSrc>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLBaseSrcClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLBaseSrcClass>(),
|
||||
alignment: align_of::<GstGLBaseSrcClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLBuffer",
|
||||
Layout {
|
||||
size: size_of::<GstGLBuffer>(),
|
||||
alignment: align_of::<GstGLBuffer>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLBufferAllocationParams",
|
||||
Layout {
|
||||
size: size_of::<GstGLBufferAllocationParams>(),
|
||||
alignment: align_of::<GstGLBufferAllocationParams>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLBufferAllocator",
|
||||
Layout {
|
||||
size: size_of::<GstGLBufferAllocator>(),
|
||||
alignment: align_of::<GstGLBufferAllocator>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLBufferAllocatorClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLBufferAllocatorClass>(),
|
||||
alignment: align_of::<GstGLBufferAllocatorClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLBufferPool",
|
||||
Layout {
|
||||
size: size_of::<GstGLBufferPool>(),
|
||||
alignment: align_of::<GstGLBufferPool>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLBufferPoolClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLBufferPoolClass>(),
|
||||
alignment: align_of::<GstGLBufferPoolClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLColorConvert",
|
||||
Layout {
|
||||
size: size_of::<GstGLColorConvert>(),
|
||||
alignment: align_of::<GstGLColorConvert>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLColorConvertClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLColorConvertClass>(),
|
||||
alignment: align_of::<GstGLColorConvertClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLContext",
|
||||
Layout {
|
||||
size: size_of::<GstGLContext>(),
|
||||
alignment: align_of::<GstGLContext>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLContextClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLContextClass>(),
|
||||
alignment: align_of::<GstGLContextClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLContextError",
|
||||
Layout {
|
||||
size: size_of::<GstGLContextError>(),
|
||||
alignment: align_of::<GstGLContextError>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLDisplay",
|
||||
Layout {
|
||||
size: size_of::<GstGLDisplay>(),
|
||||
alignment: align_of::<GstGLDisplay>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLDisplayClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLDisplayClass>(),
|
||||
alignment: align_of::<GstGLDisplayClass>(),
|
||||
},
|
||||
),
|
||||
#[cfg(any(feature = "egl", feature = "dox"))]
|
||||
(
|
||||
"GstGLDisplayEGL",
|
||||
Layout {
|
||||
size: size_of::<GstGLDisplayEGL>(),
|
||||
alignment: align_of::<GstGLDisplayEGL>(),
|
||||
},
|
||||
),
|
||||
#[cfg(any(feature = "egl", feature = "dox"))]
|
||||
(
|
||||
"GstGLDisplayEGLClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLDisplayEGLClass>(),
|
||||
alignment: align_of::<GstGLDisplayEGLClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLDisplayType",
|
||||
Layout {
|
||||
size: size_of::<GstGLDisplayType>(),
|
||||
alignment: align_of::<GstGLDisplayType>(),
|
||||
},
|
||||
),
|
||||
#[cfg(any(feature = "wayland", feature = "dox"))]
|
||||
(
|
||||
"GstGLDisplayWayland",
|
||||
Layout {
|
||||
size: size_of::<GstGLDisplayWayland>(),
|
||||
alignment: align_of::<GstGLDisplayWayland>(),
|
||||
},
|
||||
),
|
||||
#[cfg(any(feature = "wayland", feature = "dox"))]
|
||||
(
|
||||
"GstGLDisplayWaylandClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLDisplayWaylandClass>(),
|
||||
alignment: align_of::<GstGLDisplayWaylandClass>(),
|
||||
},
|
||||
),
|
||||
#[cfg(any(feature = "x11", feature = "dox"))]
|
||||
(
|
||||
"GstGLDisplayX11",
|
||||
Layout {
|
||||
size: size_of::<GstGLDisplayX11>(),
|
||||
alignment: align_of::<GstGLDisplayX11>(),
|
||||
},
|
||||
),
|
||||
#[cfg(any(feature = "x11", feature = "dox"))]
|
||||
(
|
||||
"GstGLDisplayX11Class",
|
||||
Layout {
|
||||
size: size_of::<GstGLDisplayX11Class>(),
|
||||
alignment: align_of::<GstGLDisplayX11Class>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLFilter",
|
||||
Layout {
|
||||
size: size_of::<GstGLFilter>(),
|
||||
alignment: align_of::<GstGLFilter>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLFilterClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLFilterClass>(),
|
||||
alignment: align_of::<GstGLFilterClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLFormat",
|
||||
Layout {
|
||||
size: size_of::<GstGLFormat>(),
|
||||
alignment: align_of::<GstGLFormat>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLFramebuffer",
|
||||
Layout {
|
||||
size: size_of::<GstGLFramebuffer>(),
|
||||
alignment: align_of::<GstGLFramebuffer>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLFramebufferClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLFramebufferClass>(),
|
||||
alignment: align_of::<GstGLFramebufferClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLMemory",
|
||||
Layout {
|
||||
size: size_of::<GstGLMemory>(),
|
||||
alignment: align_of::<GstGLMemory>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLMemoryAllocator",
|
||||
Layout {
|
||||
size: size_of::<GstGLMemoryAllocator>(),
|
||||
alignment: align_of::<GstGLMemoryAllocator>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLMemoryAllocatorClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLMemoryAllocatorClass>(),
|
||||
alignment: align_of::<GstGLMemoryAllocatorClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLMemoryPBO",
|
||||
Layout {
|
||||
size: size_of::<GstGLMemoryPBO>(),
|
||||
alignment: align_of::<GstGLMemoryPBO>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLMemoryPBOAllocator",
|
||||
Layout {
|
||||
size: size_of::<GstGLMemoryPBOAllocator>(),
|
||||
alignment: align_of::<GstGLMemoryPBOAllocator>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLMemoryPBOAllocatorClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLMemoryPBOAllocatorClass>(),
|
||||
alignment: align_of::<GstGLMemoryPBOAllocatorClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLOverlayCompositor",
|
||||
Layout {
|
||||
size: size_of::<GstGLOverlayCompositor>(),
|
||||
alignment: align_of::<GstGLOverlayCompositor>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLOverlayCompositorClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLOverlayCompositorClass>(),
|
||||
alignment: align_of::<GstGLOverlayCompositorClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLPlatform",
|
||||
Layout {
|
||||
size: size_of::<GstGLPlatform>(),
|
||||
alignment: align_of::<GstGLPlatform>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLQuery",
|
||||
Layout {
|
||||
size: size_of::<GstGLQuery>(),
|
||||
alignment: align_of::<GstGLQuery>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLQueryType",
|
||||
Layout {
|
||||
size: size_of::<GstGLQueryType>(),
|
||||
alignment: align_of::<GstGLQueryType>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLRenderbuffer",
|
||||
Layout {
|
||||
size: size_of::<GstGLRenderbuffer>(),
|
||||
alignment: align_of::<GstGLRenderbuffer>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLRenderbufferAllocationParams",
|
||||
Layout {
|
||||
size: size_of::<GstGLRenderbufferAllocationParams>(),
|
||||
alignment: align_of::<GstGLRenderbufferAllocationParams>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLRenderbufferAllocator",
|
||||
Layout {
|
||||
size: size_of::<GstGLRenderbufferAllocator>(),
|
||||
alignment: align_of::<GstGLRenderbufferAllocator>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLRenderbufferAllocatorClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLRenderbufferAllocatorClass>(),
|
||||
alignment: align_of::<GstGLRenderbufferAllocatorClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLSLError",
|
||||
Layout {
|
||||
size: size_of::<GstGLSLError>(),
|
||||
alignment: align_of::<GstGLSLError>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLSLProfile",
|
||||
Layout {
|
||||
size: size_of::<GstGLSLProfile>(),
|
||||
alignment: align_of::<GstGLSLProfile>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLSLStage",
|
||||
Layout {
|
||||
size: size_of::<GstGLSLStage>(),
|
||||
alignment: align_of::<GstGLSLStage>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLSLStageClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLSLStageClass>(),
|
||||
alignment: align_of::<GstGLSLStageClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLSLVersion",
|
||||
Layout {
|
||||
size: size_of::<GstGLSLVersion>(),
|
||||
alignment: align_of::<GstGLSLVersion>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLShader",
|
||||
Layout {
|
||||
size: size_of::<GstGLShader>(),
|
||||
alignment: align_of::<GstGLShader>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLShaderClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLShaderClass>(),
|
||||
alignment: align_of::<GstGLShaderClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLStereoDownmix",
|
||||
Layout {
|
||||
size: size_of::<GstGLStereoDownmix>(),
|
||||
alignment: align_of::<GstGLStereoDownmix>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLSyncMeta",
|
||||
Layout {
|
||||
size: size_of::<GstGLSyncMeta>(),
|
||||
alignment: align_of::<GstGLSyncMeta>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLTextureTarget",
|
||||
Layout {
|
||||
size: size_of::<GstGLTextureTarget>(),
|
||||
alignment: align_of::<GstGLTextureTarget>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLUpload",
|
||||
Layout {
|
||||
size: size_of::<GstGLUpload>(),
|
||||
alignment: align_of::<GstGLUpload>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLUploadClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLUploadClass>(),
|
||||
alignment: align_of::<GstGLUploadClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLUploadReturn",
|
||||
Layout {
|
||||
size: size_of::<GstGLUploadReturn>(),
|
||||
alignment: align_of::<GstGLUploadReturn>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLVideoAllocationParams",
|
||||
Layout {
|
||||
size: size_of::<GstGLVideoAllocationParams>(),
|
||||
alignment: align_of::<GstGLVideoAllocationParams>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLViewConvert",
|
||||
Layout {
|
||||
size: size_of::<GstGLViewConvert>(),
|
||||
alignment: align_of::<GstGLViewConvert>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLViewConvertClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLViewConvertClass>(),
|
||||
alignment: align_of::<GstGLViewConvertClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLWindow",
|
||||
Layout {
|
||||
size: size_of::<GstGLWindow>(),
|
||||
alignment: align_of::<GstGLWindow>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLWindowClass",
|
||||
Layout {
|
||||
size: size_of::<GstGLWindowClass>(),
|
||||
alignment: align_of::<GstGLWindowClass>(),
|
||||
},
|
||||
),
|
||||
(
|
||||
"GstGLWindowError",
|
||||
Layout {
|
||||
size: size_of::<GstGLWindowError>(),
|
||||
alignment: align_of::<GstGLWindowError>(),
|
||||
},
|
||||
),
|
||||
];
|
||||
|
||||
const RUST_CONSTANTS: &[(&str, &str)] = &[
|
||||
(
|
||||
"GST_BUFFER_POOL_OPTION_GL_SYNC_META",
|
||||
"GstBufferPoolOptionGLSyncMeta",
|
||||
),
|
||||
(
|
||||
"GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_2D",
|
||||
"GstBufferPoolOptionGLTextureTarget2D",
|
||||
),
|
||||
(
|
||||
"GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_EXTERNAL_OES",
|
||||
"GstBufferPoolOptionGLTextureTargetExternalOES",
|
||||
),
|
||||
(
|
||||
"GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_RECTANGLE",
|
||||
"GstBufferPoolOptionGLTextureTargetRectangle",
|
||||
),
|
||||
("GST_CAPS_FEATURE_MEMORY_GL_BUFFER", "memory:GLBuffer"),
|
||||
("GST_CAPS_FEATURE_MEMORY_GL_MEMORY", "memory:GLMemory"),
|
||||
("(gint) GST_GLSL_ERROR_COMPILE", "0"),
|
||||
("(gint) GST_GLSL_ERROR_LINK", "1"),
|
||||
("(gint) GST_GLSL_ERROR_PROGRAM", "2"),
|
||||
("(guint) GST_GLSL_PROFILE_ANY", "4294967295"),
|
||||
("(guint) GST_GLSL_PROFILE_COMPATIBILITY", "4"),
|
||||
("(guint) GST_GLSL_PROFILE_CORE", "2"),
|
||||
("(guint) GST_GLSL_PROFILE_ES", "1"),
|
||||
("(guint) GST_GLSL_PROFILE_NONE", "0"),
|
||||
("(gint) GST_GLSL_VERSION_100", "100"),
|
||||
("(gint) GST_GLSL_VERSION_110", "110"),
|
||||
("(gint) GST_GLSL_VERSION_120", "120"),
|
||||
("(gint) GST_GLSL_VERSION_130", "130"),
|
||||
("(gint) GST_GLSL_VERSION_140", "140"),
|
||||
("(gint) GST_GLSL_VERSION_150", "150"),
|
||||
("(gint) GST_GLSL_VERSION_300", "300"),
|
||||
("(gint) GST_GLSL_VERSION_310", "310"),
|
||||
("(gint) GST_GLSL_VERSION_320", "320"),
|
||||
("(gint) GST_GLSL_VERSION_330", "330"),
|
||||
("(gint) GST_GLSL_VERSION_400", "400"),
|
||||
("(gint) GST_GLSL_VERSION_410", "410"),
|
||||
("(gint) GST_GLSL_VERSION_420", "420"),
|
||||
("(gint) GST_GLSL_VERSION_430", "430"),
|
||||
("(gint) GST_GLSL_VERSION_440", "440"),
|
||||
("(gint) GST_GLSL_VERSION_450", "450"),
|
||||
("(gint) GST_GLSL_VERSION_NONE", "0"),
|
||||
("GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_ALLOC", "1"),
|
||||
("GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER", "16"),
|
||||
("GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_USER", "65536"),
|
||||
("GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_VIDEO", "8"),
|
||||
("GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_GPU_HANDLE", "4"),
|
||||
("GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_SYSMEM", "2"),
|
||||
("(gint) GST_GL_ALPHA", "6406"),
|
||||
("(guint) GST_GL_API_ANY", "4294967295"),
|
||||
("(guint) GST_GL_API_GLES1", "32768"),
|
||||
("GST_GL_API_GLES1_NAME", "gles1"),
|
||||
("(guint) GST_GL_API_GLES2", "65536"),
|
||||
("GST_GL_API_GLES2_NAME", "gles2"),
|
||||
("(guint) GST_GL_API_NONE", "0"),
|
||||
("(guint) GST_GL_API_OPENGL", "1"),
|
||||
("(guint) GST_GL_API_OPENGL3", "2"),
|
||||
("GST_GL_API_OPENGL3_NAME", "opengl3"),
|
||||
("GST_GL_API_OPENGL_NAME", "opengl"),
|
||||
("GST_GL_BASE_MEMORY_ALLOCATOR_NAME", "GLBaseMemory"),
|
||||
("(gint) GST_GL_BASE_MEMORY_ERROR_FAILED", "0"),
|
||||
("(gint) GST_GL_BASE_MEMORY_ERROR_OLD_LIBS", "1"),
|
||||
("(gint) GST_GL_BASE_MEMORY_ERROR_RESOURCE_UNAVAILABLE", "2"),
|
||||
(
|
||||
"(guint) GST_GL_BASE_MEMORY_TRANSFER_NEED_DOWNLOAD",
|
||||
"1048576",
|
||||
),
|
||||
("(guint) GST_GL_BASE_MEMORY_TRANSFER_NEED_UPLOAD", "2097152"),
|
||||
("GST_GL_BUFFER_ALLOCATOR_NAME", "GLBuffer"),
|
||||
(
|
||||
"GST_GL_COLOR_CONVERT_EXT_FORMATS",
|
||||
", BGR10A2_LE, RGB10A2_LE, P010_10LE, P012_LE, P016_LE, Y212_LE, Y412_LE",
|
||||
),
|
||||
("(gint) GST_GL_CONTEXT_ERROR_CREATE_CONTEXT", "4"),
|
||||
("(gint) GST_GL_CONTEXT_ERROR_FAILED", "0"),
|
||||
("(gint) GST_GL_CONTEXT_ERROR_OLD_LIBS", "3"),
|
||||
("(gint) GST_GL_CONTEXT_ERROR_RESOURCE_UNAVAILABLE", "5"),
|
||||
("(gint) GST_GL_CONTEXT_ERROR_WRONG_API", "2"),
|
||||
("(gint) GST_GL_CONTEXT_ERROR_WRONG_CONFIG", "1"),
|
||||
("GST_GL_CONTEXT_TYPE_CGL", "gst.gl.context.CGL"),
|
||||
("GST_GL_CONTEXT_TYPE_EAGL", "gst.gl.context.EAGL"),
|
||||
("GST_GL_CONTEXT_TYPE_EGL", "gst.gl.context.EGL"),
|
||||
("GST_GL_CONTEXT_TYPE_GLX", "gst.gl.context.GLX"),
|
||||
("GST_GL_CONTEXT_TYPE_WGL", "gst.gl.context.WGL"),
|
||||
("(gint) GST_GL_DEPTH24_STENCIL8", "35056"),
|
||||
("(gint) GST_GL_DEPTH_COMPONENT16", "33189"),
|
||||
("GST_GL_DISPLAY_CONTEXT_TYPE", "gst.gl.GLDisplay"),
|
||||
("(guint) GST_GL_DISPLAY_TYPE_ANY", "4294967295"),
|
||||
("(guint) GST_GL_DISPLAY_TYPE_COCOA", "4"),
|
||||
("(guint) GST_GL_DISPLAY_TYPE_DISPMANX", "16"),
|
||||
("(guint) GST_GL_DISPLAY_TYPE_EGL", "32"),
|
||||
("(guint) GST_GL_DISPLAY_TYPE_EGL_DEVICE", "256"),
|
||||
("(guint) GST_GL_DISPLAY_TYPE_GBM", "128"),
|
||||
("(guint) GST_GL_DISPLAY_TYPE_NONE", "0"),
|
||||
("(guint) GST_GL_DISPLAY_TYPE_VIV_FB", "64"),
|
||||
("(guint) GST_GL_DISPLAY_TYPE_WAYLAND", "2"),
|
||||
("(guint) GST_GL_DISPLAY_TYPE_WIN32", "8"),
|
||||
("(guint) GST_GL_DISPLAY_TYPE_X11", "1"),
|
||||
("(gint) GST_GL_LUMINANCE", "6409"),
|
||||
("(gint) GST_GL_LUMINANCE_ALPHA", "6410"),
|
||||
("GST_GL_MEMORY_ALLOCATOR_NAME", "GLMemory"),
|
||||
("GST_GL_MEMORY_PBO_ALLOCATOR_NAME", "GLMemoryPBO"),
|
||||
(
|
||||
"GST_GL_MEMORY_VIDEO_EXT_FORMATS",
|
||||
", BGR10A2_LE, RGB10A2_LE, P010_10LE, P012_LE, P016_LE, Y212_LE, Y412_LE",
|
||||
),
|
||||
("(guint) GST_GL_PLATFORM_ANY", "4294967295"),
|
||||
("(guint) GST_GL_PLATFORM_CGL", "8"),
|
||||
("(guint) GST_GL_PLATFORM_EAGL", "16"),
|
||||
("(guint) GST_GL_PLATFORM_EGL", "1"),
|
||||
("(guint) GST_GL_PLATFORM_GLX", "2"),
|
||||
("(guint) GST_GL_PLATFORM_NONE", "0"),
|
||||
("(guint) GST_GL_PLATFORM_WGL", "4"),
|
||||
("(gint) GST_GL_QUERY_NONE", "0"),
|
||||
("(gint) GST_GL_QUERY_TIMESTAMP", "2"),
|
||||
("(gint) GST_GL_QUERY_TIME_ELAPSED", "1"),
|
||||
("(gint) GST_GL_R16", "33322"),
|
||||
("(gint) GST_GL_R8", "33321"),
|
||||
("(gint) GST_GL_RED", "6403"),
|
||||
("GST_GL_RENDERBUFFER_ALLOCATOR_NAME", "GLRenderbuffer"),
|
||||
("(gint) GST_GL_RG", "33319"),
|
||||
("(gint) GST_GL_RG16", "33324"),
|
||||
("(gint) GST_GL_RG8", "33323"),
|
||||
("(gint) GST_GL_RGB", "6407"),
|
||||
("(gint) GST_GL_RGB10_A2", "32857"),
|
||||
("(gint) GST_GL_RGB16", "32852"),
|
||||
("(gint) GST_GL_RGB565", "36194"),
|
||||
("(gint) GST_GL_RGB8", "32849"),
|
||||
("(gint) GST_GL_RGBA", "6408"),
|
||||
("(gint) GST_GL_RGBA16", "32859"),
|
||||
("(gint) GST_GL_RGBA8", "32856"),
|
||||
(
|
||||
"(gint) GST_GL_STEREO_DOWNMIX_ANAGLYPH_AMBER_BLUE_DUBOIS",
|
||||
"2",
|
||||
),
|
||||
(
|
||||
"(gint) GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS",
|
||||
"0",
|
||||
),
|
||||
("(gint) GST_GL_STEREO_DOWNMIX_ANAGLYPH_RED_CYAN_DUBOIS", "1"),
|
||||
("(gint) GST_GL_TEXTURE_TARGET_2D", "1"),
|
||||
("GST_GL_TEXTURE_TARGET_2D_STR", "2D"),
|
||||
("(gint) GST_GL_TEXTURE_TARGET_EXTERNAL_OES", "3"),
|
||||
("GST_GL_TEXTURE_TARGET_EXTERNAL_OES_STR", "external-oes"),
|
||||
("(gint) GST_GL_TEXTURE_TARGET_NONE", "0"),
|
||||
("(gint) GST_GL_TEXTURE_TARGET_RECTANGLE", "2"),
|
||||
("GST_GL_TEXTURE_TARGET_RECTANGLE_STR", "rectangle"),
|
||||
("(gint) GST_GL_UPLOAD_DONE", "1"),
|
||||
("(gint) GST_GL_UPLOAD_ERROR", "-1"),
|
||||
("(gint) GST_GL_UPLOAD_RECONFIGURE", "-3"),
|
||||
("(gint) GST_GL_UPLOAD_UNSHARED_GL_CONTEXT", "-100"),
|
||||
("(gint) GST_GL_UPLOAD_UNSUPPORTED", "-2"),
|
||||
("(gint) GST_GL_WINDOW_ERROR_FAILED", "0"),
|
||||
("(gint) GST_GL_WINDOW_ERROR_OLD_LIBS", "1"),
|
||||
("(gint) GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE", "2"),
|
||||
("GST_MAP_GL", "131072"),
|
||||
];
|
27
sys/gstreamer-gl-sys/tests/constant.c
Normal file
27
sys/gstreamer-gl-sys/tests/constant.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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
sys/gstreamer-gl-sys/tests/layout.c
Normal file
12
sys/gstreamer-gl-sys/tests/layout.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37)
|
||||
// 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
sys/gstreamer-gl-sys/tests/manual.h
Normal file
3
sys/gstreamer-gl-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/gl/gl.h>
|
181
sys/gstreamer-mpegts-sys/CHANGELOG.md
Normal file
181
sys/gstreamer-mpegts-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
|
60
sys/gstreamer-mpegts-sys/Cargo.toml
Normal file
60
sys/gstreamer-mpegts-sys/Cargo.toml
Normal file
|
@ -0,0 +1,60 @@
|
|||
[build-dependencies]
|
||||
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 = "1.0.0"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
v1_2 = []
|
||||
v1_4 = ["v1_2"]
|
||||
v1_6 = ["v1_4"]
|
||||
v1_8 = ["v1_6"]
|
||||
v1_10 = ["v1_8"]
|
||||
v1_12 = ["v1_10"]
|
||||
v1_14 = ["v1_12"]
|
||||
v1_16 = ["v1_14"]
|
||||
v1_18 = ["v1_16"]
|
||||
dox = []
|
||||
|
||||
[lib]
|
||||
name = "gstreamer_mpegts_sys"
|
||||
|
||||
[package]
|
||||
authors = ["Russel Winder <russel@winder.org.uk>", "Sebastian Dröge <sebastian@centricular.com>"]
|
||||
build = "build.rs"
|
||||
documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_mpegts_sys/"
|
||||
description = "FFI bindings to libgstmpegts-1.0"
|
||||
homepage = "https://gstreamer.freedesktop.org"
|
||||
keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
|
||||
license = "MIT"
|
||||
links = "gstmpegts-1.0"
|
||||
name = "gstreamer-mpegts-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_mpegts_1_0]
|
||||
name = "gstreamer-mpegts-1.0"
|
||||
version = "1.12"
|
||||
|
||||
[package.metadata.system-deps.gstreamer_mpegts_1_0.feature-versions]
|
||||
v1_14 = "1.14"
|
||||
v1_16 = "1.16"
|
||||
v1_18 = "1.18"
|
21
sys/gstreamer-mpegts-sys/LICENSE
Normal file
21
sys/gstreamer-mpegts-sys/LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Russel Winder <russel@winder.org.uk>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
33
sys/gstreamer-mpegts-sys/README.md
Normal file
33
sys/gstreamer-mpegts-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-mpegts-sys.svg)](https://crates.io/crates/gstreamer-mpegts-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/) (MPEGTS 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.
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue