mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-05-20 01:08:26 +00:00
Compare commits
109 commits
Author | SHA1 | Date | |
---|---|---|---|
f59029b57c | |||
b468280353 | |||
0ef80c4fe7 | |||
455996c60b | |||
83fe420466 | |||
5af4a262b8 | |||
b8dbfc66ca | |||
b15e0e1633 | |||
a430291725 | |||
0ee36ea4b5 | |||
a7a0bf226d | |||
19ea814a09 | |||
2a9d0d035f | |||
1e293e5cb8 | |||
fe1fe5b114 | |||
238768f525 | |||
2f99c4c560 | |||
9fca740851 | |||
9490735655 | |||
81b20b9329 | |||
ba4bd5c631 | |||
4b79dddc14 | |||
01b32ce143 | |||
873aeff133 | |||
87cc9fe6e4 | |||
bac0828260 | |||
200d8b1c0c | |||
dc04a53207 | |||
0bb334e14c | |||
46226106b4 | |||
b7b5352353 | |||
88a6977777 | |||
cb560e59a3 | |||
241338f43c | |||
5c8a989029 | |||
57050f66c6 | |||
63654c67da | |||
70a15e8dbe | |||
953e3747f2 | |||
e117010bc0 | |||
694d1fd39b | |||
db03c8edd1 | |||
ea25c9262b | |||
0d872ae6f8 | |||
7433ea79c9 | |||
46be4a0b1e | |||
43c82da25a | |||
da1f53f4c7 | |||
0524435190 | |||
917c458a86 | |||
5eaa0ca46d | |||
5400979e28 | |||
c43c08804a | |||
a7ebe45ff3 | |||
2b53c55ee6 | |||
04c840a1d9 | |||
6111663e26 | |||
7cea7ba6f1 | |||
e2e38d9494 | |||
676e41064b | |||
4524af89ee | |||
e5830c2ea9 | |||
d7fe0709a5 | |||
983e8b3308 | |||
6aff1773bd | |||
ebc06257b5 | |||
86d02890ca | |||
29c82cd54d | |||
c05563d22e | |||
9e80250b49 | |||
0b027c853b | |||
3246f4fb5b | |||
82f6accc31 | |||
ffad1188b9 | |||
353e3d1611 | |||
b5cb4ae831 | |||
14576fdf26 | |||
70045a36fb | |||
28451435a4 | |||
fcc7ab6b88 | |||
18a02f6d34 | |||
c5111ddcc2 | |||
d5917be045 | |||
4e6ddf6663 | |||
ab0a29b765 | |||
8062a8748f | |||
28fe70f479 | |||
c8b98dde8c | |||
b47aba1837 | |||
28931e2f09 | |||
1649e268c5 | |||
d575cd1f95 | |||
ac275fe10e | |||
b10f395c2c | |||
22796cee0c | |||
7f9dd58718 | |||
798ee29b98 | |||
040a194700 | |||
b69fee9abe | |||
a87a844604 | |||
5d19b26974 | |||
2613c57739 | |||
f82b9cc197 | |||
12c9ada9e0 | |||
a784ea2d0b | |||
90e6108ed7 | |||
77b2800caf | |||
c4636fc0cd | |||
6a1441203d |
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,2 @@
|
||||||
target/
|
target/
|
||||||
**/*.rs.bk
|
**/*.rs.bk
|
||||||
Cargo.lock
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ variables:
|
||||||
# latest release must be at the top
|
# latest release must be at the top
|
||||||
# (only relevant on main branch)
|
# (only relevant on main branch)
|
||||||
RELEASES:
|
RELEASES:
|
||||||
0.21=0.21
|
0.22=0.22
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- "trigger"
|
- "trigger"
|
||||||
|
@ -73,6 +73,7 @@ trigger:
|
||||||
stage: 'trigger'
|
stage: 'trigger'
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
|
tags: [ 'placeholder-job' ]
|
||||||
script:
|
script:
|
||||||
- echo "Trigger job done, now running the pipeline."
|
- echo "Trigger job done, now running the pipeline."
|
||||||
rules:
|
rules:
|
||||||
|
@ -141,6 +142,7 @@ trigger:
|
||||||
libpango1.0-dev libcairo2-dev libjson-glib-dev libgdk-pixbuf-2.0-dev
|
libpango1.0-dev libcairo2-dev libjson-glib-dev libgdk-pixbuf-2.0-dev
|
||||||
libtiff-dev libpng-dev libjpeg-dev libepoxy-dev libsass-dev sassc
|
libtiff-dev libpng-dev libjpeg-dev libepoxy-dev libsass-dev sassc
|
||||||
libcsound64-dev llvm clang nasm libsodium-dev libwebp-dev
|
libcsound64-dev llvm clang nasm libsodium-dev libwebp-dev
|
||||||
|
libflac-dev
|
||||||
FDO_DISTRIBUTION_EXEC: >-
|
FDO_DISTRIBUTION_EXEC: >-
|
||||||
bash ci/install-gst.sh &&
|
bash ci/install-gst.sh &&
|
||||||
bash ci/install-dav1d.sh &&
|
bash ci/install-dav1d.sh &&
|
||||||
|
@ -311,6 +313,7 @@ test nightly sys:
|
||||||
rustfmt:
|
rustfmt:
|
||||||
extends: .img-stable
|
extends: .img-stable
|
||||||
stage: "lint"
|
stage: "lint"
|
||||||
|
tags: [ 'placeholder-job' ]
|
||||||
script:
|
script:
|
||||||
- cargo fmt --version
|
- cargo fmt --version
|
||||||
- cargo fmt -- --color=always --check
|
- cargo fmt -- --color=always --check
|
||||||
|
@ -321,6 +324,7 @@ rustfmt:
|
||||||
check commits:
|
check commits:
|
||||||
extends: .img-stable
|
extends: .img-stable
|
||||||
stage: "lint"
|
stage: "lint"
|
||||||
|
tags: [ 'placeholder-job' ]
|
||||||
script:
|
script:
|
||||||
- ci-fairy check-commits --textwidth 0 --no-signed-off-by
|
- ci-fairy check-commits --textwidth 0 --no-signed-off-by
|
||||||
needs:
|
needs:
|
||||||
|
@ -330,6 +334,7 @@ check commits:
|
||||||
typos:
|
typos:
|
||||||
extends: .img-stable
|
extends: .img-stable
|
||||||
stage: "lint"
|
stage: "lint"
|
||||||
|
tags: [ 'placeholder-job' ]
|
||||||
script:
|
script:
|
||||||
- typos
|
- typos
|
||||||
needs:
|
needs:
|
||||||
|
@ -366,6 +371,7 @@ gir-checks:
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
extends: .img-stable
|
extends: .img-stable
|
||||||
stage: 'extras'
|
stage: 'extras'
|
||||||
|
tags: [ 'placeholder-job' ]
|
||||||
needs:
|
needs:
|
||||||
- job: 'build-stable'
|
- job: 'build-stable'
|
||||||
artifacts: false
|
artifacts: false
|
||||||
|
@ -508,7 +514,6 @@ pages:
|
||||||
# We also don't need a CONTEXT_DIR var as its also
|
# We also don't need a CONTEXT_DIR var as its also
|
||||||
# hardcoded to be windows-docker/
|
# hardcoded to be windows-docker/
|
||||||
DOCKERFILE: 'ci/windows-docker/Dockerfile'
|
DOCKERFILE: 'ci/windows-docker/Dockerfile'
|
||||||
GST_UPSTREAM_BRANCH: 'main'
|
|
||||||
tags:
|
tags:
|
||||||
- 'windows'
|
- 'windows'
|
||||||
- 'shell'
|
- 'shell'
|
||||||
|
|
663
Cargo.lock
generated
663
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -107,7 +107,7 @@ members = [
|
||||||
exclude = ["gir"]
|
exclude = ["gir"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.22.0"
|
version = "0.23.0"
|
||||||
categories = ["api-bindings", "multimedia"]
|
categories = ["api-bindings", "multimedia"]
|
||||||
repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
|
repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
|
||||||
homepage = "https://gstreamer.freedesktop.org"
|
homepage = "https://gstreamer.freedesktop.org"
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
variables:
|
variables:
|
||||||
GST_RS_IMG_TAG: "2024-02-07.0"
|
GST_RS_IMG_TAG: "2024-05-10.0"
|
||||||
GST_RS_STABLE: "1.75.0"
|
GST_RS_STABLE: "1.78.0"
|
||||||
GST_RS_MSRV: "1.70.0"
|
GST_RS_MSRV: "1.70.0"
|
||||||
|
# The branch we use to build GStreamer from in the docker images
|
||||||
|
# Ex. main, 1.24, my-test-branch
|
||||||
|
GST_UPSTREAM_BRANCH: 'main'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
RELEASE=1.1.0
|
RELEASE=1.4.1
|
||||||
|
|
||||||
git clone https://code.videolan.org/videolan/dav1d.git --branch $RELEASE
|
git clone https://code.videolan.org/videolan/dav1d.git --branch $RELEASE
|
||||||
cd dav1d
|
cd dav1d
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
DEFAULT_BRANCH="$GST_UPSTREAM_BRANCH"
|
||||||
|
|
||||||
pip3 install meson==1.1.1 --break-system-packages
|
pip3 install meson==1.1.1 --break-system-packages
|
||||||
|
|
||||||
# gstreamer-rs already has a 'gstreamer' directory so don't clone there
|
# gstreamer-rs already has a 'gstreamer' directory so don't clone there
|
||||||
|
@ -9,7 +11,7 @@ pushd .
|
||||||
cd ..
|
cd ..
|
||||||
git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git \
|
git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git \
|
||||||
--depth 1 \
|
--depth 1 \
|
||||||
--branch main
|
--branch "$DEFAULT_BRANCH"
|
||||||
|
|
||||||
cd gstreamer
|
cd gstreamer
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ source ./ci/env.sh
|
||||||
set -e
|
set -e
|
||||||
export CARGO_HOME='/usr/local/cargo'
|
export CARGO_HOME='/usr/local/cargo'
|
||||||
|
|
||||||
RUSTUP_VERSION=1.26.0
|
RUSTUP_VERSION=1.27.1
|
||||||
RUST_VERSION=$1
|
RUST_VERSION=$1
|
||||||
RUST_IMAGE_FULL=$2
|
RUST_IMAGE_FULL=$2
|
||||||
RUST_ARCH="x86_64-unknown-linux-gnu"
|
RUST_ARCH="x86_64-unknown-linux-gnu"
|
||||||
|
@ -28,7 +28,7 @@ if [ "$RUST_IMAGE_FULL" = "1" ]; then
|
||||||
|
|
||||||
cargo install --locked --force cargo-deny
|
cargo install --locked --force cargo-deny
|
||||||
cargo install --locked --force cargo-outdated
|
cargo install --locked --force cargo-outdated
|
||||||
cargo install --locked --force typos-cli
|
cargo install --locked --force typos-cli --version "1.19.0"
|
||||||
|
|
||||||
# Coverage tools
|
# Coverage tools
|
||||||
rustup component add llvm-tools-preview
|
rustup component add llvm-tools-preview
|
||||||
|
|
|
@ -11,13 +11,10 @@ get_features() {
|
||||||
crate=$1
|
crate=$1
|
||||||
case "$crate" in
|
case "$crate" in
|
||||||
gstreamer-audio|gstreamer-editing-services|gstreamer-gl|gstreamer-pbutils|gstreamer-rtp|gstreamer-rtsp|gstreamer-video|gstreamer)
|
gstreamer-audio|gstreamer-editing-services|gstreamer-gl|gstreamer-pbutils|gstreamer-rtp|gstreamer-rtsp|gstreamer-video|gstreamer)
|
||||||
echo "--features=serde,v1_24"
|
echo "--features=serde,v1_26"
|
||||||
;;
|
|
||||||
gstreamer-analytics)
|
|
||||||
echo ""
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "--features=v1_24"
|
echo "--features=v1_26"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,11 +13,14 @@ for crate in gstreamer*/sys gstreamer-gl/*/sys; do
|
||||||
done
|
done
|
||||||
|
|
||||||
for crate in gstreamer/sys \
|
for crate in gstreamer/sys \
|
||||||
|
gstreamer-allocators/sys \
|
||||||
|
gstreamer-analytics/sys \
|
||||||
gstreamer-app/sys \
|
gstreamer-app/sys \
|
||||||
gstreamer-audio/sys \
|
gstreamer-audio/sys \
|
||||||
gstreamer-base/sys \
|
gstreamer-base/sys \
|
||||||
gstreamer-check/sys \
|
gstreamer-check/sys \
|
||||||
gstreamer-controller/sys \
|
gstreamer-controller/sys \
|
||||||
|
gstreamer-editing-services/sys \
|
||||||
gstreamer-gl/sys \
|
gstreamer-gl/sys \
|
||||||
gstreamer-gl/egl/sys \
|
gstreamer-gl/egl/sys \
|
||||||
gstreamer-gl/wayland/sys \
|
gstreamer-gl/wayland/sys \
|
||||||
|
@ -25,11 +28,14 @@ for crate in gstreamer/sys \
|
||||||
gstreamer-mpegts/sys \
|
gstreamer-mpegts/sys \
|
||||||
gstreamer-net/sys \
|
gstreamer-net/sys \
|
||||||
gstreamer-pbutils/sys \
|
gstreamer-pbutils/sys \
|
||||||
|
gstreamer-play/sys \
|
||||||
gstreamer-player/sys \
|
gstreamer-player/sys \
|
||||||
|
gstreamer-rtp/sys \
|
||||||
gstreamer-rtsp-server/sys \
|
gstreamer-rtsp-server/sys \
|
||||||
gstreamer-rtsp/sys \
|
gstreamer-rtsp/sys \
|
||||||
gstreamer-sdp/sys \
|
gstreamer-sdp/sys \
|
||||||
gstreamer-tag/sys \
|
gstreamer-tag/sys \
|
||||||
|
gstreamer-validate/sys \
|
||||||
gstreamer-video/sys \
|
gstreamer-video/sys \
|
||||||
gstreamer-webrtc/sys; do
|
gstreamer-webrtc/sys; do
|
||||||
echo "Testing $crate with --all-features)"
|
echo "Testing $crate with --all-features)"
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
# 'gstreamer-gl/egl',
|
# 'gstreamer-gl/egl',
|
||||||
# 'gstreamer-gl/wayland',
|
# 'gstreamer-gl/wayland',
|
||||||
# 'gstreamer-gl/x11',
|
# 'gstreamer-gl/x11',
|
||||||
# only has sys
|
'gstreamer-mpegts',
|
||||||
# 'gstreamer-mpegts',
|
|
||||||
'gstreamer-mpegts/sys',
|
'gstreamer-mpegts/sys',
|
||||||
'gstreamer-net',
|
'gstreamer-net',
|
||||||
'gstreamer-pbutils',
|
'gstreamer-pbutils',
|
||||||
|
@ -26,8 +25,7 @@
|
||||||
'gstreamer-rtsp',
|
'gstreamer-rtsp',
|
||||||
'gstreamer-rtsp-server',
|
'gstreamer-rtsp-server',
|
||||||
'gstreamer-sdp',
|
'gstreamer-sdp',
|
||||||
# only has sys
|
'gstreamer-tag',
|
||||||
# 'gstreamer-tag',
|
|
||||||
'gstreamer-tag/sys',
|
'gstreamer-tag/sys',
|
||||||
'gstreamer-video',
|
'gstreamer-video',
|
||||||
'gstreamer-webrtc',
|
'gstreamer-webrtc',
|
||||||
|
|
|
@ -4,7 +4,7 @@ FROM "registry.freedesktop.org/gstreamer/gstreamer/amd64/windows:2023-07-17.0-ma
|
||||||
|
|
||||||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
||||||
|
|
||||||
ARG DEFAULT_BRANCH="main"
|
ARG DEFAULT_BRANCH="1.24"
|
||||||
ARG RUST_VERSION="invalid"
|
ARG RUST_VERSION="invalid"
|
||||||
|
|
||||||
RUN choco install -y pkgconfiglite nasm llvm openssl
|
RUN choco install -y pkgconfiglite nasm llvm openssl
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
|
||||||
|
|
||||||
# Download gstreamer and all its subprojects
|
# Download gstreamer and all its subprojects
|
||||||
git clone -b 1.1.0 --depth 1 https://code.videolan.org/videolan/dav1d.git C:\dav1d
|
git clone -b 1.4.1 --depth 1 https://code.videolan.org/videolan/dav1d.git C:\dav1d
|
||||||
if (!$?) {
|
if (!$?) {
|
||||||
Write-Host "Failed to clone dav1d"
|
Write-Host "Failed to clone dav1d"
|
||||||
Exit 1
|
Exit 1
|
||||||
|
|
|
@ -45,7 +45,7 @@ data-encoding = "2.0"
|
||||||
once_cell = "1"
|
once_cell = "1"
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
windows = { version = "0.52", features=["Win32_Graphics_Direct3D11",
|
windows = { version = "0.56", features=["Win32_Graphics_Direct3D11",
|
||||||
"Win32_Foundation", "Win32_Graphics_Direct3D", "Win32_Graphics_Dxgi",
|
"Win32_Foundation", "Win32_Graphics_Direct3D", "Win32_Graphics_Dxgi",
|
||||||
"Win32_Graphics_Dxgi_Common", "Win32_Graphics_Direct2D",
|
"Win32_Graphics_Dxgi_Common", "Win32_Graphics_Direct2D",
|
||||||
"Win32_Graphics_Direct2D_Common", "Win32_Graphics_DirectWrite",
|
"Win32_Graphics_Direct2D_Common", "Win32_Graphics_DirectWrite",
|
||||||
|
@ -204,3 +204,6 @@ required-features = ["cairo-rs", "gst-video/v1_18"]
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "d3d11videosink"
|
name = "d3d11videosink"
|
||||||
required-features = ["windows"]
|
required-features = ["windows"]
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "audio_multichannel_interleave"
|
||||||
|
|
153
examples/src/bin/audio_multichannel_interleave.rs
Normal file
153
examples/src/bin/audio_multichannel_interleave.rs
Normal file
|
@ -0,0 +1,153 @@
|
||||||
|
// This example demonstrates how to mix multiple audio
|
||||||
|
// streams into a single output using the audiomixer element.
|
||||||
|
// In this case, we're mixing 4 stereo streams into a single 8 channel output.
|
||||||
|
|
||||||
|
use gst::prelude::*;
|
||||||
|
use std::env;
|
||||||
|
|
||||||
|
#[path = "../examples-common.rs"]
|
||||||
|
mod examples_common;
|
||||||
|
|
||||||
|
const TRACKS: i32 = 4;
|
||||||
|
|
||||||
|
fn create_source_and_link(pipeline: &gst::Pipeline, mixer: &gst::Element, track_number: i32) {
|
||||||
|
let freq = ((track_number + 1) * 1000) as f64;
|
||||||
|
let audiosrc = gst::ElementFactory::make("audiotestsrc")
|
||||||
|
.property("freq", freq)
|
||||||
|
.property("num-buffers", 2000)
|
||||||
|
.build()
|
||||||
|
.unwrap();
|
||||||
|
let caps = gst_audio::AudioCapsBuilder::new().channels(2).build();
|
||||||
|
let capsfilter = gst::ElementFactory::make("capsfilter")
|
||||||
|
.property("caps", &caps)
|
||||||
|
.build()
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
pipeline.add_many([&audiosrc, &capsfilter]).unwrap();
|
||||||
|
gst::Element::link_many([&audiosrc, &capsfilter]).unwrap();
|
||||||
|
|
||||||
|
let src_pad = capsfilter.static_pad("src").unwrap();
|
||||||
|
let mixer_pad = mixer.request_pad_simple("sink_%u").unwrap();
|
||||||
|
|
||||||
|
// audiomixer expects a mix-matrix set on each input pad,
|
||||||
|
// indicating which output channels our input should appear in.
|
||||||
|
// Rows => input channels, columns => output channels.
|
||||||
|
// Here each input channel will appear in exactly one output channel.
|
||||||
|
let mut mix_matrix: Vec<Vec<f32>> = vec![];
|
||||||
|
for i in 0..TRACKS {
|
||||||
|
if i == track_number {
|
||||||
|
mix_matrix.push(vec![1.0, 0.0]);
|
||||||
|
mix_matrix.push(vec![0.0, 1.0]);
|
||||||
|
} else {
|
||||||
|
mix_matrix.push(vec![0.0, 0.0]);
|
||||||
|
mix_matrix.push(vec![0.0, 0.0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let mut audiomixer_config = gst_audio::AudioConverterConfig::new();
|
||||||
|
audiomixer_config.set_mix_matrix(&mix_matrix);
|
||||||
|
mixer_pad.set_property("converter-config", audiomixer_config);
|
||||||
|
|
||||||
|
src_pad.link(&mixer_pad).unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn example_main() {
|
||||||
|
gst::init().unwrap();
|
||||||
|
|
||||||
|
let args: Vec<_> = env::args().collect();
|
||||||
|
let output_file = if args.len() == 2 {
|
||||||
|
&args[1]
|
||||||
|
} else {
|
||||||
|
println!("Usage: audiomixer <output file>");
|
||||||
|
std::process::exit(-1);
|
||||||
|
};
|
||||||
|
|
||||||
|
let pipeline = gst::Pipeline::new();
|
||||||
|
let audiomixer = gst::ElementFactory::make("audiomixer").build().unwrap();
|
||||||
|
|
||||||
|
// Using an arbitrary layout of 4 stereo pairs.
|
||||||
|
let positions = [
|
||||||
|
gst_audio::AudioChannelPosition::FrontLeft,
|
||||||
|
gst_audio::AudioChannelPosition::FrontRight,
|
||||||
|
gst_audio::AudioChannelPosition::RearLeft,
|
||||||
|
gst_audio::AudioChannelPosition::RearRight,
|
||||||
|
gst_audio::AudioChannelPosition::SideLeft,
|
||||||
|
gst_audio::AudioChannelPosition::SideRight,
|
||||||
|
gst_audio::AudioChannelPosition::TopFrontLeft,
|
||||||
|
gst_audio::AudioChannelPosition::TopFrontRight,
|
||||||
|
];
|
||||||
|
|
||||||
|
let mask = gst_audio::AudioChannelPosition::positions_to_mask(&positions, true).unwrap();
|
||||||
|
let caps = gst_audio::AudioCapsBuilder::new()
|
||||||
|
.channels(positions.len() as i32)
|
||||||
|
.channel_mask(mask)
|
||||||
|
.build();
|
||||||
|
let capsfilter = gst::ElementFactory::make("capsfilter")
|
||||||
|
.property("caps", &caps)
|
||||||
|
.build()
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
let audioconvert = gst::ElementFactory::make("audioconvert").build().unwrap();
|
||||||
|
let audioresample = gst::ElementFactory::make("audioresample").build().unwrap();
|
||||||
|
let wavenc = gst::ElementFactory::make("wavenc").build().unwrap();
|
||||||
|
let sink = gst::ElementFactory::make("filesink")
|
||||||
|
.property("location", output_file)
|
||||||
|
.build()
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
pipeline
|
||||||
|
.add_many([
|
||||||
|
&audiomixer,
|
||||||
|
&capsfilter,
|
||||||
|
&audioconvert,
|
||||||
|
&audioresample,
|
||||||
|
&wavenc,
|
||||||
|
&sink,
|
||||||
|
])
|
||||||
|
.unwrap();
|
||||||
|
gst::Element::link_many([
|
||||||
|
&audiomixer,
|
||||||
|
&capsfilter,
|
||||||
|
&audioconvert,
|
||||||
|
&audioresample,
|
||||||
|
&wavenc,
|
||||||
|
&sink,
|
||||||
|
])
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
for i in 0..TRACKS {
|
||||||
|
create_source_and_link(&pipeline, &audiomixer, i);
|
||||||
|
}
|
||||||
|
|
||||||
|
let bus = pipeline.bus().expect("Pipeline without bus");
|
||||||
|
|
||||||
|
pipeline
|
||||||
|
.set_state(gst::State::Playing)
|
||||||
|
.expect("Unable to start pipeline");
|
||||||
|
|
||||||
|
for msg in bus.iter_timed(gst::ClockTime::NONE) {
|
||||||
|
use gst::MessageView;
|
||||||
|
match msg.view() {
|
||||||
|
MessageView::Eos(..) => break,
|
||||||
|
MessageView::Error(err) => {
|
||||||
|
eprintln!(
|
||||||
|
"Error from {:?}: {} ({:?})",
|
||||||
|
msg.src().map(|s| s.path_string()),
|
||||||
|
err.error(),
|
||||||
|
err.debug()
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline
|
||||||
|
.set_state(gst::State::Null)
|
||||||
|
.expect("Unable to change pipeline state to NULL");
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
// tutorials_common::run is only required to set up the application environment on macOS
|
||||||
|
// (but not necessary in normal Cocoa applications where this is set up automatically)
|
||||||
|
examples_common::run(example_main);
|
||||||
|
}
|
|
@ -194,7 +194,7 @@ fn main() -> Result<()> {
|
||||||
let mut metrics = DWRITE_TEXT_METRICS::default();
|
let mut metrics = DWRITE_TEXT_METRICS::default();
|
||||||
layout.GetMetrics(&mut metrics).unwrap();
|
layout.GetMetrics(&mut metrics).unwrap();
|
||||||
layout
|
layout
|
||||||
.GetFontSize2(0, &mut font_size, Some(&mut range))
|
.GetFontSize(0, &mut font_size, Some(&mut range))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
if metrics.widthIncludingTrailingWhitespace >= desc.Width as f32 {
|
if metrics.widthIncludingTrailingWhitespace >= desc.Width as f32 {
|
||||||
|
|
|
@ -36,14 +36,14 @@ fn example_main() {
|
||||||
// For flags handling
|
// For flags handling
|
||||||
// With flags, one can configure playbin's behavior such as whether it
|
// With flags, one can configure playbin's behavior such as whether it
|
||||||
// should play back contained video streams, or if it should render subtitles.
|
// should play back contained video streams, or if it should render subtitles.
|
||||||
// let flags = playbin.get_property("flags").unwrap();
|
// let flags = playbin.property_value("flags");
|
||||||
// let flags_class = FlagsClass::new(flags.type_()).unwrap();
|
// let flags_class = FlagsClass::with_type(flags.type_()).unwrap();
|
||||||
// let flags = flags_class.builder_with_value(flags).unwrap()
|
// let flags = flags_class.builder_with_value(flags).unwrap()
|
||||||
// .unset_by_nick("text")
|
// .unset_by_nick("text")
|
||||||
// .unset_by_nick("video")
|
// .unset_by_nick("video")
|
||||||
// .build()
|
// .build()
|
||||||
// .unwrap();
|
// .unwrap();
|
||||||
// playbin.set_property_from_value("flags", &flags).unwrap();
|
// playbin.set_property_from_value("flags", &flags);
|
||||||
|
|
||||||
// The playbin also provides any kind of metadata that it found in the played stream.
|
// The playbin also provides any kind of metadata that it found in the played stream.
|
||||||
// For this, the playbin provides signals notifying about changes in the metadata.
|
// For this, the playbin provides signals notifying about changes in the metadata.
|
||||||
|
|
|
@ -138,7 +138,11 @@ mod auth {
|
||||||
if let Some(authorization) = auth_credentials.authorization() {
|
if let Some(authorization) = auth_credentials.authorization() {
|
||||||
if let Some(user) = self.external_auth(authorization) {
|
if let Some(user) = self.external_auth(authorization) {
|
||||||
// Update context token with authenticated username
|
// Update context token with authenticated username
|
||||||
ctx.set_token(gst_rtsp_server::RTSPToken::new(&[("user", &user)]));
|
ctx.set_token(
|
||||||
|
gst_rtsp_server::RTSPToken::builder()
|
||||||
|
.field("user", user)
|
||||||
|
.build(),
|
||||||
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
// send to the server. For this, the launch syntax pipeline, that is passed
|
// send to the server. For this, the launch syntax pipeline, that is passed
|
||||||
// to this example's cli is spawned and the client's media is streamed into it.
|
// to this example's cli is spawned and the client's media is streamed into it.
|
||||||
|
|
||||||
use std::{env, ptr};
|
use std::env;
|
||||||
|
|
||||||
use anyhow::Error;
|
use anyhow::Error;
|
||||||
use derive_more::{Display, Error};
|
use derive_more::{Display, Error};
|
||||||
use glib::translate::*;
|
|
||||||
use gst_rtsp_server::prelude::*;
|
use gst_rtsp_server::prelude::*;
|
||||||
|
|
||||||
#[path = "../examples-common.rs"]
|
#[path = "../examples-common.rs"]
|
||||||
|
@ -45,10 +44,9 @@ fn main_loop() -> Result<(), Error> {
|
||||||
// Here we configure a method of authentication that we want the
|
// Here we configure a method of authentication that we want the
|
||||||
// server to require from clients.
|
// server to require from clients.
|
||||||
let auth = gst_rtsp_server::RTSPAuth::new();
|
let auth = gst_rtsp_server::RTSPAuth::new();
|
||||||
let token = gst_rtsp_server::RTSPToken::new(&[(
|
let token = gst_rtsp_server::RTSPToken::builder()
|
||||||
gst_rtsp_server::RTSP_TOKEN_MEDIA_FACTORY_ROLE,
|
.field(gst_rtsp_server::RTSP_TOKEN_MEDIA_FACTORY_ROLE, "user")
|
||||||
&"user",
|
.build();
|
||||||
)]);
|
|
||||||
let basic = gst_rtsp_server::RTSPAuth::make_basic("user", "password");
|
let basic = gst_rtsp_server::RTSPAuth::make_basic("user", "password");
|
||||||
// For proper authentication, we want to use encryption. And there's no
|
// For proper authentication, we want to use encryption. And there's no
|
||||||
// encryption without a certificate!
|
// encryption without a certificate!
|
||||||
|
@ -78,24 +76,14 @@ fn main_loop() -> Result<(), Error> {
|
||||||
W535W8UBbEg=-----END PRIVATE KEY-----",
|
W535W8UBbEg=-----END PRIVATE KEY-----",
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
// Bindable versions were added in b1f515178a363df0322d7adbd5754e1f6e2083c9
|
|
||||||
// This declares that the user "user" (once authenticated) has a role that
|
// This declares that the user "user" (once authenticated) has a role that
|
||||||
// allows them to access and construct media factories.
|
// allows them to access and construct media factories.
|
||||||
unsafe {
|
factory.add_role_from_structure(
|
||||||
gst_rtsp_server::ffi::gst_rtsp_media_factory_add_role(
|
&gst::Structure::builder("user")
|
||||||
factory.to_glib_none().0,
|
.field(gst_rtsp_server::RTSP_PERM_MEDIA_FACTORY_ACCESS, true)
|
||||||
"user".to_glib_none().0,
|
.field(gst_rtsp_server::RTSP_PERM_MEDIA_FACTORY_CONSTRUCT, true)
|
||||||
gst_rtsp_server::RTSP_PERM_MEDIA_FACTORY_ACCESS
|
.build(),
|
||||||
.to_glib_none()
|
);
|
||||||
.0,
|
|
||||||
<bool as StaticType>::static_type().into_glib() as *const u8,
|
|
||||||
true.into_glib() as *const u8,
|
|
||||||
gst_rtsp_server::RTSP_PERM_MEDIA_FACTORY_CONSTRUCT.as_ptr() as *const u8,
|
|
||||||
<bool as StaticType>::static_type().into_glib() as *const u8,
|
|
||||||
true.into_glib() as *const u8,
|
|
||||||
ptr::null_mut::<u8>(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
auth.set_tls_certificate(Some(&cert));
|
auth.set_tls_certificate(Some(&cert));
|
||||||
auth.add_basic(basic.as_str(), &token);
|
auth.add_basic(basic.as_str(), &token);
|
||||||
|
|
|
@ -19,10 +19,6 @@ mod examples_common;
|
||||||
#[display(fmt = "Could not get mount points")]
|
#[display(fmt = "Could not get mount points")]
|
||||||
struct NoMountPoints;
|
struct NoMountPoints;
|
||||||
|
|
||||||
#[derive(Debug, Display, Error)]
|
|
||||||
#[display(fmt = "Usage: {_0} LAUNCH_LINE")]
|
|
||||||
struct UsageError(#[error(not(source))] String);
|
|
||||||
|
|
||||||
fn main_loop() -> Result<(), Error> {
|
fn main_loop() -> Result<(), Error> {
|
||||||
let main_loop = glib::MainLoop::new(None, false);
|
let main_loop = glib::MainLoop::new(None, false);
|
||||||
let server = server::Server::default();
|
let server = server::Server::default();
|
||||||
|
|
2
gir
2
gir
|
@ -1 +1 @@
|
||||||
Subproject commit 5975266da3b0fa1195e53213502a8c9bc5d9b1ac
|
Subproject commit 5223ce91b97a833b09d6cbd04bbeab1bf18112b7
|
|
@ -1 +1 @@
|
||||||
Subproject commit fe8258109e602dcb000890197b62f832006c715a
|
Subproject commit 6cd7b656acd61172ab7f125a7059e4d0ecfc9637
|
|
@ -1 +1 @@
|
||||||
Subproject commit 63e90a30193bf8d228057c4570a50a0a2b40f2bd
|
Subproject commit c988e03b5e99349efb8ffb6f502879ad4ddbc248
|
|
@ -30,6 +30,7 @@ v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"]
|
v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"]
|
||||||
|
v1_26 = ["gst/v1_26", "ffi/v1_26", "v1_24"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -56,6 +56,8 @@ pub use phys_memory::*;
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub use gst::prelude::*;
|
pub use gst::prelude::*;
|
||||||
|
|
||||||
|
pub use crate::auto::traits::*;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub mod subclass;
|
pub mod subclass;
|
||||||
|
|
|
@ -23,6 +23,7 @@ v1_18 = ["v1_16"]
|
||||||
v1_20 = ["v1_18"]
|
v1_20 = ["v1_18"]
|
||||||
v1_22 = ["v1_20"]
|
v1_22 = ["v1_20"]
|
||||||
v1_24 = ["v1_22"]
|
v1_24 = ["v1_22"]
|
||||||
|
v1_26 = ["v1_24"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "gstreamer_allocators_sys"
|
name = "gstreamer_allocators_sys"
|
||||||
|
@ -77,4 +78,7 @@ version = "1.20"
|
||||||
version = "1.22"
|
version = "1.22"
|
||||||
|
|
||||||
[package.metadata.system-deps.gstreamer_allocators_1_0.v1_24]
|
[package.metadata.system-deps.gstreamer_allocators_1_0.v1_24]
|
||||||
version = "1.23"
|
version = "1.24"
|
||||||
|
|
||||||
|
[package.metadata.system-deps.gstreamer_allocators_1_0.v1_26]
|
||||||
|
version = "1.25"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -19,8 +19,11 @@ use gstreamer_sys as gst;
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use libc::{
|
use libc::{
|
||||||
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
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, uintptr_t, FILE,
|
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
|
||||||
};
|
};
|
||||||
|
#[cfg(unix)]
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use glib::{gboolean, gconstpointer, gpointer, GType};
|
use glib::{gboolean, gconstpointer, gpointer, GType};
|
||||||
|
|
|
@ -24,6 +24,7 @@ gir-format-check = "0.1"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
v1_26 = ["gst/v1_26", "ffi/v1_26"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -60,13 +60,13 @@ impl<'a> AnalyticsRelationMetaODExt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default, Debug)]
|
#[derive(Clone, Copy, Default, Debug)]
|
||||||
pub struct AnalyticsODLocation {
|
pub struct AnalyticsODLocation {
|
||||||
x: i32,
|
pub x: i32,
|
||||||
y: i32,
|
pub y: i32,
|
||||||
w: i32,
|
pub w: i32,
|
||||||
h: i32,
|
pub h: i32,
|
||||||
loc_conf_lvl: f32,
|
pub loc_conf_lvl: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe impl AnalyticsMtd for AnalyticsODMtd {
|
unsafe impl AnalyticsMtd for AnalyticsODMtd {
|
||||||
|
@ -82,11 +82,15 @@ unsafe fn from(t: ffi::GstAnalyticsMtd) -> ffi::GstAnalyticsODMtd {
|
||||||
|
|
||||||
impl<'a> AnalyticsMtdRef<'a, AnalyticsODMtd> {
|
impl<'a> AnalyticsMtdRef<'a, AnalyticsODMtd> {
|
||||||
#[doc(alias = "gst_analytics_od_mtd_get_obj_type")]
|
#[doc(alias = "gst_analytics_od_mtd_get_obj_type")]
|
||||||
pub fn obj_type(&self) -> glib::Quark {
|
pub fn obj_type(&self) -> Option<glib::Quark> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut mtd = from(ffi::GstAnalyticsMtd::unsafe_from(self));
|
let mut mtd = from(ffi::GstAnalyticsMtd::unsafe_from(self));
|
||||||
let type_ = ffi::gst_analytics_od_mtd_get_obj_type(&mut mtd);
|
let type_ = ffi::gst_analytics_od_mtd_get_obj_type(&mut mtd);
|
||||||
glib::Quark::from_glib(type_)
|
if type_ == 0 {
|
||||||
|
None
|
||||||
|
} else {
|
||||||
|
Some(glib::Quark::from_glib(type_))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +147,7 @@ mod tests {
|
||||||
.add_od_mtd(glib::Quark::from_str("blb"), 0, 1, 10, 20, 0.8)
|
.add_od_mtd(glib::Quark::from_str("blb"), 0, 1, 10, 20, 0.8)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
assert_eq!(od.obj_type(), glib::Quark::from_str("blb"));
|
assert_eq!(od.obj_type().unwrap(), glib::Quark::from_str("blb"));
|
||||||
|
|
||||||
let loc = od.location().unwrap();
|
let loc = od.location().unwrap();
|
||||||
|
|
||||||
|
@ -159,7 +163,7 @@ mod tests {
|
||||||
let meta2 = buf.meta::<AnalyticsRelationMeta>().unwrap();
|
let meta2 = buf.meta::<AnalyticsRelationMeta>().unwrap();
|
||||||
let od2 = meta2.mtd::<AnalyticsODMtd>(0).unwrap();
|
let od2 = meta2.mtd::<AnalyticsODMtd>(0).unwrap();
|
||||||
|
|
||||||
assert_eq!(od2.obj_type(), glib::Quark::from_str("blb"));
|
assert_eq!(od2.obj_type().unwrap(), glib::Quark::from_str("blb"));
|
||||||
let loc = od2.location().unwrap();
|
let loc = od2.location().unwrap();
|
||||||
|
|
||||||
assert_eq!(loc.x, 0);
|
assert_eq!(loc.x, 0);
|
||||||
|
|
|
@ -652,13 +652,13 @@ mod tests {
|
||||||
assert_eq!(meta.len(), meta.iter::<AnalyticsAnyMtd>().count());
|
assert_eq!(meta.len(), meta.iter::<AnalyticsAnyMtd>().count());
|
||||||
assert_eq!(meta.len(), meta.iter::<AnalyticsODMtd>().count());
|
assert_eq!(meta.len(), meta.iter::<AnalyticsODMtd>().count());
|
||||||
for mtd in meta.iter::<AnalyticsODMtd>() {
|
for mtd in meta.iter::<AnalyticsODMtd>() {
|
||||||
assert_eq!(mtd.obj_type(), glib::Quark::from_str("blb"))
|
assert_eq!(mtd.obj_type().unwrap(), glib::Quark::from_str("blb"))
|
||||||
}
|
}
|
||||||
|
|
||||||
assert_eq!(meta.len(), meta.iter::<AnalyticsAnyMtd>().count());
|
assert_eq!(meta.len(), meta.iter::<AnalyticsAnyMtd>().count());
|
||||||
for mtd in meta.iter::<AnalyticsAnyMtd>() {
|
for mtd in meta.iter::<AnalyticsAnyMtd>() {
|
||||||
if let Ok(mtd) = mtd.downcast::<AnalyticsODMtd>() {
|
if let Ok(mtd) = mtd.downcast::<AnalyticsODMtd>() {
|
||||||
assert_eq!(mtd.obj_type(), glib::Quark::from_str("blb"))
|
assert_eq!(mtd.obj_type().unwrap(), glib::Quark::from_str("blb"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -689,7 +689,7 @@ mod tests {
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
for mtd in meta.iter_direct_related::<AnalyticsODMtd>(od1_id, crate::RelTypes::IS_PART_OF) {
|
for mtd in meta.iter_direct_related::<AnalyticsODMtd>(od1_id, crate::RelTypes::IS_PART_OF) {
|
||||||
assert_eq!(mtd.obj_type(), glib::Quark::from_str("blb"))
|
assert_eq!(mtd.obj_type().unwrap(), glib::Quark::from_str("blb"))
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut meta = buf.make_mut().meta_mut::<AnalyticsRelationMeta>().unwrap();
|
let mut meta = buf.make_mut().meta_mut::<AnalyticsRelationMeta>().unwrap();
|
||||||
|
|
|
@ -52,6 +52,10 @@ rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
|
||||||
|
|
||||||
[package.metadata.system-deps.gstreamer_analytics_1_0]
|
[package.metadata.system-deps.gstreamer_analytics_1_0]
|
||||||
name = "gstreamer-analytics-1.0"
|
name = "gstreamer-analytics-1.0"
|
||||||
version = "1.23"
|
version = "1.24"
|
||||||
|
|
||||||
|
[package.metadata.system-deps.gstreamer_analytics_1_0.v1_26]
|
||||||
|
version = "1.25"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
v1_26 = []
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -18,8 +18,11 @@ use gstreamer_sys as gst;
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use libc::{
|
use libc::{
|
||||||
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
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, uintptr_t, FILE,
|
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
|
||||||
};
|
};
|
||||||
|
#[cfg(unix)]
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use glib::{gboolean, gconstpointer, gpointer, GType};
|
use glib::{gboolean, gconstpointer, gpointer, GType};
|
||||||
|
@ -28,7 +31,6 @@ use glib::{gboolean, gconstpointer, gpointer, GType};
|
||||||
pub type GstAnalyticsMtdType = uintptr_t;
|
pub type GstAnalyticsMtdType = uintptr_t;
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
pub const GST_AN_RELATION_META_TAG: &[u8] = b"GST-ANALYSIS-RELATION-META-TAG\0";
|
|
||||||
pub const GST_INF_RELATION_SPAN: c_int = -1;
|
pub const GST_INF_RELATION_SPAN: c_int = -1;
|
||||||
pub const GST_ANALYTICS_MTD_TYPE_ANY: c_int = 0;
|
pub const GST_ANALYTICS_MTD_TYPE_ANY: c_int = 0;
|
||||||
|
|
||||||
|
@ -95,7 +97,6 @@ impl ::std::fmt::Debug for GstAnalyticsMtdImpl {
|
||||||
f.debug_struct(&format!("GstAnalyticsMtdImpl @ {self:p}"))
|
f.debug_struct(&format!("GstAnalyticsMtdImpl @ {self:p}"))
|
||||||
.field("name", &self.name)
|
.field("name", &self.name)
|
||||||
.field("mtd_meta_transform", &self.mtd_meta_transform)
|
.field("mtd_meta_transform", &self.mtd_meta_transform)
|
||||||
.field("_reserved", &self._reserved)
|
|
||||||
.finish()
|
.finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -268,6 +268,5 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
|
||||||
("(guint) GST_ANALYTICS_REL_TYPE_LAST", "16"),
|
("(guint) GST_ANALYTICS_REL_TYPE_LAST", "16"),
|
||||||
("(guint) GST_ANALYTICS_REL_TYPE_NONE", "0"),
|
("(guint) GST_ANALYTICS_REL_TYPE_NONE", "0"),
|
||||||
("(guint) GST_ANALYTICS_REL_TYPE_RELATE_TO", "8"),
|
("(guint) GST_ANALYTICS_REL_TYPE_RELATE_TO", "8"),
|
||||||
("GST_AN_RELATION_META_TAG", "GST-ANALYSIS-RELATION-META-TAG"),
|
|
||||||
("GST_INF_RELATION_SPAN", "-1"),
|
("GST_INF_RELATION_SPAN", "-1"),
|
||||||
];
|
];
|
||||||
|
|
|
@ -36,7 +36,6 @@ int main() {
|
||||||
PRINT_CONSTANT((guint) GST_ANALYTICS_REL_TYPE_LAST);
|
PRINT_CONSTANT((guint) GST_ANALYTICS_REL_TYPE_LAST);
|
||||||
PRINT_CONSTANT((guint) GST_ANALYTICS_REL_TYPE_NONE);
|
PRINT_CONSTANT((guint) GST_ANALYTICS_REL_TYPE_NONE);
|
||||||
PRINT_CONSTANT((guint) GST_ANALYTICS_REL_TYPE_RELATE_TO);
|
PRINT_CONSTANT((guint) GST_ANALYTICS_REL_TYPE_RELATE_TO);
|
||||||
PRINT_CONSTANT(GST_AN_RELATION_META_TAG);
|
|
||||||
PRINT_CONSTANT(GST_INF_RELATION_SPAN);
|
PRINT_CONSTANT(GST_INF_RELATION_SPAN);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ v1_18 = ["gst/v1_18", "gst-base/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "gst-base/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "gst-base/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "gst-base/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "gst-base/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
v1_24 = ["gst/v1_24", "gst-base/v1_24", "ffi/v1_24", "v1_22"]
|
v1_24 = ["gst/v1_24", "gst-base/v1_24", "ffi/v1_24", "v1_22"]
|
||||||
|
v1_26 = ["gst/v1_26", "gst-base/v1_26", "ffi/v1_26", "v1_24"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
|
|
@ -4,13 +4,13 @@ use std::{
|
||||||
mem, panic,
|
mem, panic,
|
||||||
pin::Pin,
|
pin::Pin,
|
||||||
ptr,
|
ptr,
|
||||||
sync::{
|
sync::{Arc, Mutex},
|
||||||
atomic::{AtomicBool, Ordering},
|
|
||||||
Arc, Mutex,
|
|
||||||
},
|
|
||||||
task::{Context, Poll, Waker},
|
task::{Context, Poll, Waker},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(not(panic = "abort"))]
|
||||||
|
use std::sync::atomic::{AtomicBool, Ordering};
|
||||||
|
|
||||||
use futures_core::Stream;
|
use futures_core::Stream;
|
||||||
use glib::{ffi::gpointer, prelude::*, translate::*};
|
use glib::{ffi::gpointer, prelude::*, translate::*};
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ pub struct AppSinkCallbacks {
|
||||||
new_event: Option<Box<dyn FnMut(&AppSink) -> bool + Send + 'static>>,
|
new_event: Option<Box<dyn FnMut(&AppSink) -> bool + Send + 'static>>,
|
||||||
propose_allocation:
|
propose_allocation:
|
||||||
Option<Box<dyn FnMut(&AppSink, &mut gst::query::Allocation) -> bool + Send + 'static>>,
|
Option<Box<dyn FnMut(&AppSink, &mut gst::query::Allocation) -> bool + Send + 'static>>,
|
||||||
|
#[cfg(not(panic = "abort"))]
|
||||||
panicked: AtomicBool,
|
panicked: AtomicBool,
|
||||||
callbacks: ffi::GstAppSinkCallbacks,
|
callbacks: ffi::GstAppSinkCallbacks,
|
||||||
}
|
}
|
||||||
|
@ -71,6 +72,14 @@ impl AppSinkCallbacksBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn eos_if_some<F: FnMut(&AppSink) + Send + 'static>(self, eos: Option<F>) -> Self {
|
||||||
|
if let Some(eos) = eos {
|
||||||
|
self.eos(eos)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn new_preroll<
|
pub fn new_preroll<
|
||||||
F: FnMut(&AppSink) -> Result<gst::FlowSuccess, gst::FlowError> + Send + 'static,
|
F: FnMut(&AppSink) -> Result<gst::FlowSuccess, gst::FlowError> + Send + 'static,
|
||||||
>(
|
>(
|
||||||
|
@ -83,6 +92,19 @@ impl AppSinkCallbacksBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn new_preroll_if_some<
|
||||||
|
F: FnMut(&AppSink) -> Result<gst::FlowSuccess, gst::FlowError> + Send + 'static,
|
||||||
|
>(
|
||||||
|
self,
|
||||||
|
new_preroll: Option<F>,
|
||||||
|
) -> Self {
|
||||||
|
if let Some(new_preroll) = new_preroll {
|
||||||
|
self.new_preroll(new_preroll)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn new_sample<
|
pub fn new_sample<
|
||||||
F: FnMut(&AppSink) -> Result<gst::FlowSuccess, gst::FlowError> + Send + 'static,
|
F: FnMut(&AppSink) -> Result<gst::FlowSuccess, gst::FlowError> + Send + 'static,
|
||||||
>(
|
>(
|
||||||
|
@ -95,6 +117,19 @@ impl AppSinkCallbacksBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn new_sample_if_some<
|
||||||
|
F: FnMut(&AppSink) -> Result<gst::FlowSuccess, gst::FlowError> + Send + 'static,
|
||||||
|
>(
|
||||||
|
self,
|
||||||
|
new_sample: Option<F>,
|
||||||
|
) -> Self {
|
||||||
|
if let Some(new_sample) = new_sample {
|
||||||
|
self.new_sample(new_sample)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_20")]
|
#[cfg(feature = "v1_20")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
||||||
pub fn new_event<F: FnMut(&AppSink) -> bool + Send + 'static>(self, new_event: F) -> Self {
|
pub fn new_event<F: FnMut(&AppSink) -> bool + Send + 'static>(self, new_event: F) -> Self {
|
||||||
|
@ -104,6 +139,19 @@ impl AppSinkCallbacksBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "v1_20")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
||||||
|
pub fn new_event_if_some<F: FnMut(&AppSink) -> bool + Send + 'static>(
|
||||||
|
self,
|
||||||
|
new_event: Option<F>,
|
||||||
|
) -> Self {
|
||||||
|
if let Some(new_event) = new_event {
|
||||||
|
self.new_event(new_event)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_24")]
|
#[cfg(feature = "v1_24")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
pub fn propose_allocation<
|
pub fn propose_allocation<
|
||||||
|
@ -118,6 +166,21 @@ impl AppSinkCallbacksBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "v1_24")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
|
pub fn propose_allocation_if_some<
|
||||||
|
F: FnMut(&AppSink, &mut gst::query::Allocation) -> bool + Send + 'static,
|
||||||
|
>(
|
||||||
|
self,
|
||||||
|
propose_allocation: Option<F>,
|
||||||
|
) -> Self {
|
||||||
|
if let Some(propose_allocation) = propose_allocation {
|
||||||
|
self.propose_allocation(propose_allocation)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[must_use = "Building the callbacks without using them has no effect"]
|
#[must_use = "Building the callbacks without using them has no effect"]
|
||||||
pub fn build(self) -> AppSinkCallbacks {
|
pub fn build(self) -> AppSinkCallbacks {
|
||||||
let have_eos = self.eos.is_some();
|
let have_eos = self.eos.is_some();
|
||||||
|
@ -132,6 +195,7 @@ impl AppSinkCallbacksBuilder {
|
||||||
new_sample: self.new_sample,
|
new_sample: self.new_sample,
|
||||||
new_event: self.new_event,
|
new_event: self.new_event,
|
||||||
propose_allocation: self.propose_allocation,
|
propose_allocation: self.propose_allocation,
|
||||||
|
#[cfg(not(panic = "abort"))]
|
||||||
panicked: AtomicBool::new(false),
|
panicked: AtomicBool::new(false),
|
||||||
callbacks: ffi::GstAppSinkCallbacks {
|
callbacks: ffi::GstAppSinkCallbacks {
|
||||||
eos: if have_eos { Some(trampoline_eos) } else { None },
|
eos: if have_eos { Some(trampoline_eos) } else { None },
|
||||||
|
@ -165,6 +229,7 @@ unsafe extern "C" fn trampoline_eos(appsink: *mut ffi::GstAppSink, callbacks: gp
|
||||||
let callbacks = callbacks as *mut AppSinkCallbacks;
|
let callbacks = callbacks as *mut AppSinkCallbacks;
|
||||||
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
||||||
|
|
||||||
|
#[cfg(not(panic = "abort"))]
|
||||||
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
||||||
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
||||||
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
||||||
|
@ -176,12 +241,19 @@ unsafe extern "C" fn trampoline_eos(appsink: *mut ffi::GstAppSink, callbacks: gp
|
||||||
match result {
|
match result {
|
||||||
Ok(result) => result,
|
Ok(result) => result,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
#[cfg(panic = "abort")]
|
||||||
gst::subclass::post_panic_error_message(
|
{
|
||||||
element.upcast_ref(),
|
unreachable!("{err:?}");
|
||||||
element.upcast_ref(),
|
}
|
||||||
Some(err),
|
#[cfg(not(panic = "abort"))]
|
||||||
);
|
{
|
||||||
|
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
||||||
|
gst::subclass::post_panic_error_message(
|
||||||
|
element.upcast_ref(),
|
||||||
|
element.upcast_ref(),
|
||||||
|
Some(err),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,6 +266,7 @@ unsafe extern "C" fn trampoline_new_preroll(
|
||||||
let callbacks = callbacks as *mut AppSinkCallbacks;
|
let callbacks = callbacks as *mut AppSinkCallbacks;
|
||||||
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
||||||
|
|
||||||
|
#[cfg(not(panic = "abort"))]
|
||||||
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
||||||
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
||||||
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
||||||
|
@ -205,14 +278,21 @@ unsafe extern "C" fn trampoline_new_preroll(
|
||||||
match result {
|
match result {
|
||||||
Ok(result) => result,
|
Ok(result) => result,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
#[cfg(panic = "abort")]
|
||||||
gst::subclass::post_panic_error_message(
|
{
|
||||||
element.upcast_ref(),
|
unreachable!("{err:?}");
|
||||||
element.upcast_ref(),
|
}
|
||||||
Some(err),
|
#[cfg(not(panic = "abort"))]
|
||||||
);
|
{
|
||||||
|
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
||||||
|
gst::subclass::post_panic_error_message(
|
||||||
|
element.upcast_ref(),
|
||||||
|
element.upcast_ref(),
|
||||||
|
Some(err),
|
||||||
|
);
|
||||||
|
|
||||||
gst::FlowReturn::Error
|
gst::FlowReturn::Error
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -229,6 +309,7 @@ unsafe extern "C" fn trampoline_new_sample(
|
||||||
let callbacks = callbacks as *mut AppSinkCallbacks;
|
let callbacks = callbacks as *mut AppSinkCallbacks;
|
||||||
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
||||||
|
|
||||||
|
#[cfg(not(panic = "abort"))]
|
||||||
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
||||||
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
||||||
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
||||||
|
@ -240,14 +321,21 @@ unsafe extern "C" fn trampoline_new_sample(
|
||||||
match result {
|
match result {
|
||||||
Ok(result) => result,
|
Ok(result) => result,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
#[cfg(panic = "abort")]
|
||||||
gst::subclass::post_panic_error_message(
|
{
|
||||||
element.upcast_ref(),
|
unreachable!("{err:?}");
|
||||||
element.upcast_ref(),
|
}
|
||||||
Some(err),
|
#[cfg(not(panic = "abort"))]
|
||||||
);
|
{
|
||||||
|
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
||||||
|
gst::subclass::post_panic_error_message(
|
||||||
|
element.upcast_ref(),
|
||||||
|
element.upcast_ref(),
|
||||||
|
Some(err),
|
||||||
|
);
|
||||||
|
|
||||||
gst::FlowReturn::Error
|
gst::FlowReturn::Error
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -264,6 +352,7 @@ unsafe extern "C" fn trampoline_new_event(
|
||||||
let callbacks = callbacks as *mut AppSinkCallbacks;
|
let callbacks = callbacks as *mut AppSinkCallbacks;
|
||||||
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
||||||
|
|
||||||
|
#[cfg(not(panic = "abort"))]
|
||||||
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
||||||
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
||||||
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
||||||
|
@ -275,14 +364,21 @@ unsafe extern "C" fn trampoline_new_event(
|
||||||
match result {
|
match result {
|
||||||
Ok(result) => result,
|
Ok(result) => result,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
#[cfg(panic = "abort")]
|
||||||
gst::subclass::post_panic_error_message(
|
{
|
||||||
element.upcast_ref(),
|
unreachable!("{err:?}");
|
||||||
element.upcast_ref(),
|
}
|
||||||
Some(err),
|
#[cfg(not(panic = "abort"))]
|
||||||
);
|
{
|
||||||
|
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
||||||
|
gst::subclass::post_panic_error_message(
|
||||||
|
element.upcast_ref(),
|
||||||
|
element.upcast_ref(),
|
||||||
|
Some(err),
|
||||||
|
);
|
||||||
|
|
||||||
false
|
false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -300,6 +396,7 @@ unsafe extern "C" fn trampoline_propose_allocation(
|
||||||
let callbacks = callbacks as *mut AppSinkCallbacks;
|
let callbacks = callbacks as *mut AppSinkCallbacks;
|
||||||
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
||||||
|
|
||||||
|
#[cfg(not(panic = "abort"))]
|
||||||
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
||||||
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
|
||||||
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
||||||
|
@ -317,14 +414,20 @@ unsafe extern "C" fn trampoline_propose_allocation(
|
||||||
match result {
|
match result {
|
||||||
Ok(result) => result,
|
Ok(result) => result,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
#[cfg(panic = "abort")]
|
||||||
gst::subclass::post_panic_error_message(
|
{
|
||||||
element.upcast_ref(),
|
unreachable!("{err:?}");
|
||||||
element.upcast_ref(),
|
}
|
||||||
Some(err),
|
#[cfg(not(panic = "abort"))]
|
||||||
);
|
{
|
||||||
|
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
||||||
false
|
gst::subclass::post_panic_error_message(
|
||||||
|
element.upcast_ref(),
|
||||||
|
element.upcast_ref(),
|
||||||
|
Some(err),
|
||||||
|
);
|
||||||
|
false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -4,13 +4,13 @@ use std::{
|
||||||
mem, panic,
|
mem, panic,
|
||||||
pin::Pin,
|
pin::Pin,
|
||||||
ptr,
|
ptr,
|
||||||
sync::{
|
sync::{Arc, Mutex},
|
||||||
atomic::{AtomicBool, Ordering},
|
|
||||||
Arc, Mutex,
|
|
||||||
},
|
|
||||||
task::{Context, Poll, Waker},
|
task::{Context, Poll, Waker},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(not(panic = "abort"))]
|
||||||
|
use std::sync::atomic::{AtomicBool, Ordering};
|
||||||
|
|
||||||
use futures_sink::Sink;
|
use futures_sink::Sink;
|
||||||
use glib::{
|
use glib::{
|
||||||
ffi::{gboolean, gpointer},
|
ffi::{gboolean, gpointer},
|
||||||
|
@ -25,6 +25,7 @@ pub struct AppSrcCallbacks {
|
||||||
need_data: Option<Box<dyn FnMut(&AppSrc, u32) + Send + 'static>>,
|
need_data: Option<Box<dyn FnMut(&AppSrc, u32) + Send + 'static>>,
|
||||||
enough_data: Option<Box<dyn Fn(&AppSrc) + Send + Sync + 'static>>,
|
enough_data: Option<Box<dyn Fn(&AppSrc) + Send + Sync + 'static>>,
|
||||||
seek_data: Option<Box<dyn Fn(&AppSrc, u64) -> bool + Send + Sync + 'static>>,
|
seek_data: Option<Box<dyn Fn(&AppSrc, u64) -> bool + Send + Sync + 'static>>,
|
||||||
|
#[cfg(not(panic = "abort"))]
|
||||||
panicked: AtomicBool,
|
panicked: AtomicBool,
|
||||||
callbacks: ffi::GstAppSrcCallbacks,
|
callbacks: ffi::GstAppSrcCallbacks,
|
||||||
}
|
}
|
||||||
|
@ -60,6 +61,17 @@ impl AppSrcCallbacksBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn need_data_if_some<F: FnMut(&AppSrc, u32) + Send + 'static>(
|
||||||
|
self,
|
||||||
|
need_data: Option<F>,
|
||||||
|
) -> Self {
|
||||||
|
if let Some(need_data) = need_data {
|
||||||
|
self.need_data(need_data)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn enough_data<F: Fn(&AppSrc) + Send + Sync + 'static>(self, enough_data: F) -> Self {
|
pub fn enough_data<F: Fn(&AppSrc) + Send + Sync + 'static>(self, enough_data: F) -> Self {
|
||||||
Self {
|
Self {
|
||||||
enough_data: Some(Box::new(enough_data)),
|
enough_data: Some(Box::new(enough_data)),
|
||||||
|
@ -67,6 +79,17 @@ impl AppSrcCallbacksBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn enough_data_if_some<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
||||||
|
self,
|
||||||
|
enough_data: Option<F>,
|
||||||
|
) -> Self {
|
||||||
|
if let Some(enough_data) = enough_data {
|
||||||
|
self.enough_data(enough_data)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn seek_data<F: Fn(&AppSrc, u64) -> bool + Send + Sync + 'static>(
|
pub fn seek_data<F: Fn(&AppSrc, u64) -> bool + Send + Sync + 'static>(
|
||||||
self,
|
self,
|
||||||
seek_data: F,
|
seek_data: F,
|
||||||
|
@ -77,6 +100,17 @@ impl AppSrcCallbacksBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn seek_data_if_some<F: Fn(&AppSrc, u64) -> bool + Send + Sync + 'static>(
|
||||||
|
self,
|
||||||
|
seek_data: Option<F>,
|
||||||
|
) -> Self {
|
||||||
|
if let Some(seek_data) = seek_data {
|
||||||
|
self.seek_data(seek_data)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[must_use = "Building the callbacks without using them has no effect"]
|
#[must_use = "Building the callbacks without using them has no effect"]
|
||||||
pub fn build(self) -> AppSrcCallbacks {
|
pub fn build(self) -> AppSrcCallbacks {
|
||||||
let have_need_data = self.need_data.is_some();
|
let have_need_data = self.need_data.is_some();
|
||||||
|
@ -87,6 +121,7 @@ impl AppSrcCallbacksBuilder {
|
||||||
need_data: self.need_data,
|
need_data: self.need_data,
|
||||||
enough_data: self.enough_data,
|
enough_data: self.enough_data,
|
||||||
seek_data: self.seek_data,
|
seek_data: self.seek_data,
|
||||||
|
#[cfg(not(panic = "abort"))]
|
||||||
panicked: AtomicBool::new(false),
|
panicked: AtomicBool::new(false),
|
||||||
callbacks: ffi::GstAppSrcCallbacks {
|
callbacks: ffi::GstAppSrcCallbacks {
|
||||||
need_data: if have_need_data {
|
need_data: if have_need_data {
|
||||||
|
@ -123,6 +158,7 @@ unsafe extern "C" fn trampoline_need_data(
|
||||||
let callbacks = callbacks as *mut AppSrcCallbacks;
|
let callbacks = callbacks as *mut AppSrcCallbacks;
|
||||||
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
|
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
|
||||||
|
|
||||||
|
#[cfg(not(panic = "abort"))]
|
||||||
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
||||||
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
|
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
|
||||||
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
||||||
|
@ -134,12 +170,19 @@ unsafe extern "C" fn trampoline_need_data(
|
||||||
match result {
|
match result {
|
||||||
Ok(result) => result,
|
Ok(result) => result,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
#[cfg(panic = "abort")]
|
||||||
gst::subclass::post_panic_error_message(
|
{
|
||||||
element.upcast_ref(),
|
unreachable!("{err:?}");
|
||||||
element.upcast_ref(),
|
}
|
||||||
Some(err),
|
#[cfg(not(panic = "abort"))]
|
||||||
);
|
{
|
||||||
|
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
||||||
|
gst::subclass::post_panic_error_message(
|
||||||
|
element.upcast_ref(),
|
||||||
|
element.upcast_ref(),
|
||||||
|
Some(err),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,6 +192,7 @@ unsafe extern "C" fn trampoline_enough_data(appsrc: *mut ffi::GstAppSrc, callbac
|
||||||
let callbacks = callbacks as *const AppSrcCallbacks;
|
let callbacks = callbacks as *const AppSrcCallbacks;
|
||||||
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
|
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
|
||||||
|
|
||||||
|
#[cfg(not(panic = "abort"))]
|
||||||
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
||||||
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
|
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
|
||||||
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
||||||
|
@ -160,12 +204,19 @@ unsafe extern "C" fn trampoline_enough_data(appsrc: *mut ffi::GstAppSrc, callbac
|
||||||
match result {
|
match result {
|
||||||
Ok(result) => result,
|
Ok(result) => result,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
#[cfg(panic = "abort")]
|
||||||
gst::subclass::post_panic_error_message(
|
{
|
||||||
element.upcast_ref(),
|
unreachable!("{err:?}");
|
||||||
element.upcast_ref(),
|
}
|
||||||
Some(err),
|
#[cfg(not(panic = "abort"))]
|
||||||
);
|
{
|
||||||
|
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
||||||
|
gst::subclass::post_panic_error_message(
|
||||||
|
element.upcast_ref(),
|
||||||
|
element.upcast_ref(),
|
||||||
|
Some(err),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -179,6 +230,7 @@ unsafe extern "C" fn trampoline_seek_data(
|
||||||
let callbacks = callbacks as *const AppSrcCallbacks;
|
let callbacks = callbacks as *const AppSrcCallbacks;
|
||||||
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
|
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
|
||||||
|
|
||||||
|
#[cfg(not(panic = "abort"))]
|
||||||
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
if (*callbacks).panicked.load(Ordering::Relaxed) {
|
||||||
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
|
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
|
||||||
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
gst::subclass::post_panic_error_message(element.upcast_ref(), element.upcast_ref(), None);
|
||||||
|
@ -190,14 +242,21 @@ unsafe extern "C" fn trampoline_seek_data(
|
||||||
match result {
|
match result {
|
||||||
Ok(result) => result,
|
Ok(result) => result,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
#[cfg(panic = "abort")]
|
||||||
gst::subclass::post_panic_error_message(
|
{
|
||||||
element.upcast_ref(),
|
unreachable!("{err:?}");
|
||||||
element.upcast_ref(),
|
}
|
||||||
Some(err),
|
#[cfg(not(panic = "abort"))]
|
||||||
);
|
{
|
||||||
|
(*callbacks).panicked.store(true, Ordering::Relaxed);
|
||||||
|
gst::subclass::post_panic_error_message(
|
||||||
|
element.upcast_ref(),
|
||||||
|
element.upcast_ref(),
|
||||||
|
Some(err),
|
||||||
|
);
|
||||||
|
|
||||||
false
|
false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -23,6 +23,7 @@ v1_18 = ["v1_16"]
|
||||||
v1_20 = ["v1_18"]
|
v1_20 = ["v1_18"]
|
||||||
v1_22 = ["v1_20"]
|
v1_22 = ["v1_20"]
|
||||||
v1_24 = ["v1_22"]
|
v1_24 = ["v1_22"]
|
||||||
|
v1_26 = ["v1_24"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "gstreamer_app_sys"
|
name = "gstreamer_app_sys"
|
||||||
|
@ -77,4 +78,7 @@ version = "1.20"
|
||||||
version = "1.22"
|
version = "1.22"
|
||||||
|
|
||||||
[package.metadata.system-deps.gstreamer_app_1_0.v1_24]
|
[package.metadata.system-deps.gstreamer_app_1_0.v1_24]
|
||||||
version = "1.23"
|
version = "1.24"
|
||||||
|
|
||||||
|
[package.metadata.system-deps.gstreamer_app_1_0.v1_26]
|
||||||
|
version = "1.25"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -19,8 +19,11 @@ use gstreamer_sys as gst;
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use libc::{
|
use libc::{
|
||||||
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
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, uintptr_t, FILE,
|
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
|
||||||
};
|
};
|
||||||
|
#[cfg(unix)]
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use glib::{gboolean, gconstpointer, gpointer, GType};
|
use glib::{gboolean, gconstpointer, gpointer, GType};
|
||||||
|
|
|
@ -36,6 +36,7 @@ v1_18 = ["gst/v1_18", "gst-base/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "gst-base/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "gst-base/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "gst-base/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "gst-base/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
v1_24 = ["gst/v1_24", "gst-base/v1_24", "ffi/v1_24", "v1_22"]
|
v1_24 = ["gst/v1_24", "gst-base/v1_24", "ffi/v1_24", "v1_22"]
|
||||||
|
v1_26 = ["gst/v1_26", "gst-base/v1_26", "ffi/v1_26", "v1_24"]
|
||||||
serde = ["dep:serde", "gst/serde"]
|
serde = ["dep:serde", "gst/serde"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
|
|
|
@ -327,6 +327,10 @@ status = "generate"
|
||||||
# Platform dependant
|
# Platform dependant
|
||||||
manual = true
|
manual = true
|
||||||
|
|
||||||
|
[[object.member]]
|
||||||
|
name = "last"
|
||||||
|
ignore = true
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "to_string"
|
name = "to_string"
|
||||||
# This has an Unknown field that may return NULL or "UNKNOWN"
|
# This has an Unknown field that may return NULL or "UNKNOWN"
|
||||||
|
|
|
@ -73,6 +73,30 @@ impl From<AudioConverterConfig> for gst::Structure {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl glib::value::ToValue for AudioConverterConfig {
|
||||||
|
fn to_value(&self) -> glib::Value {
|
||||||
|
self.0.to_value()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn value_type(&self) -> glib::Type {
|
||||||
|
self.0.value_type()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl glib::value::ToValueOptional for AudioConverterConfig {
|
||||||
|
fn to_value_optional(s: Option<&Self>) -> glib::Value {
|
||||||
|
skip_assert_initialized!();
|
||||||
|
s.map(|s| &s.0).to_value()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<AudioConverterConfig> for glib::Value {
|
||||||
|
fn from(s: AudioConverterConfig) -> glib::Value {
|
||||||
|
skip_assert_initialized!();
|
||||||
|
s.0.into()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl AudioConverterConfig {
|
impl AudioConverterConfig {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self(gst::Structure::new_empty("GstAudioConverter"))
|
Self(gst::Structure::new_empty("GstAudioConverter"))
|
||||||
|
|
|
@ -364,7 +364,8 @@ mod tests {
|
||||||
fn test_display() {
|
fn test_display() {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
||||||
format!("{}", crate::AudioFormat::S16be);
|
assert_eq!(format!("{}", crate::AudioFormat::S16be), "S16BE");
|
||||||
|
assert_eq!(format!("{:?}", crate::AudioFormat::S16be), "S16be");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -96,6 +96,17 @@ impl<'a> AudioInfoBuilder<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn positions_if_some(
|
||||||
|
self,
|
||||||
|
positions: Option<&'a [crate::AudioChannelPosition]>,
|
||||||
|
) -> AudioInfoBuilder<'a> {
|
||||||
|
if let Some(positions) = positions {
|
||||||
|
self.positions(positions)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn flags(self, flags: crate::AudioFlags) -> Self {
|
pub fn flags(self, flags: crate::AudioFlags) -> Self {
|
||||||
Self {
|
Self {
|
||||||
flags: Some(flags),
|
flags: Some(flags),
|
||||||
|
@ -103,12 +114,28 @@ impl<'a> AudioInfoBuilder<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn flags_if_some(self, flags: Option<crate::AudioFlags>) -> Self {
|
||||||
|
if let Some(flags) = flags {
|
||||||
|
self.flags(flags)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn layout(self, layout: crate::AudioLayout) -> Self {
|
pub fn layout(self, layout: crate::AudioLayout) -> Self {
|
||||||
Self {
|
Self {
|
||||||
layout: Some(layout),
|
layout: Some(layout),
|
||||||
..self
|
..self
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn layout_if_some(self, layout: Option<crate::AudioLayout>) -> Self {
|
||||||
|
if let Some(layout) = layout {
|
||||||
|
self.layout(layout)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AudioInfo {
|
impl AudioInfo {
|
||||||
|
|
|
@ -294,6 +294,14 @@ impl fmt::Debug for AudioLevelMeta {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub mod tags {
|
||||||
|
gst::impl_meta_tag!(Audio, GST_META_TAG_AUDIO_STR);
|
||||||
|
gst::impl_meta_tag!(Channels, GST_META_TAG_AUDIO_CHANNELS_STR);
|
||||||
|
gst::impl_meta_tag!(Rate, GST_META_TAG_AUDIO_RATE_STR);
|
||||||
|
#[cfg(feature = "v1_24")]
|
||||||
|
gst::impl_meta_tag!(DSDPlaneOffsets, GST_META_TAG_DSD_PLANE_OFFSETS_STR);
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
@ -319,6 +327,8 @@ mod tests {
|
||||||
let cmeta = buffer.meta::<AudioClippingMeta>().unwrap();
|
let cmeta = buffer.meta::<AudioClippingMeta>().unwrap();
|
||||||
assert_eq!(cmeta.start().try_into(), Ok(Some(start)));
|
assert_eq!(cmeta.start().try_into(), Ok(Some(start)));
|
||||||
assert_eq!(cmeta.end().try_into(), Ok(Some(stop)));
|
assert_eq!(cmeta.end().try_into(), Ok(Some(stop)));
|
||||||
|
|
||||||
|
assert!(cmeta.has_tag::<tags::Audio>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -90,6 +90,14 @@ impl<T> AudioCapsBuilder<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn format_if_some(self, format: Option<AudioFormat>) -> Self {
|
||||||
|
if let Some(format) = format {
|
||||||
|
self.format(format)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn format_list(self, formats: impl IntoIterator<Item = AudioFormat>) -> Self {
|
pub fn format_list(self, formats: impl IntoIterator<Item = AudioFormat>) -> Self {
|
||||||
Self {
|
Self {
|
||||||
builder: self.builder.field(
|
builder: self.builder.field(
|
||||||
|
@ -99,12 +107,31 @@ impl<T> AudioCapsBuilder<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn format_list_if_some(
|
||||||
|
self,
|
||||||
|
formats: Option<impl IntoIterator<Item = AudioFormat>>,
|
||||||
|
) -> Self {
|
||||||
|
if let Some(formats) = formats {
|
||||||
|
self.format_list(formats)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn rate(self, rate: i32) -> Self {
|
pub fn rate(self, rate: i32) -> Self {
|
||||||
Self {
|
Self {
|
||||||
builder: self.builder.field(glib::gstr!("rate"), rate),
|
builder: self.builder.field(glib::gstr!("rate"), rate),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn rate_if_some(self, rate: Option<i32>) -> Self {
|
||||||
|
if let Some(rate) = rate {
|
||||||
|
self.rate(rate)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn rate_range(self, rates: impl RangeBounds<i32>) -> Self {
|
pub fn rate_range(self, rates: impl RangeBounds<i32>) -> Self {
|
||||||
let (start, end) = range_bounds_i32_start_end(rates);
|
let (start, end) = range_bounds_i32_start_end(rates);
|
||||||
let gst_rates = gst::IntRange::<i32>::new(start, end);
|
let gst_rates = gst::IntRange::<i32>::new(start, end);
|
||||||
|
@ -113,6 +140,14 @@ impl<T> AudioCapsBuilder<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn rate_range_if_some(self, rates: Option<impl RangeBounds<i32>>) -> Self {
|
||||||
|
if let Some(rates) = rates {
|
||||||
|
self.rate_range(rates)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn rate_list(self, rates: impl IntoIterator<Item = i32>) -> Self {
|
pub fn rate_list(self, rates: impl IntoIterator<Item = i32>) -> Self {
|
||||||
Self {
|
Self {
|
||||||
builder: self
|
builder: self
|
||||||
|
@ -121,12 +156,28 @@ impl<T> AudioCapsBuilder<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn rate_list_if_some(self, rates: Option<impl IntoIterator<Item = i32>>) -> Self {
|
||||||
|
if let Some(rates) = rates {
|
||||||
|
self.rate_list(rates)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn channels(self, channels: i32) -> Self {
|
pub fn channels(self, channels: i32) -> Self {
|
||||||
Self {
|
Self {
|
||||||
builder: self.builder.field(glib::gstr!("channels"), channels),
|
builder: self.builder.field(glib::gstr!("channels"), channels),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn channels_if_some(self, channels: Option<i32>) -> Self {
|
||||||
|
if let Some(channels) = channels {
|
||||||
|
self.channels(channels)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn channels_range(self, channels: impl RangeBounds<i32>) -> Self {
|
pub fn channels_range(self, channels: impl RangeBounds<i32>) -> Self {
|
||||||
let (start, end) = range_bounds_i32_start_end(channels);
|
let (start, end) = range_bounds_i32_start_end(channels);
|
||||||
let gst_channels: gst::IntRange<i32> = gst::IntRange::new(start, end);
|
let gst_channels: gst::IntRange<i32> = gst::IntRange::new(start, end);
|
||||||
|
@ -135,6 +186,14 @@ impl<T> AudioCapsBuilder<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn channels_range_if_some(self, channels: Option<impl RangeBounds<i32>>) -> Self {
|
||||||
|
if let Some(channels) = channels {
|
||||||
|
self.channels_range(channels)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn channels_list(self, channels: impl IntoIterator<Item = i32>) -> Self {
|
pub fn channels_list(self, channels: impl IntoIterator<Item = i32>) -> Self {
|
||||||
Self {
|
Self {
|
||||||
builder: self
|
builder: self
|
||||||
|
@ -143,6 +202,14 @@ impl<T> AudioCapsBuilder<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn channels_list_if_some(self, channels: Option<impl IntoIterator<Item = i32>>) -> Self {
|
||||||
|
if let Some(channels) = channels {
|
||||||
|
self.channels_list(channels)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn layout(self, layout: AudioLayout) -> Self {
|
pub fn layout(self, layout: AudioLayout) -> Self {
|
||||||
Self {
|
Self {
|
||||||
builder: self
|
builder: self
|
||||||
|
@ -151,6 +218,14 @@ impl<T> AudioCapsBuilder<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn layout_if_some(self, layout: Option<AudioLayout>) -> Self {
|
||||||
|
if let Some(layout) = layout {
|
||||||
|
self.layout(layout)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn layout_list(self, layouts: impl IntoIterator<Item = AudioLayout>) -> Self {
|
pub fn layout_list(self, layouts: impl IntoIterator<Item = AudioLayout>) -> Self {
|
||||||
Self {
|
Self {
|
||||||
builder: self.builder.field(
|
builder: self.builder.field(
|
||||||
|
@ -160,6 +235,17 @@ impl<T> AudioCapsBuilder<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn layout_list_if_some(
|
||||||
|
self,
|
||||||
|
layouts: Option<impl IntoIterator<Item = AudioLayout>>,
|
||||||
|
) -> Self {
|
||||||
|
if let Some(layouts) = layouts {
|
||||||
|
self.layout_list(layouts)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn channel_mask(self, channel_mask: u64) -> Self {
|
pub fn channel_mask(self, channel_mask: u64) -> Self {
|
||||||
Self {
|
Self {
|
||||||
builder: self
|
builder: self
|
||||||
|
@ -168,6 +254,14 @@ impl<T> AudioCapsBuilder<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn channel_mask_if_some(self, channel_mask: Option<u64>) -> Self {
|
||||||
|
if let Some(channel_mask) = channel_mask {
|
||||||
|
self.channel_mask(channel_mask)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn fallback_channel_mask(self) -> Self {
|
pub fn fallback_channel_mask(self) -> Self {
|
||||||
let channels = self.builder.structure().get::<i32>(glib::gstr!("channels"));
|
let channels = self.builder.structure().get::<i32>(glib::gstr!("channels"));
|
||||||
match channels {
|
match channels {
|
||||||
|
@ -187,6 +281,14 @@ impl<T> AudioCapsBuilder<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn field_if_some(self, name: &str, value: Option<impl Into<glib::Value> + Send>) -> Self {
|
||||||
|
if let Some(value) = value {
|
||||||
|
self.field(name, value)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn build(self) -> gst::Caps {
|
pub fn build(self) -> gst::Caps {
|
||||||
self.builder.build()
|
self.builder.build()
|
||||||
|
|
|
@ -26,6 +26,7 @@ v1_18 = ["v1_16"]
|
||||||
v1_20 = ["v1_18"]
|
v1_20 = ["v1_18"]
|
||||||
v1_22 = ["v1_20"]
|
v1_22 = ["v1_20"]
|
||||||
v1_24 = ["v1_22"]
|
v1_24 = ["v1_22"]
|
||||||
|
v1_26 = ["v1_24"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "gstreamer_audio_sys"
|
name = "gstreamer_audio_sys"
|
||||||
|
@ -80,4 +81,7 @@ version = "1.20"
|
||||||
version = "1.22"
|
version = "1.22"
|
||||||
|
|
||||||
[package.metadata.system-deps.gstreamer_audio_1_0.v1_24]
|
[package.metadata.system-deps.gstreamer_audio_1_0.v1_24]
|
||||||
version = "1.23"
|
version = "1.24"
|
||||||
|
|
||||||
|
[package.metadata.system-deps.gstreamer_audio_1_0.v1_26]
|
||||||
|
version = "1.25"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -20,8 +20,11 @@ use gstreamer_sys as gst;
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use libc::{
|
use libc::{
|
||||||
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
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, uintptr_t, FILE,
|
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
|
||||||
};
|
};
|
||||||
|
#[cfg(unix)]
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use glib::{gboolean, gconstpointer, gpointer, GType};
|
use glib::{gboolean, gconstpointer, gpointer, GType};
|
||||||
|
@ -209,6 +212,7 @@ pub const GST_AUDIO_DEF_FORMAT: &[u8] = b"S16LE\0";
|
||||||
pub const GST_AUDIO_DEF_RATE: c_int = 44100;
|
pub const GST_AUDIO_DEF_RATE: c_int = 44100;
|
||||||
pub const GST_AUDIO_ENCODER_SINK_NAME: &[u8] = b"sink\0";
|
pub const GST_AUDIO_ENCODER_SINK_NAME: &[u8] = b"sink\0";
|
||||||
pub const GST_AUDIO_ENCODER_SRC_NAME: &[u8] = b"src\0";
|
pub const GST_AUDIO_ENCODER_SRC_NAME: &[u8] = b"src\0";
|
||||||
|
pub const GST_AUDIO_FORMAT_LAST: c_int = 32;
|
||||||
pub const GST_AUDIO_RATE_RANGE: &[u8] = b"(int) [ 1, max ]\0";
|
pub const GST_AUDIO_RATE_RANGE: &[u8] = b"(int) [ 1, max ]\0";
|
||||||
pub const GST_AUDIO_RESAMPLER_OPT_CUBIC_B: &[u8] = b"GstAudioResampler.cubic-b\0";
|
pub const GST_AUDIO_RESAMPLER_OPT_CUBIC_B: &[u8] = b"GstAudioResampler.cubic-b\0";
|
||||||
pub const GST_AUDIO_RESAMPLER_OPT_CUBIC_C: &[u8] = b"GstAudioResampler.cubic-c\0";
|
pub const GST_AUDIO_RESAMPLER_OPT_CUBIC_C: &[u8] = b"GstAudioResampler.cubic-c\0";
|
||||||
|
|
|
@ -769,6 +769,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
|
||||||
("(guint) GST_AUDIO_FORMAT_FLAG_INTEGER", "1"),
|
("(guint) GST_AUDIO_FORMAT_FLAG_INTEGER", "1"),
|
||||||
("(guint) GST_AUDIO_FORMAT_FLAG_SIGNED", "4"),
|
("(guint) GST_AUDIO_FORMAT_FLAG_SIGNED", "4"),
|
||||||
("(guint) GST_AUDIO_FORMAT_FLAG_UNPACK", "32"),
|
("(guint) GST_AUDIO_FORMAT_FLAG_UNPACK", "32"),
|
||||||
|
("GST_AUDIO_FORMAT_LAST", "32"),
|
||||||
("(gint) GST_AUDIO_FORMAT_S16", "4"),
|
("(gint) GST_AUDIO_FORMAT_S16", "4"),
|
||||||
("(gint) GST_AUDIO_FORMAT_S16BE", "5"),
|
("(gint) GST_AUDIO_FORMAT_S16BE", "5"),
|
||||||
("(gint) GST_AUDIO_FORMAT_S16LE", "4"),
|
("(gint) GST_AUDIO_FORMAT_S16LE", "4"),
|
||||||
|
|
|
@ -117,6 +117,7 @@ int main() {
|
||||||
PRINT_CONSTANT((guint) GST_AUDIO_FORMAT_FLAG_INTEGER);
|
PRINT_CONSTANT((guint) GST_AUDIO_FORMAT_FLAG_INTEGER);
|
||||||
PRINT_CONSTANT((guint) GST_AUDIO_FORMAT_FLAG_SIGNED);
|
PRINT_CONSTANT((guint) GST_AUDIO_FORMAT_FLAG_SIGNED);
|
||||||
PRINT_CONSTANT((guint) GST_AUDIO_FORMAT_FLAG_UNPACK);
|
PRINT_CONSTANT((guint) GST_AUDIO_FORMAT_FLAG_UNPACK);
|
||||||
|
PRINT_CONSTANT(GST_AUDIO_FORMAT_LAST);
|
||||||
PRINT_CONSTANT((gint) GST_AUDIO_FORMAT_S16);
|
PRINT_CONSTANT((gint) GST_AUDIO_FORMAT_S16);
|
||||||
PRINT_CONSTANT((gint) GST_AUDIO_FORMAT_S16BE);
|
PRINT_CONSTANT((gint) GST_AUDIO_FORMAT_S16BE);
|
||||||
PRINT_CONSTANT((gint) GST_AUDIO_FORMAT_S16LE);
|
PRINT_CONSTANT((gint) GST_AUDIO_FORMAT_S16LE);
|
||||||
|
|
|
@ -32,6 +32,7 @@ v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"]
|
v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"]
|
||||||
|
v1_26 = ["gst/v1_26", "ffi/v1_26", "v1_24"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -25,6 +25,7 @@ v1_18 = ["v1_16"]
|
||||||
v1_20 = ["v1_18"]
|
v1_20 = ["v1_18"]
|
||||||
v1_22 = ["v1_20"]
|
v1_22 = ["v1_20"]
|
||||||
v1_24 = ["v1_22"]
|
v1_24 = ["v1_22"]
|
||||||
|
v1_26 = ["v1_24"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "gstreamer_base_sys"
|
name = "gstreamer_base_sys"
|
||||||
|
@ -85,4 +86,7 @@ version = "1.20"
|
||||||
version = "1.22"
|
version = "1.22"
|
||||||
|
|
||||||
[package.metadata.system-deps.gstreamer_base_1_0.v1_24]
|
[package.metadata.system-deps.gstreamer_base_1_0.v1_24]
|
||||||
version = "1.23"
|
version = "1.24"
|
||||||
|
|
||||||
|
[package.metadata.system-deps.gstreamer_base_1_0.v1_26]
|
||||||
|
version = "1.25"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -19,8 +19,11 @@ use gstreamer_sys as gst;
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use libc::{
|
use libc::{
|
||||||
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
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, uintptr_t, FILE,
|
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
|
||||||
};
|
};
|
||||||
|
#[cfg(unix)]
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use glib::{gboolean, gconstpointer, gpointer, GType};
|
use glib::{gboolean, gconstpointer, gpointer, GType};
|
||||||
|
|
|
@ -28,6 +28,7 @@ v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"]
|
v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"]
|
||||||
|
v1_26 = ["gst/v1_26", "ffi/v1_26", "v1_24"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -23,6 +23,7 @@ v1_18 = ["v1_16"]
|
||||||
v1_20 = ["v1_18"]
|
v1_20 = ["v1_18"]
|
||||||
v1_22 = ["v1_20"]
|
v1_22 = ["v1_20"]
|
||||||
v1_24 = ["v1_22"]
|
v1_24 = ["v1_22"]
|
||||||
|
v1_26 = ["v1_24"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "gstreamer_check_sys"
|
name = "gstreamer_check_sys"
|
||||||
|
@ -77,4 +78,7 @@ version = "1.20"
|
||||||
version = "1.22"
|
version = "1.22"
|
||||||
|
|
||||||
[package.metadata.system-deps.gstreamer_check_1_0.v1_24]
|
[package.metadata.system-deps.gstreamer_check_1_0.v1_24]
|
||||||
version = "1.23"
|
version = "1.24"
|
||||||
|
|
||||||
|
[package.metadata.system-deps.gstreamer_check_1_0.v1_26]
|
||||||
|
version = "1.25"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -19,8 +19,11 @@ use gstreamer_sys as gst;
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use libc::{
|
use libc::{
|
||||||
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
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, uintptr_t, FILE,
|
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
|
||||||
};
|
};
|
||||||
|
#[cfg(unix)]
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use glib::{gboolean, gconstpointer, gpointer, GType};
|
use glib::{gboolean, gconstpointer, gpointer, GType};
|
||||||
|
|
|
@ -28,6 +28,7 @@ v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"]
|
v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"]
|
||||||
|
v1_26 = ["gst/v1_26", "ffi/v1_26", "v1_24"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -24,6 +24,7 @@ v1_18 = ["v1_16"]
|
||||||
v1_20 = ["v1_18"]
|
v1_20 = ["v1_18"]
|
||||||
v1_22 = ["v1_20"]
|
v1_22 = ["v1_20"]
|
||||||
v1_24 = ["v1_22"]
|
v1_24 = ["v1_22"]
|
||||||
|
v1_26 = ["v1_24"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "gstreamer_controller_sys"
|
name = "gstreamer_controller_sys"
|
||||||
|
@ -78,4 +79,7 @@ version = "1.20"
|
||||||
version = "1.22"
|
version = "1.22"
|
||||||
|
|
||||||
[package.metadata.system-deps.gstreamer_controller_1_0.v1_24]
|
[package.metadata.system-deps.gstreamer_controller_1_0.v1_24]
|
||||||
version = "1.23"
|
version = "1.24"
|
||||||
|
|
||||||
|
[package.metadata.system-deps.gstreamer_controller_1_0.v1_26]
|
||||||
|
version = "1.25"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -19,8 +19,11 @@ use gstreamer_sys as gst;
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use libc::{
|
use libc::{
|
||||||
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
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, uintptr_t, FILE,
|
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
|
||||||
};
|
};
|
||||||
|
#[cfg(unix)]
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use glib::{gboolean, gconstpointer, gpointer, GType};
|
use glib::{gboolean, gconstpointer, gpointer, GType};
|
||||||
|
|
|
@ -33,6 +33,7 @@ v1_18 = ["gst/v1_18", "gst-base/v1_18", "gst-pbutils/v1_18", "ffi/v1_18", "v1_16
|
||||||
v1_20 = ["gst/v1_20", "gst-base/v1_20", "gst-pbutils/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "gst-base/v1_20", "gst-pbutils/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "gst-base/v1_22", "gst-pbutils/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "gst-base/v1_22", "gst-pbutils/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
v1_24 = ["gst/v1_24", "gst-base/v1_24", "gst-pbutils/v1_24", "ffi/v1_24", "v1_22"]
|
v1_24 = ["gst/v1_24", "gst-base/v1_24", "gst-pbutils/v1_24", "ffi/v1_24", "v1_22"]
|
||||||
|
v1_26 = ["gst/v1_26", "gst-base/v1_26", "gst-pbutils/v1_26", "ffi/v1_26", "v1_24"]
|
||||||
serde = ["dep:serde", "gst/serde", "gst-pbutils/serde"]
|
serde = ["dep:serde", "gst/serde", "gst-pbutils/serde"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -20,32 +20,32 @@ impl FrameCompositionMeta {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn position(&self) -> (i32, i32) {
|
pub fn position(&self) -> (f64, f64) {
|
||||||
(self.0.posx, self.0.posy)
|
(self.0.posx, self.0.posy)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn pos_x(&self) -> i32 {
|
pub fn pos_x(&self) -> f64 {
|
||||||
self.0.posx
|
self.0.posx
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn pos_y(&self) -> i32 {
|
pub fn pos_y(&self) -> f64 {
|
||||||
self.0.posy
|
self.0.posy
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn size(&self) -> (i32, i32) {
|
pub fn size(&self) -> (f64, f64) {
|
||||||
(self.0.width, self.0.height)
|
(self.0.width, self.0.height)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn width(&self) -> i32 {
|
pub fn width(&self) -> f64 {
|
||||||
self.0.width
|
self.0.width
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn height(&self) -> i32 {
|
pub fn height(&self) -> f64 {
|
||||||
self.0.height
|
self.0.height
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,8 +90,8 @@ mod tests {
|
||||||
|
|
||||||
fn add_composition_meta(
|
fn add_composition_meta(
|
||||||
buffer: &mut gst::BufferRef,
|
buffer: &mut gst::BufferRef,
|
||||||
position: (i32, i32),
|
position: (f64, f64),
|
||||||
size: (i32, i32),
|
size: (f64, f64),
|
||||||
alpha: f64,
|
alpha: f64,
|
||||||
zorder: u32,
|
zorder: u32,
|
||||||
operator: i32,
|
operator: i32,
|
||||||
|
@ -124,15 +124,21 @@ mod tests {
|
||||||
|
|
||||||
let mut buffer = gst::Buffer::with_size(320 * 240 * 4).unwrap();
|
let mut buffer = gst::Buffer::with_size(320 * 240 * 4).unwrap();
|
||||||
{
|
{
|
||||||
let _meta =
|
let _meta = add_composition_meta(
|
||||||
add_composition_meta(buffer.get_mut().unwrap(), (42, 42), (20, 22), 0.42, 2, 42)
|
buffer.get_mut().unwrap(),
|
||||||
.unwrap();
|
(42., 42.),
|
||||||
|
(20., 22.),
|
||||||
|
0.42,
|
||||||
|
2,
|
||||||
|
42,
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
let meta = buffer.meta::<FrameCompositionMeta>().unwrap();
|
let meta = buffer.meta::<FrameCompositionMeta>().unwrap();
|
||||||
assert_eq!(meta.position(), (42, 42));
|
assert_eq!(meta.position(), (42., 42.));
|
||||||
assert_eq!(meta.size(), (20, 22));
|
assert_eq!(meta.size(), (20., 22.));
|
||||||
assert_eq!(meta.alpha(), 0.42);
|
assert_eq!(meta.alpha(), 0.42);
|
||||||
assert_eq!(meta.zorder(), 2);
|
assert_eq!(meta.zorder(), 2);
|
||||||
assert_eq!(meta.operator(), 42);
|
assert_eq!(meta.operator(), 42);
|
||||||
|
|
|
@ -29,6 +29,7 @@ v1_18 = ["v1_16"]
|
||||||
v1_20 = ["v1_18"]
|
v1_20 = ["v1_18"]
|
||||||
v1_22 = ["v1_20"]
|
v1_22 = ["v1_20"]
|
||||||
v1_24 = ["v1_22"]
|
v1_24 = ["v1_22"]
|
||||||
|
v1_26 = ["v1_24"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "gstreamer_editing_services_sys"
|
name = "gstreamer_editing_services_sys"
|
||||||
|
@ -83,4 +84,7 @@ version = "1.20"
|
||||||
version = "1.22"
|
version = "1.22"
|
||||||
|
|
||||||
[package.metadata.system-deps.gst_editing_services_1_0.v1_24]
|
[package.metadata.system-deps.gst_editing_services_1_0.v1_24]
|
||||||
version = "1.23"
|
version = "1.24"
|
||||||
|
|
||||||
|
[package.metadata.system-deps.gst_editing_services_1_0.v1_26]
|
||||||
|
version = "1.25"
|
||||||
|
|
|
@ -37,3 +37,18 @@ status = "generate"
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "frame_composition_meta_api_get_type"
|
name = "frame_composition_meta_api_get_type"
|
||||||
version = "1.24"
|
version = "1.24"
|
||||||
|
|
||||||
|
[[object]]
|
||||||
|
name = "GES.PitiviFormatter"
|
||||||
|
# Deprecated since GStreamer 1.0 & causes ABI test failures
|
||||||
|
# See: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1425#note_2380648
|
||||||
|
status = "ignore"
|
||||||
|
[[object.function]]
|
||||||
|
pattern = ".+"
|
||||||
|
ignore = true
|
||||||
|
|
||||||
|
[[object]]
|
||||||
|
name = "GES.PitiviFormatterClass"
|
||||||
|
# Deprecated since GStreamer 1.0 & causes ABI test failures
|
||||||
|
# See: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1425#note_2380648
|
||||||
|
status = "ignore"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -21,8 +21,11 @@ use gstreamer_sys as gst;
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use libc::{
|
use libc::{
|
||||||
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
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, uintptr_t, FILE,
|
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
|
||||||
};
|
};
|
||||||
|
#[cfg(unix)]
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use glib::{gboolean, gconstpointer, gpointer, GType};
|
use glib::{gboolean, gconstpointer, gpointer, GType};
|
||||||
|
@ -879,10 +882,10 @@ pub type GESFormatterPrivate = _GESFormatterPrivate;
|
||||||
pub struct GESFrameCompositionMeta {
|
pub struct GESFrameCompositionMeta {
|
||||||
pub meta: gst::GstMeta,
|
pub meta: gst::GstMeta,
|
||||||
pub alpha: c_double,
|
pub alpha: c_double,
|
||||||
pub posx: c_int,
|
pub posx: c_double,
|
||||||
pub posy: c_int,
|
pub posy: c_double,
|
||||||
pub height: c_int,
|
pub height: c_double,
|
||||||
pub width: c_int,
|
pub width: c_double,
|
||||||
pub zorder: c_uint,
|
pub zorder: c_uint,
|
||||||
pub operator: c_int,
|
pub operator: c_int,
|
||||||
}
|
}
|
||||||
|
@ -1135,20 +1138,6 @@ pub struct _GESPipelinePrivate {
|
||||||
|
|
||||||
pub type GESPipelinePrivate = _GESPipelinePrivate;
|
pub type GESPipelinePrivate = _GESPipelinePrivate;
|
||||||
|
|
||||||
#[derive(Copy, Clone)]
|
|
||||||
#[repr(C)]
|
|
||||||
pub struct GESPitiviFormatterClass {
|
|
||||||
pub parent_class: GESFormatterClass,
|
|
||||||
pub _ges_reserved: [gpointer; 4],
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ::std::fmt::Debug for GESPitiviFormatterClass {
|
|
||||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
|
||||||
f.debug_struct(&format!("GESPitiviFormatterClass @ {self:p}"))
|
|
||||||
.finish()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct _GESPitiviFormatterPrivate {
|
pub struct _GESPitiviFormatterPrivate {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
|
@ -2389,22 +2378,6 @@ impl ::std::fmt::Debug for GESPipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone)]
|
|
||||||
#[repr(C)]
|
|
||||||
pub struct GESPitiviFormatter {
|
|
||||||
pub parent: GESFormatter,
|
|
||||||
pub priv_: *mut GESPitiviFormatterPrivate,
|
|
||||||
pub _ges_reserved: [gpointer; 4],
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ::std::fmt::Debug for GESPitiviFormatter {
|
|
||||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
|
||||||
f.debug_struct(&format!("GESPitiviFormatter @ {self:p}"))
|
|
||||||
.field("parent", &self.parent)
|
|
||||||
.finish()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct GESProject {
|
pub struct GESProject {
|
||||||
|
@ -3466,8 +3439,6 @@ extern "C" {
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
// GESPitiviFormatter
|
// GESPitiviFormatter
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
pub fn ges_pitivi_formatter_get_type() -> GType;
|
|
||||||
pub fn ges_pitivi_formatter_new() -> *mut GESPitiviFormatter;
|
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
// GESProject
|
// GESProject
|
||||||
|
|
|
@ -671,20 +671,6 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
||||||
alignment: align_of::<GESPipelineFlags>(),
|
alignment: align_of::<GESPipelineFlags>(),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
(
|
|
||||||
"GESPitiviFormatter",
|
|
||||||
Layout {
|
|
||||||
size: size_of::<GESPitiviFormatter>(),
|
|
||||||
alignment: align_of::<GESPitiviFormatter>(),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
(
|
|
||||||
"GESPitiviFormatterClass",
|
|
||||||
Layout {
|
|
||||||
size: size_of::<GESPitiviFormatterClass>(),
|
|
||||||
alignment: align_of::<GESPitiviFormatterClass>(),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
"GESProject",
|
"GESProject",
|
||||||
Layout {
|
Layout {
|
||||||
|
|
|
@ -75,8 +75,6 @@ int main() {
|
||||||
printf("%s;%zu;%zu\n", "GESPipeline", sizeof(GESPipeline), alignof(GESPipeline));
|
printf("%s;%zu;%zu\n", "GESPipeline", sizeof(GESPipeline), alignof(GESPipeline));
|
||||||
printf("%s;%zu;%zu\n", "GESPipelineClass", sizeof(GESPipelineClass), alignof(GESPipelineClass));
|
printf("%s;%zu;%zu\n", "GESPipelineClass", sizeof(GESPipelineClass), alignof(GESPipelineClass));
|
||||||
printf("%s;%zu;%zu\n", "GESPipelineFlags", sizeof(GESPipelineFlags), alignof(GESPipelineFlags));
|
printf("%s;%zu;%zu\n", "GESPipelineFlags", sizeof(GESPipelineFlags), alignof(GESPipelineFlags));
|
||||||
printf("%s;%zu;%zu\n", "GESPitiviFormatter", sizeof(GESPitiviFormatter), alignof(GESPitiviFormatter));
|
|
||||||
printf("%s;%zu;%zu\n", "GESPitiviFormatterClass", sizeof(GESPitiviFormatterClass), alignof(GESPitiviFormatterClass));
|
|
||||||
printf("%s;%zu;%zu\n", "GESProject", sizeof(GESProject), alignof(GESProject));
|
printf("%s;%zu;%zu\n", "GESProject", sizeof(GESProject), alignof(GESProject));
|
||||||
printf("%s;%zu;%zu\n", "GESProjectClass", sizeof(GESProjectClass), alignof(GESProjectClass));
|
printf("%s;%zu;%zu\n", "GESProjectClass", sizeof(GESProjectClass), alignof(GESProjectClass));
|
||||||
printf("%s;%zu;%zu\n", "GESSource", sizeof(GESSource), alignof(GESSource));
|
printf("%s;%zu;%zu\n", "GESSource", sizeof(GESSource), alignof(GESSource));
|
||||||
|
|
|
@ -37,6 +37,7 @@ v1_18 = ["gst/v1_18", "gst-base/v1_18", "gst-video/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "gst-base/v1_20", "gst-video/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "gst-base/v1_20", "gst-video/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "gst-base/v1_22", "gst-video/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "gst-base/v1_22", "gst-video/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
v1_24 = ["gst/v1_24", "gst-base/v1_24", "gst-video/v1_24", "ffi/v1_24", "v1_22"]
|
v1_24 = ["gst/v1_24", "gst-base/v1_24", "gst-video/v1_24", "ffi/v1_24", "v1_22"]
|
||||||
|
v1_26 = ["gst/v1_26", "gst-base/v1_26", "gst-video/v1_26", "ffi/v1_26", "v1_24"]
|
||||||
serde = ["dep:serde", "gst/serde", "gst-video/serde"]
|
serde = ["dep:serde", "gst/serde", "gst-video/serde"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
|
|
|
@ -32,6 +32,7 @@ v1_18 = ["gst/v1_18", "gst-gl/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "gst-gl/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "gst-gl/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "gst-gl/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "gst-gl/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
v1_24 = ["gst/v1_24", "gst-gl/v1_24", "ffi/v1_24", "v1_22"]
|
v1_24 = ["gst/v1_24", "gst-gl/v1_24", "ffi/v1_24", "v1_22"]
|
||||||
|
v1_26 = ["gst/v1_26", "gst-gl/v1_26", "ffi/v1_26", "v1_24"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -44,7 +44,10 @@ version = "1.20"
|
||||||
version = "1.22"
|
version = "1.22"
|
||||||
|
|
||||||
[package.metadata.system-deps.gstreamer_gl_egl_1_0.v1_24]
|
[package.metadata.system-deps.gstreamer_gl_egl_1_0.v1_24]
|
||||||
version = "1.23"
|
version = "1.24"
|
||||||
|
|
||||||
|
[package.metadata.system-deps.gstreamer_gl_egl_1_0.v1_26]
|
||||||
|
version = "1.25"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
@ -76,3 +79,4 @@ v1_18 = ["v1_16"]
|
||||||
v1_20 = ["v1_18"]
|
v1_20 = ["v1_18"]
|
||||||
v1_22 = ["v1_20"]
|
v1_22 = ["v1_20"]
|
||||||
v1_24 = ["v1_22"]
|
v1_24 = ["v1_22"]
|
||||||
|
v1_26 = ["v1_24"]
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -18,8 +18,11 @@ use gstreamer_gl_sys as gst_gl;
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use libc::{
|
use libc::{
|
||||||
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
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, uintptr_t, FILE,
|
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
|
||||||
};
|
};
|
||||||
|
#[cfg(unix)]
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use glib::{gboolean, gconstpointer, gpointer, GType};
|
use glib::{gboolean, gconstpointer, gpointer, GType};
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -29,6 +29,7 @@ v1_18 = ["v1_16"]
|
||||||
v1_20 = ["v1_18"]
|
v1_20 = ["v1_18"]
|
||||||
v1_22 = ["v1_20"]
|
v1_22 = ["v1_20"]
|
||||||
v1_24 = ["v1_22"]
|
v1_24 = ["v1_22"]
|
||||||
|
v1_26 = ["v1_24"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "gstreamer_gl_sys"
|
name = "gstreamer_gl_sys"
|
||||||
|
@ -83,4 +84,7 @@ version = "1.20"
|
||||||
version = "1.22"
|
version = "1.22"
|
||||||
|
|
||||||
[package.metadata.system-deps.gstreamer_gl_1_0.v1_24]
|
[package.metadata.system-deps.gstreamer_gl_1_0.v1_24]
|
||||||
version = "1.23"
|
version = "1.24"
|
||||||
|
|
||||||
|
[package.metadata.system-deps.gstreamer_gl_1_0.v1_26]
|
||||||
|
version = "1.25"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -25,8 +25,11 @@ pub use manual::*;
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use libc::{
|
use libc::{
|
||||||
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
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, uintptr_t, FILE,
|
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
|
||||||
};
|
};
|
||||||
|
#[cfg(unix)]
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use glib::{gboolean, gconstpointer, gpointer, GType};
|
use glib::{gboolean, gconstpointer, gpointer, GType};
|
||||||
|
|
|
@ -33,6 +33,7 @@ v1_18 = ["gst/v1_18", "gst-gl/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "gst-gl/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "gst-gl/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "gst-gl/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "gst-gl/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
v1_24 = ["gst/v1_24", "gst-gl/v1_24", "ffi/v1_24", "v1_22"]
|
v1_24 = ["gst/v1_24", "gst-gl/v1_24", "ffi/v1_24", "v1_22"]
|
||||||
|
v1_26 = ["gst/v1_26", "gst-gl/v1_26", "ffi/v1_26", "v1_24"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -44,7 +44,10 @@ version = "1.20"
|
||||||
version = "1.22"
|
version = "1.22"
|
||||||
|
|
||||||
[package.metadata.system-deps.gstreamer_gl_wayland_1_0.v1_24]
|
[package.metadata.system-deps.gstreamer_gl_wayland_1_0.v1_24]
|
||||||
version = "1.23"
|
version = "1.24"
|
||||||
|
|
||||||
|
[package.metadata.system-deps.gstreamer_gl_wayland_1_0.v1_26]
|
||||||
|
version = "1.25"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
@ -76,3 +79,4 @@ v1_18 = ["v1_16"]
|
||||||
v1_20 = ["v1_18"]
|
v1_20 = ["v1_18"]
|
||||||
v1_22 = ["v1_20"]
|
v1_22 = ["v1_20"]
|
||||||
v1_24 = ["v1_22"]
|
v1_24 = ["v1_22"]
|
||||||
|
v1_26 = ["v1_24"]
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -18,8 +18,11 @@ use gstreamer_gl_sys as gst_gl;
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use libc::{
|
use libc::{
|
||||||
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
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, uintptr_t, FILE,
|
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
|
||||||
};
|
};
|
||||||
|
#[cfg(unix)]
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use glib::{gboolean, gconstpointer, gpointer, GType};
|
use glib::{gboolean, gconstpointer, gpointer, GType};
|
||||||
|
|
|
@ -33,6 +33,7 @@ v1_18 = ["gst/v1_18", "gst-gl/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "gst-gl/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "gst-gl/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "gst-gl/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "gst-gl/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
v1_24 = ["gst/v1_24", "gst-gl/v1_24", "ffi/v1_24", "v1_22"]
|
v1_24 = ["gst/v1_24", "gst-gl/v1_24", "ffi/v1_24", "v1_22"]
|
||||||
|
v1_26 = ["gst/v1_26", "gst-gl/v1_26", "ffi/v1_26", "v1_24"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5975266da3b0)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ fe8258109e60)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 63e90a30193b)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ c988e03b5e99)
|
||||||
|
|
|
@ -44,7 +44,10 @@ version = "1.20"
|
||||||
version = "1.22"
|
version = "1.22"
|
||||||
|
|
||||||
[package.metadata.system-deps.gstreamer_gl_x11_1_0.v1_24]
|
[package.metadata.system-deps.gstreamer_gl_x11_1_0.v1_24]
|
||||||
version = "1.23"
|
version = "1.24"
|
||||||
|
|
||||||
|
[package.metadata.system-deps.gstreamer_gl_x11_1_0.v1_26]
|
||||||
|
version = "1.25"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
@ -76,3 +79,4 @@ v1_18 = ["v1_16"]
|
||||||
v1_20 = ["v1_18"]
|
v1_20 = ["v1_18"]
|
||||||
v1_22 = ["v1_20"]
|
v1_22 = ["v1_20"]
|
||||||
v1_24 = ["v1_22"]
|
v1_24 = ["v1_22"]
|
||||||
|
v1_26 = ["v1_24"]
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue