Skip to content
Commits on Source (234)
stages:
- "lint"
- "test"
.cargo_cache: &cache
cache:
key: "gst"
paths:
- ".cargo_cache/"
.cargo_test_template: &cargo_test
stage: "test"
variables:
DEPENDENCIES: |
curl
liborc-dev
libglib2.0-dev
libxml2-dev
libgtk-3-dev
libegl1-mesa
libgles2-mesa
libgl1-mesa-dri
libgl1-mesa-glx
libwayland-egl1-mesa
<<: *cache
before_script:
- apt-get update -yqq
- apt-get install -yqq --no-install-recommends $DEPENDENCIES
# Only stuff inside the repo directory can be cached
# Override the CARGO_HOME variable to force its location
- export CARGO_HOME="${PWD}/.cargo_cache"
- mkdir -p precompiled-gst && cd precompiled-gst
- curl -L https://people.freedesktop.org/~slomo/gstreamer-1.14.3.tar.gz | tar xz
- 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
- export GST_PLUGIN_SCANNER=$PWD/gstreamer/libexec/gstreamer-1.0/gst-plugin-scanner
- export PATH=$PATH:$PWD/gstreamer/bin
- export LD_LIBRARY_PATH=$PWD/gstreamer/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
script:
- rustc --version
- cargo build --color=always --all
- G_DEBUG=fatal_warnings cargo test --color=always --all
- cargo build --color=always --all --all-features
- G_DEBUG=fatal_warnings cargo test --color=always --all --all-features
test 1.31:
# 1.31 img
# https://hub.docker.com/_/rust/
image: "rust:1.31-slim"
<<: *cargo_test
test stable:
# Stable img
# https://hub.docker.com/_/rust/
image: "rust:slim"
<<: *cargo_test
test nightly:
# Nightly
# https://hub.docker.com/r/rustlang/rust/
image: "rustlang/rust:nightly-slim"
allow_failure: true
<<: *cargo_test
rustfmt:
image: "rust:slim"
stage: "lint"
script:
- rustup component add rustfmt
- cargo fmt --version
- cargo fmt -- --color=always --check
dist: trusty
sudo: required
language: rust
cache:
cargo: true
rust:
- stable
- beta
......@@ -14,6 +12,11 @@ addons:
- libglib2.0-dev
- libxml2-dev
- libgtk-3-dev
- libegl1-mesa
- libgles2-mesa
- libgl1-mesa-dri
- libgl1-mesa-glx
- libwayland-egl1-mesa
matrix:
allow_failures:
......@@ -22,12 +25,12 @@ matrix:
script:
- rustc --version
- cargo build --all
- cargo test --all
- G_DEBUG=fatal_warnings cargo test --all
- cargo build --all --all-features
- cargo test --all --all-features
- G_DEBUG=fatal_warnings cargo test --all --all-features
before_install:
- curl -L https://people.freedesktop.org/~slomo/gstreamer.tar.gz | tar xz
- curl -L https://people.freedesktop.org/~slomo/gstreamer-1.14.3.tar.gz | tar xz
- 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
......
......@@ -13,6 +13,9 @@ members = [
"gstreamer-video",
"gstreamer-pbutils",
"gstreamer-webrtc",
"gstreamer-check",
"gstreamer-editing-services",
"gstreamer-gl",
"examples",
"tutorials",
]
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......@@ -16,7 +17,6 @@ external_libraries = [
generate = [
"Gst.ClockTimeDiff",
"Gst.Pipeline",
"Gst.State",
"Gst.StateChange",
"Gst.SeekFlags",
......@@ -40,6 +40,7 @@ generate = [
"Gst.StreamFlags",
"Gst.ProgressType",
"Gst.BusSyncReply",
"Gst.TagFlag",
"Gst.TagMergeMode",
"Gst.PadProbeType",
"Gst.PadProbeReturn",
......@@ -83,7 +84,14 @@ conversion_type = "scalar"
[[object]]
name = "Gst.Bin"
subclassing = true
status = "generate"
trait_name = "GstBinExt"
[[object.signal]]
name = "do-latency"
# Use Result<(), glib::BoolError>
ignore = true
[[object.function]]
name = "add"
[object.function.return]
......@@ -107,7 +115,12 @@ status = "generate"
[[object]]
name = "Gst.Bus"
status = "generate"
trait = false
final_type = true
[[object.function]]
name = "set_sync_handler"
# Into<Option<_>> makes this hard to use
ignore = true
[[object.function]]
name = "add_signal_watch_full"
# Priority
......@@ -131,6 +144,21 @@ trait = false
# More convenient manual implementation
ignore = true
[[object.function]]
name = "add_watch"
# More specific trait bounds possible for the closure
ignore = true
[[object.function]]
name = "add_watch_full"
# More specific trait bounds possible for the closure
ignore = true
[[object.function]]
name = "remove_watch"
[object.function.return]
bool_return_is_error = "Bus has no event source"
[[object.signal]]
name = "message"
concurrency = "send"
......@@ -273,6 +301,11 @@ name = "Gst.TocEntry"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.Pipeline"
subclassing = true
status = "generate"
[[object]]
name = "Gst.Promise"
status = "manual"
......@@ -311,6 +344,7 @@ status = "generate"
[[object]]
name = "Gst.Element"
subclassing = true
status = "generate"
[[object.function]]
name = "make_from_uri"
......@@ -318,6 +352,11 @@ status = "generate"
# It is already a Result
nullable = false
[[object.function]]
name = "call_async"
# more specific closure type possible
ignore = true
[[object.function]]
name = "add_pad"
[object.function.return]
......@@ -378,6 +417,26 @@ status = "generate"
[object.function.return]
bool_return_is_error = "Failed to sync state with parent"
[[object.function]]
name = "change_state"
# Use Result<StateChangeSuccess, StateChangeError>
ignore = true
[[object.function]]
name = "continue_state"
# Use Result<StateChangeSuccess, StateChangeError>
ignore = true
[[object.function]]
name = "get_state"
# Use Result<StateChangeSuccess, StateChangeError>
ignore = true
[[object.function]]
name = "set_state"
# Use Result<StateChangeSuccess, StateChangeError>
ignore = true
[[object.function]]
name = "query"
# correct mutability
......@@ -458,20 +517,25 @@ status = "generate"
# better manual function
ignore = true
[[object.function]]
name = "register"
[object.function.return]
bool_return_is_error = "Failed to register element factory"
[[object]]
name = "Gst.ElementFactory"
status = "generate"
trait = false
final_type = true
[[object]]
name = "Gst.TypeFindFactory"
status = "generate"
trait = false
final_type = true
[[object]]
name = "Gst.DeviceProviderFactory"
status = "generate"
trait = false
final_type = true
[[object]]
name = "Gst.DeviceProvider"
......@@ -486,6 +550,11 @@ status = "generate"
[object.function.return]
bool_return_is_error = "Failed to start"
[[object.function]]
name = "register"
[object.function.return]
bool_return_is_error = "Failed to register device provider factory"
[[object.function]]
name = "get_metadata"
# better manual function
......@@ -499,6 +568,11 @@ status = "generate"
# Work-around for 1.14 switch from transfer-floating to transfer-full
ignore = true
[[object.function]]
name = "add_filter"
# Return Option<DeviceMonitorFilterId>
ignore = true
[[object.function]]
name = "get_bus"
[object.function.return]
......@@ -509,6 +583,11 @@ status = "generate"
[object.function.return]
bool_return_is_error = "Failed to start"
[[object.function]]
name = "remove_filter"
# Use DeviceMonitorFilterId and return Result<(), glib::BoolError>
ignore = true
[[object]]
name = "Gst.Device"
status = "generate"
......@@ -522,6 +601,11 @@ status = "generate"
[object.function.return]
nullable = false
[[object.function]]
name = "reconfigure_element"
[object.function.return]
bool_return_is_error = "Failed to reconfigure the element to use this device"
[[object]]
name = "Gst.Object"
# For renaming the trait...
......@@ -560,11 +644,17 @@ trait_name = "GstObjectExt"
[[object]]
name = "Gst.Pad"
subclassing = true
status = "generate"
[[object.function]]
name = "link_maybe_ghosting"
[object.function.return]
bool_return_is_error = "Failed to link pad, possibly ghosting"
bool_return_is_error = "Failed to link pads, possibly ghosting"
[[object.function]]
name = "link_maybe_ghosting_full"
[object.function.return]
bool_return_is_error = "Failed to link pads, possibly ghosting"
[[object.function]]
name = "unlink"
......@@ -626,6 +716,11 @@ status = "generate"
# Buffer can be NULL
ignore = true
[[object.function]]
name = "get_last_flow_return"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object.function]]
name = "query"
# Correct mutability
......@@ -666,6 +761,21 @@ status = "generate"
# Pass by value
ignore = true
[[object.function]]
name = "link"
# Use Result<PadLinkSuccess, PadLinkError>
ignore = true
[[object.function]]
name = "link_full"
# Use Result<PadLinkSuccess, PadLinkError>
ignore = true
[[object.function]]
name = "store_sticky_event"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object.function]]
name = "new_from_static_template"
# Correct mutability
......@@ -706,10 +816,30 @@ status = "generate"
# Wrong place
ignore = true
[[object.function]]
pattern = "set_.*_function_full"
# More specific closure trait bounds possible
ignore = true
[[object.function]]
name = "start_task"
# More specific closure trait bounds possible
ignore = true
[[object.function]]
name = "sticky_events_foreach"
# Complex closure argument handling
ignore = true
[[object.function]]
name = "add_probe"
# Complex closure argument handling
ignore = true
[[object]]
name = "Gst.PadTemplate"
status = "generate"
trait = false
final_type = true
[[object.function]]
name = "new_from_static_pad_template_with_gtype"
# static pad template manual
......@@ -717,6 +847,7 @@ trait = false
[[object]]
name = "Gst.GhostPad"
subclassing = true
status = "generate"
[[object.function]]
name = "set_target"
......@@ -767,7 +898,7 @@ status = "generate"
[[object]]
name = "Gst.Stream"
status = "generate"
trait = false
final_type = true
[[object.function]]
name = "new"
# Work-around for 1.14 switch from transfer-floating to transfer-full
......@@ -776,16 +907,26 @@ trait = false
[[object]]
name = "Gst.StreamCollection"
status = "generate"
trait = false
final_type = true
[[object.function]]
name = "new"
# Work-around for 1.14 switch from transfer-floating to transfer-full
ignore = true
[[object.function]]
name = "add_stream"
# Ignore return value which is always `true`
ignore = true
[[object]]
name = "Gst.Plugin"
status = "generate"
trait = false
final_type = true
[[object.function]]
pattern = "register_static.*"
# Needs manual implementation
ignore = true
[[object.function]]
name = "list_free"
......@@ -851,7 +992,7 @@ status = "generate"
[[object]]
name = "Gst.Registry"
status = "generate"
trait = false
final_type = true
[[object.function]]
pattern = "fork_.*"
......@@ -1127,6 +1268,11 @@ status = "generate"
# wrong mutable for context parameter
ignore = true
[[object.function]]
name = "update_registry"
[object.function.return]
bool_return_is_error = "Failed to update the registry"
[[object.function]]
name = "util_group_id_next"
# newtype wrapper
......
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......@@ -34,7 +35,7 @@ manual = [
[[object]]
name = "GstApp.AppSink"
status = "generate"
trait = false
final_type = true
[[object.signal]]
name = "pull-sample"
......@@ -56,6 +57,16 @@ trait = false
# Action signal
ignore = true
[[object.signal]]
name = "new-sample"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object.signal]]
name = "new-preroll"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object.function]]
name = "set_caps"
[[object.function.parameter]]
......@@ -65,7 +76,7 @@ trait = false
[[object]]
name = "GstApp.AppSrc"
status = "generate"
trait = false
final_type = true
[[object.function]]
name = "push_buffer"
......@@ -97,6 +108,16 @@ trait = false
# Action signal
ignore = true
[[object.function]]
name = "end_of_stream"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object.function]]
name = "push_sample"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object.function]]
name = "set_latency"
# ClockTime
......
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......@@ -16,8 +17,6 @@ external_libraries = [
]
generate = [
"GstBase.BaseSink",
"GstBase.BaseTransform",
"GstBase.PushSrc",
]
......@@ -38,8 +37,8 @@ manual = [
[[object]]
name = "GstBase.Adapter"
status = "generate"
trait = false
concurrency = "none"
final_type = true
concurrency = "send-unique"
[[object.function]]
name = "map"
......@@ -70,21 +69,69 @@ concurrency = "none"
name = "GstBase.FlowCombiner"
# Manual because ref/unref functions were added much later
status = "manual"
trait = false
final_type = true
concurrency = "none"
[[object]]
name = "GstBase.BaseSink"
subclassing = true
status = "generate"
[[object.function]]
name = "wait"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object.function]]
name = "wait_preroll"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object]]
name = "GstBase.BaseSrc"
subclassing = true
status = "generate"
[[object.function]]
name = "set_caps"
[object.function.return]
bool_return_is_error = "Failed to set caps"
[[object.function]]
name = "start_complete"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object.function]]
name = "start_wait"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object.function]]
name = "submit_buffer_list"
# Pass by value, to be added manually
ignore = true
[[object.function]]
name = "wait_playing"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object]]
name = "GstBase.BaseTransform"
subclassing = true
status = "generate"
[[object.function]]
name = "update_src_caps"
[object.function.return]
bool_return_is_error = "Failed to update src caps"
[[object]]
name = "GstBase.Aggregator"
status = "generate"
subclassing = true
version = "1.14"
[[object.function]]
......@@ -99,6 +146,7 @@ version = "1.14"
[[object]]
name = "GstBase.AggregatorPad"
status = "generate"
subclassing = true
version = "1.14"
[[object]]
......
[options]
girs_dir = "gir-files"
library = "GstCheck"
version = "1.0"
min_cfg_version = "1.8"
target_path = "gstreamer-check"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
"GObject",
"Gst",
]
generate = [
]
manual = [
"GObject.Object",
"Gst.Object",
"Gst.Clock",
"Gst.ClockTimeDiff",
"Gst.ClockType",
"GstCheck.Harness",
]
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
[[object]]
name = "GstCheck.TestClock"
status = "generate"
final_type = true
[options]
girs_dir = "gir-files"
library = "GES"
version = "1.0"
min_cfg_version = "1.8"
target_path = "gstreamer-editing-services"
work_mode = "normal"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
"GObject",
"Gio",
"Gst",
"GstPbutils",
]
manual = [
"GLib.Error",
"GLib.Source",
"GLib.DateTime",
"Gio.Cancellable",
"Gio.AsyncReadyCallback",
"GObject.Object",
"Gst.Segment",
"Gst.StaticCaps",
"Gst.StaticPadTemplate",
"GstPbutils.EncodingProfile",
"GstPbutils.DiscovererInfo",
"GstPbutils.DiscovererStreamInfo",
"Gst.Object",
"Gst.Element",
"Gst.Pad",
"Gst.Pipeline",
]
generate = [
"GES.EditMode",
"GES.PipelineFlags",
"GES.Edge",
"GES.Effect",
"GES.TrackType",
"GES.BaseEffect",
"GES.Group",
"GES.UriClip",
"GES.UriClipAsset",
"GES.UriSourceAsset",
]
[[object]]
name = "Gst.Structure"
status = "manual"
ref_mode = "ref-mut"
[[object]]
name = "Gst.Caps"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.Buffer"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.BufferList"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.Sample"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
[[object]]
name = "GES.Timeline"
status = "generate"
[[object.function]]
name = "append_layer"
[object.function.return]
nullable = false
[[object.function]]
name = "load_from_uri"
[object.function.return]
bool_return_is_error = "Failed to load from uri"
[[object.function]]
name = "add_layer"
[object.function.return]
bool_return_is_error = "Failed to add layer"
[[object.function]]
name = "remove_layer"
[object.function.return]
bool_return_is_error = "Failed to remove layer"
[[object.function]]
name = "add_track"
[object.function.return]
bool_return_is_error = "Failed to add track"
[[object.function]]
name = "move_layer"
[object.function.return]
bool_return_is_error = "Failed to move layer"
[[object.function]]
name = "remove_track"
[object.function.return]
bool_return_is_error = "Failed to remove track"
[[object]]
name = "GES.Container"
status = "generate"
trait_name = "GESContainerExt"
[[object.function]]
name = "add"
[object.function.return]
bool_return_is_error = "Failed to add element"
[[object.function]]
name = "remove"
[object.function.return]
bool_return_is_error = "Failed to remove element"
[[object.function]]
name = "edit"
[object.function.return]
bool_return_is_error = "Failed to edit container"
[[object]]
name = "GES.Pipeline"
status = "generate"
trait_name = "GESPipelineExt"
[[object.function]]
name = "set_render_settings"
[object.function.return]
bool_return_is_error = "Failed to set render settings"
[[object.function]]
name = "set_mode"
[object.function.return]
bool_return_is_error = "Failed to set mode"
[[object.function]]
name = "save_thumbnail"
[object.function.return]
bool_return_is_error = "Failed to save thumbnail"
[[object.function]]
name = "set_timeline"
[object.function.return]
bool_return_is_error = "Failed to set timeline"
[[object]]
name = "GES.Track"
status = "generate"
trait_name = "GESTrackExt"
[[object.function]]
name = "add_element"
[object.function.return]
bool_return_is_error = "Failed to add element"
[[object.function]]
name = "remove_element"
[object.function.return]
bool_return_is_error = "Failed to remove element"
[[object]]
name = "GES.Asset"
status = "generate"
[[object.function]]
name = "set_proxy"
[object.function.return]
bool_return_is_error = "Failed to set proxy"
[[object.function]]
name = "unproxy"
[object.function.return]
bool_return_is_error = "Failed to unproxy asset"
[[object]]
name = "GES.Clip"
status = "generate"
[[object.function]]
name = "move_to_layer"
[object.function.return]
bool_return_is_error = "Failed to move clip to specified layer"
[[object.function]]
name = "set_top_effect_index"
[object.function.return]
bool_return_is_error = "Failed to move effect"
[[object.function]]
name = "set_top_effect_priority"
[object.function.return]
bool_return_is_error = "Failed to the set top effect priority"
[[object]]
name = "GES.Extractable"
status = "generate"
[[object.function]]
name = "set_asset"
[object.function.return]
bool_return_is_error = "Failed to set asset"
[[object]]
name = "GES.Layer"
status = "generate"
[[object.function]]
name = "add_clip"
[object.function.return]
bool_return_is_error = "Failed to add clip"
[[object.function]]
name = "remove_clip"
[object.function.return]
bool_return_is_error = "Failed to remove clip"
[[object]]
name = "GES.Project"
status = "generate"
[[object.function]]
name = "add_encoding_profile"
[object.function.return]
bool_return_is_error = "Failed to add profile"
[[object.function]]
name = "remove_asset"
[object.function.return]
bool_return_is_error = "Failed to remove asset"
[[object]]
name = "GES.TimelineElement"
status = "generate"
[[object.function]]
name = "ripple"
[object.function.return]
bool_return_is_error = "Failed to ripple"
[[object.function]]
name = "ripple_end"
[object.function.return]
bool_return_is_error = "Failed to ripple"
[[object.function]]
name = "roll_end"
[object.function.return]
bool_return_is_error = "Failed to roll"
[[object.function]]
name = "roll_start"
[object.function.return]
bool_return_is_error = "Failed to roll"
[[object.function]]
name = "set_name"
[object.function.return]
bool_return_is_error = "Failed to set name"
[[object.function]]
name = "set_parent"
[object.function.return]
bool_return_is_error = "`TimelineElement` already had a parent or its parent was the same as specified"
[[object.function]]
name = "set_timeline"
[object.function.return]
bool_return_is_error = "`Failed to set timeline"
[[object.function]]
name = "trim"
[object.function.return]
bool_return_is_error = "`Failed to trim"
[[object]]
name = "GES.TrackElement"
status = "generate"
[[object.function]]
name = "edit"
[object.function.return]
bool_return_is_error = "Failed to edit"
[[object.function]]
name = "remove_control_binding"
[object.function.return]
bool_return_is_error = "Failed to remove control binding"
\ No newline at end of file
[options]
girs_dir = "gir-files"
library = "GstGL"
version = "1.0"
min_cfg_version = "1.14"
target_path = "gstreamer-gl"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
"GObject",
"Gst",
"GstBase",
"GstVideo",
]
generate = [
# BitFlags
"GstGL.GLAPI",
"GstGL.GLDisplayType",
"GstGL.GLPlatform",
"GstGL.GLSLProfile",
# Enums
"GstGL.GLFormat",
"GstGL.GLQueryType",
"GstGL.GLSLVersion",
"GstGL.GLTextureTarget",
"GstGL.GLStereoDownmix",
"GstGL.GLUploadReturn",
# Enums Errors
#"GstGL.GLBaseMemoryError",
"GstGL.GLContextError",
"GstGL.GLSLError",
"GstGL.GLWindowError",
# Records
#"GstGL.GLAllocationParams",
#"GstGL.GLRenderbufferAllocationParams",
#"GstGL.GLVideoAllocationParams",
# Objects
"GstGL.GLBaseFilter",
#"GstGL.GLBufferPool",
"GstGL.GLFramebuffer",
#"GstGL.GLBaseMemory",
#"GstGL.GLBaseMemoryAllocator",
#"GstGL.GLMemoryPBOAllocator",
#"GstGL.GLRenderbufferAllocator",
]
manual = [
"GLib.Error",
"GLib.Thread",
"GObject.Object",
"Gst.Object",
"Gst.FlowReturn",
"Gst.PadDirection",
"GstVideo.VideoMultiviewFlags",
"GstVideo.VideoMultiviewMode",
]
[[object]]
name = "Gst.Structure"
status = "manual"
ref_mode = "ref-mut"
[[object]]
name = "Gst.Buffer"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.Caps"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.Query"
status = "manual"
ref_mode = "ref"
[[object]]
name = "GstGL.GLBuffer"
status = "manual"
ref_mode = "ref"
[[object]]
name = "GstGL.GLQuery"
status = "manual"
ref_mode = "ref"
[[object]]
name = "GstGL.GLContext"
status = "generate"
[[object.function]]
name = "new_wrapped"
# input handle
ignore = true
[[object.function]]
name = "get_gl_context"
# return handle
ignore = true
[[object.function]]
name = "get_current_gl_context"
# return handle
ignore = true
[[object.function]]
name = "get_proc_address"
ignore = true
[[object.function]]
name = "default_get_proc_address"
ignore = true
[[object.function]]
name = "get_proc_address_with_platform"
ignore = true
[[object.function]]
name = "thread_add"
# unimplemented GLContextThreadFunc
ignore = true
[[object.function]]
name = "get_thread"
# glib::Thread not found in `glib`
ignore = true
[[object.function]]
name = "get_gl_context_for_thread"
# glib::Thread not found in `glib`
ignore = true
[[object.function]]
name = "error_quark"
# bad error domian definition in gir
ignore = true
[[object.function]]
name = "activate"
[object.function.return]
bool_return_is_error = "Failed to activate OpenGL context"
[[object.function]]
name = "get_display"
[object.function.return]
nullable = false
[[object.function]]
name = "set_window"
[object.function.return]
bool_return_is_error = "Failed to set window"
[[object]]
name = "GstGL.GLDisplay"
status = "generate"
[[object.function]]
name = "find_window"
# unimplemented pointer
ignore = true
[[object.function]]
name = "get_handle"
# return handle
ignore = true
[[object.function]]
name = "get_gl_context_for_thread"
# glib::Thread not found in `glib`
ignore = true
[[object.function]]
name = "add_context"
[object.function.return]
bool_return_is_error = "Failed to add OpenGL context"
[[object.function]]
name = "remove_window"
[object.function.return]
bool_return_is_error = "Failed to remove window"
[[object]]
name = "GstGL.GLDisplayEGL"
status = "generate"
final_type = true
cfg_condition = "feature = \"egl\""
[[object]]
name = "GstGL.GLWindow"
status = "generate"
[[object.function]]
name = "get_window_handle"
# return native handle
ignore = true
[[object.function]]
name = "send_message"
# callback
ignore = true
[[object.function]]
name = "send_message_async"
# callback
ignore = true
[[object.function]]
name = "set_close_callback"
# callback
ignore = true
[[object.function]]
name = "set_draw_callback"
# callback
ignore = true
[[object.function]]
name = "set_render_rectangle"
[object.function.return]
bool_return_is_error = "Failed to set the specified region"
[[object.function]]
name = "set_resize_callback"
# callback
ignore = true
[[object.function]]
name = "set_window_handle"
# handle
ignore = true
[[object.function]]
name = "get_display"
# handle
ignore = true
[[object.function]]
name = "error_quark"
# bad error domian definition in gir
ignore = true
[[object]]
name = "GstGL.GLColorConvert"
status = "generate"
final_type = true
[[object.function]]
name = "set_caps"
[object.function.return]
bool_return_is_error = "Failed to set caps"
[[object.function]]
name = "decide_allocation"
# correct mutability
ignore = true
[[object.function]]
name = "fixate_caps"
# correct reference ownership
ignore = true
[[object.function]]
name = "perform"
# transfer gst::Buffer not reference
ignore = true
[[object]]
name = "GstGL.GLOverlayCompositor"
status = "generate"
final_type = true
[[object.function]]
name = "upload_overlays"
# correct mutability
ignore = true
[[object]]
name = "GstGL.GLSLStage"
status = "generate"
final_type = true
[[object.function]]
name = "set_strings"
[object.function.return]
bool_return_is_error = "Failed to attach stage to set strings"
[[object]]
name = "GstGL.GLShader"
status = "generate"
final_type = true
[[object.function]]
name = "attach"
[object.function.return]
bool_return_is_error = "Failed to attach stage to shader"
[[object.function]]
name = "attach_unlocked"
[object.function.return]
bool_return_is_error = "Failed to attach stage to shader"
[[object.function]]
name = "set_uniform_matrix_2fv"
# array with size
ignore = true
[[object.function]]
name = "set_uniform_matrix_2x3fv"
# array with size
ignore = true
[[object.function]]
name = "set_uniform_matrix_2x4fv"
# array with size
ignore = true
[[object.function]]
name = "set_uniform_matrix_3fv"
# array with size
ignore = true
[[object.function]]
name = "set_uniform_matrix_3x2fv"
# array with size
ignore = true
[[object.function]]
name = "set_uniform_matrix_3x4fv"
# array with size
ignore = true
[[object.function]]
name = "set_uniform_matrix_4fv"
# array with size
ignore = true
[[object.function]]
name = "set_uniform_matrix_4x2fv"
# array with size
ignore = true
[[object.function]]
name = "set_uniform_matrix_4x3fv"
# array with size
ignore = true
[[object]]
name = "GstGL.GLUpload"
status = "generate"
final_type = true
[[object.function]]
name = "set_caps"
[object.function.return]
bool_return_is_error = "Failed to set caps"
[[object.function]]
name = "perform_with_buffer"
# Result<Buffer, GLUploadReturn>
ignore = true
[[object.function]]
name = "propose_allocation"
# fix mutability
ignore = true
[[object.function]]
name = "get_input_template_caps"
[object.function.return]
nullable = false
[[object]]
name = "GstGL.GLViewConvert"
status = "generate"
final_type = true
[[object.function]]
name = "set_caps"
[object.function.return]
bool_return_is_error = "Failed to set caps"
[[object.function]]
name = "fixate_caps"
# correct reference ownership
ignore = true
[[object.function]]
name = "get_output"
# Result<Buffer, FlowReturn>
ignore = true
[[object.function]]
name = "tranform_caps"
[object.function.return]
nullable = false
[[object.function]]
name = "submit_input_buffer"
# Buffer ownership transfer
ignore = true
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......@@ -34,7 +35,7 @@ conversion_type = "scalar"
[[object]]
name = "GstNet.NtpClock"
status = "generate"
trait = false
final_type = true
[[object.function]]
name = "new"
......@@ -44,7 +45,7 @@ trait = false
[[object]]
name = "GstNet.PtpClock"
status = "generate"
trait = false
final_type = true
[[object.function]]
name = "new"
......@@ -54,7 +55,7 @@ trait = false
[[object]]
name = "GstNet.NetClientClock"
status = "generate"
trait = false
final_type = true
[[object.function]]
name = "new"
......@@ -64,7 +65,7 @@ trait = false
[[object]]
name = "GstNet.NetTimeProvider"
status = "generate"
trait = false
final_type = true
[[object.function]]
name = "new"
......
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......@@ -73,7 +74,7 @@ conversion_type = "scalar"
[[object]]
name = "GstPbutils.Discoverer"
status = "generate"
trait = false
final_type = true
[[object.function]]
name = "discover_uri_async"
......@@ -97,6 +98,7 @@ status = "generate"
[[object]]
name = "GstPbutils.DiscovererStreamInfo"
status = "generate"
final_type = false
# Not useful
[[object.function]]
......@@ -111,12 +113,12 @@ status = "generate"
[[object]]
name = "GstPbutils.DiscovererAudioInfo"
status = "generate"
trait = false
final_type = true
[[object]]
name = "GstPbutils.DiscovererVideoInfo"
status = "generate"
trait = false
final_type = true
# Implement manually to expose as gst::Fraction
[[object.function]]
......@@ -135,9 +137,154 @@ trait = false
[[object]]
name = "GstPbutils.DiscovererSubtitleInfo"
status = "generate"
trait = false
final_type = true
[[object]]
name = "GstPbutils.DiscovererContainerInfo"
status = "generate"
trait = false
final_type = true
[[object]]
name = "GstPbutils.EncodingProfile"
status = "generate"
# Ignore all setters, making it immutable. A builder will be provided.
[[object.function]]
name = "new"
ignore = true
[[object.function]]
pattern = "set_.*"
ignore = true
[[object.function]]
name = "copy"
[object.function.return]
nullable = false
[[object.function]]
name = "get_input_caps"
[object.function.return]
nullable = false
[[object.function]]
name = "get_format"
[object.function.return]
nullable = false
[[object.property]]
name = "restriction-caps"
# encodingprofile is immutable after constructed
ignore = true
[[object]]
name = "GstPbutils.EncodingContainerProfile"
status = "generate"
# Make it immutable, only able to be constructed for a builder
[[object.function]]
name = "new"
ignore = true
[[object.function]]
name = "add_profile"
ignore = true
[[object]]
name = "GstPbutils.EncodingTarget"
status = "generate"
[[object.function]]
name = "add_profile"
# can be provided on constructor and we better
# consider this immutable
ignore = true
[[object.function]]
name = "get_category"
[object.function.return]
nullable = false
[[object.function]]
name = "get_description"
[object.function.return]
nullable = false
[[object.function]]
name = "get_name"
[object.function.return]
nullable = false
[[object]]
name = "GstPbutils.EncodingAudioProfile"
status = "generate"
final_type = true
# Ignore all setters, making it immutable. A builder will be provided.
[[object.function]]
name = "new"
ignore = true
[[object.function]]
pattern = "set_.*"
ignore = true
[[object]]
name = "GstPbutils.EncodingVideoProfile"
status = "generate"
final_type = true
# Ignore all setters, making it immutable. A builder will be provided.
[[object.function]]
name = "new"
ignore = true
[[object.function]]
pattern = "set_.*"
ignore = true
[[object]]
name = "GstPbutils.*"
status = "generate"
# We'll opt-in for constants at a later time
[[object.constant]]
pattern = ".+"
ignore = true
# Codec utils need some special care
[[object.function]]
pattern = "codec_utils.*"
ignore = true
# Plugin installer API needs some manual impls
[[object.function]]
pattern = "install_plugins.*"
ignore = true
# Plugin installer API needs some manual impls
[[object.function]]
pattern = "missing_.*"
ignore = true
# Plugin installer API needs some manual impls
[[object.function]]
name = "is_missing_plugin_message"
ignore = true
# Initialization is handled implicitely
[[object.function]]
name = "pb_utils_init"
ignore = true
# Needs special handling for mutable taglists
[[object.function]]
name = "pb_utils_add_codec_description_to_tag_list"
ignore = true
# Needs special handling for caps refs
[[object.function]]
name = "pb_utils_get_codec_description"
ignore = true
# Needs special handling for caps refs
[[object.function]]
name = "pb_utils_get_decoder_description"
ignore = true
# Needs special handling for caps refs
[[object.function]]
name = "pb_utils_get_encoder_description"
ignore = true
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......@@ -59,7 +60,7 @@ ref_mode = "ref-mut"
[[object]]
name = "GstPlayer.Player"
status = "generate"
trait = false
final_type = true
[[object.function]]
name = "visualizations_free"
......@@ -185,12 +186,12 @@ status = "generate"
[[object]]
name = "GstPlayer.PlayerAudioInfo"
status = "generate"
trait = false
final_type = true
[[object]]
name = "GstPlayer.PlayerVideoInfo"
status = "generate"
trait = false
final_type = true
[[object.function]]
name = "get_framerate"
......@@ -205,12 +206,12 @@ trait = false
[[object]]
name = "GstPlayer.PlayerSubtitleInfo"
status = "generate"
trait = false
final_type = true
[[object]]
name = "GstPlayer.PlayerMediaInfo"
status = "generate"
trait = false
final_type = true
[[object.function]]
name = "get_uri"
......@@ -220,12 +221,12 @@ trait = false
[[object]]
name = "GstPlayer.PlayerVideoOverlayVideoRenderer"
status = "generate"
trait = false
final_type = true
[[object]]
name = "GstPlayer.PlayerGMainContextSignalDispatcher"
status = "generate"
trait = false
final_type = true
[[object.function]]
name = "new"
......
......@@ -9,6 +9,7 @@ concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
doc_target_path = "docs/gstreamer-rtsp/docs.md"
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -9,6 +9,7 @@ concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
doc_target_path = "docs/gstreamer-rtsp-server/docs.md"
generate_display_trait = false
external_libraries = [
"GLib",
......@@ -31,7 +32,8 @@ generate = [
"GstRtspServer.RTSPSuspendMode",
"GstRtspServer.RTSPThreadPool",
"GstRtspServer.RTSPThreadType",
"GstRtspServer.RTSPTransportMode"
"GstRtspServer.RTSPTransportMode",
"GstRtspServer.RTSPFilterResult"
]
manual = [
......@@ -109,6 +111,16 @@ status = "generate"
name = "attach"
ignore = true
[[object.function]]
name = "io_func"
[object.function.return]
bool_return_is_error = "Failed to connect the source"
[[object.function]]
name = "transfer_connection"
[object.function.return]
bool_return_is_error = "Failed to transfer to the connection"
[[object]]
name = "GstRtspServer.RTSPClient"
status = "generate"
......@@ -121,6 +133,16 @@ status = "generate"
name = "GstRtspServer.RTSPStream"
status = "generate"
[[object.function]]
name = "recv_rtcp"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object.function]]
name = "recv_rtp"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object.function]]
name = "query_position"
ignore = true
......@@ -149,6 +171,21 @@ status = "generate"
[object.function.return]
bool_return_is_error = "Failed to leave bin"
[[object.function]]
name = "set_blocked"
[object.function.return]
bool_return_is_error = "Failed to block/unblock the dataflow"
[[object.function]]
name = "unblock_linked"
[object.function.return]
bool_return_is_error = "Failed to unblock the dataflow"
[[object.function]]
name = "update_crypto"
[object.function.return]
bool_return_is_error = "Failed to update crypto"
[[object]]
name = "GstRtspServer.RTSPAddress"
status = "generate"
......@@ -159,6 +196,11 @@ name = "GstRtspServer.RTSPStreamTransport"
status = "generate"
concurrency = "none"
[[object.function]]
name = "recv_data"
# Use Result<FlowSuccess, FlowError>
ignore = true
[[object.function]]
name = "send_rtcp"
[object.function.return]
......@@ -242,6 +284,16 @@ status = "generate"
name="GstRtspServer.RTSPAuth"
status="generate"
[[object.function]]
name = "check"
[object.function.return]
bool_return_is_error = "Check failed"
[[object.function]]
name = "connect_accept_certificate"
# Use Result<(), LoggableError>
ignore = true
[[object.function]]
name = "make_basic"
[object.function.return]
......
......@@ -9,6 +9,7 @@ concurrency = "send"
generate_safety_asserts = true
single_version_file = true
doc_target_path = "docs/gstreamer-sdp/docs.md"
generate_display_trait = false
external_libraries = [
"GLib",
......@@ -43,6 +44,56 @@ ref_mode = "ref"
[[object]]
name = "GstSdp.MIKEYMessage"
status = "generate"
[[object.function]]
name = "add_cs_srtp"
[object.function.return]
bool_return_is_error = "Failed to add the Crypto policy for SRTP"
[[object.function]]
name = "add_pke"
[object.function.return]
bool_return_is_error = "Failed to add the PKE payload"
[[object.function]]
name = "add_rand"
[object.function.return]
bool_return_is_error = "Failed to add the RAND payload"
[[object.function]]
name = "add_rand_len"
[object.function.return]
bool_return_is_error = "Failed to add the RAND payload with random bytes"
[[object.function]]
name = "add_t"
[object.function.return]
bool_return_is_error = "Failed to add the T payload"
[[object.function]]
name = "add_t_now_ntp_utc"
[object.function.return]
bool_return_is_error = "Failed to add the T payload with current time"
[[object.function]]
name = "remove_cs_srtp"
[object.function.return]
bool_return_is_error = "Failed to remove the SRTP policy"
[[object.function]]
name = "remove_payload"
[object.function.return]
bool_return_is_error = "Failed to remove the payload"
[[object.function]]
name = "set_info"
[object.function.return]
bool_return_is_error = "Failed to set the information"
[[object.function]]
name = "to_caps"
[object.function.return]
bool_return_is_error = "Failed to fill caps with SRTP parameters"
[[object.function]]
name = "replace_payload"
ignore = true
......@@ -70,10 +121,64 @@ status = "generate"
name = "kemac_add_sub"
ignore = true
[[object.function]]
name = "kemac_remove_sub"
[object.function.return]
bool_return_is_error = "Failed to remove the sub payload"
[[object.function]]
name = "kemac_get_sub"
ignore = true
[[object.function]]
name = "kemac_set"
[object.function.return]
bool_return_is_error = "Failed to set the KEMAC parameters"
[[object.function]]
name = "key_data_set_interval"
ignore = true
[[object.function]]
name = "key_data_set_key"
[object.function.return]
bool_return_is_error = "Failed to set the key"
[[object.function]]
name = "key_data_set_salt"
[object.function.return]
bool_return_is_error = "Failed to set the salt key data"
[[object.function]]
name = "key_data_set_spi"
[object.function.return]
bool_return_is_error = "Failed to set the SPI/MKI validity"
[[object.function]]
name = "pke_set"
[object.function.return]
bool_return_is_error = "Failed to set the PKE values"
[[object.function]]
name = "rand_set"
[object.function.return]
bool_return_is_error = "Failed to set the random values"
[[object.function]]
name = "sp_add_param"
[object.function.return]
bool_return_is_error = "Failed to add the parameter"
[[object.function]]
name = "sp_remove_param"
[object.function.return]
bool_return_is_error = "Failed to remove the parameter"
[[object.function]]
name = "sp_set"
[object.function.return]
bool_return_is_error = "Failed to set the Security Policy parameters"
[[object.function]]
name = "t_set"
ignore = true
\ No newline at end of file
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......@@ -32,9 +33,12 @@ generate = [
"GstVideo.VideoFrameFlags",
"GstVideo.VideoMultiviewFramePacking",
"GstVideo.VideoFilter",
"GstVideo.VideoOverlayFormatFlags",
"GstVideo.VideoTimeCodeFlags",
]
manual = [
"GLib.DateTime",
"GObject.Object",
"Gst.Object",
"Gst.Element",
......@@ -44,6 +48,8 @@ manual = [
"GstVideo.VideoColorimetry",
"GstVideo.VideoColorRange",
"GstVideo.VideoFrame",
"GstVideo.VideoTimeCode",
"GstVideo.VideoTimeCodeInterval",
]
[[object]]
......@@ -59,8 +65,3 @@ status = "generate"
name = "set_render_rectangle"
[object.function.return]
bool_return_is_error = "Failed to set render rectangle"
[[object.function]]
name = "prepare_window_handle"
# to be called by subclasses
ignore = true
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......@@ -39,32 +40,32 @@ manual = [
[[object]]
name = "GstWebRTC.WebRTCDTLSTransport"
status = "generate"
trait = false
final_type = true
[[object]]
name = "GstWebRTC.WebRTCICETransport"
status = "generate"
trait = false
final_type = true
[[object]]
name = "GstWebRTC.WebRTCRTPReceiver"
status = "generate"
trait = false
final_type = true
[[object]]
name = "GstWebRTC.WebRTCRTPSender"
status = "generate"
trait = false
final_type = true
[[object]]
name = "GstWebRTC.WebRTCRTPTransceiver"
status = "generate"
trait = false
final_type = true
[[object]]
name = "GstWebRTC.WebRTCSessionDescription"
status = "generate"
trait = false
final_type = true
[[object.function]]
name = "new"
......
# gstreamer-rs [![crates.io](https://img.shields.io/crates/v/gstreamer.svg)](https://crates.io/crates/gstreamer) [![Build Status](https://travis-ci.org/sdroege/gstreamer-rs.svg?branch=master)](https://travis-ci.org/sdroege/gstreamer-rs)
# 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.
Documentation can be found [here](https://sdroege.github.io/rustdoc/gstreamer/gstreamer/).
Documentation can be found [here](https://slomo.pages.freedesktop.org/rustdocs/gstreamer/gstreamer/).
These bindings are providing a safe API that can be used to interface with
GStreamer, e.g. for writing GStreamer-based applications.
For background and motivation, see the [announcement blogpost](https://coaxion.net/blog/2017/07/writing-gstreamer-applications-in-rust/).
GStreamer, e.g. for writing GStreamer-based applications and GStreamer plugins.
The bindings (since 0.8.0) are autogenerated with [gir](https://github.com/gtk-rs/gir/)
The bindings are mostly autogenerated with [gir](https://github.com/gtk-rs/gir/)
based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/)
API metadata provided by the GStreamer project. Older versions before 0.8.0 were manually
written and the repository can be found [here](https://github.com/arturoc/gstreamer1.0-rs).
The API of the two is incompatible.
A crate for writing GStreamer plugins in Rust can be found here: https://github.com/sdroege/gst-plugin-rs
API metadata provided by the GStreamer project.
## Table of Contents
1. [Installation](#installation)
......@@ -83,8 +79,9 @@ Homebrew only installs various plugins if explicitly enabled, so some extra
```
$ brew install gstreamer gst-plugins-base gst-plugins-good \
gst-plugins-bad gst-plugins-ugly gst-libav gst-rtsp-server \
--with-orc -with-libogg --with-opus --with-pango --with-theora \
--with-libvorbis
gst-editing-services --with-orc --with-libogg --with-opus \
--with-pango --with-theora --with-libvorbis --with-libvpx \
--enable-gtk3
```
If you wish to install the gstreamer-player sub-crate, make sure the
......@@ -145,7 +142,7 @@ $ export PKG_CONFIG_PATH="c:\\gstreamer\\1.0\\x86_64\\lib\\pkgconfig${PKG_CONFIG
## Getting Started
The API reference can be found
[here](https://sdroege.github.io/rustdoc/gstreamer/gstreamer/), however it is
[here](https://slomo.pages.freedesktop.org/rustdocs/gstreamer/gstreamer/), however it is
only the Rust API reference and does not explain any of the concepts.
For getting started with GStreamer development, the best would be to follow
......@@ -161,14 +158,18 @@ In addition there are
[tutorials](https://gstreamer.freedesktop.org/documentation/tutorials/) on the
GStreamer website. Many of them were ported to Rust already and the code can
be found in the
[tutorials](https://github.com/sdroege/gstreamer-rs/tree/master/tutorials)
[tutorials](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/tree/master/tutorials)
directory.
Some further examples for various aspects of GStreamer and how to use it from
Rust can be found in the
[examples](https://github.com/sdroege/gstreamer-rs/tree/master/examples)
[examples](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/tree/master/examples)
directory.
Various GStreamer plugins written in Rust can be found in the
[gst-plugins-rs](https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs)
repository.
<a name="license"/>
## LICENSE
......
......@@ -546,6 +546,187 @@ a `glib::List` of
bytes are not available
<!-- impl Adapter::fn unmap -->
Releases the memory obtained with the last `Adapter::map`.
<!-- struct Aggregator -->
Manages a set of pads with the purpose of aggregating their buffers.
Control is given to the subclass when all pads have data.
* Base class for mixers and muxers. Subclasses should at least implement
the `AggregatorClass.aggregate`() virtual method.
* Installs a `GstPadChainFunction`, a `GstPadEventFullFunction` and a
`GstPadQueryFunction` to queue all serialized data packets per sink pad.
Subclasses should not overwrite those, but instead implement
`AggregatorClass.sink_event`() and `AggregatorClass.sink_query`() as
needed.
* When data is queued on all pads, the aggregate vmethod is called.
* One can peek at the data on any given GstAggregatorPad with the
gst_aggregator_pad_peek_buffer () method, and remove it from the pad
with the gst_aggregator_pad_pop_buffer () method. When a buffer
has been taken with pop_buffer (), a new buffer can be queued
on that pad.
* If the subclass wishes to push a buffer downstream in its aggregate
implementation, it should do so through the
gst_aggregator_finish_buffer () method. This method will take care
of sending and ordering mandatory events such as stream start, caps
and segment.
* Same goes for EOS events, which should not be pushed directly by the
subclass, it should instead return GST_FLOW_EOS in its aggregate
implementation.
* Note that the aggregator logic regarding gap event handling is to turn
these into gap buffers with matching PTS and duration. It will also
flag these buffers with GST_BUFFER_FLAG_GAP and GST_BUFFER_FLAG_DROPPABLE
to ease their identification and subsequent processing.
* Subclasses must use (a subclass of) `AggregatorPad` for both their
sink and source pads.
See `gst::ElementClass::add_static_pad_template_with_gtype`.
This class used to live in gst-plugins-bad and was moved to core.
Feature: `v1_14`
# Implements
[`AggregatorExt`](trait.AggregatorExt.html), [`gst::ElementExt`](../gst/trait.ElementExt.html), [`gst::ObjectExt`](../gst/trait.ObjectExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html)
<!-- trait AggregatorExt -->
Trait containing all `Aggregator` methods.
Feature: `v1_14`
# Implementors
[`Aggregator`](struct.Aggregator.html)
<!-- trait AggregatorExt::fn finish_buffer -->
This method will push the provided output buffer downstream. If needed,
mandatory events such as stream-start, caps, and segment events will be
sent before pushing the buffer.
Feature: `v1_14`
## `buffer`
the `gst::Buffer` to push.
<!-- trait AggregatorExt::fn get_allocator -->
Lets `Aggregator` sub-classes get the memory `allocator`
acquired by the base class and its `params`.
Unref the `allocator` after use it.
Feature: `v1_14`
## `allocator`
the `gst::Allocator`
used
## `params`
the
`gst::AllocationParams` of `allocator`
<!-- trait AggregatorExt::fn get_buffer_pool -->
Feature: `v1_14`
# Returns
the instance of the `gst::BufferPool` used
by `trans`; free it after use it
<!-- trait AggregatorExt::fn get_latency -->
Retrieves the latency values reported by `self` in response to the latency
query, or `GST_CLOCK_TIME_NONE` if there is not live source connected and the element
will not wait for the clock.
Typically only called by subclasses.
Feature: `v1_14`
# Returns
The latency or `GST_CLOCK_TIME_NONE` if the element does not sync
<!-- trait AggregatorExt::fn set_latency -->
Lets `Aggregator` sub-classes tell the baseclass what their internal
latency is. Will also post a LATENCY message on the bus so the pipeline
can reconfigure its global latency.
Feature: `v1_14`
## `min_latency`
minimum latency
## `max_latency`
maximum latency
<!-- trait AggregatorExt::fn set_src_caps -->
Sets the caps to be used on the src pad.
Feature: `v1_14`
## `caps`
The `gst::Caps` to set on the src pad.
<!-- struct AggregatorPad -->
Pads managed by a `GstAggregor` subclass.
This class used to live in gst-plugins-bad and was moved to core.
Feature: `v1_14`
# Implements
[`AggregatorPadExt`](trait.AggregatorPadExt.html), [`gst::PadExt`](../gst/trait.PadExt.html), [`gst::ObjectExt`](../gst/trait.ObjectExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html)
<!-- trait AggregatorPadExt -->
Trait containing all `AggregatorPad` methods.
Feature: `v1_14`
# Implementors
[`AggregatorPad`](struct.AggregatorPad.html)
<!-- trait AggregatorPadExt::fn drop_buffer -->
Drop the buffer currently queued in `self`.
Feature: `v1_14`
# Returns
TRUE if there was a buffer queued in `self`, or FALSE if not.
<!-- trait AggregatorPadExt::fn has_buffer -->
Feature: `v1_14_1`
# Returns
`true` if the pad has a buffer available as the next thing.
<!-- trait AggregatorPadExt::fn is_eos -->
Feature: `v1_14`
# Returns
`true` if the pad is EOS, otherwise `false`.
<!-- trait AggregatorPadExt::fn peek_buffer -->
Feature: `v1_14`
# Returns
A reference to the buffer in `self` or
NULL if no buffer was queued. You should unref the buffer after
usage.
<!-- trait AggregatorPadExt::fn pop_buffer -->
Steal the ref to the buffer currently queued in `self`.
Feature: `v1_14`
# Returns
The buffer in `self` or NULL if no buffer was
queued. You should unref the buffer after usage.
<!-- struct BaseSink -->
`BaseSink` is the base class for sink elements in GStreamer, such as
xvimagesink or filesink. It is a layer on top of `gst::Element` that provides a
......@@ -598,7 +779,7 @@ Subclasses that synchronise on the clock in the `BaseSinkClass.render`()
method are supported as well. These classes typically receive a buffer in
the render method and can then potentially block on the clock while
rendering. A typical example is an audiosink.
These subclasses can use `BaseSinkExt::wait_preroll` to perform the
These subclasses can use `BaseSink::wait_preroll` to perform the
blocking wait.
Upon receiving the EOS event in the PLAYING state, `BaseSink` will wait
......@@ -1064,7 +1245,7 @@ can only produce data in the PLAYING state, when the clock is actually
distributed and running.
Live sources that synchronize and block on the clock (an audio source, for
example) can use `BaseSrcExt::wait_playing` when the
example) can use `BaseSrc::wait_playing` when the
`BaseSrcClass.create`() function was interrupted by a state change to
PAUSED.
......@@ -1270,7 +1451,7 @@ be GST_STATE_CHANGE_NO_PREROLL.
new live-mode
<!-- trait BaseSrcExt::fn start_complete -->
Complete an asynchronous start operation. When the subclass overrides the
start method, it should call `BaseSrcExt::start_complete` when the start
start method, it should call `BaseSrc::start_complete` when the start
operation completes either from the same thread or from an asynchronous
helper thread.
## `ret`
......