Skip to content
Commits on Source (165)
......@@ -10,7 +10,6 @@ stages:
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo_home"
DEPENDENCIES: |
curl
libssl-dev
liborc-0.4-dev
libglib2.0-dev
libxml2-dev
......@@ -20,13 +19,15 @@ stages:
libgl1-mesa-dri
libgl1-mesa-glx
libwayland-egl1-mesa
xz-utils
libssl-dev
before_script:
- apt-get update -yqq
- apt-get install -yqq --no-install-recommends $DEPENDENCIES
- mkdir -p precompiled-gst && cd precompiled-gst
- curl -L https://people.freedesktop.org/~slomo/gstreamer-1.16.0.tar.gz | tar xz
- curl -L https://people.freedesktop.org/~slomo/gstreamer-1.16.1.tar.xz | tar xJ
- sed -i "s;prefix=/root/gstreamer;prefix=$PWD/gstreamer;g" $PWD/gstreamer/lib/x86_64-linux-gnu/pkgconfig/*.pc
- export PKG_CONFIG_PATH=$PWD/gstreamer/lib/x86_64-linux-gnu/pkgconfig
- export GST_PLUGIN_SYSTEM_PATH=$PWD/gstreamer/lib/x86_64-linux-gnu/gstreamer-1.0
......@@ -45,38 +46,73 @@ stages:
stage: "test"
script:
- rustc --version
- cargo build --color=always --all
- G_DEBUG=fatal_warnings cargo test --color=always --all
# First build and test all the crates with their relevant features
# Keep features in sync with below
- |
for crate in gstreamer*; do
if [ -n "$ALL_FEATURES" ]; then
if [ $crate = "gstreamer" ]; then
FEATURES=ser_de,v1_16
elif [ $crate = "gstreamer-gl" ]; then
FEATURES=egl,x11,wayland,v1_16
else
FEATURES=v1_16
fi
cargo build --color=always --manifest-path $crate/Cargo.toml --features=$FEATURES
G_DEBUG=fatal_warnings cargo test --color=always --manifest-path $crate/Cargo.toml --features=$FEATURES
else
cargo build --color=always --manifest-path $crate/Cargo.toml
G_DEBUG=fatal_warnings cargo test --color=always --manifest-path $crate/Cargo.toml
fi
done
# If we do a build with all features then also build the
# tutorials/examples with all features
- |
if [ -n "$NIGHTLY" ]; then
cargo build --color=always --all --all-features
G_DEBUG=fatal_warnings cargo test --color=always --all --all-features
if [ -n "$ALL_FEATURES" ]; then
cargo build --color=always --manifest-path examples/Cargo.toml --bins --examples --all-features
cargo build --color=always --manifest-path tutorials/Cargo.toml --bins --examples --all-features
fi
test 1.34:
# 1.34 img
test 1.39:
# 1.39 img
# https://hub.docker.com/_/rust/
image: "rust:1.34-slim"
image: "rust:1.39-slim-buster"
extends: '.cargo test'
test stable:
# Stable img
# https://hub.docker.com/_/rust/
image: "rust:slim"
image: "rust:slim-buster"
extends: '.cargo test'
test stable all-features:
# Stable img
# https://hub.docker.com/_/rust/
image: "rust:slim-buster"
variables:
ALL_FEATURES: 'yes'
extends: '.cargo test'
test nightly:
# Nightly
# https://hub.docker.com/r/rustlang/rust/
image: "rustlang/rust:nightly-slim"
image: "rustlang/rust:nightly-buster-slim"
allow_failure: true
extends: '.cargo test'
test nightly all-features:
# Nightly
# https://hub.docker.com/r/rustlang/rust/
image: "rustlang/rust:nightly-buster-slim"
allow_failure: true
variables:
NIGHTLY: 'yes'
ALL_FEATURES: 'yes'
extends: '.cargo test'
rustfmt:
image: "rust:slim"
image: "rust:slim-buster"
stage: "lint"
script:
- rustup component add rustfmt
......@@ -85,10 +121,35 @@ rustfmt:
clippy:
extends: '.tarball_setup'
image: "rustlang/rust:nightly-slim"
image: "rust:slim-buster"
stage: 'extras'
allow_failure: true
script:
- rustup component add clippy-preview
- cargo clippy --version
- cargo clippy --color=always --all --all-features
# Keep features in sync with above
- |
for crate in gstreamer*; do
if [ $crate = "gstreamer" ]; then
FEATURES=ser_de,v1_16
elif [ $crate = "gstreamer-gl" ]; then
FEATURES=egl,x11,wayland,v1_16
else
FEATURES=v1_16
fi
cargo clippy --color=always --manifest-path $crate/Cargo.toml --features=$FEATURES -- -A clippy::redundant_pattern_matching -A clippy::single_match -A clippy::cast_lossless
done
# And also run over all the examples/tutorials
- |
cargo clippy --color=always --manifest-path examples/Cargo.toml --bins --examples --all-features -- -A clippy::redundant_pattern_matching -A clippy::single_match -A clippy::cast_lossless
cargo clippy --color=always --manifest-path tutorials/Cargo.toml --bins --examples --all-features -- -A clippy::redundant_pattern_matching -A clippy::single_match -A clippy::cast_lossless
audit:
extends: '.tarball_setup'
image: "rust:slim-buster"
stage: 'extras'
only:
- schedules
script:
- cargo install --force cargo-audit
- cargo audit --deny-warnings
......@@ -16,6 +16,9 @@ members = [
"gstreamer-check",
"gstreamer-editing-services",
"gstreamer-gl",
"gstreamer-rtp",
"examples",
"tutorials",
]
exclude = ["gir"]
......@@ -69,9 +69,10 @@ generate = [
"Gst.ParseFlags",
"Gst.TaskState",
"Gst.PluginDependencyFlags",
"Gst.DateTime",
"Gst.BufferPoolAcquireFlags",
"Gst.PromiseResult",
"Gst.ClockEntryType",
"Gst.ClockFlags",
]
manual = [
......@@ -91,7 +92,6 @@ conversion_type = "scalar"
[[object]]
name = "Gst.Bin"
subclassing = true
status = "generate"
trait_name = "GstBinExt"
[[object.signal]]
......@@ -319,7 +319,6 @@ ref_mode = "ref"
[[object]]
name = "Gst.Pipeline"
subclassing = true
status = "generate"
[[object]]
......@@ -360,7 +359,6 @@ status = "generate"
[[object]]
name = "Gst.Element"
subclassing = true
status = "generate"
[[object.function]]
name = "make_from_uri"
......@@ -541,6 +539,15 @@ status = "generate"
name = "Gst.ElementFactory"
status = "generate"
final_type = true
[[object.function]]
name = "create"
[object.function.return]
nullable_return_is_error = "Failed to create element from factory"
[[object.function]]
name = "make"
[object.function.return]
nullable_return_is_error = "Failed to create element from factory name"
[[object]]
name = "Gst.TypeFindFactory"
......@@ -620,6 +627,11 @@ status = "generate"
[object.function.return]
bool_return_is_error = "Failed to reconfigure the element to use this device"
[[object.function]]
name = "create_element"
[object.function.return]
nullable_return_is_error = "Failed to create element for device"
[[object]]
name = "Gst.Object"
# For renaming the trait...
......@@ -658,7 +670,6 @@ trait_name = "GstObjectExt"
[[object]]
name = "Gst.Pad"
subclassing = true
status = "generate"
[[object.function]]
name = "link_maybe_ghosting"
......@@ -854,6 +865,16 @@ status = "generate"
name = "Gst.PadTemplate"
status = "generate"
final_type = true
[[object.function]]
name = "new"
[object.function.return]
nullable_return_is_error = "Failed to create pad template"
[[object.function]]
name = "new_with_gtype"
[object.function.return]
nullable_return_is_error = "Failed to create pad template"
[[object.function]]
name = "new_from_static_pad_template_with_gtype"
# static pad template manual
......@@ -861,7 +882,6 @@ final_type = true
[[object]]
name = "Gst.GhostPad"
subclassing = true
status = "generate"
[[object.function]]
name = "set_target"
......@@ -876,6 +896,16 @@ status = "generate"
name = "new_from_template"
ignore = true
[[object.function]]
name = "new_no_target"
[object.function.return]
nullable_return_is_error = "Failed to create GhostPad"
[[object.function]]
name = "new_no_target_from_template"
[object.function.return]
nullable_return_is_error = "Failed to create GhostPad"
[[object.function]]
name = "construct"
ignore = true
......@@ -992,6 +1022,16 @@ final_type = true
[object.function.return]
nullable = false
[[object.function]]
name = "load"
[object.function.return]
nullable_return_is_error = "Failed to load plugin"
[[object.function]]
name = "load_by_name"
[object.function.return]
nullable_return_is_error = "Failed to load plugin"
[[object]]
name = "Gst.PluginFeature"
status = "generate"
......@@ -1011,6 +1051,11 @@ status = "generate"
name = "set_rank"
ignore = true
[[object.function]]
name = "load"
[object.function.return]
nullable_return_is_error = "Failed to load plugin feature"
[[object]]
name = "Gst.Registry"
status = "generate"
......@@ -1342,6 +1387,16 @@ status = "generate"
# Already a Result
nullable = false
[[object.function]]
name = "debug_get_stack_trace"
[object.function.return]
nullable_return_is_error = "Failed to get stack trace"
[[object.function]]
name = "get_main_executable_path"
[object.function.return]
nullable_return_is_error = "Failed to get main executable path"
[[object]]
name = "Gst.StateChangeReturn"
status = "generate"
......@@ -1361,3 +1416,30 @@ must_use = true
name = "Gst.ClockReturn"
status = "generate"
must_use = true
[[object]]
name = "Gst.DateTime"
status = "generate"
[[object.derive]]
# Don't auto-implement traits
name = ""
[[object.function]]
name = "new_from_g_date_time"
[object.function.return]
nullable = false
[[object.function]]
name = "to_g_date_time"
[object.function.return]
nullable_return_is_error = "Can't create glib::DateTime from DateTime"
[[object.function]]
name = "new_from_iso8601_string"
[object.function.return]
nullable_return_is_error = "Failed to create DateTime from ISO-8601 string"
[[object.function]]
name = "to_iso8601_string"
[object.function.return]
nullable_return_is_error = "Failed to create ISO-8601 string from DateTime"
......@@ -74,8 +74,18 @@ final_type = true
[[object.function]]
name = "set_caps"
[[object.function.parameter]]
name = "caps"
nullable = true
name = "caps"
nullable = true
[[object.function]]
name = "pull_preroll"
[object.function.return]
nullable_return_is_error = "Failed to pull preroll sample"
[[object.function]]
name = "pull_sample"
[object.function.return]
nullable_return_is_error = "Failed to pull sample"
[[object]]
name = "GstApp.AppSrc"
......
......@@ -14,6 +14,7 @@ external_libraries = [
"GLib",
"GObject",
"Gst",
"GstBase",
]
generate = [
......@@ -24,11 +25,23 @@ generate = [
"GstAudio.AudioChannelPosition",
"GstAudio.StreamVolume",
"GstAudio.StreamVolumeFormat",
"GstAudio.AudioSink",
"GstAudio.AudioSrc",
"GstAudio.AudioBaseSink",
"GstAudio.AudioBaseSrc",
"GstAudio.AudioRingBufferFormatType",
]
manual = [
"GObject.Object",
"Gst.Object",
"Gst.Element",
"Gst.Allocator",
"Gst.AllocationParams",
"Gst.TagList",
"Gst.TagMergeMode",
"GstBase.BaseSink",
"GstBase.BaseSrc",
"GstAudio.AudioInfo",
"GstAudio.AudioFormatInfo",
]
......@@ -38,6 +51,11 @@ name = "Gst.Caps"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.Buffer"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.ClockTime"
status = "manual"
......@@ -125,3 +143,74 @@ status = "generate"
name = "process"
# bool does not signal error
ignore = true
[[object]]
name = "GstAudio.AudioDecoder"
status = "generate"
[[object.function]]
name = "finish_frame"
ignore = true
[[object.function]]
name = "finish_subframe"
ignore = true
[[object.function]]
name = "negotiate"
ignore = true
[[object.function]]
name = "set_output_caps"
ignore = true
[[object.function]]
name = "set_output_format"
ignore = true
[[object.function]]
name = "get_allocator"
ignore = true
[[object.function]]
name = "proxy_getcaps"
[object.function.return]
nullable = false
[[object.function]]
name = "allocate_output_buffer"
[object.function.return]
nullable_return_is_error = "Failed to allocate output buffer"
[[object]]
name = "GstAudio.AudioEncoder"
status = "generate"
[[object.function]]
name = "finish_frame"
ignore = true
[[object.function]]
name = "negotiate"
ignore = true
[[object.function]]
name = "set_output_format"
ignore = true
[[object.function]]
name = "get_allocator"
ignore = true
[[object.function]]
name = "get_latency"
ignore = true
[[object.function]]
name = "proxy_getcaps"
[object.function.return]
nullable = false
[[object.function]]
name = "allocate_output_buffer"
[object.function.return]
nullable_return_is_error = "Failed to allocate output buffer"
......@@ -68,6 +68,41 @@ concurrency = "send-unique"
# Useless copying of data
ignore = true
[[object.function]]
name = "copy_bytes"
[object.function.return]
nullable_return_is_error = "Failed to copy bytes"
[[object.function]]
name = "get_buffer"
[object.function.return]
nullable_return_is_error = "Failed to get buffer"
[[object.function]]
name = "get_buffer_fast"
[object.function.return]
nullable_return_is_error = "Failed to get buffer"
[[object.function]]
name = "get_buffer_list"
[object.function.return]
nullable_return_is_error = "Failed to get buffer list"
[[object.function]]
name = "take_buffer"
[object.function.return]
nullable_return_is_error = "Failed to take buffer"
[[object.function]]
name = "take_buffer_fast"
[object.function.return]
nullable_return_is_error = "Failed to take buffer"
[[object.function]]
name = "take_buffer_list"
[object.function.return]
nullable_return_is_error = "Failed to take buffer list"
[[object]]
name = "GstBase.FlowCombiner"
# Manual because ref/unref functions were added much later
......@@ -77,7 +112,6 @@ concurrency = "none"
[[object]]
name = "GstBase.BaseSink"
subclassing = true
status = "generate"
[[object.function]]
......@@ -90,9 +124,18 @@ status = "generate"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object.function]]
name = "wait_clock"
# Use Result<ClockSuccess, ClockError>
ignore = true
[[object.function]]
name = "query_latency"
# Use Result
ignore = true
[[object]]
name = "GstBase.BaseSrc"
subclassing = true
status = "generate"
[[object.function]]
......@@ -120,9 +163,13 @@ status = "generate"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object.function]]
name = "query_latency"
# Use Result
ignore = true
[[object]]
name = "GstBase.BaseTransform"
subclassing = true
status = "generate"
[[object.function]]
......@@ -134,7 +181,6 @@ status = "generate"
[[object]]
name = "GstBase.Aggregator"
status = "generate"
subclassing = true
version = "1.14"
[[object.function]]
......@@ -154,7 +200,6 @@ version = "1.14"
[[object]]
name = "GstBase.AggregatorPad"
status = "generate"
subclassing = true
version = "1.14"
[[object]]
......@@ -167,9 +212,34 @@ status = "generate"
[[object.function]]
name = "type_find_helper_for_data"
# broken data type
# broken return value
ignore = true
[[object.function]]
name = "type_find_helper_for_data_with_extension"
# broken return value
ignore = true
[[object.function]]
name = "type_find_helper_for_buffer"
# broken return value
ignore = true
[[object.function]]
name = "type_find_helper_for_buffer_with_extension"
# broken return value
ignore = true
[[object.function]]
name = "type_find_helper"
[object.function.return]
nullable_return_is_error = "Could not find type"
[[object.function]]
name = "type_find_helper_for_extension"
[object.function.return]
nullable_return_is_error = "Could not find type"
[[object]]
name = "Gst.Structure"
status = "manual"
......@@ -207,7 +277,6 @@ ref_mode = "ref"
[[object]]
name = "GstBase.BaseParse"
subclassing = true
status = "generate"
[[object.function]]
name = "finish_frame"
......
......@@ -40,11 +40,9 @@ generate = [
"GES.EditMode",
"GES.PipelineFlags",
"GES.Edge",
"GES.Effect",
"GES.TrackType",
"GES.BaseEffect",
"GES.Group",
"GES.UriClip",
"GES.UriClipAsset",
"GES.UriSourceAsset",
]
......@@ -79,6 +77,22 @@ name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
[[object]]
name = "GES.Effect"
status = "generate"
[[object.function]]
name = "new"
[object.function.return]
nullable_return_is_error = "Failed to create effect from description"
[[object]]
name = "GES.UriClip"
status = "generate"
[[object.function]]
name = "new"
[object.function.return]
nullable_return_is_error = "Failed to create Uri clip from Uri"
[[object]]
name = "GES.Timeline"
status = "generate"
......@@ -205,6 +219,16 @@ status = "generate"
[object.function.return]
bool_return_is_error = "Failed to the set top effect priority"
[[object.function]]
name = "add_asset"
[object.function.return]
nullable_return_is_error = "Failed to add asset"
[[object.function]]
name = "split"
[object.function.return]
nullable_return_is_error = "Failed to split clip"
[[object]]
name = "GES.Extractable"
status = "generate"
......@@ -227,6 +251,11 @@ status = "generate"
[object.function.return]
bool_return_is_error = "Failed to remove clip"
[[object.function]]
name = "add_asset"
[object.function.return]
nullable_return_is_error = "Failed to add asset"
[[object]]
name = "GES.Project"
status = "generate"
......@@ -281,7 +310,17 @@ status = "generate"
[[object.function]]
name = "trim"
[object.function.return]
bool_return_is_error = "`Failed to trim"
bool_return_is_error = "Failed to trim"
[[object.function]]
name = "copy"
[object.function.return]
nullable_return_is_error = "Failed to copy timeline element"
[[object.function]]
name = "paste"
[object.function.return]
nullable_return_is_error = "Failed to paste timeline element"
[[object]]
name = "GES.TrackElement"
......@@ -294,4 +333,4 @@ status = "generate"
[[object.function]]
name = "remove_control_binding"
[object.function.return]
bool_return_is_error = "Failed to remove control binding"
\ No newline at end of file
bool_return_is_error = "Failed to remove control binding"
......@@ -186,6 +186,11 @@ status = "generate"
[object.function.return]
bool_return_is_error = "Failed to remove window"
[[object.function]]
name = "create_window"
[object.function.return]
nullable_return_is_error = "Failed to create window"
[[object]]
name = "GstGL.GLDisplayEGL"
status = "generate"
......@@ -262,7 +267,6 @@ status = "generate"
name = "GstGL.GLColorConvert"
status = "generate"
final_type = true
[[object.function]]
name = "set_caps"
[object.function.return]
......
......@@ -99,6 +99,16 @@ status = "generate"
[object.function.return]
nullable = false
[[object.function]]
name = "to_variant"
[object.function.return]
nullable_return_is_error = "Failed to serialize DiscovererInfo to Variant"
[[object.function]]
name = "from_variant"
[object.function.return]
nullable_return_is_error = "Failed to deserialize DiscovererInfo from Variant"
[[object]]
name = "GstPbutils.DiscovererStreamInfo"
status = "generate"
......@@ -180,6 +190,11 @@ status = "generate"
# encodingprofile is immutable after constructed
ignore = true
[[object.function]]
name = "from_discoverer"
[object.function.return]
nullable_return_is_error = "Failed to create EncodingProfile from DiscovererInfo"
[[object]]
name = "GstPbutils.EncodingContainerProfile"
status = "generate"
......@@ -292,3 +307,23 @@ status = "generate"
[[object.function]]
name = "pb_utils_get_encoder_description"
ignore = true
[[object.function]]
name = "pb_utils_get_element_description"
[object.function.return]
nullable_return_is_error = "Failed to get element description"
[[object.function]]
name = "pb_utils_get_sink_description"
[object.function.return]
nullable_return_is_error = "Failed to get sink description"
[[object.function]]
name = "pb_utils_get_source_description"
[object.function.return]
nullable_return_is_error = "Failed to get source description"
[[object.function]]
name = "plugins_base_version_string"
[object.function.return]
nullable = false
[options]
girs_dir = "gir-files"
library = "GstRtp"
version = "1.0"
min_cfg_version = "1.8"
target_path = "gstreamer-rtp"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
doc_target_path = "docs/gstreamer-rtp/docs.md"
generate_display_trait = false
external_libraries = [
"GLib",
"GObject",
"Gst",
]
generate = [
"GstRtp.RTCPFBType",
"GstRtp.RTCPSDESType",
"GstRtp.RTCPType",
"GstRtp.RTCPXRType",
"GstRtp.RTPPayload",
"GstRtp.RTPProfile",
"GstRtp.RTPBufferFlags",
"GstRtp.RTPBufferMapFlags",
]
[[object]]
name = "Gst.Buffer"
status = "manual"
ref_mode = "ref"
[[object]]
name = "GstRtp.*"
status = "generate"
# expected enum `std::ffi::c_void`, found u8
[[object.function]]
name = "rtp_hdrext_get_ntp_56"
ignore = true
# expected enum `std::ffi::c_void`, found u8
[[object.function]]
name = "rtp_hdrext_get_ntp_64"
ignore = true
# manual bindings are needed for GstMeta
[[object.function]]
name = "rtp_source_meta_api_get_type"
ignore = true
......@@ -26,9 +26,7 @@ generate = [
"GstRtspServer.RTSPAddressPoolResult",
"GstRtspServer.RTSPMediaFactoryURI",
"GstRtspServer.RTSPMediaStatus",
"GstRtspServer.RTSPMountPoints",
"GstRtspServer.RTSPPublishClockMode",
"GstRtspServer.RTSPSession",
"GstRtspServer.RTSPSuspendMode",
"GstRtspServer.RTSPThreadPool",
"GstRtspServer.RTSPThreadType",
......@@ -225,6 +223,11 @@ status = "generate"
[object.function.return]
bool_return_is_error = "Failed to add address range"
[[object.function]]
name = "acquire_address"
[object.function.return]
nullable_return_is_error = "Failed to acquire address"
[[object.function]]
name = "reserve_address"
ignore = true
......@@ -257,6 +260,16 @@ status = "generate"
# Different structure mutability needed
ignore = true
[[object.function]]
name = "construct"
[object.function.return]
nullable_return_is_error = "Failed to construct media"
[[object.function]]
name = "create_element"
[object.function.return]
nullable_return_is_error = "Failed to create media element"
[[object]]
name = "GstRtspServer.RTSPSessionMedia"
status = "generate"
......@@ -280,10 +293,14 @@ status = "generate"
# GSource return
ignore = true
[[object.function]]
name = "create"
[object.function.return]
nullable_return_is_error = "Failed to create session pool"
[[object]]
name="GstRtspServer.RTSPAuth"
status="generate"
[[object.function]]
name = "check"
[object.function.return]
......@@ -297,9 +314,26 @@ status="generate"
[[object.function]]
name = "make_basic"
[object.function.return]
nullable = false
nullable = false
[[object.function]]
name = "set_default_token"
# gir forgets mut
ignore = true
[[object]]
name="GstRtspServer.RTSPMountPoints"
status="generate"
[[object.function]]
name = "make_path"
[object.function.return]
nullable_return_is_error = "Failed to make path"
[[object]]
name="GstRtspServer.RTSPSession"
status="generate"
[[object.function]]
name = "manage_media"
[object.function.return]
nullable_return_is_error = "Failed to manage media"
......@@ -39,6 +39,7 @@ generate = [
"GstVideo.VideoCaptionType",
"GstVideo.VideoBufferPool",
"GstVideo.VideoPackFlags",
"GstVideo.VideoBufferFlags",
]
manual = [
......@@ -49,6 +50,8 @@ manual = [
"Gst.Buffer",
"Gst.BufferPool",
"Gst.BufferPoolAcquireParams",
"Gst.Allocator",
"Gst.AllocationParams",
"Gst.ClockTimeDiff",
"Gst.FlowReturn",
"Gst.TagList",
......@@ -86,7 +89,6 @@ status = "generate"
[[object]]
name = "GstVideo.VideoDecoder"
subclassing = true
status = "generate"
[[object.function]]
......@@ -149,9 +151,22 @@ status = "generate"
name = "negotiate"
ignore = true
[[object.function]]
name = "get_allocator"
ignore = true
[[object.function]]
name = "proxy_getcaps"
[object.function.return]
nullable = false
[[object.function]]
name = "allocate_output_buffer"
[object.function.return]
nullable_return_is_error = "Failed to allocate output buffer"
[[object]]
name = "GstVideo.VideoEncoder"
subclassing = true
status = "generate"
[[object.function]]
......@@ -197,3 +212,17 @@ status = "generate"
[[object.function]]
name = "negotiate"
ignore = true
[[object.function]]
name = "get_allocator"
ignore = true
[[object.function]]
name = "proxy_getcaps"
[object.function.return]
nullable = false
[[object.function]]
name = "allocate_output_buffer"
[object.function.return]
nullable_return_is_error = "Failed to allocate output buffer"
......@@ -29,6 +29,12 @@ generate = [
"GstWebRTC.WebRTCRTPTransceiverDirection",
"GstWebRTC.WebRTCSignalingState",
"GstWebRTC.WebRTCStatsType",
"GstWebRTC.WebRTCBundlePolicy",
"GstWebRTC.WebRTCDataChannelState",
"GstWebRTC.WebRTCICETransportPolicy",
"GstWebRTC.WebRTCPriorityType",
"GstWebRTC.WebRTCSCTPTransportState",
"GstWebRTC.WebRTCFECType",
]
manual = [
......
# NOTE: The canonical repository for gstreamer-rs has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs)!
# gstreamer-rs [![crates.io](https://img.shields.io/crates/v/gstreamer.svg)](https://crates.io/crates/gstreamer) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/commits/master)
[GStreamer](https://gstreamer.freedesktop.org/) bindings for Rust.
......
......@@ -239,10 +239,10 @@ the maximum amount of time to wait for a sample
a `gst::Sample` or NULL when the appsink is stopped or EOS or the timeout expires.
Call `gst_sample_unref` after usage.
<!-- trait AppSinkExt::fn connect_eos -->
<!-- impl AppSink::fn connect_eos -->
Signal that the end-of-stream has been reached. This signal is emitted from
the streaming thread.
<!-- trait AppSinkExt::fn connect_new_preroll -->
<!-- impl AppSink::fn connect_new_preroll -->
Signal that a new preroll sample is available.
This signal is emitted from the streaming thread and only when the
......@@ -254,7 +254,7 @@ or from any other thread.
Note that this signal is only emitted when the "emit-signals" property is
set to `true`, which it is not by default for performance reasons.
<!-- trait AppSinkExt::fn connect_new_sample -->
<!-- impl AppSink::fn connect_new_sample -->
Signal that a new sample is available.
This signal is emitted from the streaming thread and only when the
......@@ -266,7 +266,7 @@ or from any other thread.
Note that this signal is only emitted when the "emit-signals" property is
set to `true`, which it is not by default for performance reasons.
<!-- trait AppSinkExt::fn connect_pull_preroll -->
<!-- impl AppSink::fn connect_pull_preroll -->
Get the last preroll sample in `appsink`. This was the sample that caused the
appsink to preroll in the PAUSED state.
......@@ -289,7 +289,7 @@ element is set to the READY/NULL state.
# Returns
a `gst::Sample` or NULL when the appsink is stopped or EOS.
<!-- trait AppSinkExt::fn connect_pull_sample -->
<!-- impl AppSink::fn connect_pull_sample -->
This function blocks until a sample or EOS becomes available or the appsink
element is set to the READY/NULL state.
......@@ -308,7 +308,7 @@ If an EOS event was received before any buffers, this function returns
# Returns
a `gst::Sample` or NULL when the appsink is stopped or EOS.
<!-- trait AppSinkExt::fn connect_try_pull_preroll -->
<!-- impl AppSink::fn connect_try_pull_preroll -->
Get the last preroll sample in `appsink`. This was the sample that caused the
appsink to preroll in the PAUSED state.
......@@ -337,7 +337,7 @@ the maximum amount of time to wait for the preroll sample
# Returns
a `gst::Sample` or NULL when the appsink is stopped or EOS or the timeout expires.
<!-- trait AppSinkExt::fn connect_try_pull_sample -->
<!-- impl AppSink::fn connect_try_pull_sample -->
This function blocks until a sample or EOS becomes available or the appsink
element is set to the READY/NULL state or the timeout expires.
......@@ -532,6 +532,9 @@ buffers that the appsrc element will push to its source pad. Any
previous caps that were set on appsrc will be replaced by the caps
associated with the sample if not equal.
This function does not take ownership of the
sample so the sample needs to be unreffed after calling this function.
When the block property is TRUE, this function can block until free
space becomes available in the queue.
## `sample`
......@@ -603,13 +606,13 @@ be connected to.
A stream_type stream
## `type_`
the new state
<!-- trait AppSrcExt::fn connect_end_of_stream -->
<!-- impl AppSrc::fn connect_end_of_stream -->
Notify `appsrc` that no more buffer are available.
<!-- trait AppSrcExt::fn connect_enough_data -->
<!-- impl AppSrc::fn connect_enough_data -->
Signal that the source has enough data. It is recommended that the
application stops calling push-buffer until the need-data signal is
emitted again to avoid excessive buffer queueing.
<!-- trait AppSrcExt::fn connect_need_data -->
<!-- impl AppSrc::fn connect_need_data -->
Signal that the source needs more data. In the callback or from another
thread you should call push-buffer or end-of-stream.
......@@ -620,7 +623,7 @@ You can call push-buffer multiple times until the enough-data signal is
fired.
## `length`
the amount of bytes needed.
<!-- trait AppSrcExt::fn connect_push_buffer -->
<!-- impl AppSrc::fn connect_push_buffer -->
Adds a buffer to the queue of buffers that the appsrc element will
push to its source pad. This function does not take ownership of the
buffer so the buffer needs to be unreffed after calling this function.
......@@ -629,7 +632,7 @@ When the block property is TRUE, this function can block until free space
becomes available in the queue.
## `buffer`
a buffer to push
<!-- trait AppSrcExt::fn connect_push_buffer_list -->
<!-- impl AppSrc::fn connect_push_buffer_list -->
Adds a buffer list to the queue of buffers and buffer lists that the
appsrc element will push to its source pad. This function does not take
ownership of the buffer list so the buffer list needs to be unreffed
......@@ -642,7 +645,7 @@ Feature: `v1_14`
## `buffer_list`
a buffer list to push
<!-- trait AppSrcExt::fn connect_push_sample -->
<!-- impl AppSrc::fn connect_push_sample -->
Extract a buffer from the provided sample and adds the extracted buffer
to the queue of buffers that the appsrc element will
push to its source pad. This function set the appsrc caps based on the caps
......@@ -656,7 +659,7 @@ When the block property is TRUE, this function can block until free space
becomes available in the queue.
## `sample`
a sample from which extract buffer to push
<!-- trait AppSrcExt::fn connect_seek_data -->
<!-- impl AppSrc::fn connect_seek_data -->
Seek to the given offset. The next push-buffer should produce buffers from
the new `offset`.
This callback is only called for seekable stream types.
......
This diff is collapsed.
This diff is collapsed.
......@@ -876,7 +876,7 @@ a `guint` describing how many seconds to wait for `waits` to be true
# Returns
a `gboolean` `true` if the waits have been registered, `false` if not.
(Could be that it timed out waiting or that more waits then waits was found)
(Could be that it timed out waiting or that more waits than waits was found)
<!-- impl Harness::fn new -->
Creates a new harness. Works like `Harness::new_with_padnames`, except it
assumes the `gst::Element` sinkpad is named "sink" and srcpad is named "src"
......@@ -1266,6 +1266,27 @@ which is earlier or equal to the time of the clock as given by
MT safe.
## `new_time`
a `gst::ClockTime` later than that returned by `gst::ClockExt::get_time`
<!-- impl TestClock::fn timed_wait_for_multiple_pending_ids -->
Blocks until at least `count` clock notifications have been requested from
`self`, or the timeout expires.
MT safe.
Feature: `v1_16`
## `count`
the number of pending clock notifications to wait for
## `timeout_ms`
the timeout in milliseconds
## `pending_list`
Address
of a `glib::List` pointer variable to store the list of pending `GstClockIDs`
that expired, or `None`
# Returns
a `gboolean` `true` if the waits have been registered, `false` if not.
(Could be that it timed out waiting or that more waits than waits was found)
<!-- impl TestClock::fn wait_for_multiple_pending_ids -->
Blocks until at least `count` clock notifications have been requested from
`self`. There is no timeout for this wait, see the main description of
......@@ -1297,13 +1318,13 @@ Blocks until at least `count` clock notifications have been requested from
use `TestClock::wait_for_multiple_pending_ids` instead.
## `count`
the number of pending clock notifications to wait for
<!-- trait TestClockExt::fn get_property_start-time -->
<!-- impl TestClock::fn get_property_start_time -->
When a `TestClock` is constructed it will have a certain start time set.
If the clock was created using `TestClock::new_with_start_time` then
this property contains the value of the `start_time` argument. If
`TestClock::new` was called the clock started at time zero, and thus
this property contains the value 0.
<!-- trait TestClockExt::fn set_property_start-time -->
<!-- impl TestClock::fn set_property_start_time -->
When a `TestClock` is constructed it will have a certain start time set.
If the clock was created using `TestClock::new_with_start_time` then
this property contains the value of the `start_time` argument. If
......
......@@ -105,6 +105,14 @@ The Identifier or `None`
A reference to the wanted `Asset` or `None`
<!-- impl Asset::fn request_async -->
The `callback` will be called from a running `glib::MainLoop` which is iterating a `glib::MainContext`.
Note that, users should ensure the `glib::MainContext`, since this method will notify
`callback` from the thread which was associated with a thread default
`glib::MainContext` at calling `ges_init`.
For example, if a user wants non-default `glib::MainContext` to be associated
with `callback`, `ges_init` must be called after g_main_context_push_thread_default ()
with custom `glib::MainContext`.
Request a new `Asset` asyncronously, `callback` will be called when the materail is
ready to be used or if an error occured.
......@@ -378,9 +386,9 @@ from the splitting or `None` if the clip can't be split.
The GESLayer where this clip is being used. If you want to connect to its
notify signal you should connect to it with g_signal_connect_after as the
signal emission can be stop in the first fase.
<!-- trait ClipExt::fn get_property_supported-formats -->
<!-- trait ClipExt::fn get_property_supported_formats -->
The formats supported by the clip.
<!-- trait ClipExt::fn set_property_supported-formats -->
<!-- trait ClipExt::fn set_property_supported_formats -->
The formats supported by the clip.
<!-- struct Container -->
The `Container` base class.
......@@ -549,12 +557,12 @@ The gst-launch like bin description of the effect
a newly created `Effect`, or `None` if something went
wrong.
<!-- trait EffectExt::fn get_property_bin-description -->
<!-- trait EffectExt::fn get_property_bin_description -->
The description of the effect bin with a gst-launch-style
pipeline description.
Example: "videobalance saturation=1.5 hue=+0.5"
<!-- trait EffectExt::fn set_property_bin-description -->
<!-- trait EffectExt::fn set_property_bin_description -->
The description of the effect bin with a gst-launch-style
pipeline description.
......@@ -621,21 +629,21 @@ The new empty group.
The duration (in nanoseconds) which will be used in the container
<!-- trait GroupExt::fn set_property_duration -->
The duration (in nanoseconds) which will be used in the container
<!-- trait GroupExt::fn get_property_in-point -->
<!-- trait GroupExt::fn get_property_in_point -->
The in-point at which this `Group` will start outputting data
from its contents (in nanoseconds).
Ex : an in-point of 5 seconds means that the first outputted buffer will
be the one located 5 seconds in the controlled resource.
<!-- trait GroupExt::fn set_property_in-point -->
<!-- trait GroupExt::fn set_property_in_point -->
The in-point at which this `Group` will start outputting data
from its contents (in nanoseconds).
Ex : an in-point of 5 seconds means that the first outputted buffer will
be the one located 5 seconds in the controlled resource.
<!-- trait GroupExt::fn get_property_max-duration -->
<!-- trait GroupExt::fn get_property_max_duration -->
The maximum duration (in nanoseconds) of the `Group`.
<!-- trait GroupExt::fn set_property_max-duration -->
<!-- trait GroupExt::fn set_property_max_duration -->
The maximum duration (in nanoseconds) of the `Group`.
<!-- trait GroupExt::fn get_property_start -->
The position of the object in its container (in nanoseconds).
......@@ -787,9 +795,9 @@ the `Clip` that was added.
Will be emitted after the clip was removed from the layer.
## `clip`
the `Clip` that was removed
<!-- trait LayerExt::fn get_property_auto-transition -->
<!-- trait LayerExt::fn get_property_auto_transition -->
Sets whether transitions are added automagically when clips overlap.
<!-- trait LayerExt::fn set_property_auto-transition -->
<!-- trait LayerExt::fn set_property_auto_transition -->
Sets whether transitions are added automagically when clips overlap.
<!-- trait LayerExt::fn get_property_priority -->
The priority of the layer in the `Timeline`. 0 is the highest
......@@ -959,9 +967,9 @@ the `Timeline` to set on the `self`.
`true` if the `timeline` could be successfully set on the `self`,
else `false`.
<!-- trait GESPipelineExt::fn get_property_audio-sink -->
<!-- trait GESPipelineExt::fn get_property_audio_sink -->
Audio sink for the preview.
<!-- trait GESPipelineExt::fn set_property_audio-sink -->
<!-- trait GESPipelineExt::fn set_property_audio_sink -->
Audio sink for the preview.
<!-- trait GESPipelineExt::fn get_property_mode -->
Pipeline mode. See `GESPipelineExt::set_mode` for more
......@@ -975,9 +983,9 @@ Timeline to use in this pipeline. See also
<!-- trait GESPipelineExt::fn set_property_timeline -->
Timeline to use in this pipeline. See also
`GESPipelineExt::set_timeline` for more info.
<!-- trait GESPipelineExt::fn get_property_video-sink -->
<!-- trait GESPipelineExt::fn get_property_video_sink -->
Video sink for the preview.
<!-- trait GESPipelineExt::fn set_property_video-sink -->
<!-- trait GESPipelineExt::fn set_property_video_sink -->
Video sink for the preview.
<!-- struct Project -->
The `Project` is used to control a set of `Asset` and is a
......@@ -1163,7 +1171,7 @@ Informs you that a `Asset` could not be created. In case of
missing GStreamer plugins, the error will be set to `GST_CORE_ERROR`
`gst::CoreError::MissingPlugin`
## `error`
The `glib::Error` defining the error that accured, might be `None`
The `glib::Error` defining the error that occured, might be `None`
## `id`
The `id` of the asset that failed loading
## `extractable_type`
......@@ -1419,6 +1427,9 @@ we land at that position in the stack of layers inside
the timeline. If `new_layer_priority` is superior than the number
of layers present in the time, it will move to the end of the
stack of layers.
Feature: `v1_16`
## `layer`
The layer to move at `new_layer_priority`
## `new_layer_priority`
......@@ -1515,6 +1526,22 @@ The `TrackElement` for which to choose the tracks it should land into
# Returns
a `glib::PtrArray` of `Track`-s where that object should be added
<!-- trait TimelineExt::fn connect_snapping_ended -->
Will be emitted when the 2 `TrackElement` ended to snap
## `obj1`
the first `TrackElement` that was snapping.
## `obj2`
the second `TrackElement` that was snapping.
## `position`
the position where the two objects finally snapping.
<!-- trait TimelineExt::fn connect_snapping_started -->
Will be emitted when the 2 `TrackElement` first snapped
## `obj1`
the first `TrackElement` that was snapping.
## `obj2`
the second `TrackElement` that was snapping.
## `position`
the position where the two objects finally snapping.
<!-- trait TimelineExt::fn connect_track_added -->
Will be emitted after the track was added to the timeline.
## `track`
......@@ -1523,16 +1550,16 @@ the `Track` that was added to the timeline
Will be emitted after the track was removed from the timeline.
## `track`
the `Track` that was removed from the timeline
<!-- trait TimelineExt::fn get_property_auto-transition -->
<!-- trait TimelineExt::fn get_property_auto_transition -->
Sets whether transitions are added automagically when clips overlap.
<!-- trait TimelineExt::fn set_property_auto-transition -->
<!-- trait TimelineExt::fn set_property_auto_transition -->
Sets whether transitions are added automagically when clips overlap.
<!-- trait TimelineExt::fn get_property_duration -->
Current duration (in nanoseconds) of the `Timeline`
<!-- trait TimelineExt::fn get_property_snapping-distance -->
<!-- trait TimelineExt::fn get_property_snapping_distance -->
Distance (in nanoseconds) from which a moving object will snap
with it neighboors. 0 means no snapping.
<!-- trait TimelineExt::fn set_property_snapping-distance -->
<!-- trait TimelineExt::fn set_property_snapping_distance -->
Distance (in nanoseconds) from which a moving object will snap
with it neighboors. 0 means no snapping.
<!-- struct TimelineElement -->
......@@ -1606,6 +1633,16 @@ The `duration` of `self`
# Returns
The `inpoint` of `self`
<!-- trait TimelineElementExt::fn get_layer_priority -->
Feature: `v1_16`
# Returns
The priority of the first layer the element is in (note that only
groups can span over several layers). `GES_TIMELINE_ELEMENT_NO_LAYER_PRIORITY`
means that the element is not in a layer.
<!-- trait TimelineElementExt::fn get_max_duration -->
# Returns
......@@ -1694,7 +1731,8 @@ be copied to, meaning it will become the start of `self`
# Returns
Paste `self` copying the element
New element resulting of pasting `self`
or `None`
<!-- trait TimelineElementExt::fn ripple -->
Edits `self` in ripple mode. It allows you to modify the
start of `self` and move the following neighbours accordingly.
......@@ -1787,15 +1825,27 @@ Note that if the timeline snap-distance property of the timeline containing
`self` is set, `self` will properly snap to its neighboors.
## `duration`
the duration in `gst::ClockTime`
# Returns
`true` if `duration` could be set.
<!-- trait TimelineElementExt::fn set_inpoint -->
Set the in-point, that is the moment at which the `self` will start
outputting data from its contents.
## `inpoint`
the in-point in `gst::ClockTime`
# Returns
`true` if `inpoint` could be set.
<!-- trait TimelineElementExt::fn set_max_duration -->
Set the maximun duration of the object
## `maxduration`
the maximum duration in `gst::ClockTime`
# Returns
`true` if `maxduration` could be set.
<!-- trait TimelineElementExt::fn set_name -->
Sets the name of object, or gives `self` a guaranteed unique name (if name is NULL).
This function makes a copy of the provided name, so the caller retains ownership
......@@ -1822,6 +1872,10 @@ To set `Effect` priorities `ClipExt::set_top_effect_index` should
be used.
## `priority`
the priority
# Returns
`true` if `priority` could be set.
<!-- trait TimelineElementExt::fn set_start -->
Set the position of the object in its containing layer.
......@@ -1829,6 +1883,10 @@ Note that if the snapping-distance property of the timeline containing
`self` is set, `self` will properly snap to the edges around `start`.
## `start`
the position in `gst::ClockTime`
# Returns
`true` if `start` could be set.
<!-- trait TimelineElementExt::fn set_timeline -->
Sets the timeline of `self` to `timeline`.
## `timeline`
......@@ -1865,21 +1923,21 @@ the property that changed
The duration (in nanoseconds) which will be used in the container
<!-- trait TimelineElementExt::fn set_property_duration -->
The duration (in nanoseconds) which will be used in the container
<!-- trait TimelineElementExt::fn get_property_in-point -->
<!-- trait TimelineElementExt::fn get_property_in_point -->
The in-point at which this `TimelineElement` will start outputting data
from its contents (in nanoseconds).
Ex : an in-point of 5 seconds means that the first outputted buffer will
be the one located 5 seconds in the controlled resource.
<!-- trait TimelineElementExt::fn set_property_in-point -->
<!-- trait TimelineElementExt::fn set_property_in_point -->
The in-point at which this `TimelineElement` will start outputting data
from its contents (in nanoseconds).
Ex : an in-point of 5 seconds means that the first outputted buffer will
be the one located 5 seconds in the controlled resource.
<!-- trait TimelineElementExt::fn get_property_max-duration -->
<!-- trait TimelineElementExt::fn get_property_max_duration -->
The maximum duration (in nanoseconds) of the `TimelineElement`.
<!-- trait TimelineElementExt::fn set_property_max-duration -->
<!-- trait TimelineElementExt::fn set_property_max_duration -->
The maximum duration (in nanoseconds) of the `TimelineElement`.
<!-- trait TimelineElementExt::fn get_property_name -->
The name of the object
......@@ -2055,22 +2113,22 @@ Default value: O
Whether layer mixing is activated or not on the track.
<!-- trait GESTrackExt::fn set_property_mixing -->
Whether layer mixing is activated or not on the track.
<!-- trait GESTrackExt::fn get_property_restriction-caps -->
<!-- trait GESTrackExt::fn get_property_restriction_caps -->
Caps used to filter/choose the output stream.
Default value: `GST_CAPS_ANY`.
<!-- trait GESTrackExt::fn set_property_restriction-caps -->
<!-- trait GESTrackExt::fn set_property_restriction_caps -->
Caps used to filter/choose the output stream.
Default value: `GST_CAPS_ANY`.
<!-- trait GESTrackExt::fn get_property_track-type -->
<!-- trait GESTrackExt::fn get_property_track_type -->
Type of stream the track outputs. This is used when creating the `Track`
to specify in generic terms what type of content will be outputted.
It also serves as a 'fast' way to check what type of data will be outputted
from the `Track` without having to actually check the `Track`'s caps
property.
<!-- trait GESTrackExt::fn set_property_track-type -->
<!-- trait GESTrackExt::fn set_property_track_type -->
Type of stream the track outputs. This is used when creating the `Track`
to specify in generic terms what type of content will be outputted.
......@@ -2358,7 +2416,9 @@ the `gst::ControlSource` to set on the binding.
## `property_name`
The name of the property to control.
## `binding_type`
The type of binding to create. Only "direct" is available for now.
The type of binding to create. Currently the following values are valid:
- "direct": See `gst_direct_control_binding_new`
- "direct-absolute": See `gst_direct_control_binding_new_absolute`
# Returns
......@@ -2428,10 +2488,10 @@ Sets whether the clip is a still image or not.
Sets whether the audio track of this clip is muted or not.
## `mute`
`true` to mute `self` audio track, `false` to unmute it
<!-- trait UriClipExt::fn get_property_is-image -->
<!-- trait UriClipExt::fn get_property_is_image -->
Whether this uri clip represents a still image or not. This must be set
before create_track_elements is called.
<!-- trait UriClipExt::fn set_property_is-image -->
<!-- trait UriClipExt::fn set_property_is_image -->
Whether this uri clip represents a still image or not. This must be set
before create_track_elements is called.
<!-- trait UriClipExt::fn get_property_mute -->
......@@ -2446,7 +2506,7 @@ The location of the file/resource to use.
The `UriClipAsset` is a special `Asset` that lets you handle
the media file to use inside the GStreamer Editing Services. It has APIs that
let you get information about the medias. Also, the tags found in the media file are
set as Metadatas of the Asser.
set as Metadata of the Asset.
# Implements
......@@ -2457,6 +2517,17 @@ Trait containing all `UriClipAsset` methods.
# Implementors
[`UriClipAsset`](struct.UriClipAsset.html)
<!-- impl UriClipAsset::fn finish -->
Finalize the request of an async `UriClipAsset`
Feature: `v1_16`
## `res`
The `gio::AsyncResult` from which to get the newly created `UriClipAsset`
# Returns
The `UriClipAsset` previously requested
<!-- impl UriClipAsset::fn new -->
Creates a `UriClipAsset` for `uri`
......@@ -2470,7 +2541,7 @@ filesource_asset_loaded_cb (GESAsset * source, GAsyncResult * res, gpointer user
GError *error = NULL;
GESUriClipAsset *filesource_asset;
filesource_asset = GES_URI_CLIP_ASSET (ges_asset_request_finish (res, &error));
filesource_asset = ges_uri_clip_asset_finish (res, &error);
if (filesource_asset) {
g_print ("The file: %s is usable as a FileSource, it is%s an image and lasts %" GST_TIME_FORMAT,
ges_asset_get_id (GES_ASSET (filesource_asset))
......@@ -2504,8 +2575,8 @@ You can also use multi file uris for `MultiFileSource`.
# Returns
A reference to the requested asset or
`None` if an error happened
A reference to the requested asset or `None` if
an error happened
<!-- trait UriClipAssetExt::fn get_duration -->
Gets duration of the file represented by `self`
......
......@@ -5,15 +5,27 @@ context. It also provided some wrappers around `gst_base::BaseTransform`'s
`start`, `stop` and `set_caps` virtual methods that ensure an OpenGL context
is available and current in the calling thread.
Feature: `v1_16`
# Implements
[`GLBaseFilterExt`](trait.GLBaseFilterExt.html), [`gst::ObjectExt`](../gst/trait.ObjectExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html)
<!-- trait GLBaseFilterExt -->
Trait containing all `GLBaseFilter` methods.
Feature: `v1_16`
# Implementors
[`GLBaseFilter`](struct.GLBaseFilter.html)
<!-- trait GLBaseFilterExt::fn find_gl_context -->
Feature: `v1_16`
# Returns
Whether an OpenGL context could be retrieved or created successfully
<!-- struct GLBuffer -->
GstGLBuffer is a `gst::Memory` subclass providing support for the mapping of
GL buffers.
......@@ -44,7 +56,7 @@ a `GLContext`
a new `GLColorConvert` object
<!-- impl GLColorConvert::fn fixate_caps -->
Provides an implementation of `gst_base::BaseTransformClass::fixate_caps`()
Provides an implementation of `gst_base::BaseTransformClass.fixate_caps`()
## `context`
a `GLContext` to use for transforming `caps`
## `direction`
......@@ -58,7 +70,7 @@ the `gst::Caps` to fixate
the fixated `gst::Caps`
<!-- impl GLColorConvert::fn transform_caps -->
Provides an implementation of `gst_base::BaseTransformClass::transform_caps`()
Provides an implementation of `gst_base::BaseTransformClass.transform_caps`()
## `context`
a `GLContext` to use for transforming `caps`
## `direction`
......@@ -72,7 +84,7 @@ a set of filter `gst::Caps`
the converted `gst::Caps`
<!-- impl GLColorConvert::fn decide_allocation -->
Provides an implementation of `GstBaseTransfromClass::decide_allocation`()
Provides an implementation of `gst_base::BaseTransformClass.decide_allocation`()
## `query`
a completed ALLOCATION `gst::Query`
......@@ -299,7 +311,7 @@ Gets the OpenGL platform that used by `self`.
The platform specific backing OpenGL context
<!-- trait GLContextExt::fn get_gl_platform_version -->
Get the version of the OpenGL platform (GLX, EGL, etc) used. Only valid
after a call to `gst_gl_context_create_context`.
after a call to `GLContextExt::create`.
## `major`
return for the major version
## `minor`
......@@ -377,6 +389,30 @@ a `GLSLProfile`
# Returns
Whether `self` supports the combination of `version` with `profile`
<!-- trait GLContextExt::fn supports_precision -->
Feature: `v1_16`
## `version`
a `GLSLVersion`
## `profile`
a `GLSLProfile`
# Returns
whether `self` supports the 'precision' specifier in GLSL shaders
<!-- trait GLContextExt::fn supports_precision_highp -->
Feature: `v1_16`
## `version`
a `GLSLVersion`
## `profile`
a `GLSLProfile`
# Returns
whether `self` supports the 'precision highp' specifier in GLSL shaders
<!-- trait GLContextExt::fn swap_buffers -->
Swap the front and back buffers on the window attached to `self`.
This will display the frame on the next refresh cycle.
......@@ -432,7 +468,7 @@ Trait containing all `GLDisplay` methods.
# Implementors
[`GLDisplayEGL`](struct.GLDisplayEGL.html), [`GLDisplay`](struct.GLDisplay.html)
[`GLDisplayEGL`](struct.GLDisplayEGL.html), [`GLDisplayWayland`](struct.GLDisplayWayland.html), [`GLDisplayX11`](struct.GLDisplayX11.html), [`GLDisplay`](struct.GLDisplay.html)
<!-- impl GLDisplay::fn new -->
# Returns
......@@ -551,6 +587,54 @@ pointer to a display (or 0)
# Returns
A `EGLDisplay` or `EGL_NO_DISPLAY`
<!-- struct GLDisplayWayland -->
the contents of a `GLDisplayWayland` are private and should only be accessed
through the provided API
# Implements
[`GLDisplayExt`](trait.GLDisplayExt.html), [`gst::ObjectExt`](../gst/trait.ObjectExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html)
<!-- impl GLDisplayWayland::fn new -->
Create a new `GLDisplayWayland` from the wayland display name. See `wl_display_connect`
for details on what is a valid name.
## `name`
a display name
# Returns
a new `GLDisplayWayland` or `None`
<!-- impl GLDisplayWayland::fn new_with_display -->
Creates a new display connection from a wl_display Display.
## `display`
an existing, wayland display
# Returns
a new `GLDisplayWayland`
<!-- struct GLDisplayX11 -->
the contents of a `GLDisplayX11` are private and should only be accessed
through the provided API
# Implements
[`GLDisplayExt`](trait.GLDisplayExt.html), [`gst::ObjectExt`](../gst/trait.ObjectExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html)
<!-- impl GLDisplayX11::fn new -->
Create a new `GLDisplayX11` from the x11 display name. See XOpenDisplay()
for details on what is a valid name.
## `name`
a display name
# Returns
a new `GLDisplayX11` or `None`
<!-- impl GLDisplayX11::fn new_with_display -->
Creates a new display connection from a X11 Display.
## `display`
an existing, x11 display
# Returns
a new `GLDisplayX11`
<!-- enum GLFormat -->
<!-- enum GLFormat::variant Luminance -->
Single component replicated across R, G, and B textures
......@@ -575,12 +659,18 @@ Three 8-bit components stored in the R, G, and B
<!-- enum GLFormat::variant Rgb565 -->
Three components of bit depth 5, 6 and 5 stored in the R, G,
and B texture components respectively.
<!-- enum GLFormat::variant Rgb16 -->
Three 16-bit components stored in the R, G, and B
texture components
<!-- enum GLFormat::variant Rgba -->
Four components stored in the R, G, B, and A texture
components respectively.
<!-- enum GLFormat::variant Rgba8 -->
Four 8-bit components stored in the R, G, B, and A texture
components respectively.
<!-- enum GLFormat::variant Rgba16 -->
Four 16-bit components stored in the R, G, B, and A texture
components respectively.
<!-- enum GLFormat::variant DepthComponent16 -->
A single 16-bit component for depth information.
<!-- enum GLFormat::variant Depth24Stencil8 -->
......@@ -895,6 +985,58 @@ a `glib::Error`
# Returns
a new `shader` with the specified stages.
<!-- impl GLShader::fn string_fragment_external_oes_get_default -->
Feature: `v1_16`
## `context`
a `GLContext`
## `version`
a `GLSLVersion`
## `profile`
a `GLSLProfile`
# Returns
a passthrough shader string for copying an input external-oes
texture to the output
<!-- impl GLShader::fn string_fragment_get_default -->
Feature: `v1_16`
## `context`
a `GLContext`
## `version`
a `GLSLVersion`
## `profile`
a `GLSLProfile`
# Returns
a passthrough shader string for copying an input texture to
the output
<!-- impl GLShader::fn string_get_highest_precision -->
Generates a shader string that defines the precision of float types in
GLSL shaders. This is particularly needed for fragment shaders in a
GLSL ES context where there is no default precision specified.
Practically, this will return the string 'precision mediump float'
or 'precision highp float' depending on if high precision floats are
determined to be supported.
Feature: `v1_16`
## `context`
a `GLContext`
## `version`
a `GLSLVersion`
## `profile`
a `GLSLProfile`
# Returns
a shader string defining the precision of float types based on
`context`, `version` and `profile`
<!-- impl GLShader::fn attach -->
Attaches `stage` to `self`. `stage` must have been successfully compiled
with `GLSLStage::compile`.
......@@ -1221,6 +1363,12 @@ Mark's `self` as being used for the next GL draw command.
Note: must be called in the GL thread and `self` must have been linked.
<!-- enum GLStereoDownmix -->
Output anaglyph type to generate when downmixing to mono
<!-- enum GLStereoDownmix::variant GreenMagentaDubois -->
Dubois optimised Green-Magenta anaglyph
<!-- enum GLStereoDownmix::variant RedCyanDubois -->
Dubois optimised Red-Cyan anaglyph
<!-- enum GLStereoDownmix::variant AmberBlueDubois -->
Dubois optimised Amber-Blue anaglyph
<!-- enum GLTextureTarget -->
<!-- enum GLTextureTarget::variant None -->
no texture target
......@@ -1298,7 +1446,7 @@ Convert stereoscopic/multiview video using fragment shaders.
a new `GLViewConvert`
<!-- impl GLViewConvert::fn fixate_caps -->
Provides an implementation of `gst_base::BaseTransformClass::fixate_caps`()
Provides an implementation of `gst_base::BaseTransformClass.fixate_caps`()
## `direction`
a `gst::PadDirection`
## `caps`
......@@ -1350,7 +1498,7 @@ a `gst::Buffer`
a `gst::FlowReturn`
<!-- impl GLViewConvert::fn transform_caps -->
Provides an implementation of `gst_base::BaseTransformClass::transform_caps`()
Provides an implementation of `gst_base::BaseTransformClass.transform_caps`()
## `direction`
a `gst::PadDirection`
## `caps`
......@@ -1381,6 +1529,15 @@ a `GLDisplay`
# Returns
a new `GLWindow` using `display`'s connection
<!-- trait GLWindowExt::fn controls_viewport -->
Checks if `self` controls the GL viewport.
Feature: `v1_16`
# Returns
`true` if `self` controls the GL viewport, otherwise `false`
<!-- trait GLWindowExt::fn draw -->
Redraw the window contents. Implementations should invoke the draw callback.
<!-- trait GLWindowExt::fn get_context -->
......@@ -1411,8 +1568,16 @@ for them. This method allows you to disable events handling completely
from the `self`.
## `handle_events`
a `gboolean` indicating if events should be handled or not.
<!-- trait GLWindowExt::fn queue_resize -->
Queue resizing of `self`.
<!-- trait GLWindowExt::fn quit -->
Quit the runloop's execution.
<!-- trait GLWindowExt::fn resize -->
Resize `self` to the given `width` and `height`.
## `width`
new width
## `height`
new height
<!-- trait GLWindowExt::fn run -->
Start the execution of the runloop.
<!-- trait GLWindowExt::fn send_message -->
......