Skip to content
Commits on Source (19)
# 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://slomo.pages.freedesktop.org/rustdocs/gstreamer/gstreamer/).
Documentation can be found [here](https://gstreamer.pages.freedesktop.org/gstreamer-rs/gstreamer/index.html).
These bindings are providing a safe API that can be used to interface with
GStreamer, e.g. for writing GStreamer-based applications and GStreamer plugins.
......@@ -140,7 +140,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://slomo.pages.freedesktop.org/rustdocs/gstreamer/gstreamer/), however it is
[here](https://gstreamer.pages.freedesktop.org/gstreamer-rs/gstreamer/index.html), 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
......
......@@ -19,7 +19,7 @@ gstreamer-editing-services = { version = "0.16", path = "../gstreamer-editing-se
gstreamer-sdp = { version = "0.16", path = "../gstreamer-sdp", optional = true }
gstreamer-rtsp = { version = "0.16", path = "../gstreamer-rtsp", optional = true }
gstreamer-rtsp-server = { version = "0.16", path = "../gstreamer-rtsp-server", optional = true }
gstreamer-rtsp-server-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", rev = "0.9", features = ["v1_8"], optional = true }
gstreamer-rtsp-server-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", branch = "0.9", features = ["v1_8"], optional = true }
gtk = { version = "0.9", optional = true }
gdk = { version = "0.13", optional = true }
gio = { version = "0.9", optional = true }
......
......@@ -19,7 +19,7 @@ mod custom_meta {
use std::ptr;
// Public Rust type for the custom meta.
#[repr(C)]
#[repr(transparent)]
pub struct CustomMeta(imp::CustomMeta);
// Metas must be Send+Sync.
......
......@@ -4,7 +4,6 @@
#[cfg(target_os = "macos")]
mod runloop {
use std::os::raw::c_void;
#[repr(C)]
pub struct CFRunLoop(*mut c_void);
#[link(name = "foundation", kind = "framework")]
......
......@@ -5,6 +5,29 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html),
specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field).
## [0.16.5] - 2020-11-23
### Fixed
- Make sure to use `$crate` in more macros to allow them to work without
anything special in scope already.
- Update documentation location.
- Don't panic if C code stores invalid seqnums in events and the seqnum is
used directly or via the `Display` impl.
- Fix docs build for some crates on docs.rs.
- Fix `Debug` impl for `gst_video::VideoTimeCode` to print the correct type
name.
- Fix plugin version to be 1.18 instead of 1.17 when compiling a plugin with
`v1_18`.
### Added
- Event handling support in pad probes, that is returning
`PadProbeReturn::Handled` for events.
- `EventRef::get_structure_mut()` getter that allows changing the events'
structures.
### Changed
- Remove unnecessary `PhantomData` markers and use `repr(transparent)` instead
of `repr(C)` where it is more correct.
## [0.16.4] - 2020-10-09
### Fixed
- Correctly implement `ExactSizeIterator` on the `AudioFormat` and
......@@ -888,7 +911,9 @@ specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-v
(< 0.8.0) of the bindings can be found [here](https://github.com/arturoc/gstreamer1.0-rs).
The API of the two is incompatible.
[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.3...HEAD
[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.5...HEAD
[0.16.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.4...0.16.5
[0.16.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.3...0.16.4
[0.16.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.2...0.16.3
[0.16.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.1...0.16.2
[0.16.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.0...0.16.1
......
[package]
name = "gstreamer-app"
version = "0.16.4"
version = "0.16.5"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
categories = ["api-bindings", "multimedia"]
description = "Rust bindings for GStreamer App library"
......@@ -19,8 +19,8 @@ bitflags = "1.0"
libc = "0.2"
glib-sys = "0.10"
gobject-sys = "0.10"
gstreamer-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", rev = "0.9", features = ["v1_8"] }
gstreamer-app-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", rev = "0.9", features = ["v1_8"] }
gstreamer-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", branch = "0.9", features = ["v1_8"] }
gstreamer-app-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", branch = "0.9", features = ["v1_8"] }
glib = "0.10"
gstreamer = { version = "0.16", path = "../gstreamer" }
gstreamer-base = { version = "0.16", path = "../gstreamer-base" }
......
......@@ -140,7 +140,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://slomo.pages.freedesktop.org/rustdocs/gstreamer/gstreamer/), however it is
[here](https://gstreamer.pages.freedesktop.org/gstreamer-rs/gstreamer/index.html), 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
......
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use gst_app_sys;
use glib::translate::*;
......@@ -5,6 +5,29 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html),
specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field).
## [0.16.5] - 2020-11-23
### Fixed
- Make sure to use `$crate` in more macros to allow them to work without
anything special in scope already.
- Update documentation location.
- Don't panic if C code stores invalid seqnums in events and the seqnum is
used directly or via the `Display` impl.
- Fix docs build for some crates on docs.rs.
- Fix `Debug` impl for `gst_video::VideoTimeCode` to print the correct type
name.
- Fix plugin version to be 1.18 instead of 1.17 when compiling a plugin with
`v1_18`.
### Added
- Event handling support in pad probes, that is returning
`PadProbeReturn::Handled` for events.
- `EventRef::get_structure_mut()` getter that allows changing the events'
structures.
### Changed
- Remove unnecessary `PhantomData` markers and use `repr(transparent)` instead
of `repr(C)` where it is more correct.
## [0.16.4] - 2020-10-09
### Fixed
- Correctly implement `ExactSizeIterator` on the `AudioFormat` and
......@@ -888,7 +911,9 @@ specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-v
(< 0.8.0) of the bindings can be found [here](https://github.com/arturoc/gstreamer1.0-rs).
The API of the two is incompatible.
[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.3...HEAD
[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.5...HEAD
[0.16.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.4...0.16.5
[0.16.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.3...0.16.4
[0.16.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.2...0.16.3
[0.16.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.1...0.16.2
[0.16.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.0...0.16.1
......
[package]
name = "gstreamer-audio"
version = "0.16.4"
version = "0.16.5"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
categories = ["api-bindings", "multimedia"]
description = "Rust bindings for GStreamer Audio library"
......@@ -17,13 +17,13 @@ libc = "0.2"
bitflags = "1.0"
glib-sys = "0.10"
gobject-sys = "0.10"
gstreamer-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", rev = "0.9", features = ["v1_8"] }
gstreamer-base-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", rev = "0.9", features = ["v1_8"] }
gstreamer-audio-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", rev = "0.9", features = ["v1_8"] }
gstreamer-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", branch = "0.9", features = ["v1_8"] }
gstreamer-base-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", branch = "0.9", features = ["v1_8"] }
gstreamer-audio-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", branch = "0.9", features = ["v1_8"] }
glib = "0.10"
gstreamer = { version = "0.16", path = "../gstreamer" }
gstreamer-base = { version = "0.16", path = "../gstreamer-base" }
array-init = "0.1"
array-init = "1.0"
once_cell = "1.0"
[build-dependencies]
......@@ -41,7 +41,7 @@ v1_16 = ["gstreamer/v1_16", "gstreamer-base/v1_16", "gstreamer-audio-sys/v1_16",
v1_18 = ["gstreamer/v1_18", "gstreamer-base/v1_18", "gstreamer-audio-sys/v1_18", "v1_16"]
embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-audio-sys/dox", "glib/dox", "gstreamer/dox"]
dox = ["v1_18", "gstreamer-audio-sys/dox", "glib/dox", "gstreamer/dox", "gstreamer-base/dox"]
[package.metadata.docs.rs]
features = ["dox", "embed-lgpl-docs"]
......@@ -140,7 +140,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://slomo.pages.freedesktop.org/rustdocs/gstreamer/gstreamer/), however it is
[here](https://gstreamer.pages.freedesktop.org/gstreamer-rs/gstreamer/index.html), 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
......
......@@ -21,7 +21,7 @@ use gst;
use gst::prelude::*;
use gst_audio_sys;
#[repr(C)]
#[repr(transparent)]
pub struct AudioClippingMeta(gst_audio_sys::GstAudioClippingMeta);
unsafe impl Send for AudioClippingMeta {}
......@@ -76,7 +76,7 @@ impl fmt::Debug for AudioClippingMeta {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[repr(C)]
#[repr(transparent)]
pub struct AudioMeta(gst_audio_sys::GstAudioMeta);
#[cfg(any(feature = "v1_16", feature = "dox"))]
......
......@@ -7,7 +7,7 @@ use AudioRingBufferFormatType;
use std::fmt;
#[repr(C)]
#[repr(transparent)]
pub struct AudioRingBufferSpec(pub(crate) GstAudioRingBufferSpec);
impl AudioRingBufferSpec {
......
......@@ -5,6 +5,29 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html),
specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field).
## [0.16.5] - 2020-11-23
### Fixed
- Make sure to use `$crate` in more macros to allow them to work without
anything special in scope already.
- Update documentation location.
- Don't panic if C code stores invalid seqnums in events and the seqnum is
used directly or via the `Display` impl.
- Fix docs build for some crates on docs.rs.
- Fix `Debug` impl for `gst_video::VideoTimeCode` to print the correct type
name.
- Fix plugin version to be 1.18 instead of 1.17 when compiling a plugin with
`v1_18`.
### Added
- Event handling support in pad probes, that is returning
`PadProbeReturn::Handled` for events.
- `EventRef::get_structure_mut()` getter that allows changing the events'
structures.
### Changed
- Remove unnecessary `PhantomData` markers and use `repr(transparent)` instead
of `repr(C)` where it is more correct.
## [0.16.4] - 2020-10-09
### Fixed
- Correctly implement `ExactSizeIterator` on the `AudioFormat` and
......@@ -888,7 +911,9 @@ specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-v
(< 0.8.0) of the bindings can be found [here](https://github.com/arturoc/gstreamer1.0-rs).
The API of the two is incompatible.
[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.3...HEAD
[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.5...HEAD
[0.16.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.4...0.16.5
[0.16.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.3...0.16.4
[0.16.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.2...0.16.3
[0.16.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.1...0.16.2
[0.16.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.0...0.16.1
......
[package]
name = "gstreamer-base"
version = "0.16.4"
version = "0.16.5"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
categories = ["api-bindings", "multimedia"]
description = "Rust bindings for GStreamer Base library"
......@@ -17,8 +17,8 @@ libc = "0.2"
bitflags = "1.0"
glib-sys = "0.10"
gobject-sys = "0.10"
gstreamer-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", rev = "0.9", features = ["v1_8"] }
gstreamer-base-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", rev = "0.9", features = ["v1_8"] }
gstreamer-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", branch = "0.9", features = ["v1_8"] }
gstreamer-base-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", branch = "0.9", features = ["v1_8"] }
glib = "0.10"
gstreamer = { version = "0.16", path = "../gstreamer" }
......
......@@ -140,7 +140,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://slomo.pages.freedesktop.org/rustdocs/gstreamer/gstreamer/), however it is
[here](https://gstreamer.pages.freedesktop.org/gstreamer-rs/gstreamer/index.html), 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
......
......@@ -5,6 +5,29 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html),
specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field).
## [0.16.5] - 2020-11-23
### Fixed
- Make sure to use `$crate` in more macros to allow them to work without
anything special in scope already.
- Update documentation location.
- Don't panic if C code stores invalid seqnums in events and the seqnum is
used directly or via the `Display` impl.
- Fix docs build for some crates on docs.rs.
- Fix `Debug` impl for `gst_video::VideoTimeCode` to print the correct type
name.
- Fix plugin version to be 1.18 instead of 1.17 when compiling a plugin with
`v1_18`.
### Added
- Event handling support in pad probes, that is returning
`PadProbeReturn::Handled` for events.
- `EventRef::get_structure_mut()` getter that allows changing the events'
structures.
### Changed
- Remove unnecessary `PhantomData` markers and use `repr(transparent)` instead
of `repr(C)` where it is more correct.
## [0.16.4] - 2020-10-09
### Fixed
- Correctly implement `ExactSizeIterator` on the `AudioFormat` and
......@@ -888,7 +911,9 @@ specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-v
(< 0.8.0) of the bindings can be found [here](https://github.com/arturoc/gstreamer1.0-rs).
The API of the two is incompatible.
[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.3...HEAD
[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.5...HEAD
[0.16.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.4...0.16.5
[0.16.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.3...0.16.4
[0.16.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.2...0.16.3
[0.16.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.1...0.16.2
[0.16.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.0...0.16.1
......
[package]
name = "gstreamer-check"
version = "0.16.4"
version = "0.16.5"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
categories = ["api-bindings", "multimedia"]
description = "Rust bindings for GStreamer Check library"
......@@ -16,8 +16,8 @@ build = "build.rs"
bitflags = "1.0"
glib-sys = "0.10"
gobject-sys = "0.10"
gstreamer-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", rev = "0.9", features = ["v1_8"] }
gstreamer-check-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", rev = "0.9", features = ["v1_8"] }
gstreamer-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", branch = "0.9", features = ["v1_8"] }
gstreamer-check-sys = { version = "0.9", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git", branch = "0.9", features = ["v1_8"] }
glib = "0.10"
gstreamer = { version = "0.16", path = "../gstreamer" }
......
......@@ -140,7 +140,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://slomo.pages.freedesktop.org/rustdocs/gstreamer/gstreamer/), however it is
[here](https://gstreamer.pages.freedesktop.org/gstreamer-rs/gstreamer/index.html), 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
......
......@@ -22,10 +22,7 @@ use std::ptr;
use TestClock;
#[derive(Debug)]
pub struct Harness(
ptr::NonNull<gst_check_sys::GstHarness>,
PhantomData<gst_check_sys::GstHarness>,
);
pub struct Harness(ptr::NonNull<gst_check_sys::GstHarness>);
impl Drop for Harness {
fn drop(&mut self) {
......@@ -567,7 +564,7 @@ impl Harness {
unsafe fn from_glib_full(ptr: *mut gst_check_sys::GstHarness) -> Harness {
assert!(!ptr.is_null());
Harness(ptr::NonNull::new_unchecked(ptr), PhantomData)
Harness(ptr::NonNull::new_unchecked(ptr))
}
pub fn new(element_name: &str) -> Harness {
......@@ -728,10 +725,7 @@ impl Harness {
None
} else {
Some(Ref(
mem::ManuallyDrop::new(Harness(
ptr::NonNull::new_unchecked(sink_harness),
PhantomData,
)),
mem::ManuallyDrop::new(Harness(ptr::NonNull::new_unchecked(sink_harness))),
PhantomData,
))
}
......@@ -745,10 +739,7 @@ impl Harness {
None
} else {
Some(Ref(
mem::ManuallyDrop::new(Harness(
ptr::NonNull::new_unchecked(src_harness),
PhantomData,
)),
mem::ManuallyDrop::new(Harness(ptr::NonNull::new_unchecked(src_harness))),
PhantomData,
))
}
......@@ -762,10 +753,7 @@ impl Harness {
None
} else {
Some(RefMut(
mem::ManuallyDrop::new(Harness(
ptr::NonNull::new_unchecked(sink_harness),
PhantomData,
)),
mem::ManuallyDrop::new(Harness(ptr::NonNull::new_unchecked(sink_harness))),
PhantomData,
))
}
......@@ -779,10 +767,7 @@ impl Harness {
None
} else {
Some(RefMut(
mem::ManuallyDrop::new(Harness(
ptr::NonNull::new_unchecked(src_harness),
PhantomData,
)),
mem::ManuallyDrop::new(Harness(ptr::NonNull::new_unchecked(src_harness))),
PhantomData,
))
}
......