...
 
Commits (229)
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.28:
# 1.28 img
# https://hub.docker.com/_/rust/
image: "rust:1.28-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: "rustlang/rust:nightly-slim"
stage: "lint"
script:
- rustup component add rustfmt-preview
- cargo fmt --version
- cargo fmt -- --color=always --check
ignore = [
"gstreamer/src/auto",
"gstreamer-app/src/auto",
"gstreamer-audio/src/auto",
"gstreamer-base/src/auto",
"gstreamer-check/src/auto",
"gstreamer-net/src/auto",
"gstreamer-pbutils/src/auto",
"gstreamer-player/src/auto",
"gstreamer-rtsp/src/auto",
"gstreamer-rtsp-server/src/auto",
"gstreamer-sdp/src/auto",
"gstreamer-video/src/auto",
"gstreamer-webrtc/src/auto",
"gstreamer-editing-services/src/auto",
]
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
......
......@@ -12,6 +12,9 @@ members = [
"gstreamer-sdp",
"gstreamer-video",
"gstreamer-pbutils",
"gstreamer-webrtc",
"gstreamer-check",
"gstreamer-editing-services",
"examples",
"tutorials",
]
......@@ -7,6 +7,7 @@ target_path = "gstreamer"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
external_libraries = [
"GLib",
......@@ -25,7 +26,6 @@ generate = [
"Gst.URIHandler",
"Gst.URIType",
"Gst.ElementFactoryListType",
"Gst.Format",
"Gst.BufferingMode",
"Gst.CoreError",
"Gst.ResourceError",
......@@ -44,22 +44,15 @@ generate = [
"Gst.PadProbeType",
"Gst.PadProbeReturn",
"Gst.CapsIntersectMode",
"Gst.BufferFlags",
"Gst.BufferCopyFlags",
"Gst.SegmentFlags",
"Gst.PadMode",
"Gst.SchedulingFlags",
"Gst.ChildProxy",
"Gst.TagSetter",
"Gst.QOSType",
"Gst.EventType",
"Gst.TocScope",
"Gst.TocEntryType",
"Gst.TocLoopType",
"Gst.TocSetter",
"Gst.ClockType",
"Gst.ElementFlags",
"Gst.Rank",
"Gst.PadLinkCheck",
"Gst.DebugLevel",
"Gst.DebugColorFlags",
......@@ -69,7 +62,6 @@ generate = [
"Gst.TaskState",
"Gst.PluginDependencyFlags",
"Gst.DateTime",
"Gst.TypeFindProbability",
"Gst.BufferPoolAcquireFlags",
"Gst.PromiseResult",
]
......@@ -92,6 +84,7 @@ conversion_type = "scalar"
[[object]]
name = "Gst.Bin"
status = "generate"
trait_name = "GstBinExt"
[[object.function]]
name = "add"
[object.function.return]
......@@ -116,11 +109,6 @@ status = "generate"
name = "Gst.Bus"
status = "generate"
trait = false
[[object.function]]
name = "remove_watch"
# Needs manual bindings and GSource support in glib-rs
ignore = true
[[object.function]]
name = "add_signal_watch_full"
# Priority
......@@ -153,6 +141,74 @@ trait = false
[object.function.return]
bool_return_is_error = "Failed to post message"
[[object]]
name = "Gst.BufferFlags"
status = "generate"
[[object.derive]]
name = "Serialize, Deserialize"
cfg_condition = "feature = \"ser_de\""
[[object]]
name = "Gst.Format"
status = "generate"
[[object.derive]]
name = "Serialize, Deserialize"
cfg_condition = "feature = \"ser_de\""
[[object.derive]]
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
[[object]]
name = "Gst.SegmentFlags"
status = "generate"
[[object.derive]]
name = "Serialize, Deserialize"
cfg_condition = "feature = \"ser_de\""
[[object]]
name = "Gst.TocScope"
status = "generate"
[[object.derive]]
name = "Serialize, Deserialize"
cfg_condition = "feature = \"ser_de\""
[[object.derive]]
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
[[object]]
name = "Gst.TocEntryType"
status = "generate"
[[object.derive]]
name = "Serialize, Deserialize"
cfg_condition = "feature = \"ser_de\""
[[object.derive]]
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
[[object]]
name = "Gst.TocLoopType"
status = "generate"
[[object.derive]]
name = "Serialize, Deserialize"
cfg_condition = "feature = \"ser_de\""
[[object.derive]]
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
[[object]]
name = "Gst.Rank"
status = "generate"
[[object.derive]]
name = "Debug, PartialEq, Eq, Hash"
[[object]]
name = "Gst.TypeFindProbability"
status = "generate"
[[object.derive]]
name = "Debug, PartialEq, Eq, Hash"
[[object]]
name = "Gst.EventType"
status = "generate"
[[object.derive]]
name = "Debug, PartialEq, Eq, Hash"
[[object]]
name = "Gst.Structure"
status = "manual"
......@@ -403,6 +459,11 @@ 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"
......@@ -431,6 +492,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
......@@ -439,6 +505,11 @@ status = "generate"
[[object]]
name = "Gst.DeviceMonitor"
status = "generate"
[[object.function]]
name = "new"
# Work-around for 1.14 switch from transfer-floating to transfer-full
ignore = true
[[object.function]]
name = "get_bus"
[object.function.return]
......@@ -708,11 +779,19 @@ status = "generate"
name = "Gst.Stream"
status = "generate"
trait = false
[[object.function]]
name = "new"
# Work-around for 1.14 switch from transfer-floating to transfer-full
ignore = true
[[object]]
name = "Gst.StreamCollection"
status = "generate"
trait = false
[[object.function]]
name = "new"
# Work-around for 1.14 switch from transfer-floating to transfer-full
ignore = true
[[object]]
name = "Gst.Plugin"
......@@ -832,6 +911,11 @@ status = "generate"
# Takes ownership
ignore = true
[[object.function]]
name = "new"
# Work-around for 1.14 switch from transfer-floating to transfer-full
ignore = true
[[object.function]]
name = "set_active"
[object.function.return]
......
......@@ -7,6 +7,7 @@ target_path = "gstreamer-app"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
external_libraries = [
"GLib",
......
......@@ -7,6 +7,7 @@ target_path = "gstreamer-audio"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
external_libraries = [
"GLib",
......
......@@ -7,6 +7,7 @@ target_path = "gstreamer-base"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
external_libraries = [
"GLib",
......@@ -25,6 +26,7 @@ manual = [
"GLib.Bytes",
"Gst.Object",
"Gst.Element",
"Gst.BufferPool",
"Gst.ClockTimeDiff",
"Gst.ClockReturn",
"Gst.FlowReturn",
......@@ -37,7 +39,7 @@ manual = [
name = "GstBase.Adapter"
status = "generate"
trait = false
concurrency = "none"
concurrency = "send-unique"
[[object.function]]
name = "map"
......@@ -80,6 +82,25 @@ status = "generate"
# Pass by value, to be added manually
ignore = true
[[object]]
name = "GstBase.Aggregator"
status = "generate"
version = "1.14"
[[object.function]]
name = "finish_buffer"
# Takes ownership
ignore = true
[[object.property]]
name = "latency"
version = "1.14"
[[object]]
name = "GstBase.AggregatorPad"
status = "generate"
version = "1.14"
[[object]]
name = "GstBase.*"
status = "generate"
......
[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
external_libraries = [
"GLib",
"GObject",
"Gst",
]
generate = [
]
manual = [
"GObject.Object",
"Gst.Object",
"Gst.Clock",
"Gst.ClockTimeDiff",
"Gst.ClockType",
]
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
[[object]]
name = "GstCheck.TestClock"
status = "generate"
trait = false
[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
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.TimelineElement",
"GES.Group",
"GES.TrackElement",
"GES.Layer",
"GES.Clip",
"GES.UriClip",
"GES.Asset",
"GES.UriClipAsset",
"GES.UriSourceAsset",
"GES.Extractable",
"GES.Project",
]
[[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]]
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]]
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"
\ No newline at end of file
......@@ -7,6 +7,7 @@ target_path = "gstreamer-net"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
external_libraries = [
"GLib",
......@@ -64,3 +65,8 @@ trait = false
name = "GstNet.NetTimeProvider"
status = "generate"
trait = false
[[object.function]]
name = "new"
# Floating reference handling
ignore = true
......@@ -7,6 +7,7 @@ target_path = "gstreamer-pbutils"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
external_libraries = [
"GLib",
......@@ -140,3 +141,148 @@ trait = false
name = "GstPbutils.DiscovererContainerInfo"
status = "generate"
trait = false
[[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"
trait = false
# 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"
trait = false
# 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
......@@ -7,6 +7,7 @@ target_path = "gstreamer-player"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
external_libraries = [
"GLib",
......
......@@ -7,6 +7,7 @@ target_path = "gstreamer-rtsp"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
doc_target_path = "docs/gstreamer-rtsp/docs.md"
external_libraries = [
......
......@@ -7,6 +7,7 @@ target_path = "gstreamer-rtsp-server"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
doc_target_path = "docs/gstreamer-rtsp-server/docs.md"
external_libraries = [
......
......@@ -5,8 +5,9 @@ version = "1.0"
min_cfg_version = "1.8"
target_path = "gstreamer-sdp"
work_mode = "normal"
concurrency = "send+sync"
concurrency = "send"
generate_safety_asserts = true
single_version_file = true
doc_target_path = "docs/gstreamer-sdp/docs.md"
external_libraries = [
......@@ -28,13 +29,51 @@ generate = [
"GstSdp.MIKEYSecSRTP",
"GstSdp.MIKEYTSType",
"GstSdp.MIKEYType",
"GstSdp.SDPResult"
]
manual = [
"GLib.Bytes",
]
[[object]]
name = "Gst.Caps"
status = "manual"
ref_mode = "ref"
[[object]]
name = "GstSdp.MIKEYMessage"
status = "generate"
[[object.function]]
name = "replace_payload"
ignore = true
[[object.function]]
name = "insert_payload"
ignore = true
[[object.function]]
name = "add_payload"
ignore = true
[[object.function]]
name = "get_payload"
ignore = true
[[object.function]]
name = "base64_encode"
ignore = true
[[object]]
name = "GstSdp.MIKEYPayload"
status = "generate"
[[object.function]]
name = "kemac_add_sub"
ignore = true
[[object.function]]
name = "kemac_get_sub"
ignore = true
[[object.function]]
name = "key_data_set_interval"
ignore = true
......@@ -7,6 +7,7 @@ target_path = "gstreamer-video"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
external_libraries = [
"GLib",
......@@ -31,6 +32,7 @@ generate = [
"GstVideo.VideoFrameFlags",
"GstVideo.VideoMultiviewFramePacking",
"GstVideo.VideoFilter",
"GstVideo.VideoOverlayFormatFlags",
]
manual = [
......@@ -58,8 +60,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
[options]
girs_dir = "gir-files"
library = "GstWebRTC"
version = "1.0"
min_cfg_version = "1.14"
target_path = "gstreamer-webrtc"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
external_libraries = [
"GLib",
"GObject",
"Gst",
"GstSdp",
]
generate = [
"GstWebRTC.WebRTCDTLSTransportState",
"GstWebRTC.WebRTCICEGatheringState",
"GstWebRTC.WebRTCICEConnectionState",
"GstWebRTC.WebRTCICERole",
"GstWebRTC.WebRTCICEComponent",
"GstWebRTC.WebRTCSDPType",
"GstWebRTC.WebRTCDTLSSetup",
"GstWebRTC.WebRTCPeerConnectionState",
"GstWebRTC.WebRTCRTPTransceiverDirection",
"GstWebRTC.WebRTCSignalingState",
"GstWebRTC.WebRTCStatsType",
]
manual = [
"GObject.Object",
"Gst.Structure",
"GstSdp.SDPMessage",
]
[[object]]
name = "GstWebRTC.WebRTCDTLSTransport"
status = "generate"
trait = false
[[object]]
name = "GstWebRTC.WebRTCICETransport"
status = "generate"
trait = false
[[object]]
name = "GstWebRTC.WebRTCRTPReceiver"
status = "generate"
trait = false
[[object]]
name = "GstWebRTC.WebRTCRTPSender"
status = "generate"
trait = false
[[object]]
name = "GstWebRTC.WebRTCRTPTransceiver"
status = "generate"
trait = false
[[object]]
name = "GstWebRTC.WebRTCSessionDescription"
status = "generate"
trait = false
[[object.function]]
name = "new"
# takes ownership of SDP message
ignore = true
# 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/).
......@@ -14,7 +16,7 @@ API metadata provided by the GStreamer project. Older versions before 0.8.0 were
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
A crate for writing GStreamer plugins in Rust can be found here: https://gitlab.freedesktop.org/gstreamer/gst-plugin-rs
## Table of Contents
1. [Installation](#installation)
......@@ -77,9 +79,15 @@ provided by the GStreamer project.
#### Homebrew
Homebrew only installs various plugins if explicitly enabled, so some extra
`--with-*` flags may be required.
```
$ brew install gstreamer gst-plugins-base gst-plugins-good \
gst-plugins-bad gst-plugins-ugly gst-libav gst-rtsp-server
gst-plugins-bad gst-plugins-ugly gst-libav gst-rtsp-server \
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
......@@ -156,12 +164,12 @@ 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.
<a name="license"/>
......
......@@ -39,10 +39,442 @@ HMAC-SHA-1-160
<!-- enum MIKEYMapType -->
Specifies the method of uniquely mapping Crypto Sessions to the security
protocol sessions.
<!-- struct MIKEYMessage -->
Structure holding the information of the MIKEY message
<!-- impl MIKEYMessage::fn new -->
Make a new MIKEY message.
# Returns
a new `MIKEYMessage` on success
<!-- impl MIKEYMessage::fn new_from_bytes -->
Make a new `MIKEYMessage` from `bytes`.
## `bytes`
a `glib::Bytes`
## `info`
a `MIKEYDecryptInfo`
# Returns
a new `MIKEYMessage`
<!-- impl MIKEYMessage::fn new_from_caps -->
Makes mikey message including:
- Security Policy Payload
- Key Data Transport Payload
- Key Data Sub-Payload
## `caps`
a `gst::Caps`, including SRTP parameters (srtp/srtcp cipher, authorization, key data)
# Returns
a `MIKEYMessage`,
or `None` if there is no srtp information in the caps.
<!-- impl MIKEYMessage::fn new_from_data -->
Parse `size` bytes from `data` into a `MIKEYMessage`. `info` contains the
parameters to decrypt and verify the data.
## `data`
bytes to read
## `size`
length of `data`
## `info`
`MIKEYDecryptInfo`
# Returns
a `MIKEYMessage` on success or `None` when parsing failed and
`error` will be set.
<!-- impl MIKEYMessage::fn add_cs_srtp -->
Add a Crypto policy for SRTP to `self`.
## `policy`
The security policy applied for the stream with `ssrc`
## `ssrc`
the SSRC that must be used for the stream
## `roc`
current rollover counter
# Returns
`true` on success
<!-- impl MIKEYMessage::fn add_payload -->
Add a new payload to `self`.
## `payload`
a `MIKEYPayload`
# Returns
`true` on success
<!-- impl MIKEYMessage::fn add_pke -->
Add a new PKE payload to `self` with the given parameters.
## `C`
envelope key cache indicator
## `data_len`
the length of `data`
## `data`
the encrypted envelope key
# Returns
`true` on success
<!-- impl MIKEYMessage::fn add_rand -->
Add a new RAND payload to `self` with the given parameters.
## `len`
the length of `rand`
## `rand`
random data
# Returns
`true` on success
<!-- impl MIKEYMessage::fn add_rand_len -->
Add a new RAND payload to `self` with `len` random bytes.
## `len`
length
# Returns
`true` on success
<!-- impl MIKEYMessage::fn add_t -->
Add a new T payload to `self` with the given parameters.
## `type_`
specifies the timestamp type used
## `ts_value`
The timestamp value of the specified `type_`
# Returns
`true` on success
<!-- impl MIKEYMessage::fn add_t_now_ntp_utc -->
Add a new T payload to `self` that contains the current time
in NTP-UTC format.
# Returns
`true` on success
<!-- impl MIKEYMessage::fn base64_encode -->
# Returns
a `gchar`, base64-encoded data
<!-- impl MIKEYMessage::fn find_payload -->
Find the `nth` occurence of the payload with `type_` in `self`.
## `type_`
a