Compare commits

...

42 commits
main ... 0.17

Author SHA1 Message Date
Sebastian Dröge
6c9815f059 gstreamer: Fix -sys dependency version 2021-09-13 12:16:58 +03:00
Sebastian Dröge
0b7b8bd60f Update versions to 0.17.4 2021-09-13 12:04:11 +03:00
Sebastian Dröge
ad0dbadc74 Update CHANGELOG.md for 0.17.4 2021-09-13 12:03:48 +03:00
Sebastian Dröge
8deac14876 gstreamer/device_provider: Add constructor for device provider metadata 2021-09-13 11:36:12 +03:00
Sebastian Dröge
3b40b8e2d5 Update dependencies 2021-08-30 12:49:43 +03:00
Sebastian Dröge
e009fd0a4c Require gstreamer-sys 0.17.3 for the fixed tracer version bound 2021-08-23 09:10:10 +03:00
Sebastian Dröge
9f5c9adadf Update version numbers for 0.17.3 2021-08-23 09:10:07 +03:00
Sebastian Dröge
69eecdcc83 Update CHANGELOG.md for 0.17.3 2021-08-23 08:55:30 +03:00
Jordan Petridis
c5771f0373 tracer: add rustdoc-stripper-ignore-next annotations 2021-08-22 22:21:11 +03:00
Sebastian Dröge
1ae8b0d4a2 gstreamer: Add Value::deserialize_with_pspec() from 1.20 2021-08-22 21:57:19 +03:00
Sebastian Dröge
dd4330f899 gstreamer: Value::deserialize() needs to take the target type as parameter
Otherwise it will always fail.
2021-08-22 21:57:13 +03:00
Edward Hervey
562c8563ce gstreamer: Add serde support for more enums and flags
PadDirection, PadPresence, URITYpe, Rank
2021-08-22 21:57:05 +03:00
Simonas Kazlauskas
e1f197c91c Bindings to GstTracer and GstTracerFactory
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/147
2021-08-22 21:56:48 +03:00
Simonas Kazlauskas
6cf9b9a3d3 Make plugin date-time optional
It is described as optional in
https://gstreamer.freedesktop.org/documentation/gstreamer/gstplugin.html?gi-language=c#GstPluginDesc
and is also pretty difficult to provide for Rust plugins, I feel. For C
stuff the expectation is that build system would set something like
GST_PACKAGE_RELEASE_DATETIME=`date -u "+%Y-%m-%dT%H:%MZ"` which is
terrible.
2021-08-22 21:56:42 +03:00
Sebastian Dröge
35d2a2852b Update Cargo.lock 2021-08-05 18:01:05 +03:00
Sebastian Dröge
52b5f30b29 Update versions to 0.17.2 2021-08-05 16:46:10 +03:00
Sebastian Dröge
0fb2f605b6 Update CHANGELOG.md for 0.17.2 2021-08-05 16:46:03 +03:00
Vivia Nikolaidou
7868b700ee structure, caps: Implement 1.20 serialize functions 2021-08-05 16:08:54 +03:00
Vivia Nikolaidou
6c46db6e61 event: Implement gap_flags 2021-08-05 16:08:49 +03:00
Guillaume Gomez
e3ad81d473 Fix (new) clippy warnings 2021-08-05 14:36:36 +03:00
Fabio Valentini
566cfb879b gstreamer-audio: fix audio_format code for big-endian targets 2021-08-05 14:34:25 +03:00
Sebastian Dröge
5189a4d175 Fix various needless-borrow clippy warnings 2021-08-05 14:33:49 +03:00
Sebastian Dröge
3fc45a9254 base: Fix new clippy warning
error: statement can be reduced
  --> gstreamer-base/src/flow_combiner.rs:6:1
   |
6  | / glib::wrapper! {
7  | |     #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
8  | |     #[doc(alias = "GstFlowCombiner")]
9  | |     pub struct FlowCombiner(Shared<ffi::GstFlowCombiner>);
...  |
31 | |     }
32 | | }
   | |_^
2021-08-05 14:33:41 +03:00
Sebastian Dröge
c1905f2f24 Add Cargo.lock file for the stable branch 2021-08-05 14:01:09 +03:00
Sebastian Dröge
061f85d410 examples/tutorials: Use cocoa crate to initialize the shared NSApplication instance
This is required for OpenGL to work nowadays on macOS. Simply running an
CFRunLoop on the main thread is not sufficient.

Thanks to Philippe Normand for testing this on macOS and making sure it
actually compiles and works.
2021-07-13 11:06:24 +03:00
Sebastian Dröge
3b03ab0660 Update CHANGELOG.md for 0.17.1 2021-07-13 09:17:06 +03:00
Sebastian Dröge
e535924367 Update versions to 0.17.1 2021-07-13 09:15:11 +03:00
Olivier Crête
810ff23bed subclass: Declare minimum to be 1.19 for v1_20 2021-07-13 09:02:00 +03:00
Sebastian Dröge
c44fde7279 gstreamer/element: Include ElementExtManual::request_pad_simple() in the docs too
Currently only the v1_20 ElementExt::request_pad_simple() appears in the
docs but it's available from the other trait in older versions.
2021-06-30 13:27:47 +03:00
François Laignel
f33594bdd9 gstreamer-*/CHANGELOG.md use symlinks 2021-06-29 15:46:52 +02:00
François Laignel
9a0be6f1a8 CHANGELOG: mention fix-getters migration tools 2021-06-29 12:50:21 +02:00
Sebastian Dröge
cb526abb5a controller: Add missing README.md 2021-06-28 23:56:26 +03:00
Sebastian Dröge
7de8a64fc0 Update CHANGELOG.md for 0.17.0 2021-06-28 23:36:39 +03:00
Sebastian Dröge
b0c6fd1543 Regenerate with latest gir-files 2021-06-28 19:35:15 +03:00
Sebastian Dröge
b58b9d234c webrtc: Remove unneeded dependencies on gst-sys and gobject-sys 2021-06-28 19:35:01 +03:00
Sebastian Dröge
223a12597c webrtc: Fix manual data channel code
The corresponding API shouldn't have been public and is not public
anymore with 1.20.
2021-06-28 19:34:25 +03:00
Sebastian Dröge
72da9ea826 webrtc: Fix minimal version of WebRTCRTPSender 2021-06-28 19:34:25 +03:00
Sebastian Dröge
864072220b gstreamer: Mark all kinds of miniobject memory management convenience functions as existing since 1.18.3
Previously they were only available as inline functions in the headers.
2021-06-28 19:34:25 +03:00
Sebastian Dröge
11d04ad7b6 Update gst-gir-files 2021-06-28 19:34:25 +03:00
Prakash Duggaraju
ecf9a43692 rtsp-server: Add support for subclassing GstRtspMountPoints
Implement MountPointsImpl and MountPointsExt to allow subclassing.
Update the example to show usage.
2021-06-28 10:33:59 +03:00
Sebastian Dröge
2aeaf6fa7a ci: Add 0.17 release for the docs 2021-06-25 09:00:24 +03:00
Sebastian Dröge
e403542a28 Update versions from git to releases 2021-06-25 08:59:54 +03:00
300 changed files with 5107 additions and 19411 deletions

View file

@ -34,6 +34,7 @@ variables:
# latest release must be at the top
# (only relevant on master branch)
RELEASES:
0.17=0.17
0.16=0.16
stages:
@ -51,13 +52,6 @@ stages:
before_script:
- source ./ci/env.sh
- mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config
# If cargo exists assume we probably will want to update
# the lockfile
- |
if command -v cargo; then
cargo generate-lockfile --color=always
cargo update --color=always
fi
.debian:10-base:
extends: .debian:10

2834
Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,41 +1,44 @@
[package]
name = "examples"
version = "0.17.0"
version = "0.17.4"
license = "MIT"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
edition = "2018"
[dependencies]
glib = { git = "https://github.com/gtk-rs/gtk-rs-core" }
gst = { package = "gstreamer", path = "../gstreamer" }
gst-gl = { package = "gstreamer-gl", path = "../gstreamer-gl", optional = true }
gst-gl-egl = { package = "gstreamer-gl-egl", path = "../gstreamer-gl/egl", optional = true }
gst-gl-wayland = { package = "gstreamer-gl-wayland", path = "../gstreamer-gl/wayland", optional = true }
gst-gl-x11 = { package = "gstreamer-gl-x11", path = "../gstreamer-gl/x11", optional = true }
gst-app = { package = "gstreamer-app", path = "../gstreamer-app" }
gst-audio = { package = "gstreamer-audio", path = "../gstreamer-audio" }
gst-base = { package = "gstreamer-base", path = "../gstreamer-base" }
gst-video = { package = "gstreamer-video", path = "../gstreamer-video" }
gst-pbutils = { package = "gstreamer-pbutils", path = "../gstreamer-pbutils" }
gst-player = { package = "gstreamer-player", path = "../gstreamer-player", optional = true }
ges = { package = "gstreamer-editing-services", path = "../gstreamer-editing-services", optional = true }
gst-sdp = { package = "gstreamer-sdp", path = "../gstreamer-sdp", optional = true }
gst-rtsp = { package = "gstreamer-rtsp", path = "../gstreamer-rtsp", optional = true }
gst-rtsp-server = { package = "gstreamer-rtsp-server", path = "../gstreamer-rtsp-server", optional = true }
gtk = { git = "https://github.com/gtk-rs/gtk3-rs", optional = true }
gdk = { git = "https://github.com/gtk-rs/gtk3-rs", optional = true }
gio = { git = "https://github.com/gtk-rs/gtk-rs-core", optional = true }
glib = { version = "0.14" }
gst = { package = "gstreamer", version = "0.17", path = "../gstreamer" }
gst-gl = { package = "gstreamer-gl", version = "0.17", path = "../gstreamer-gl", optional = true }
gst-gl-egl = { package = "gstreamer-gl-egl", version = "0.17", path = "../gstreamer-gl/egl", optional = true }
gst-gl-wayland = { package = "gstreamer-gl-wayland", version = "0.17", path = "../gstreamer-gl/wayland", optional = true }
gst-gl-x11 = { package = "gstreamer-gl-x11", version = "0.17", path = "../gstreamer-gl/x11", optional = true }
gst-app = { package = "gstreamer-app", version = "0.17", path = "../gstreamer-app" }
gst-audio = { package = "gstreamer-audio", version = "0.17", path = "../gstreamer-audio" }
gst-base = { package = "gstreamer-base", version = "0.17", path = "../gstreamer-base" }
gst-video = { package = "gstreamer-video", version = "0.17", path = "../gstreamer-video" }
gst-pbutils = { package = "gstreamer-pbutils", version = "0.17", path = "../gstreamer-pbutils" }
gst-player = { package = "gstreamer-player", version = "0.17", path = "../gstreamer-player", optional = true }
ges = { package = "gstreamer-editing-services", version = "0.17", path = "../gstreamer-editing-services", optional = true }
gst-sdp = { package = "gstreamer-sdp", version = "0.17", path = "../gstreamer-sdp", optional = true }
gst-rtsp = { package = "gstreamer-rtsp", version = "0.17", path = "../gstreamer-rtsp", optional = true }
gst-rtsp-server = { package = "gstreamer-rtsp-server", version = "0.17", path = "../gstreamer-rtsp-server", optional = true }
gtk = { version = "0.14", optional = true }
gdk = { version = "0.14", optional = true }
gio = { version = "0.14", optional = true }
anyhow = "1.0"
derive_more = "0.99.5"
futures = "0.3"
byte-slice-cast = "1"
cairo-rs = { git = "https://github.com/gtk-rs/gtk-rs-core", features=["use_glib"], optional = true }
pango = { git = "https://github.com/gtk-rs/gtk-rs-core", optional = true }
pangocairo = { git = "https://github.com/gtk-rs/gtk-rs-core", optional = true }
cairo-rs = { version = "0.14", features=["use_glib"], optional = true }
pango = { version = "0.14", optional = true }
pangocairo = { version = "0.14", optional = true }
glutin = { version = "0.27", optional = true }
once_cell = "1.0"
image = { version="0.23", optional = true }
[target.'cfg(target_os = "macos")'.dependencies]
cocoa = "0.24"
[build-dependencies]
gl_generator = { version = "0.14", optional = true }

View file

@ -28,7 +28,7 @@ fn example_main() {
let mut context = gst::ParseContext::new();
let pipeline =
match gst::parse_launch_full(&pipeline_str, Some(&mut context), gst::ParseFlags::empty()) {
match gst::parse_launch_full(pipeline_str, Some(&mut context), gst::ParseFlags::empty()) {
Ok(pipeline) => pipeline,
Err(err) => {
if let Some(gst::ParseError::NoSuchElement) = err.kind::<gst::ParseError>() {

View file

@ -216,7 +216,7 @@ fn example_main() -> Result<(), Error> {
None => return,
};
match connect_rtpbin_srcpad(&src_pad, &depay) {
match connect_rtpbin_srcpad(src_pad, &depay) {
Ok(_) => (),
Err(err) => {
element_error!(

View file

@ -63,7 +63,7 @@ fn request_pad(element: &gst::Element, pad_name: &'static str) -> Result<gst::Pa
}
fn connect_decodebin_pad(src_pad: &gst::Pad, sink: &gst::Element) -> Result<(), Error> {
let sinkpad = static_pad(&sink, "sink")?;
let sinkpad = static_pad(sink, "sink")?;
src_pad.link(&sinkpad)?;
Ok(())
@ -136,7 +136,7 @@ fn example_main() -> Result<(), Error> {
srcpad.link(&sinkpad)?;
src.connect_pad_added(
move |decodebin, src_pad| match connect_decodebin_pad(&src_pad, &conv) {
move |decodebin, src_pad| match connect_decodebin_pad(src_pad, &conv) {
Ok(_) => (),
Err(err) => {
element_error!(

View file

@ -26,6 +26,10 @@ struct UsageError(#[error(not(source))] String);
fn main_loop() -> Result<(), Error> {
let main_loop = glib::MainLoop::new(None, false);
let server = server::Server::default();
let mounts = mount_points::MountPoints::default();
server.set_mount_points(Some(&mounts));
// Much like HTTP servers, RTSP servers have multiple endpoints that
// provide different streams. Here, we ask our server to give
// us a reference to his list of endpoints, so we can add our
@ -329,6 +333,58 @@ mod client {
}
}
mod mount_points {
use gst_rtsp_server::subclass::prelude::*;
mod imp {
use super::*;
// This is the private data of our mount points
#[derive(Default)]
pub struct MountPoints {}
// This trait registers our type with the GObject object system and
// provides the entry points for creating a new instance and setting
// up the class data
#[glib::object_subclass]
impl ObjectSubclass for MountPoints {
const NAME: &'static str = "RsRTSPMountPoints";
type Type = super::MountPoints;
type ParentType = gst_rtsp_server::RTSPMountPoints;
}
// Implementation of glib::Object virtual methods
impl ObjectImpl for MountPoints {}
// Implementation of gst_rtsp_server::RTSPClient virtual methods
impl RTSPMountPointsImpl for MountPoints {
fn make_path(
&self,
mount_points: &Self::Type,
url: &gst_rtsp::RTSPUrl,
) -> Option<glib::GString> {
println!("Make path called for {:?} ", url);
self.parent_make_path(mount_points, url)
}
}
}
glib::wrapper! {
pub struct MountPoints(ObjectSubclass<imp::MountPoints>) @extends gst_rtsp_server::RTSPMountPoints;
}
// MountPoints must be Send+Sync, and ours is
unsafe impl Send for MountPoints {}
unsafe impl Sync for MountPoints {}
impl Default for MountPoints {
// Creates a new instance of our factory
fn default() -> Self {
glib::Object::new(&[]).expect("Failed to create mount points")
}
}
}
fn example_main() -> Result<(), Error> {
gst::init()?;
main_loop()

View file

@ -79,7 +79,7 @@ fn create_pipeline(uri: String, out_path: std::path::PathBuf) -> Result<gst::Pip
})?;
let caps = sample.caps().expect("Sample without caps");
let info = gst_video::VideoInfo::from_caps(&caps).expect("Failed to parse caps");
let info = gst_video::VideoInfo::from_caps(caps).expect("Failed to parse caps");
// Make sure that we only get a single buffer
if got_snapshot {

View file

@ -1,41 +1,6 @@
/// macOS has a specific requirement that there must be a run loop running
/// on the main thread in order to open windows and use OpenGL.
#[cfg(target_os = "macos")]
mod runloop {
use std::os::raw::c_void;
pub struct CFRunLoop(*mut c_void);
#[link(name = "foundation", kind = "framework")]
extern "C" {
fn CFRunLoopRun();
fn CFRunLoopGetMain() -> *mut c_void;
fn CFRunLoopStop(l: *mut c_void);
}
impl CFRunLoop {
pub fn run() {
unsafe {
CFRunLoopRun();
}
}
#[doc(alias = "get_main")]
pub fn main() -> CFRunLoop {
unsafe {
let r = CFRunLoopGetMain();
assert!(!r.is_null());
CFRunLoop(r)
}
}
pub fn stop(&self) {
unsafe { CFRunLoopStop(self.0) }
}
}
unsafe impl Send for CFRunLoop {}
}
/// macOS has a specific requirement that there must be a run loop running on the main thread in
/// order to open windows and use OpenGL, and that the global NSApplication instance must be
/// initialized.
/// On macOS this launches the callback function on a thread.
/// On other platforms it's just executed immediately.
@ -52,16 +17,38 @@ pub fn run<T, F: FnOnce() -> T + Send + 'static>(main: F) -> T
where
T: Send + 'static,
{
use cocoa::appkit::NSApplication;
use std::thread;
let l = runloop::CFRunLoop::main();
let t = thread::spawn(move || {
let res = main();
l.stop();
res
});
unsafe {
let app = cocoa::appkit::NSApp();
let t = thread::spawn(|| {
let res = main();
runloop::CFRunLoop::run();
let app = cocoa::appkit::NSApp();
app.stop_(cocoa::base::nil);
t.join().unwrap()
// Stopping the event loop requires an actual event
let event = cocoa::appkit::NSEvent::otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_(
cocoa::base::nil,
cocoa::appkit::NSEventType::NSApplicationDefined,
cocoa::foundation::NSPoint { x: 0.0, y: 0.0 },
cocoa::appkit::NSEventModifierFlags::empty(),
0.0,
0,
cocoa::base::nil,
cocoa::appkit::NSEventSubtype::NSApplicationActivatedEventType,
0,
0,
);
app.postEvent_atStart_(event, cocoa::base::YES);
res
});
app.run();
t.join().unwrap()
}
}

@ -1 +1 @@
Subproject commit 85bd06bc2edad85889d91855cf8b900ad7c3b02f
Subproject commit 831b4449f0d5d1d30166f40cdf8409c9f395f34d

View file

@ -1,974 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
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.7] - 2021-02-13
### Fixed
- Usage of the logging system with a GStreamer library with the logging system
compiled out does not crash any longer.
- Double-free in `gst_video::VideoTimeCode` API when converting between
validated and unvalidated timecodes.
### Added
- `gst::Element::get_current_state()` and `get_pending_state()` convenience APIs.
- `gst_audio::AudioConverterConfig` for setting the configuration on e.g. the
`audiomixer` element. The low-level `AudioConverter` API is still not
included in the bindings.
## [0.16.6] - 2020-12-20
### Fixed
- `VideoTimeCodeInterval`'s `Ord` and `PartialEq` implementations compare
against the correct fields now.
- `SDPMessage::medias_mut()` iterator does not crash any longer.
### Added
- `PartialEq` and `Eq` implementations on `VideoAlignment`.
- Alignment API for `VideoMeta` and `get_plane_height()` / `get_plane_size()`.
- `VideoInfo::align_full()`.
## [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
`VideoFormat` iterators. Previously they returned the overall size instead
of the remaining size, and they didn't implement `Iterator::size_hint()`.
- Don't implement `ExactSizeIterator` on the buffer `gst::Meta` iterator. The
overall length is not known easily and the implementation would've simply
panicked in the past.
### Added
- `gst::ClockID::wait_async_stream()` for async integration for clock waiting.
- `From` / `TryFrom` impls for converting between `gst::ClockTime` and
`std::time::Duration`.
## [0.16.3] - 2020-09-08
### Fixed
- Reset vfuncs if calling `BaseTransformClass::configure()` multiple times.
- Fix `gst::debug_remove_default_log_function()` to actually remove the
default log function.
### Added
- Some more new APIs added in 1.18.
- API for getting an owned buffer from a readable `gst_video::VideoFrame` /
`VideoFrameRef`.
### Changed
- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any
API behind the "v1_18" feature is considered stable now.
- Factor out some common code from `gst::Pad::ProbeInfo` code. This reduces
the code generated for each pad probe considerably.
- Update paste dependency to 1.0 and pretty-hex to 0.2.
## [0.16.2] - 2020-07-27
### Fixed
- Use correct pointer for the plane data in `gst_audio::AudioBuffer`.
### Added
- Add `gst::GhostPad` convenience constructors that take a target pad, similar
to the ones that existed in 0.15 and before.
- Add `gst::parse_bin_from_description_with_name` that allows setting a name
for the created bin without having to use unsafe code in application code.
## [0.16.1] - 2020-07-10
### Fixed
- Allow calling `gst::DebugCategory::new()` before `gst::init()` again.
## [0.16.0] - 2020-07-06
### Added
- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be
opted-in via the "v1_18" feature flag but there might still be API changes
in the newly added API.
- `gst::MemoryRef::dump()` for dumping contents of a memory.
- `gst::Bus::stream()` instead of a custom constructor on the `BusStream`.
- Use more accurate types for `Seqnum`, `GroupId` and `MetaSeqnum`. These are
now proper wrapper types instead of plain integers, which makes mis-use
harder.
- Provide `TryFrom` impls for conversion between `glib::DateTime` and
`gst::DateTime`.
- Add `get_allocator()` functions to `gst_base::{Aggregator, BaseTransform,
BaseSrc}`, and allow overriding `BaseSrc::alloc()`.
- Add subclassing bindings for `gst_base::PushSrc`.
- Add new `gst::BufferCursor` API that allows to handle a buffer as `Read`,
`Write` and `Seek` and accesses the underlying memories of the buffer
individually without mapping them all together.
- Add `gst::Plugin::get_plugin_name()`.
- Support for `gst_video::VideoAFDMeta` and `VideoBarMeta`.
- API for getting all / iterating over all `gst_audio::AudioFormat` and
`gst_video::VideoFormat`.
- Bindings and subclassing bindings for `gst_video::VideoSink`.
- `gst::Pad` can be constructed via the builder pattern and `gst::PadBuilder`
now, which allows to safely set the pad functions and various other fields
during construction. The `PadBuilder` works on any `gst::Pad` subclass and
also has special support for `GhostPad`s by allowing to set pad functions of
the proxy pad.
- `gst::Message`, `gst::Event` and `gst::Query` type constructors are now on
the specific target type instead of various `new_XXX()` functions on the
basic type. E.g. `gst::message::Eos::new()`.
- Support for overriding `gst_audio::AudioSrc/Sink::reset()`.
- Support for overriding `gst_base::BaseParse::stop()`.
- Support for overriding `gst::Element::post_message()`.
- Added bindings for `gst::BufferList::foreach()` and `foreach_mut()`.
- Added bindings for `gst::Buffer::foreach_meta()` and `foreach_meta_mut()`.
### Fixed
- Allow using any `glib::Object` as target object for logging instead of just
`gst::Object`.
- Remove restriction API from `gst_pbutils::EncodingContainerProfile`. They
are supposed to be used only with the other encoding profiles.
- Return `&'static str` for various `gst::StructureRef` functions where the
string is backed by a `glib::Quark`.
- Fix various `gst::DateTime` functions to actually return `Option`s.
- Add support for filling in a buffer passed to the `gst::Pad` getrange
function, allow passing one in into `get_range()` and `pull_range()` and
provide the corresponding API on `gst_base::BaseSrc` too.
- Allocator in audio/video `Decoder` base classes is optional and can return
`None`.
- `gst_video::ValidVideoTimeCode::add_interval()` always returns a valid
timecode again.
- Allow resolving a `gst::Promise` with `None` and also handle that correctly
in the callback. This is allowed by the API.
- Allow calling various debugging related functions before `gst::init()`.
- Various enum/function versions were fixed to only show up if the
corresponding version feature is enabled.
- `gst::Pad` function setters are marked unsafe now as changing the functions
is not thread-safe.
- Remove `gst::Object::set_name()` as changing the name after construction
generally causes problems and is potentially unsafe.
- Remove `gst::Pad::set_pad_template()` as changing the pad template after
construction is generally unsafe.
- `gst::Pad::stream_lock()` borrows the pad now instead of taking a new
reference.
- Unimplemented `Jitter` and `Buffer` queries were removed from the bindings.
These are not implemented in C and only have a type registered.
- Various `LAST`, `NONE` variants of enums and flags were removed as these
only make sense in C.
- Call the parent impl of various vfuncs that were omitted before to not
require further subclasses of them to implement them but automatically call
the parent ones.
### Changed
- Use `NonZeroU64/U32` for various ID types to allow further optimizations.
- Use `thiserror` crate for deriving error types.
- Switch from `lazy_static` to `once_cell`.
- Change various miniobject functions like `gst::Caps::append()` from taking
the object by value to modifying it internally. This makes them easier to
use and only applies to functions that are defined on the non-reference type
and take ownership of the values passed in.
- Use `mem::ManuallyDrop` instead of `mem::forget()` everywhere.
- Replace most `mem::transmute()` calls with safer alternatives.
- `gst:StreamCollection` API was changed to the builder pattern for
construction as the collection must not be changed after construction.
- `gst::ProxyPad` default functions are plain functions on `ProxyPad` now
instead of trait functions to allow easier usage of them.
- Use proper error types in various `TryFrom` impls.
- `gst_video::VideoMeta::add()` returns a `Result` now instead of panicking.
- Various constructors were renamed from `new_with_XXX()` and `new_from_XXX()`
to the more idiomatic `with_XXX()` and `from_XXX()`.
- Miniobject bindings are simplified now and there is no `gst::GstRc` type
anymore, instead everything is directly implemented on the concrete types.
As part of this the `gst::MiniObject` trait was also removed as it was
unneeded now.
## [0.15.7] - 2020-06-08
### Fixed
- Allow multiple filter types per process with `gst::Iterator::filter()`.
- Check that `VideoInfo` is valid when creating a `VideoFrame`.
- Don't potentially dereference a `NULL` pointer when getting the format
from an invalid `VideoInfo` or `AudioInfo`.
- Don't unmap borrowed `VideoFrameRef`s.
### Added
- `gst::ProtectionMeta`, `gst_video::VideoAffineTransformationMeta`,
`VideoCropMeta` and `VideoRegionOfInterestMeta` bindings.
- Various new `gst_rtp::RTPBuffer` methods.
- `gst_audio::audio_buffer_truncate()`, `AudioMeta` and `AudioBuffer`
bindings.
## [0.15.6] - 2020-05-28
### Fixed
- Assert that the data passed to `VideoCaptionMeta::add()` is not empty.
- Don't store strong references to the object in the bus, appsink and appsrc
futures `Stream` / `Sink` adapters. This would keep them alive unnecessarily
and would prevent the `Stream` / `Sink` to ever "finish" on its own.
- Handle receiving a `None` reply in the change function of `gst::Promise`.
This is apparently valid. For backwards compatibility reasons this is
currently replaced with an empty structure but in 0.16 the API will
explicitly handle `None`.
### Added
- `gst::Stream::debug()` and `gst::StreamCollection::debug()` for converting
into a structured string with the actual contents of each.
- `gst::Structure::from_iter()` and `gst::Caps::from_iter()` to create
structures/caps from iterators.
- `gst::Event` support for getting/setting the `gst::Stream` in the
`StreamStart` event.
- `gst_video::calculate_display_ratio()` and `::guess_framerate()`.
- Various video related `gst::CapsFeatures` in `gst_video`.
- `TryFrom`/`From` impls for converting between `gst::Structure` and
`gst_video::VideoConverterConfig`.
- Various `glib::Value` trait impls for `SDPMessage`, `StructureRef`,
`CapsFeatureRef` and all borrowed variants of miniobjects to be able to
work with the borrowed, non-owned variants when handling `glib::Value`s.
## [0.15.5] - 2020-05-03
### Fixed
- Revert: Allow logging any `glib::Object` and not just `gst::Object`. This
broke API in subtile ways and needs to wait until 0.16
- Replace `%` in log output with `%%` to prevent accidental C formatting
- Add missing manual traits to the documentation
### Added
- `BufferRef::peek_memory_mut()` to give a mutable reference to a given memory
- Different iterators for iterating over the memories of a buffer
- Support for `gst_audio::AudioClippingMeta`
- `gst::Plugin::get_plugin_name()` was added
- `gst::Element::get_current_clock_time()` and
`gst::Element::get_current_running_time() helper functions
- `gst::State` and `StateChange` API for calculating next/previous state and
convert from/to the components of a state change
### Changed
- Use `mem::ManuallyDrop` instead of `mem::forget` everywhere
## [0.15.4] - 2020-03-09
### Fixed
- Allow logging any `glib::Object` and not just `gst::Object`
- Fix floating reference handling in `RTSPMedia::take_pipeline()`
- Hold `GMutex` guards for the remainder of the function and warn if they're
directly dropped
- Work around empty/any caps handling bugs in `Caps::fixate()`
### Added
- Add `BaseTransform::prepare_output_buffer()` subclassing support
- `RTSPServer`, `RTSPClient`, `RTSPMedia` and `RTSPMediaFactory` subclassing
support
- Handle panicking in `appsrc`/`appsink` callbacks by posting an error message
instead of killing the process
## [0.15.3] - 2020-02-15
### Fixed
- `UniqueFlowCombiner::clear()` should take a mutable reference.
- `AudioStreamAlign` doesn't require mutable references for getters anymore.
- Don't use bool return value of `gst_video_info_set_format()` and
`gst_video_info_align()` with GStreamer < 1.11.1 as it returned void back
then. We'd otherwise use some random value.
- Make `VideoInfo::align()` is available since 1.8.
- Fix changing/clearing of `AppSrc`, `AppSink` callbacks and `Bus` sync
handler. Before 1.16.3 this was not thread-safe and caused crashes. When
running with older versions changing them causes a panic now and unsetting
the bus sync handler has not effect. With newer versions it works correctly.
### Added
- Add `Clone` impls for `BufferPoolConfig` and `PlayerConfig`.
- Add `VideoConverter` bindings.
- Add `Future`s variant for `gst::Promise` constructor.
- Add `Future`s variant for `gst_video::convert_sample_async()`.
- Add `submit_input_buffer()`, `generate_output()`, `before_transform()`,
`copy_metadata()` and `transform_meta()` virtual method support for
`BaseTransform`.
- Add `AppSink` `Stream` adapter and `AppSrc` `Sink` adapter for integrating
both into Rust async contexts.
### Changed
- More generic implementations of `VideoFrame` / `VideoFrameRef` functions to
allow usage in more generic contexts.
## [0.15.2] - 2020-01-30
### Fixed
- Fix another race condition in the `gst::Bus` `Stream` that could cause it to
not wake up although a message is available.
## [0.15.1] - 2020-01-23
### Added
- Use static inner lifetime for `VideoCodecState<Readable>` so that it can be
stored safely on the heap.
- Getters/setters for `BinFlags` on `gst::Bin`.
- `gst::Caps::builder_full()` for building caps with multiple structures
conveniently.
- `gst::Element::call_async_future()` for asynchronously spawning a closure
and returning a `Future` for awaiting its return value.
### Fixed
- Various clippy warnings.
- Getters/setters for `PadFlags` on `gst::Pad` now provide the correct
behaviour.
- Take mutex before popping messages in the `gst::Bus` `Stream` to close a
small race condition that could cause it to not be woken up.
- `gst::ChildProxy` implementers do not have to provide `child_added()` and
`child_removed()` functions anymore but these are optional now.
- Manually implement `Debug` impls for various generic types where to `Debug`
impl should not depend on their type parameters also implementing `Debug`.
## [0.15.0] - 2019-12-18
### Added
- `StructureRef::get_optional()` for returning `None` if the field does not
exist instead of `Err`
- Bindings for `gstreamer-rtp` library, mostly `RTPBuffer`
- Support for writing `Preset`, `TagSetter`, `Clock`, `SystemClock` subclasses
- Bindings for `Typefind::get_length()`
- Bindings for `BaseSrcImpl::get_times()`
- Bindings (incl. subclassing) for `AudioSink` and `AudioSrc`
- Missing `Send`/`Sync` impl for various types
### Fixed
- Cleanup of cargo features/dependencies to improve build times
- Serde serialization with optional values.
Attention: This changes the format of the serialization!
- `VideoEncoder`/`VideoDecoder` `proxy_getcaps()` can't return `None`
- Use non-panicking UTF8 conversion in log handler. We don't want to panic
just because some C code printed a non-UTF8 string
- Re-rexport all traits from the crate level and also ensure that all traits
are actually included in the preludes
- Actually export `is_video_overlay_prepare_window_handle_message()` function
- Use `FnMut` for the `appsink` callbacks instead of `Fn`
- `Promise` change function returns the actual reply to the promise now
instead of just passing the promise itself
- Memory leak in `Iterator::filter()`
- `BinImpl::add()` takes ownership of floating references
- `DeviceImpl::create_element()` preserves floating flag
- `BinImpl::remove()` takes a strong reference of the element now as the last
reference might be owned by the bin and otherwise we would potentially have
a use-after-free afterwards
- `BaseParseFrame` and `VideoCodecFrame` take a `&mut self` now for various
functions that actually change the frame
### Changed
- Minimum supported Rust version is 1.39
- Allow passing `None` to `VideoEncoder::finish_frame()`
- Various `to_string()` methods were moved into the `Display` trait impl and
for some types `to_str()` was added to return a `&'static str`
- .gir files were updated to 1.16.2 release
- `Sample` constructor uses the builder pattern now
- `VideoMeta::add_full()` is simplified and requires parameters
- `BasetransformImpl::set_caps()` returns a `Result` instead of `bool`
- SDP data type getters for strings return an `Option` now as these can be
`None` in practice although not allowed by the SDP spec
- Various functions returning `Option`s were changed to return `Results` if
`None` actually signalled an error instead of just a missing value
### Removed
- "subclassing" and "futures" cargo features. These are enabled by default now
## [0.14.5] - 2019-09-17
### Added
- Support subclassing of `gst::Device`, `gst::DeviceProvider`,
`gst_audio::AudioDecoder` and `::AudioEncoder`
- Support for `Element::set_clock` and `::provide_clock` virtual methods
- `ElementClass::add_metadata` was added
- `gst_video::VideoDecoder` and `::VideoEncoder` got support for `get_caps`,
`negotiate`, `src/sink_query/event` and the `drain` virtual methods
- `Element::num_pads`, `::num_src_pads` and `::num_sink_pads` functions
- `gst_video::VideoDecoder` and `::VideoEncoder` got `get_allocator` bindings
- `gst::Iterator` implements `IntoIterator` now for providing
`std::iter::Iterator<Item=<Result<T, IteratorError>>` adapter
- Error macros for audio/video decoder subclasses to handle decoding errors
more gracefully and only actually error out after many consecutive errors
### Fixed
- Macros now also work in Rust 2018 edition without `#[macro_use]` but
explicit imports
- The log handler unit test runs reliable in parallel with other tests
- Manually implement `Debug` for `gst::Iterator` to allow it for any `T`
instead of `T: Debug`
- `Device::create_element` has correct reference count handling now
- Return `NotNegotiated` in the video codec base classes if setting the output
state fails instead of `Error`
## [0.14.4] - 2019-08-14
### Added
- Bindings for adding/removing custom log functions
- Bindings for `calculate_linear_regression()`
- Constants for base class custom flow returns
### Fixed
- Ownership of pad in `Element::release_pad()` virtual method implementations
## [0.14.3] - 2019-07-16
### Added
- `Buffer::unset_flags()` for unsetting specific buffer flags
- `VideoBufferFlags` flags type and `VideoBufferExt::set_video_flags()`,
`unset_video_flags()` and `get_video_flags()` for working with video buffer
flags from safe code.
### Fixed
- Setting buffer flags does not override arbitrary other flags anymore but
only sets the flags in question. This is necessary to not override extension
buffer flags like `gst_video::VideoBufferFlags`.
## [0.14.2] - 2019-07-15
### Added
- Support for `ReferenceTimestampMeta`
## [0.14.1] - 2019-07-06
### Added
- Various new WebRTC enum types from 1.14.1/1.16.0
### Fixed
- Correctly generate interlaced `VideoInfo` by using
`gst_video_info_set_interlaced_format()` instead of the generic function.
- serde serialization unit tests for `gst::format` succeed again now.
### Changed
- `Debug` impls for `VideoFormatInfo` and `AudioFormatInfo` now print all the
details of the format instead of only the name, and the `Debug` impls for
`VideoInfo` and `AudioInfo` also print the format now.
## [0.14.0] - 2019-06-24
### Added
- Bindings for `GLSyncMeta`.
- Bindings for setting/getting `TagScope` on a `TagList`
- Bindings for `GLDisplayWayland` and `GLDisplayX11` in addition to the
already existing `GLDisplayEGL`
- Bindings for `Bus::pop_filtered()` and related functions
- Bindings for getting/setting `Object`, `Element`, `Bin`, `Pipeline` and
`Plugin` flags
- Bindings for `VideoCaptionMeta`
- `Debug` impl of `Buffer` now also shows the metas of the buffers
- Expose flow return in `PadProbeInfo` for overriding the return value
- Bindings for `VideoDecoder` and `VideoEncoder`, including subclassing
support
- Bindings for `Memory`, `Allocator` and `VideoBufferPool`
- Bindings for `VideoFormatInfo::pack` and `::unpack` for format conversion
- Bindings for `BaseParse`, including subclassing support
- Various new arithmetic operation impls for fractions, formatted values and
`ClockTime`
- Bindings for `VideoInfo::align()`
### Changed
- The `SDPMessage` and `SDPMedia` bindings were completely rewritten as they
were broken before and caused crashes in various usages. As part of this
there's also some more convenience API available on these types, like
iterators for example, and API to modify the `SDPMedia` contained in a
`SDPMessage`.
- Update to GStreamer 1.16.
- Regenerate with latest gir.
- Run all autogenerated code through rustfmt after generation too.
- Updated to latest versions of GLib/GIO/etc crates.
- Updated to futures 0.3 / `std::future`
- `ProxyPad` default functions moved to an extension trait instead of plain
functions on `ProxyPad`, making them more in sync with the default `Pad`
functions
- GStreamer plugins are now exporting the new 1.14+ plugin symbols if they
were configured for GStreamer 1.14+
- Arithmetic operations on formatted values and `ClockTime` do overflow checks
now and replace the result with the `NONE` value on overflow
- `TryFrom`/`TryInto` traits are used in various places now instead of the
previous ad-hoc implementations of them.
- Registering element/typefind/device monitor factories requires passing a
value of `gst::Rank` now instead of an arbitrary `u32`
### Fixed
- Use correct type for destroying pad task closure data. This was previously
using the wrong type, causing crashes at runtime.
- `DeviceAdded`/`DeviceRemoved` message getters are transfer full so we don't
need to take an additional reference that would be leaked.
- `AppSink` callbacks are correctly marked as `Send` instead of `Send+Sync`,
allowing a wider range of closures to be used for them.
- Handle `PadProbeReturn::Handled` return values from pad probes more
correctly.
- `ToOwned::to_owned()` on miniobjects has to create copies instead of
only increasing the reference count. Otherwise it was possible to create
multiple mutable and immutable references to the same object at the same
time.
- Various functions take references to owned miniobjects instead of borrowed
references as it was otherwise possible to create multiple mutable or
immutable references to the same object at the same time.
- `URIHandler::set_uri` does not accept `None` anymore as this is not allowed
by the C function.
- Comparisons and addition of `TypeFindProbability` and `Rank` work correctly now
- Various `Display` implementations were fixed to not cause a stack overflow
due to infinite recursion anymore
- Various `::to_string()` functions don't take ownership of C strings anymore
that they do not own, which caused double frees before
### Removed
- MIKEY related bindings from the SDP library. The bindings were broken and
until someone needs them these are not available anymore.
## [0.13.0] - 2019-02-22
### Added
- Subclassing infrastructure was moved directly into the bindings,
making the `gst-plugin` crate deprecated. This involves many API
changes but generally cleans up code and makes it more flexible.
Take a look at the `gst-plugins-rs` crate for various examples.
- Bindings for GStreamer GL library
- Bindings for `CapsFeatures` and `Meta`
- Bindings for `ParentBufferMeta, `VideoMeta` and `VideoOverlayCompositionMeta`
- Bindings for `VideoOverlayComposition` and `VideoOverlayRectangle`
- Bindings for `VideoTimeCode`
- Bindings for `NetAddressMeta`
- Bindings for registering custom tags
- `UniqueFlowCombiner` and `UniqueAdapter` wrappers that make use of
the Rust compile-time mutability checks and expose more API in a safe
way, and as a side-effect implement `Sync` and `Send` now
- `Bus::add_watch_local()` and `gst_video::convert_frame_async_local()` that
allows to use a closure that does not implement `Send` but can only be
called from the thread owning the main context.
- More complete bindings for `Allocation` `Query`
- `pbutils` functions for codec descriptions
- `TagList::iter()` for iterating over all tags while getting a single
value per tag. The old `::iter_tag_list()` function was renamed to
`::iter_generic()` and still provides access to each value for a tag
- `Bus::iter()` and `Bus::iter_timed()` iterators around the
corresponding `::pop*()` functions
- Getters for `VideoColorimetry` to access its fields
- `Debug` impls for various missing types.
- serde serialization of `Value` can also handle `Buffer` now
- Extensive comments to all examples with explanations
- Transmuxing example showing how to use `typefind`, `multiqueue` and
dynamic pads
- basic-tutorial-12 was ported and added
### Changed
- Rust 1.31 is the minimum supported Rust version now
- Update to latest gir code generator and glib bindings
- Functions returning e.g. `gst::FlowReturn` or other "combined" enums
were changed to return split enums like `Result<gst::FlowSuccess,
gst::FlowError>` to allow usage of the standard Rust error handling.
- Various functions and callbacks returning `bool` or `Option<_>` were
changed to return a `Result<_, glib::BoolError>` or
`Result<_, gst::LoggableError>` or `Result<_, gst::ErrorMessage>` for
better integration with Rust's error handling infrastructure.
- Some infallible functions returning `bool` were changed to return `()`.
- `MiniObject` subclasses are now newtype wrappers around the
underlying `GstRc<FooRef>` wrapper. This does not change the
API in any breaking way for the current usages, but allows
`MiniObject`s to also be implemented in other crates and
makes sure `rustdoc` places the documentation in the right places.
- `BinExt` extension trait was renamed to `GstBinExt` to prevent
conflicts with `gtk::Bin` if both are imported
- `Buffer::from_slice()` can't possible return `None`
### Fixed
- `gst::tag::Album` is the album tag now instead of artist sortname
- Return `0` for the channel mask corresponding to negative
`AudioChannelPosition`s.
- `PartialOrd` and related traits are implemented via pointer equality on
`ClockId` instead of using the compare function. Two clock ids with the same
timestamp are not necessarily the same.
- Various functions that are actually fallible are now returning an
`Option<_>`.
- Various `clippy` warnings
## [0.12.2] - 2018-11-26
### Fixed
- PTP clock constructor actually creates a PTP instead of NTP clock
### Added
- Bindings for GStreamer Editing Services
- Bindings for GStreamer Check testing library
- Bindings for the encoding profile API (encodebin)
- VideoFrame, VideoInfo, AudioInfo, StructureRef implements Send and Sync now
- VideoFrame has a function to get the raw FFI pointer
- From impls from the Error/Success enums to the combined enums like
FlowReturn
- Bin-to-dot file functions were added to the Bin trait
- gst_base::Adapter implements SendUnique now
### Changed
- All references were updated from GitHub to freedesktop.org GitLab
- Fix various links in the README.md
- Link to the correct location for the documentation
- Remove GitLab badge as that only works with gitlab.com currently
## [0.12.1] - 2018-09-21
### Added
- More complete bindings for the gst_video::VideoOverlay interface, especially
gst_video::is_video_overlay_prepare_window_handle_message()
## [0.12.0] - 2018-09-08
### Added
- Bindings for the GStreamer SDP and WebRTC libraries
- Generic API for working with tags that is based on string tag names and
glib::Value for the tag values
- Bindings for Aggregator and AggregatorPad
- Bindings for BaseTransform/BaseSrc::get_buffer_pool()
- Optional serde implementations for the basic GStreamer data flow and metadata types
### Changed
- Use ptr::NonNull in various places
- Updated to muldiv 0.2, num-rational 0.2
- Bus::create_watch() can't return None
- Remove CallbackGuard as unwinding across FFI boundaries is not undefined
behaviour anymore but will directly cause a panic
- Changed from the futures to the futures-preview crate as an optional
dependency
- Various Caps operations take a &CapsRef instead of &Caps
- "deep-notify" signal takes the whole ParamSpec as parameter instead of only
the signal name
- Some structs were changed from empty struct to empty enums
- Pad probe code does not take an additional reference to the data anymore,
potentially passing writable events/buffers into the probe
- ValueExt::compare() is implemented around std::cmp::Ordering now instead of
a custom enum that was basically the same
### Fixed
- Pad::add_probe() can return None if an IDLE probe was already called and
removed in the meantime
- Various compiler and clippy warnings
### Removed
- std::Iterator impl for gst::Iterator. It was awkward to use because the
gst::Iterator could fail at each iteration
## [0.11.6] - 2018-08-27
### Fixed
- Build with NLL/two-phase borrows
- Explicitly define [bin] section for discoverer example to fix a cargo
warning
### Added
- Add unsafe gst::deinit() function
- Ord/PartialOrd impls on gst::Seqnum
- Getter for current pad mode
- gst::Pad::sticky_events_foreach() for iterating over all sticky events
in a thread-safe way
## [0.11.5] - 2018-07-24
### Fixed
- `gst::Bus`'s sync handler must unref every message if
`gst::BusSyncReply::Drop` is returned, otherwise they are all leaked
## [0.11.4] - 2018-07-19
### Fixed
- `gst::Caps::subtract()` does not leak its arguments anymore
- `gst::Caps::get_structure()` gracefully returns `None` if the index
is out of bounds instead of a `g_return_val_if_fail()`
- `gst::Structure::new()` has to give away ownership of the info structure
but didn't. For 0.11 we internally copy, in 0.12 it will take the info
structure by value
- Typefind tests don't fail anymore if the system has typefind factories
without caps
### Added
- An additional assertion that ensures that miniobjects are actually
writable before creating a mutable reference
## [0.11.3] - 2018-06-08
### Added
- `gst::Bus::remove_watch()` is now available to remove a bus watch again
- `fmt::Debug` impls for `AudioInfo` and `VideoInfo` were added
- `fmt::Debug` impls for mini objects also print the pointer value now to make
it easier to track them in debug logs
- `PlayerVisualization` has accessors for the name and description fields now,
without which there is no sensible way to use them or to set a player
visualization
## [0.11.2] - 2018-05-09
### Fixed
- Work-around various floating reference handling changes between 1.12 and
1.14 to be able to run with both versions without memory leaks or other
reference count problems.
This affects NetTimeProvider, BufferPool, DeviceMonitor, Stream,
StreamCollection, and Player, NetClientClock, NetClock, PtpClock which were
already previously fixed.
### Changed
- Change the appsrc need-data and all appsink callbacks to not require the
Sync bound anymore and change from Fn to FnMut. They can only be called from
a single thread at a time. This change is only done for the corresponding
callbacks, not the signals.
## [0.11.1] - 2018-04-07
### Fixed
- Fix Structure::to_string() to not run into an infinite recursion but call
the method on the contained StructureRef instead of on itself
## [0.11.0] - 2018-03-20
### Changed
- Updated everything to GStreamer 1.14.0
- Event, Message and Query types were refactored to improve usability.
Especially newly constructed queries allow to directly use the type-specific
functions to be used without first creating a view
- VideoFrameRef::copy_to_ref() and ::copy_plane_to_ref() are gone now and the
original functions work with refs instead of full frames
- PadProbeId and NotifyIds are not Copy/Clone anymore and are taken by value
- GstPlayer has GstObject as parent class now
### Added
- GstPbutils, GstSdp, GstRtsp and GstRtspServer bindings
- GstPromise, GstAudioStreamAlign and various other 1.14 API
- GstVideoFilter and GstBufferPool bindings
- Element::call_async()
- Debug impl For Toc and TocEntry
- Various new examples (RTP FEC, RTSP server, tag usage, ...)
### Fixed
- Memory leak in gst_video::convert_sample_async()
## [0.10.2] - 2018-02-18
### Fixed
- Fix building of messages with custom fields for types that don't have a
GstStructure
### Added
- VideoFrameRef::copy_to_ref() and ::copy_plane_to_ref(), which work with
VideoFrameRefs instead of full VideoFrames
- Getters for the BaseSrc/Sink/Transform configured segment
- Document the gstreamer-player-1.0 dependency in the README.md
## [0.10.1] - 2018-01-03
### Fixed
- Don't require &mut self for TagSetterExtManual::add()
### Added
- A TagSetter example application
- Bindings for gst_video::convert_sample() and ::convert_sample_async()
- Bindings for gst_video::VideoRectangle
- Debug impl for Sample and ::with_buffer_list() constructor
- A borrowing version of VideoFrame: VideoFrameRef
- Bindings for GstVideoFilter
### Changed
- Deprecated Sample::get_info() in favour of ::get_structure()
- Player has gst::Object as another parent class now
## [0.10.0] - 2017-12-22
### Fixed
- Various clippy warnings
- Memory leak of the tag list in Toc::merge_tags()
- Property getters use Values of the correct type
- Event::get_structure(), Message::get_structure() and
Query::get_structure() can return None for the structure
- Various other nullability fixes all over the API, changing functions to
accept Option<> or returning Option<>, or only plain types
- Functions taking paths/filenames now actually take Paths instead of &strs
- Element::remove_pad() is not giving away a new reference to the pad
anymore, which caused a memory leak of all pads ever removed
- Precision handling in ClockTime's Display impl
- Video/AudioInfo are only Send, not Sync
### Added
- Various enums now also derive useful traits like Copy, Clone and Hash in
addition to PartialEq, Eq and Debug
- TagList::merge() and insert() for combining tag lists
- EventType gained many useful functions to work with event types and
a PartialOrd impl to check expected event order of event types where it matters
- MessageRef/EventRef/QueryRef implement ToOwned
- Bindings for Registry and PluginFeature
- Event::set_running_time_offset() for adjusting the offset while events
pass through the pipeline
- Event/Message GroupIds and Seqnums now have a newtype wrapper around u32
instead of the plain value, making usage of them slightly more typesafe.
Also add an "invalid" value for both, as exists in latest GStreamer now.
- FormattedValue, GenericFormattedValue and related types were
implemented now, which allows more convenient and type-safe usage of
formatted values (time, bytes, etc)
- Bindings for force-keyunit and still-frame events were added
- MappedBuffer/BufferMap now implement various other useful traits, including
AsRef<[u8]>, AsMut, Deref, DerefMut, Debug, PartialEq and Eq
- Add VideoMultiviewFramePacking enum, and use it in Player
- Bindings for the GStreamer Net library, including PTP/NTP/network client
clocks and the GStreamer NetClock provider for network synchronization of
pipelines
- IteratorError implements std::error:Error
- Plugin::add_dependency() and ::add_dependency_simple() was added
- Rank and TypeFindProbability implement PartialOrd/Ord now
- Bindings for TypeFind, TypeFindFactory and the typefind helpers
- StreamCollection::iter() for iterating over all contained streams
- ErrorMessage type that can be used e.g. in a Result for passing an error
message from somewhere to upper layers to then be posted on an element the
same way gst_element_error!() would've done
### Changed
- Sample::new(), TagList::add(), Structure::set() and similar
functions take the values (ToSendValue impls) by reference instead of value.
They were not consumed by the function before.
- The Debug impls of various types, including Event/Buffer/Message/Query/Structure
were improved to print all the fields, similar to what GST_PTR_FORMAT would
do in C
- Switched to lazy_static 1.0
- Gap event and Duration tag are using ClockTimes now, as well as various
Player signals
- Segment is now based on a generic type FormattedSegment that can
take any format (time, bytes, etc) or a GenericFormattedValue for more
type-safety and convenience. Also functions for "casting" between a generic
segment and a segment with a specific format exist on this now
- AppSrc and AppSink now have a builder for the callbacks, making it
unnecessary to always provide all callbacks even if only one is actually
needed
- Various functions that returned bool for errors, are now returning a Result
- Player configuration is now a custom type with more convenient API
- Player VideoInfo uses a Fraction instead of (u32,u32) for the framerate and
pixel-aspect-ratio
- VideoFrame API has more consistent API between writable and read-only
variants
- Buffer::copy_into() was added, and ::copy_region() now takes a
BufferCopyFlags parameter instead of always using the default flags
- ChildProxy::set_child_property() takes a &ToValue now to follow the API of
Object::set_property() and improve usability
- Proxy/GhostPad default pad functions use the correct specific pad type now
instead of a generic Pad
- Bus::add_signal_watch_full() takes a Priority for the priority instead of u32
- Clock::(un)adjust_with_calibration() takes no clock parameter anymore
### Removed
- FormatValue was removed in favour of GenericFormattedValue and the
connected traits and specific format impls
## [0.9.1] - 2017-11-26
### Fixed
- Export `FlowError`/`FlowSuccess`, `ClockError`/`ClockSuccess`,
`PadLinkError`/`PadLinkSuccess` too
## [0.9.0] - 2017-11-26
### Added
- Bindings for (outputting to) the GStreamer logging system
- Bindings for the GStreamer base library
- Bindings for all the `Pad` functions to override pad behaviour, and pad task
functions
- Bindings for `StaticCaps` and `StaticPadTemplate`
- Bindings for `deep-notify` signal on `Object`
- Support for directly creating `Error`/`Warning`/`Info` `Messages` and posting them
from an element with context information (file, line, module, etc.) similar
to the C `GST_ELEMENT_ERROR` macro
- Support for setting custom fields in `Messages`/`Events` during construction
- Support for creating Buffers out of anything that is `AsRef<[u8]>` or
`AsMut<[u8]>`
- Support for using the `Read` trait on `Adapter`
- Functions for getting all sink/src/all pads of an `Element`, and all children
of a `Bin`
- Builder for `Caps` and `Structures` in addition to the existing functions
- `AppSrc`/`AppSink` implement `BaseSrc`/`BaseSink` and `URIHandler`
- Rust ports of the basic tutorials 1 to 8 from
https://gstreamer.freedesktop.org/documentation/tutorials/
- "Getting started" and "Installation" sections to the README.md
- "dox" feature for generating documentation for all available configurations
### Fixed
- `StackTraceFlags` are only available since 1.12
- Worked around macOS requiring a `NSRunLoop` running on the main thread in all
examples and tutorials, to be able to show a window or anything else
### Changed
- `ClockTime` is now a wrapper around `Option<u64>` to handle the
`CLOCK_TIME_NONE` case better. This wrapper implements all the arithmetic
and other traits as needed and ensures that no accidential calculations with
`CLOCK_TIME_NONE` can happen
- "Values with format", like in `Duration`/`Position`/`Convert` queries or
`Seek` events now return a `FormatValue` type. This contains the actual
`Format` together with the value and does any required conversions. This
also makes it harder to accidentially mix e.g. values in bytes and time
- `PadProbeId` does not implement `Clone`/`Copy` anymore
- Property notify watches return a custom type instead of ulong
- `Error`/`Warning`/`Info` `Messages` can only be created with specific kinds of
`glib::Error` now. Using arbitrary ones does not work
- `Iterator` bindings were completely rewritten and provide the item type as a
generic type parameter now, greatly simplifying its usage
- All `glib::Values` are now `glib::SendValue` instead, e.g. in `Caps` and
`Structures`, as their content must be possible to send to different threads
safely
- `Message::get_src()` can return `None`
- Allow `None` as `Caps` in `AppSrc`/`AppSink`
- Allow everything implementing `Into<Option<&str>>` to be used as a pad name
- Moved `copy()` from `GstRc` directly to `MiniObject`
- Success/Error enums (like `FlowReturn`, `PadLinkReturn`, `StateChangeReturn`) now
implement an `into_result()` function that splits them into a `Result` with
the good and bad cases. Also mark them as `#[must_use]` to make it harder to
accidentially ignore errors.
- Error enums implement the `Error` trait
- Many examples use the `failure` crate for error handling now, cleaning up the
error handling code quite a bit
- Lots of other code cleanup, compiler/clippy warning cleanup, etc.
## [0.8.2] - 2017-11-11
### Fixed
- Implement StaticType of BufferRef instead of Buffer. Buffer aka
GstRc<BufferRef> already implements StaticType if BufferRef does, and
without this it was not possible to use Buffers in GValues.
- Free memory of the appsink/appsrc callbacks with the correct type. It was
crashing because of using the wrong type before.
- Fix documentation URLs in Cargo.toml.
### Added
- Installation instructions and links to documentation for getting started to
README.md.
## [0.8.1] - 2017-09-15
### Added
- Implement Send+Sync for Query, Message and Event, and their corresponding
Ref types.
### Fixed
- Constructor for gst_player::Player now works properly with GStreamer 1.12
when passing a video renderer or signal dispatcher. There was a reference
counting bug.
- Instead of returning &'static references from functions, return references
with a generic, unbound lifetime instead.
See https://github.com/rust-lang/rust/pull/42417#issue-233404573
- Various "unused external crate" warnings and clippy warnings everywhere.
### Changed
- Remove Cargo.lock from GIT, it's not very useful for library crates.
- Run everything through latest rustfmt-nightly.
- Use while-let (instead of loop and if-let) and CLOCK_TIME_NONE (instead of
u64::MAX) in the examples.
## 0.8.0 - 2017-08-31
- Initial release of the autogenerated GStreamer bindings. Older versions
(< 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.6...HEAD
[0.16.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.5...0.16.6
[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
[0.16.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.7...0.16.0
[0.15.7]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.6...0.15.7
[0.15.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.5...0.15.6
[0.15.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.4...0.15.5
[0.15.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.3...0.15.4
[0.15.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.2...0.15.3
[0.15.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.1...0.15.2
[0.15.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.0...0.15.1
[0.15.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.2...0.15.0
[0.14.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.1...0.14.2
[0.14.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.0...0.14.1
[0.14.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.13.0...0.14.0
[0.13.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.2...0.13.0
[0.12.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.1...0.12.2
[0.12.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.0...0.12.1
[0.12.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.6...0.12.0
[0.11.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.5...0.11.6
[0.11.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.4...0.11.5
[0.11.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.3...0.11.4
[0.11.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.2...0.11.3
[0.11.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.1...0.11.2
[0.11.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.0...0.11.1
[0.11.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.2...0.11.0
[0.10.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.1...0.10.2
[0.10.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.0...0.10.1
[0.10.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.9.1...0.10.0
[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.9.0...0.9.1
[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.1...0.9.0
[0.8.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.1...0.8.2
[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.0...0.8.1

1
gstreamer-app/CHANGELOG.md Symbolic link
View file

@ -0,0 +1 @@
../gstreamer/CHANGELOG.md

View file

@ -1,6 +1,6 @@
[package]
name = "gstreamer-app"
version = "0.17.0"
version = "0.17.4"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
categories = ["api-bindings", "multimedia"]
description = "Rust bindings for GStreamer App library"
@ -17,10 +17,10 @@ futures-core = "0.3"
futures-sink = "0.3"
bitflags = "1.0"
libc = "0.2"
ffi = { package = "gstreamer-app-sys", path = "sys", features = ["v1_8"] }
glib = { git = "https://github.com/gtk-rs/gtk-rs-core" }
gst = { package = "gstreamer", path = "../gstreamer" }
gst-base = { package = "gstreamer-base", path = "../gstreamer-base" }
ffi = { package = "gstreamer-app-sys", version = "0.17", path = "sys", features = ["v1_8"] }
glib = { version = "0.14" }
gst = { package = "gstreamer", version = "0.17", path = "../gstreamer" }
gst-base = { package = "gstreamer-base", version = "0.17", path = "../gstreamer-base" }
once_cell = "1.0"
[dev-dependencies]

View file

@ -134,11 +134,11 @@ impl AppSinkCallbacksBuilder {
fn post_panic_error_message(element: &AppSink, err: &dyn std::any::Any) {
skip_assert_initialized!();
if let Some(cause) = err.downcast_ref::<&str>() {
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
gst::element_error!(element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
} else if let Some(cause) = err.downcast_ref::<String>() {
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
gst::element_error!(element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
} else {
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(element, gst::LibraryError::Failed, ["Panicked"]);
}
}
@ -148,7 +148,7 @@ unsafe extern "C" fn trampoline_eos(appsink: *mut ffi::GstAppSink, callbacks: gp
if callbacks.panicked.load(Ordering::Relaxed) {
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(element, gst::LibraryError::Failed, ["Panicked"]);
return;
}
@ -175,7 +175,7 @@ unsafe extern "C" fn trampoline_new_preroll(
if callbacks.panicked.load(Ordering::Relaxed) {
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(element, gst::LibraryError::Failed, ["Panicked"]);
return gst::FlowReturn::Error.into_glib();
}
@ -208,7 +208,7 @@ unsafe extern "C" fn trampoline_new_sample(
if callbacks.panicked.load(Ordering::Relaxed) {
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(element, gst::LibraryError::Failed, ["Panicked"]);
return gst::FlowReturn::Error.into_glib();
}
@ -533,7 +533,7 @@ impl AppSink {
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&AppSink::from_glib_borrow(this).unsafe_cast_ref())
f(AppSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box<F> = Box::new(f);
@ -561,7 +561,7 @@ impl AppSink {
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&AppSink::from_glib_borrow(this).unsafe_cast_ref())
f(AppSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box<F> = Box::new(f);
@ -589,7 +589,7 @@ impl AppSink {
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&AppSink::from_glib_borrow(this).unsafe_cast_ref())
f(AppSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box<F> = Box::new(f);
@ -617,7 +617,7 @@ impl AppSink {
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&AppSink::from_glib_borrow(this).unsafe_cast_ref())
f(AppSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box<F> = Box::new(f);
@ -645,7 +645,7 @@ impl AppSink {
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&AppSink::from_glib_borrow(this).unsafe_cast_ref())
f(AppSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box<F> = Box::new(f);
@ -673,7 +673,7 @@ impl AppSink {
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&AppSink::from_glib_borrow(this).unsafe_cast_ref())
f(AppSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box<F> = Box::new(f);
@ -703,7 +703,7 @@ impl AppSink {
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&AppSink::from_glib_borrow(this).unsafe_cast_ref())
f(AppSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box<F> = Box::new(f);
@ -729,7 +729,7 @@ impl AppSink {
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&AppSink::from_glib_borrow(this).unsafe_cast_ref())
f(AppSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box<F> = Box::new(f);
@ -757,7 +757,7 @@ impl AppSink {
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&AppSink::from_glib_borrow(this).unsafe_cast_ref())
f(AppSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box<F> = Box::new(f);
@ -785,7 +785,7 @@ impl AppSink {
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&AppSink::from_glib_borrow(this).unsafe_cast_ref())
f(AppSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box<F> = Box::new(f);
@ -811,7 +811,7 @@ impl AppSink {
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&AppSink::from_glib_borrow(this).unsafe_cast_ref())
f(AppSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box<F> = Box::new(f);
@ -839,7 +839,7 @@ impl AppSink {
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&AppSink::from_glib_borrow(this).unsafe_cast_ref())
f(AppSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box<F> = Box::new(f);
@ -867,7 +867,7 @@ impl AppSink {
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&AppSink::from_glib_borrow(this).unsafe_cast_ref())
f(AppSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box<F> = Box::new(f);

View file

@ -111,11 +111,11 @@ impl AppSrcCallbacksBuilder {
fn post_panic_error_message(element: &AppSrc, err: &dyn std::any::Any) {
skip_assert_initialized!();
if let Some(cause) = err.downcast_ref::<&str>() {
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
gst::element_error!(element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
} else if let Some(cause) = err.downcast_ref::<String>() {
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
gst::element_error!(element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
} else {
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(element, gst::LibraryError::Failed, ["Panicked"]);
}
}
@ -129,7 +129,7 @@ unsafe extern "C" fn trampoline_need_data(
if callbacks.panicked.load(Ordering::Relaxed) {
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(element, gst::LibraryError::Failed, ["Panicked"]);
return;
}
@ -153,7 +153,7 @@ unsafe extern "C" fn trampoline_enough_data(appsrc: *mut ffi::GstAppSrc, callbac
if callbacks.panicked.load(Ordering::Relaxed) {
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(element, gst::LibraryError::Failed, ["Panicked"]);
return;
}
@ -179,7 +179,7 @@ unsafe extern "C" fn trampoline_seek_data(
if callbacks.panicked.load(Ordering::Relaxed) {
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(element, gst::LibraryError::Failed, ["Panicked"]);
return false.into_glib();
}

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)

View file

@ -1,181 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
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.9.1] - 2020-09-08
### Changed
- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any
API behind the "v1_18" feature is considered stable now.
## [0.9.0] - 2020-07-05
### Added
- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be
opted-in via the "v1_18" feature flag but there might still be API changes
in the newly added API.
### Changed
- Minimum supported GStreamer version is 1.8 now.
- The `system-deps` crate is now used for declaring the dependency on the C
libraries instead of directly using `pkg-config`.
### Fixed
- Various missing version markers were added, which should allow compilation
against GStreamer 1.8 on Windows again. On Windows missing symbols are
apparently an error even if they're not used.
- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent.
## [0.8.1] - 2019-12-16
### Added
- GStreamer RTP bindings
### Changed
- Update minimum supported Rust version to 1.36
- Update introspection data to GStreamer 1.16.2 release
## [0.8.0] - 2019-06-24
### Added
- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in
addition to GstGLDisplayEGL that existed before
### Changed
- Updated to GStreamer 1.16.0 .gir files, plus backported fixes
- Updated to latest gir
- Run all code through rustfmt after code generation
## [0.7.0] - 2019-02-22
### Added
- GstGL (OpenGL/GLES) bindings
### Changed
- Switch to Rust 1.31 as minimum supported version
- Generate GstVideoOverlayFormatFlags as flags type instead of enum
- Updates GstMpegts with various annotation fixes from GStreamer git master
## [0.6.1] - 2018-11-10
### Added
- GstCheck and GES (gstreamer editing services) bindings
### Changed
- Updated .gir files to 1.14.4 release
- All references were updated from GitHub to freedesktop.org GitLab
- Various functions take \*const instead of \*mut as parameters now
### Fixed
- Various functions and structs having pointer-of-array parameters/fields have
now fixed types. They were previously flat arrays instead of
pointer-of-arrays.
- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before
that
## [0.6.0] - 2018-09-08
### Changed
- Updated everything to GStreamer 1.14.2
- Various fixes to how the code generator is used
- Regenerate with latest GIR code generator
### Fixed
- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class
struct
- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys
- Removed unneeded dependencies from the code generator configuration files
## [0.5.0] - 2018-03-20
### Changed
- Updated everything to GStreamer 1.14.0
### Added
- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings
### Fixed
- Use external_libraries feature of gir to require less manual editing
- Remove some unused crates from dependencies
- Disale print_system_libs in calls to pkg-config to work better with
non-system installs of GStreamer
## [0.4.1] - 2018-02-18
### Fixed
- Fix native library name of GstNet bindings
## [0.4.0] - 2017-12-23
### Added
- GstNet bindings
- Debug impls for basically every type
- Script to automatically regenerate everything
### Changed
- gst_player_[sg]et_multiview_mode() argument types were changed from
GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset
of the former that is allowed here
- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead
of *mut *const c_char
## [0.3.0] - 2017-11-26
### Added
- GstMpegTs bindings
### Changed
- GstDebugColorFlags from an enum to a bitfield
- Updated to bitflags 1.0
- Added support for the "dox" feature to generate documentation for all
possible versions
- Depend on glib-sys/gobject-sys 0.5
### Fixes
- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since
1.12 and 1.12.1 respectively
- All C enums are represented as integers + constants now to prevent undefined
behaviour when out-of-range values are received
## [0.2.1] - 2017-09-10
### Changed
- Add README.md to all crates directly
### Fixed
- Fix various compiler warnings
- Fix versioning/feature mess. Now each library has features for all major
versions and for the correct minor versions that added API.
- Removed Cargo.lock from GIT
## [0.2.0] - 2017-08-28
### Added
- Add GstPlayer bindings
### Changed
- Depend on bitflags 0.9
- Update GIR files to 1.12.1 release
- Fix various errors in the GIR files, backported from GStreamer GIT master
- Depend on gobject-sys/glib-sys 0.4.0 for various improvements
- Regenerated everything with latest GIR
## [0.1.1] - 2017-05-10
### Added
- Add GstTag and GstApp bindings
- Add lots of missing fields to all the structs thanks to GIR improvements
### Changed
- Update GIR files to 1.12.0 release
- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs
- Regenerated everything with latest GIR
## 0.1.0 - 2017-04-09
- Initial release of the autogenerated GStreamer FFI bindings.
[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD
[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1
[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0
[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1
[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0
[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0
[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1
[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0
[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0
[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1
[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0
[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0
[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1
[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0
[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1

View file

@ -0,0 +1 @@
../../gstreamer/CHANGELOG.md

View file

@ -5,12 +5,14 @@ system-deps = "3"
libc = "0.2"
[dependencies.glib-sys]
git = "https://github.com/gtk-rs/gtk-rs-core"
version = "0.14"
[dependencies.gstreamer-base-sys]
version = "0.17"
path = "../../gstreamer-base/sys"
[dependencies.gstreamer-sys]
version = "0.17"
path = "../../gstreamer/sys"
[dev-dependencies]
@ -45,7 +47,7 @@ links = "gstapp-1.0"
name = "gstreamer-app-sys"
readme = "README.md"
repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
version = "0.17.0"
version = "0.17.4"
edition = "2018"
[package.metadata.docs.rs]
features = ["dox"]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#[cfg(not(feature = "dox"))]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
use gstreamer_app_sys::*;

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#include "manual.h"

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#include "manual.h"

View file

@ -1,974 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
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.7] - 2021-02-13
### Fixed
- Usage of the logging system with a GStreamer library with the logging system
compiled out does not crash any longer.
- Double-free in `gst_video::VideoTimeCode` API when converting between
validated and unvalidated timecodes.
### Added
- `gst::Element::get_current_state()` and `get_pending_state()` convenience APIs.
- `gst_audio::AudioConverterConfig` for setting the configuration on e.g. the
`audiomixer` element. The low-level `AudioConverter` API is still not
included in the bindings.
## [0.16.6] - 2020-12-20
### Fixed
- `VideoTimeCodeInterval`'s `Ord` and `PartialEq` implementations compare
against the correct fields now.
- `SDPMessage::medias_mut()` iterator does not crash any longer.
### Added
- `PartialEq` and `Eq` implementations on `VideoAlignment`.
- Alignment API for `VideoMeta` and `get_plane_height()` / `get_plane_size()`.
- `VideoInfo::align_full()`.
## [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
`VideoFormat` iterators. Previously they returned the overall size instead
of the remaining size, and they didn't implement `Iterator::size_hint()`.
- Don't implement `ExactSizeIterator` on the buffer `gst::Meta` iterator. The
overall length is not known easily and the implementation would've simply
panicked in the past.
### Added
- `gst::ClockID::wait_async_stream()` for async integration for clock waiting.
- `From` / `TryFrom` impls for converting between `gst::ClockTime` and
`std::time::Duration`.
## [0.16.3] - 2020-09-08
### Fixed
- Reset vfuncs if calling `BaseTransformClass::configure()` multiple times.
- Fix `gst::debug_remove_default_log_function()` to actually remove the
default log function.
### Added
- Some more new APIs added in 1.18.
- API for getting an owned buffer from a readable `gst_video::VideoFrame` /
`VideoFrameRef`.
### Changed
- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any
API behind the "v1_18" feature is considered stable now.
- Factor out some common code from `gst::Pad::ProbeInfo` code. This reduces
the code generated for each pad probe considerably.
- Update paste dependency to 1.0 and pretty-hex to 0.2.
## [0.16.2] - 2020-07-27
### Fixed
- Use correct pointer for the plane data in `gst_audio::AudioBuffer`.
### Added
- Add `gst::GhostPad` convenience constructors that take a target pad, similar
to the ones that existed in 0.15 and before.
- Add `gst::parse_bin_from_description_with_name` that allows setting a name
for the created bin without having to use unsafe code in application code.
## [0.16.1] - 2020-07-10
### Fixed
- Allow calling `gst::DebugCategory::new()` before `gst::init()` again.
## [0.16.0] - 2020-07-06
### Added
- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be
opted-in via the "v1_18" feature flag but there might still be API changes
in the newly added API.
- `gst::MemoryRef::dump()` for dumping contents of a memory.
- `gst::Bus::stream()` instead of a custom constructor on the `BusStream`.
- Use more accurate types for `Seqnum`, `GroupId` and `MetaSeqnum`. These are
now proper wrapper types instead of plain integers, which makes mis-use
harder.
- Provide `TryFrom` impls for conversion between `glib::DateTime` and
`gst::DateTime`.
- Add `get_allocator()` functions to `gst_base::{Aggregator, BaseTransform,
BaseSrc}`, and allow overriding `BaseSrc::alloc()`.
- Add subclassing bindings for `gst_base::PushSrc`.
- Add new `gst::BufferCursor` API that allows to handle a buffer as `Read`,
`Write` and `Seek` and accesses the underlying memories of the buffer
individually without mapping them all together.
- Add `gst::Plugin::get_plugin_name()`.
- Support for `gst_video::VideoAFDMeta` and `VideoBarMeta`.
- API for getting all / iterating over all `gst_audio::AudioFormat` and
`gst_video::VideoFormat`.
- Bindings and subclassing bindings for `gst_video::VideoSink`.
- `gst::Pad` can be constructed via the builder pattern and `gst::PadBuilder`
now, which allows to safely set the pad functions and various other fields
during construction. The `PadBuilder` works on any `gst::Pad` subclass and
also has special support for `GhostPad`s by allowing to set pad functions of
the proxy pad.
- `gst::Message`, `gst::Event` and `gst::Query` type constructors are now on
the specific target type instead of various `new_XXX()` functions on the
basic type. E.g. `gst::message::Eos::new()`.
- Support for overriding `gst_audio::AudioSrc/Sink::reset()`.
- Support for overriding `gst_base::BaseParse::stop()`.
- Support for overriding `gst::Element::post_message()`.
- Added bindings for `gst::BufferList::foreach()` and `foreach_mut()`.
- Added bindings for `gst::Buffer::foreach_meta()` and `foreach_meta_mut()`.
### Fixed
- Allow using any `glib::Object` as target object for logging instead of just
`gst::Object`.
- Remove restriction API from `gst_pbutils::EncodingContainerProfile`. They
are supposed to be used only with the other encoding profiles.
- Return `&'static str` for various `gst::StructureRef` functions where the
string is backed by a `glib::Quark`.
- Fix various `gst::DateTime` functions to actually return `Option`s.
- Add support for filling in a buffer passed to the `gst::Pad` getrange
function, allow passing one in into `get_range()` and `pull_range()` and
provide the corresponding API on `gst_base::BaseSrc` too.
- Allocator in audio/video `Decoder` base classes is optional and can return
`None`.
- `gst_video::ValidVideoTimeCode::add_interval()` always returns a valid
timecode again.
- Allow resolving a `gst::Promise` with `None` and also handle that correctly
in the callback. This is allowed by the API.
- Allow calling various debugging related functions before `gst::init()`.
- Various enum/function versions were fixed to only show up if the
corresponding version feature is enabled.
- `gst::Pad` function setters are marked unsafe now as changing the functions
is not thread-safe.
- Remove `gst::Object::set_name()` as changing the name after construction
generally causes problems and is potentially unsafe.
- Remove `gst::Pad::set_pad_template()` as changing the pad template after
construction is generally unsafe.
- `gst::Pad::stream_lock()` borrows the pad now instead of taking a new
reference.
- Unimplemented `Jitter` and `Buffer` queries were removed from the bindings.
These are not implemented in C and only have a type registered.
- Various `LAST`, `NONE` variants of enums and flags were removed as these
only make sense in C.
- Call the parent impl of various vfuncs that were omitted before to not
require further subclasses of them to implement them but automatically call
the parent ones.
### Changed
- Use `NonZeroU64/U32` for various ID types to allow further optimizations.
- Use `thiserror` crate for deriving error types.
- Switch from `lazy_static` to `once_cell`.
- Change various miniobject functions like `gst::Caps::append()` from taking
the object by value to modifying it internally. This makes them easier to
use and only applies to functions that are defined on the non-reference type
and take ownership of the values passed in.
- Use `mem::ManuallyDrop` instead of `mem::forget()` everywhere.
- Replace most `mem::transmute()` calls with safer alternatives.
- `gst:StreamCollection` API was changed to the builder pattern for
construction as the collection must not be changed after construction.
- `gst::ProxyPad` default functions are plain functions on `ProxyPad` now
instead of trait functions to allow easier usage of them.
- Use proper error types in various `TryFrom` impls.
- `gst_video::VideoMeta::add()` returns a `Result` now instead of panicking.
- Various constructors were renamed from `new_with_XXX()` and `new_from_XXX()`
to the more idiomatic `with_XXX()` and `from_XXX()`.
- Miniobject bindings are simplified now and there is no `gst::GstRc` type
anymore, instead everything is directly implemented on the concrete types.
As part of this the `gst::MiniObject` trait was also removed as it was
unneeded now.
## [0.15.7] - 2020-06-08
### Fixed
- Allow multiple filter types per process with `gst::Iterator::filter()`.
- Check that `VideoInfo` is valid when creating a `VideoFrame`.
- Don't potentially dereference a `NULL` pointer when getting the format
from an invalid `VideoInfo` or `AudioInfo`.
- Don't unmap borrowed `VideoFrameRef`s.
### Added
- `gst::ProtectionMeta`, `gst_video::VideoAffineTransformationMeta`,
`VideoCropMeta` and `VideoRegionOfInterestMeta` bindings.
- Various new `gst_rtp::RTPBuffer` methods.
- `gst_audio::audio_buffer_truncate()`, `AudioMeta` and `AudioBuffer`
bindings.
## [0.15.6] - 2020-05-28
### Fixed
- Assert that the data passed to `VideoCaptionMeta::add()` is not empty.
- Don't store strong references to the object in the bus, appsink and appsrc
futures `Stream` / `Sink` adapters. This would keep them alive unnecessarily
and would prevent the `Stream` / `Sink` to ever "finish" on its own.
- Handle receiving a `None` reply in the change function of `gst::Promise`.
This is apparently valid. For backwards compatibility reasons this is
currently replaced with an empty structure but in 0.16 the API will
explicitly handle `None`.
### Added
- `gst::Stream::debug()` and `gst::StreamCollection::debug()` for converting
into a structured string with the actual contents of each.
- `gst::Structure::from_iter()` and `gst::Caps::from_iter()` to create
structures/caps from iterators.
- `gst::Event` support for getting/setting the `gst::Stream` in the
`StreamStart` event.
- `gst_video::calculate_display_ratio()` and `::guess_framerate()`.
- Various video related `gst::CapsFeatures` in `gst_video`.
- `TryFrom`/`From` impls for converting between `gst::Structure` and
`gst_video::VideoConverterConfig`.
- Various `glib::Value` trait impls for `SDPMessage`, `StructureRef`,
`CapsFeatureRef` and all borrowed variants of miniobjects to be able to
work with the borrowed, non-owned variants when handling `glib::Value`s.
## [0.15.5] - 2020-05-03
### Fixed
- Revert: Allow logging any `glib::Object` and not just `gst::Object`. This
broke API in subtile ways and needs to wait until 0.16
- Replace `%` in log output with `%%` to prevent accidental C formatting
- Add missing manual traits to the documentation
### Added
- `BufferRef::peek_memory_mut()` to give a mutable reference to a given memory
- Different iterators for iterating over the memories of a buffer
- Support for `gst_audio::AudioClippingMeta`
- `gst::Plugin::get_plugin_name()` was added
- `gst::Element::get_current_clock_time()` and
`gst::Element::get_current_running_time() helper functions
- `gst::State` and `StateChange` API for calculating next/previous state and
convert from/to the components of a state change
### Changed
- Use `mem::ManuallyDrop` instead of `mem::forget` everywhere
## [0.15.4] - 2020-03-09
### Fixed
- Allow logging any `glib::Object` and not just `gst::Object`
- Fix floating reference handling in `RTSPMedia::take_pipeline()`
- Hold `GMutex` guards for the remainder of the function and warn if they're
directly dropped
- Work around empty/any caps handling bugs in `Caps::fixate()`
### Added
- Add `BaseTransform::prepare_output_buffer()` subclassing support
- `RTSPServer`, `RTSPClient`, `RTSPMedia` and `RTSPMediaFactory` subclassing
support
- Handle panicking in `appsrc`/`appsink` callbacks by posting an error message
instead of killing the process
## [0.15.3] - 2020-02-15
### Fixed
- `UniqueFlowCombiner::clear()` should take a mutable reference.
- `AudioStreamAlign` doesn't require mutable references for getters anymore.
- Don't use bool return value of `gst_video_info_set_format()` and
`gst_video_info_align()` with GStreamer < 1.11.1 as it returned void back
then. We'd otherwise use some random value.
- Make `VideoInfo::align()` is available since 1.8.
- Fix changing/clearing of `AppSrc`, `AppSink` callbacks and `Bus` sync
handler. Before 1.16.3 this was not thread-safe and caused crashes. When
running with older versions changing them causes a panic now and unsetting
the bus sync handler has not effect. With newer versions it works correctly.
### Added
- Add `Clone` impls for `BufferPoolConfig` and `PlayerConfig`.
- Add `VideoConverter` bindings.
- Add `Future`s variant for `gst::Promise` constructor.
- Add `Future`s variant for `gst_video::convert_sample_async()`.
- Add `submit_input_buffer()`, `generate_output()`, `before_transform()`,
`copy_metadata()` and `transform_meta()` virtual method support for
`BaseTransform`.
- Add `AppSink` `Stream` adapter and `AppSrc` `Sink` adapter for integrating
both into Rust async contexts.
### Changed
- More generic implementations of `VideoFrame` / `VideoFrameRef` functions to
allow usage in more generic contexts.
## [0.15.2] - 2020-01-30
### Fixed
- Fix another race condition in the `gst::Bus` `Stream` that could cause it to
not wake up although a message is available.
## [0.15.1] - 2020-01-23
### Added
- Use static inner lifetime for `VideoCodecState<Readable>` so that it can be
stored safely on the heap.
- Getters/setters for `BinFlags` on `gst::Bin`.
- `gst::Caps::builder_full()` for building caps with multiple structures
conveniently.
- `gst::Element::call_async_future()` for asynchronously spawning a closure
and returning a `Future` for awaiting its return value.
### Fixed
- Various clippy warnings.
- Getters/setters for `PadFlags` on `gst::Pad` now provide the correct
behaviour.
- Take mutex before popping messages in the `gst::Bus` `Stream` to close a
small race condition that could cause it to not be woken up.
- `gst::ChildProxy` implementers do not have to provide `child_added()` and
`child_removed()` functions anymore but these are optional now.
- Manually implement `Debug` impls for various generic types where to `Debug`
impl should not depend on their type parameters also implementing `Debug`.
## [0.15.0] - 2019-12-18
### Added
- `StructureRef::get_optional()` for returning `None` if the field does not
exist instead of `Err`
- Bindings for `gstreamer-rtp` library, mostly `RTPBuffer`
- Support for writing `Preset`, `TagSetter`, `Clock`, `SystemClock` subclasses
- Bindings for `Typefind::get_length()`
- Bindings for `BaseSrcImpl::get_times()`
- Bindings (incl. subclassing) for `AudioSink` and `AudioSrc`
- Missing `Send`/`Sync` impl for various types
### Fixed
- Cleanup of cargo features/dependencies to improve build times
- Serde serialization with optional values.
Attention: This changes the format of the serialization!
- `VideoEncoder`/`VideoDecoder` `proxy_getcaps()` can't return `None`
- Use non-panicking UTF8 conversion in log handler. We don't want to panic
just because some C code printed a non-UTF8 string
- Re-rexport all traits from the crate level and also ensure that all traits
are actually included in the preludes
- Actually export `is_video_overlay_prepare_window_handle_message()` function
- Use `FnMut` for the `appsink` callbacks instead of `Fn`
- `Promise` change function returns the actual reply to the promise now
instead of just passing the promise itself
- Memory leak in `Iterator::filter()`
- `BinImpl::add()` takes ownership of floating references
- `DeviceImpl::create_element()` preserves floating flag
- `BinImpl::remove()` takes a strong reference of the element now as the last
reference might be owned by the bin and otherwise we would potentially have
a use-after-free afterwards
- `BaseParseFrame` and `VideoCodecFrame` take a `&mut self` now for various
functions that actually change the frame
### Changed
- Minimum supported Rust version is 1.39
- Allow passing `None` to `VideoEncoder::finish_frame()`
- Various `to_string()` methods were moved into the `Display` trait impl and
for some types `to_str()` was added to return a `&'static str`
- .gir files were updated to 1.16.2 release
- `Sample` constructor uses the builder pattern now
- `VideoMeta::add_full()` is simplified and requires parameters
- `BasetransformImpl::set_caps()` returns a `Result` instead of `bool`
- SDP data type getters for strings return an `Option` now as these can be
`None` in practice although not allowed by the SDP spec
- Various functions returning `Option`s were changed to return `Results` if
`None` actually signalled an error instead of just a missing value
### Removed
- "subclassing" and "futures" cargo features. These are enabled by default now
## [0.14.5] - 2019-09-17
### Added
- Support subclassing of `gst::Device`, `gst::DeviceProvider`,
`gst_audio::AudioDecoder` and `::AudioEncoder`
- Support for `Element::set_clock` and `::provide_clock` virtual methods
- `ElementClass::add_metadata` was added
- `gst_video::VideoDecoder` and `::VideoEncoder` got support for `get_caps`,
`negotiate`, `src/sink_query/event` and the `drain` virtual methods
- `Element::num_pads`, `::num_src_pads` and `::num_sink_pads` functions
- `gst_video::VideoDecoder` and `::VideoEncoder` got `get_allocator` bindings
- `gst::Iterator` implements `IntoIterator` now for providing
`std::iter::Iterator<Item=<Result<T, IteratorError>>` adapter
- Error macros for audio/video decoder subclasses to handle decoding errors
more gracefully and only actually error out after many consecutive errors
### Fixed
- Macros now also work in Rust 2018 edition without `#[macro_use]` but
explicit imports
- The log handler unit test runs reliable in parallel with other tests
- Manually implement `Debug` for `gst::Iterator` to allow it for any `T`
instead of `T: Debug`
- `Device::create_element` has correct reference count handling now
- Return `NotNegotiated` in the video codec base classes if setting the output
state fails instead of `Error`
## [0.14.4] - 2019-08-14
### Added
- Bindings for adding/removing custom log functions
- Bindings for `calculate_linear_regression()`
- Constants for base class custom flow returns
### Fixed
- Ownership of pad in `Element::release_pad()` virtual method implementations
## [0.14.3] - 2019-07-16
### Added
- `Buffer::unset_flags()` for unsetting specific buffer flags
- `VideoBufferFlags` flags type and `VideoBufferExt::set_video_flags()`,
`unset_video_flags()` and `get_video_flags()` for working with video buffer
flags from safe code.
### Fixed
- Setting buffer flags does not override arbitrary other flags anymore but
only sets the flags in question. This is necessary to not override extension
buffer flags like `gst_video::VideoBufferFlags`.
## [0.14.2] - 2019-07-15
### Added
- Support for `ReferenceTimestampMeta`
## [0.14.1] - 2019-07-06
### Added
- Various new WebRTC enum types from 1.14.1/1.16.0
### Fixed
- Correctly generate interlaced `VideoInfo` by using
`gst_video_info_set_interlaced_format()` instead of the generic function.
- serde serialization unit tests for `gst::format` succeed again now.
### Changed
- `Debug` impls for `VideoFormatInfo` and `AudioFormatInfo` now print all the
details of the format instead of only the name, and the `Debug` impls for
`VideoInfo` and `AudioInfo` also print the format now.
## [0.14.0] - 2019-06-24
### Added
- Bindings for `GLSyncMeta`.
- Bindings for setting/getting `TagScope` on a `TagList`
- Bindings for `GLDisplayWayland` and `GLDisplayX11` in addition to the
already existing `GLDisplayEGL`
- Bindings for `Bus::pop_filtered()` and related functions
- Bindings for getting/setting `Object`, `Element`, `Bin`, `Pipeline` and
`Plugin` flags
- Bindings for `VideoCaptionMeta`
- `Debug` impl of `Buffer` now also shows the metas of the buffers
- Expose flow return in `PadProbeInfo` for overriding the return value
- Bindings for `VideoDecoder` and `VideoEncoder`, including subclassing
support
- Bindings for `Memory`, `Allocator` and `VideoBufferPool`
- Bindings for `VideoFormatInfo::pack` and `::unpack` for format conversion
- Bindings for `BaseParse`, including subclassing support
- Various new arithmetic operation impls for fractions, formatted values and
`ClockTime`
- Bindings for `VideoInfo::align()`
### Changed
- The `SDPMessage` and `SDPMedia` bindings were completely rewritten as they
were broken before and caused crashes in various usages. As part of this
there's also some more convenience API available on these types, like
iterators for example, and API to modify the `SDPMedia` contained in a
`SDPMessage`.
- Update to GStreamer 1.16.
- Regenerate with latest gir.
- Run all autogenerated code through rustfmt after generation too.
- Updated to latest versions of GLib/GIO/etc crates.
- Updated to futures 0.3 / `std::future`
- `ProxyPad` default functions moved to an extension trait instead of plain
functions on `ProxyPad`, making them more in sync with the default `Pad`
functions
- GStreamer plugins are now exporting the new 1.14+ plugin symbols if they
were configured for GStreamer 1.14+
- Arithmetic operations on formatted values and `ClockTime` do overflow checks
now and replace the result with the `NONE` value on overflow
- `TryFrom`/`TryInto` traits are used in various places now instead of the
previous ad-hoc implementations of them.
- Registering element/typefind/device monitor factories requires passing a
value of `gst::Rank` now instead of an arbitrary `u32`
### Fixed
- Use correct type for destroying pad task closure data. This was previously
using the wrong type, causing crashes at runtime.
- `DeviceAdded`/`DeviceRemoved` message getters are transfer full so we don't
need to take an additional reference that would be leaked.
- `AppSink` callbacks are correctly marked as `Send` instead of `Send+Sync`,
allowing a wider range of closures to be used for them.
- Handle `PadProbeReturn::Handled` return values from pad probes more
correctly.
- `ToOwned::to_owned()` on miniobjects has to create copies instead of
only increasing the reference count. Otherwise it was possible to create
multiple mutable and immutable references to the same object at the same
time.
- Various functions take references to owned miniobjects instead of borrowed
references as it was otherwise possible to create multiple mutable or
immutable references to the same object at the same time.
- `URIHandler::set_uri` does not accept `None` anymore as this is not allowed
by the C function.
- Comparisons and addition of `TypeFindProbability` and `Rank` work correctly now
- Various `Display` implementations were fixed to not cause a stack overflow
due to infinite recursion anymore
- Various `::to_string()` functions don't take ownership of C strings anymore
that they do not own, which caused double frees before
### Removed
- MIKEY related bindings from the SDP library. The bindings were broken and
until someone needs them these are not available anymore.
## [0.13.0] - 2019-02-22
### Added
- Subclassing infrastructure was moved directly into the bindings,
making the `gst-plugin` crate deprecated. This involves many API
changes but generally cleans up code and makes it more flexible.
Take a look at the `gst-plugins-rs` crate for various examples.
- Bindings for GStreamer GL library
- Bindings for `CapsFeatures` and `Meta`
- Bindings for `ParentBufferMeta, `VideoMeta` and `VideoOverlayCompositionMeta`
- Bindings for `VideoOverlayComposition` and `VideoOverlayRectangle`
- Bindings for `VideoTimeCode`
- Bindings for `NetAddressMeta`
- Bindings for registering custom tags
- `UniqueFlowCombiner` and `UniqueAdapter` wrappers that make use of
the Rust compile-time mutability checks and expose more API in a safe
way, and as a side-effect implement `Sync` and `Send` now
- `Bus::add_watch_local()` and `gst_video::convert_frame_async_local()` that
allows to use a closure that does not implement `Send` but can only be
called from the thread owning the main context.
- More complete bindings for `Allocation` `Query`
- `pbutils` functions for codec descriptions
- `TagList::iter()` for iterating over all tags while getting a single
value per tag. The old `::iter_tag_list()` function was renamed to
`::iter_generic()` and still provides access to each value for a tag
- `Bus::iter()` and `Bus::iter_timed()` iterators around the
corresponding `::pop*()` functions
- Getters for `VideoColorimetry` to access its fields
- `Debug` impls for various missing types.
- serde serialization of `Value` can also handle `Buffer` now
- Extensive comments to all examples with explanations
- Transmuxing example showing how to use `typefind`, `multiqueue` and
dynamic pads
- basic-tutorial-12 was ported and added
### Changed
- Rust 1.31 is the minimum supported Rust version now
- Update to latest gir code generator and glib bindings
- Functions returning e.g. `gst::FlowReturn` or other "combined" enums
were changed to return split enums like `Result<gst::FlowSuccess,
gst::FlowError>` to allow usage of the standard Rust error handling.
- Various functions and callbacks returning `bool` or `Option<_>` were
changed to return a `Result<_, glib::BoolError>` or
`Result<_, gst::LoggableError>` or `Result<_, gst::ErrorMessage>` for
better integration with Rust's error handling infrastructure.
- Some infallible functions returning `bool` were changed to return `()`.
- `MiniObject` subclasses are now newtype wrappers around the
underlying `GstRc<FooRef>` wrapper. This does not change the
API in any breaking way for the current usages, but allows
`MiniObject`s to also be implemented in other crates and
makes sure `rustdoc` places the documentation in the right places.
- `BinExt` extension trait was renamed to `GstBinExt` to prevent
conflicts with `gtk::Bin` if both are imported
- `Buffer::from_slice()` can't possible return `None`
### Fixed
- `gst::tag::Album` is the album tag now instead of artist sortname
- Return `0` for the channel mask corresponding to negative
`AudioChannelPosition`s.
- `PartialOrd` and related traits are implemented via pointer equality on
`ClockId` instead of using the compare function. Two clock ids with the same
timestamp are not necessarily the same.
- Various functions that are actually fallible are now returning an
`Option<_>`.
- Various `clippy` warnings
## [0.12.2] - 2018-11-26
### Fixed
- PTP clock constructor actually creates a PTP instead of NTP clock
### Added
- Bindings for GStreamer Editing Services
- Bindings for GStreamer Check testing library
- Bindings for the encoding profile API (encodebin)
- VideoFrame, VideoInfo, AudioInfo, StructureRef implements Send and Sync now
- VideoFrame has a function to get the raw FFI pointer
- From impls from the Error/Success enums to the combined enums like
FlowReturn
- Bin-to-dot file functions were added to the Bin trait
- gst_base::Adapter implements SendUnique now
### Changed
- All references were updated from GitHub to freedesktop.org GitLab
- Fix various links in the README.md
- Link to the correct location for the documentation
- Remove GitLab badge as that only works with gitlab.com currently
## [0.12.1] - 2018-09-21
### Added
- More complete bindings for the gst_video::VideoOverlay interface, especially
gst_video::is_video_overlay_prepare_window_handle_message()
## [0.12.0] - 2018-09-08
### Added
- Bindings for the GStreamer SDP and WebRTC libraries
- Generic API for working with tags that is based on string tag names and
glib::Value for the tag values
- Bindings for Aggregator and AggregatorPad
- Bindings for BaseTransform/BaseSrc::get_buffer_pool()
- Optional serde implementations for the basic GStreamer data flow and metadata types
### Changed
- Use ptr::NonNull in various places
- Updated to muldiv 0.2, num-rational 0.2
- Bus::create_watch() can't return None
- Remove CallbackGuard as unwinding across FFI boundaries is not undefined
behaviour anymore but will directly cause a panic
- Changed from the futures to the futures-preview crate as an optional
dependency
- Various Caps operations take a &CapsRef instead of &Caps
- "deep-notify" signal takes the whole ParamSpec as parameter instead of only
the signal name
- Some structs were changed from empty struct to empty enums
- Pad probe code does not take an additional reference to the data anymore,
potentially passing writable events/buffers into the probe
- ValueExt::compare() is implemented around std::cmp::Ordering now instead of
a custom enum that was basically the same
### Fixed
- Pad::add_probe() can return None if an IDLE probe was already called and
removed in the meantime
- Various compiler and clippy warnings
### Removed
- std::Iterator impl for gst::Iterator. It was awkward to use because the
gst::Iterator could fail at each iteration
## [0.11.6] - 2018-08-27
### Fixed
- Build with NLL/two-phase borrows
- Explicitly define [bin] section for discoverer example to fix a cargo
warning
### Added
- Add unsafe gst::deinit() function
- Ord/PartialOrd impls on gst::Seqnum
- Getter for current pad mode
- gst::Pad::sticky_events_foreach() for iterating over all sticky events
in a thread-safe way
## [0.11.5] - 2018-07-24
### Fixed
- `gst::Bus`'s sync handler must unref every message if
`gst::BusSyncReply::Drop` is returned, otherwise they are all leaked
## [0.11.4] - 2018-07-19
### Fixed
- `gst::Caps::subtract()` does not leak its arguments anymore
- `gst::Caps::get_structure()` gracefully returns `None` if the index
is out of bounds instead of a `g_return_val_if_fail()`
- `gst::Structure::new()` has to give away ownership of the info structure
but didn't. For 0.11 we internally copy, in 0.12 it will take the info
structure by value
- Typefind tests don't fail anymore if the system has typefind factories
without caps
### Added
- An additional assertion that ensures that miniobjects are actually
writable before creating a mutable reference
## [0.11.3] - 2018-06-08
### Added
- `gst::Bus::remove_watch()` is now available to remove a bus watch again
- `fmt::Debug` impls for `AudioInfo` and `VideoInfo` were added
- `fmt::Debug` impls for mini objects also print the pointer value now to make
it easier to track them in debug logs
- `PlayerVisualization` has accessors for the name and description fields now,
without which there is no sensible way to use them or to set a player
visualization
## [0.11.2] - 2018-05-09
### Fixed
- Work-around various floating reference handling changes between 1.12 and
1.14 to be able to run with both versions without memory leaks or other
reference count problems.
This affects NetTimeProvider, BufferPool, DeviceMonitor, Stream,
StreamCollection, and Player, NetClientClock, NetClock, PtpClock which were
already previously fixed.
### Changed
- Change the appsrc need-data and all appsink callbacks to not require the
Sync bound anymore and change from Fn to FnMut. They can only be called from
a single thread at a time. This change is only done for the corresponding
callbacks, not the signals.
## [0.11.1] - 2018-04-07
### Fixed
- Fix Structure::to_string() to not run into an infinite recursion but call
the method on the contained StructureRef instead of on itself
## [0.11.0] - 2018-03-20
### Changed
- Updated everything to GStreamer 1.14.0
- Event, Message and Query types were refactored to improve usability.
Especially newly constructed queries allow to directly use the type-specific
functions to be used without first creating a view
- VideoFrameRef::copy_to_ref() and ::copy_plane_to_ref() are gone now and the
original functions work with refs instead of full frames
- PadProbeId and NotifyIds are not Copy/Clone anymore and are taken by value
- GstPlayer has GstObject as parent class now
### Added
- GstPbutils, GstSdp, GstRtsp and GstRtspServer bindings
- GstPromise, GstAudioStreamAlign and various other 1.14 API
- GstVideoFilter and GstBufferPool bindings
- Element::call_async()
- Debug impl For Toc and TocEntry
- Various new examples (RTP FEC, RTSP server, tag usage, ...)
### Fixed
- Memory leak in gst_video::convert_sample_async()
## [0.10.2] - 2018-02-18
### Fixed
- Fix building of messages with custom fields for types that don't have a
GstStructure
### Added
- VideoFrameRef::copy_to_ref() and ::copy_plane_to_ref(), which work with
VideoFrameRefs instead of full VideoFrames
- Getters for the BaseSrc/Sink/Transform configured segment
- Document the gstreamer-player-1.0 dependency in the README.md
## [0.10.1] - 2018-01-03
### Fixed
- Don't require &mut self for TagSetterExtManual::add()
### Added
- A TagSetter example application
- Bindings for gst_video::convert_sample() and ::convert_sample_async()
- Bindings for gst_video::VideoRectangle
- Debug impl for Sample and ::with_buffer_list() constructor
- A borrowing version of VideoFrame: VideoFrameRef
- Bindings for GstVideoFilter
### Changed
- Deprecated Sample::get_info() in favour of ::get_structure()
- Player has gst::Object as another parent class now
## [0.10.0] - 2017-12-22
### Fixed
- Various clippy warnings
- Memory leak of the tag list in Toc::merge_tags()
- Property getters use Values of the correct type
- Event::get_structure(), Message::get_structure() and
Query::get_structure() can return None for the structure
- Various other nullability fixes all over the API, changing functions to
accept Option<> or returning Option<>, or only plain types
- Functions taking paths/filenames now actually take Paths instead of &strs
- Element::remove_pad() is not giving away a new reference to the pad
anymore, which caused a memory leak of all pads ever removed
- Precision handling in ClockTime's Display impl
- Video/AudioInfo are only Send, not Sync
### Added
- Various enums now also derive useful traits like Copy, Clone and Hash in
addition to PartialEq, Eq and Debug
- TagList::merge() and insert() for combining tag lists
- EventType gained many useful functions to work with event types and
a PartialOrd impl to check expected event order of event types where it matters
- MessageRef/EventRef/QueryRef implement ToOwned
- Bindings for Registry and PluginFeature
- Event::set_running_time_offset() for adjusting the offset while events
pass through the pipeline
- Event/Message GroupIds and Seqnums now have a newtype wrapper around u32
instead of the plain value, making usage of them slightly more typesafe.
Also add an "invalid" value for both, as exists in latest GStreamer now.
- FormattedValue, GenericFormattedValue and related types were
implemented now, which allows more convenient and type-safe usage of
formatted values (time, bytes, etc)
- Bindings for force-keyunit and still-frame events were added
- MappedBuffer/BufferMap now implement various other useful traits, including
AsRef<[u8]>, AsMut, Deref, DerefMut, Debug, PartialEq and Eq
- Add VideoMultiviewFramePacking enum, and use it in Player
- Bindings for the GStreamer Net library, including PTP/NTP/network client
clocks and the GStreamer NetClock provider for network synchronization of
pipelines
- IteratorError implements std::error:Error
- Plugin::add_dependency() and ::add_dependency_simple() was added
- Rank and TypeFindProbability implement PartialOrd/Ord now
- Bindings for TypeFind, TypeFindFactory and the typefind helpers
- StreamCollection::iter() for iterating over all contained streams
- ErrorMessage type that can be used e.g. in a Result for passing an error
message from somewhere to upper layers to then be posted on an element the
same way gst_element_error!() would've done
### Changed
- Sample::new(), TagList::add(), Structure::set() and similar
functions take the values (ToSendValue impls) by reference instead of value.
They were not consumed by the function before.
- The Debug impls of various types, including Event/Buffer/Message/Query/Structure
were improved to print all the fields, similar to what GST_PTR_FORMAT would
do in C
- Switched to lazy_static 1.0
- Gap event and Duration tag are using ClockTimes now, as well as various
Player signals
- Segment is now based on a generic type FormattedSegment that can
take any format (time, bytes, etc) or a GenericFormattedValue for more
type-safety and convenience. Also functions for "casting" between a generic
segment and a segment with a specific format exist on this now
- AppSrc and AppSink now have a builder for the callbacks, making it
unnecessary to always provide all callbacks even if only one is actually
needed
- Various functions that returned bool for errors, are now returning a Result
- Player configuration is now a custom type with more convenient API
- Player VideoInfo uses a Fraction instead of (u32,u32) for the framerate and
pixel-aspect-ratio
- VideoFrame API has more consistent API between writable and read-only
variants
- Buffer::copy_into() was added, and ::copy_region() now takes a
BufferCopyFlags parameter instead of always using the default flags
- ChildProxy::set_child_property() takes a &ToValue now to follow the API of
Object::set_property() and improve usability
- Proxy/GhostPad default pad functions use the correct specific pad type now
instead of a generic Pad
- Bus::add_signal_watch_full() takes a Priority for the priority instead of u32
- Clock::(un)adjust_with_calibration() takes no clock parameter anymore
### Removed
- FormatValue was removed in favour of GenericFormattedValue and the
connected traits and specific format impls
## [0.9.1] - 2017-11-26
### Fixed
- Export `FlowError`/`FlowSuccess`, `ClockError`/`ClockSuccess`,
`PadLinkError`/`PadLinkSuccess` too
## [0.9.0] - 2017-11-26
### Added
- Bindings for (outputting to) the GStreamer logging system
- Bindings for the GStreamer base library
- Bindings for all the `Pad` functions to override pad behaviour, and pad task
functions
- Bindings for `StaticCaps` and `StaticPadTemplate`
- Bindings for `deep-notify` signal on `Object`
- Support for directly creating `Error`/`Warning`/`Info` `Messages` and posting them
from an element with context information (file, line, module, etc.) similar
to the C `GST_ELEMENT_ERROR` macro
- Support for setting custom fields in `Messages`/`Events` during construction
- Support for creating Buffers out of anything that is `AsRef<[u8]>` or
`AsMut<[u8]>`
- Support for using the `Read` trait on `Adapter`
- Functions for getting all sink/src/all pads of an `Element`, and all children
of a `Bin`
- Builder for `Caps` and `Structures` in addition to the existing functions
- `AppSrc`/`AppSink` implement `BaseSrc`/`BaseSink` and `URIHandler`
- Rust ports of the basic tutorials 1 to 8 from
https://gstreamer.freedesktop.org/documentation/tutorials/
- "Getting started" and "Installation" sections to the README.md
- "dox" feature for generating documentation for all available configurations
### Fixed
- `StackTraceFlags` are only available since 1.12
- Worked around macOS requiring a `NSRunLoop` running on the main thread in all
examples and tutorials, to be able to show a window or anything else
### Changed
- `ClockTime` is now a wrapper around `Option<u64>` to handle the
`CLOCK_TIME_NONE` case better. This wrapper implements all the arithmetic
and other traits as needed and ensures that no accidential calculations with
`CLOCK_TIME_NONE` can happen
- "Values with format", like in `Duration`/`Position`/`Convert` queries or
`Seek` events now return a `FormatValue` type. This contains the actual
`Format` together with the value and does any required conversions. This
also makes it harder to accidentially mix e.g. values in bytes and time
- `PadProbeId` does not implement `Clone`/`Copy` anymore
- Property notify watches return a custom type instead of ulong
- `Error`/`Warning`/`Info` `Messages` can only be created with specific kinds of
`glib::Error` now. Using arbitrary ones does not work
- `Iterator` bindings were completely rewritten and provide the item type as a
generic type parameter now, greatly simplifying its usage
- All `glib::Values` are now `glib::SendValue` instead, e.g. in `Caps` and
`Structures`, as their content must be possible to send to different threads
safely
- `Message::get_src()` can return `None`
- Allow `None` as `Caps` in `AppSrc`/`AppSink`
- Allow everything implementing `Into<Option<&str>>` to be used as a pad name
- Moved `copy()` from `GstRc` directly to `MiniObject`
- Success/Error enums (like `FlowReturn`, `PadLinkReturn`, `StateChangeReturn`) now
implement an `into_result()` function that splits them into a `Result` with
the good and bad cases. Also mark them as `#[must_use]` to make it harder to
accidentially ignore errors.
- Error enums implement the `Error` trait
- Many examples use the `failure` crate for error handling now, cleaning up the
error handling code quite a bit
- Lots of other code cleanup, compiler/clippy warning cleanup, etc.
## [0.8.2] - 2017-11-11
### Fixed
- Implement StaticType of BufferRef instead of Buffer. Buffer aka
GstRc<BufferRef> already implements StaticType if BufferRef does, and
without this it was not possible to use Buffers in GValues.
- Free memory of the appsink/appsrc callbacks with the correct type. It was
crashing because of using the wrong type before.
- Fix documentation URLs in Cargo.toml.
### Added
- Installation instructions and links to documentation for getting started to
README.md.
## [0.8.1] - 2017-09-15
### Added
- Implement Send+Sync for Query, Message and Event, and their corresponding
Ref types.
### Fixed
- Constructor for gst_player::Player now works properly with GStreamer 1.12
when passing a video renderer or signal dispatcher. There was a reference
counting bug.
- Instead of returning &'static references from functions, return references
with a generic, unbound lifetime instead.
See https://github.com/rust-lang/rust/pull/42417#issue-233404573
- Various "unused external crate" warnings and clippy warnings everywhere.
### Changed
- Remove Cargo.lock from GIT, it's not very useful for library crates.
- Run everything through latest rustfmt-nightly.
- Use while-let (instead of loop and if-let) and CLOCK_TIME_NONE (instead of
u64::MAX) in the examples.
## 0.8.0 - 2017-08-31
- Initial release of the autogenerated GStreamer bindings. Older versions
(< 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.6...HEAD
[0.16.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.5...0.16.6
[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
[0.16.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.7...0.16.0
[0.15.7]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.6...0.15.7
[0.15.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.5...0.15.6
[0.15.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.4...0.15.5
[0.15.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.3...0.15.4
[0.15.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.2...0.15.3
[0.15.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.1...0.15.2
[0.15.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.0...0.15.1
[0.15.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.2...0.15.0
[0.14.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.1...0.14.2
[0.14.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.0...0.14.1
[0.14.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.13.0...0.14.0
[0.13.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.2...0.13.0
[0.12.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.1...0.12.2
[0.12.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.0...0.12.1
[0.12.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.6...0.12.0
[0.11.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.5...0.11.6
[0.11.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.4...0.11.5
[0.11.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.3...0.11.4
[0.11.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.2...0.11.3
[0.11.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.1...0.11.2
[0.11.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.0...0.11.1
[0.11.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.2...0.11.0
[0.10.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.1...0.10.2
[0.10.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.0...0.10.1
[0.10.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.9.1...0.10.0
[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.9.0...0.9.1
[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.1...0.9.0
[0.8.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.1...0.8.2
[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.0...0.8.1

View file

@ -0,0 +1 @@
../gstreamer/CHANGELOG.md

View file

@ -1,6 +1,6 @@
[package]
name = "gstreamer-audio"
version = "0.17.0"
version = "0.17.4"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
categories = ["api-bindings", "multimedia"]
description = "Rust bindings for GStreamer Audio library"
@ -16,10 +16,10 @@ edition = "2018"
libc = "0.2"
cfg-if = "1.0"
bitflags = "1.0"
ffi = { package = "gstreamer-audio-sys", path = "sys", features = ["v1_8"] }
glib = { git = "https://github.com/gtk-rs/gtk-rs-core" }
gst = { package = "gstreamer", path = "../gstreamer" }
gst-base = { package = "gstreamer-base", path = "../gstreamer-base" }
ffi = { package = "gstreamer-audio-sys", version = "0.17", path = "sys", features = ["v1_8"] }
glib = { version = "0.14" }
gst = { package = "gstreamer", version = "0.17", path = "../gstreamer" }
gst-base = { package = "gstreamer-base", version = "0.17", path = "../gstreamer-base" }
array-init = "2.0"
once_cell = "1.0"

View file

@ -59,36 +59,36 @@ pub static AUDIO_FORMATS_ALL: Lazy<Box<[crate::AudioFormat]>> = Lazy::new(|| {
#[cfg(target_endian = "big")]
{
Box::new([
::AudioFormat::F64be,
::AudioFormat::F64le,
::AudioFormat::F32be,
::AudioFormat::F32le,
::AudioFormat::S32be,
::AudioFormat::S32le,
::AudioFormat::U32be,
::AudioFormat::U32le,
::AudioFormat::S2432be,
::AudioFormat::S2432le,
::AudioFormat::U2432be,
::AudioFormat::U2432le,
::AudioFormat::S24be,
::AudioFormat::S24le,
::AudioFormat::U24be,
::AudioFormat::U24le,
::AudioFormat::S20be,
::AudioFormat::S20le,
::AudioFormat::U20be,
::AudioFormat::U20le,
::AudioFormat::S18be,
::AudioFormat::S18le,
::AudioFormat::U18be,
::AudioFormat::U18le,
::AudioFormat::S16be,
::AudioFormat::S16le,
::AudioFormat::U16be,
::AudioFormat::U16le,
::AudioFormat::S8,
::AudioFormat::U8,
crate::AudioFormat::F64be,
crate::AudioFormat::F64le,
crate::AudioFormat::F32be,
crate::AudioFormat::F32le,
crate::AudioFormat::S32be,
crate::AudioFormat::S32le,
crate::AudioFormat::U32be,
crate::AudioFormat::U32le,
crate::AudioFormat::S2432be,
crate::AudioFormat::S2432le,
crate::AudioFormat::U2432be,
crate::AudioFormat::U2432le,
crate::AudioFormat::S24be,
crate::AudioFormat::S24le,
crate::AudioFormat::U24be,
crate::AudioFormat::U24le,
crate::AudioFormat::S20be,
crate::AudioFormat::S20le,
crate::AudioFormat::U20be,
crate::AudioFormat::U20le,
crate::AudioFormat::S18be,
crate::AudioFormat::S18le,
crate::AudioFormat::U18be,
crate::AudioFormat::U18le,
crate::AudioFormat::S16be,
crate::AudioFormat::S16le,
crate::AudioFormat::U16be,
crate::AudioFormat::U16le,
crate::AudioFormat::S8,
crate::AudioFormat::U8,
])
}
});
@ -170,33 +170,33 @@ pub const AUDIO_FORMAT_S8: crate::AudioFormat = crate::AudioFormat::S8;
pub const AUDIO_FORMAT_U8: crate::AudioFormat = crate::AudioFormat::U8;
#[cfg(target_endian = "big")]
pub const AUDIO_FORMAT_S16: ::AudioFormat = ::AudioFormat::S16be;
pub const AUDIO_FORMAT_S16: crate::AudioFormat = crate::AudioFormat::S16be;
#[cfg(target_endian = "big")]
pub const AUDIO_FORMAT_U16: ::AudioFormat = ::AudioFormat::U16be;
pub const AUDIO_FORMAT_U16: crate::AudioFormat = crate::AudioFormat::U16be;
#[cfg(target_endian = "big")]
pub const AUDIO_FORMAT_S2432: ::AudioFormat = ::AudioFormat::S2432be;
pub const AUDIO_FORMAT_S2432: crate::AudioFormat = crate::AudioFormat::S2432be;
#[cfg(target_endian = "big")]
pub const AUDIO_FORMAT_U2432: ::AudioFormat = ::AudioFormat::U2432be;
pub const AUDIO_FORMAT_U2432: crate::AudioFormat = crate::AudioFormat::U2432be;
#[cfg(target_endian = "big")]
pub const AUDIO_FORMAT_S32: ::AudioFormat = ::AudioFormat::S32be;
pub const AUDIO_FORMAT_S32: crate::AudioFormat = crate::AudioFormat::S32be;
#[cfg(target_endian = "big")]
pub const AUDIO_FORMAT_U32: ::AudioFormat = ::AudioFormat::U32be;
pub const AUDIO_FORMAT_U32: crate::AudioFormat = crate::AudioFormat::U32be;
#[cfg(target_endian = "big")]
pub const AUDIO_FORMAT_S24: ::AudioFormat = ::AudioFormat::S24be;
pub const AUDIO_FORMAT_S24: crate::AudioFormat = crate::AudioFormat::S24be;
#[cfg(target_endian = "big")]
pub const AUDIO_FORMAT_U24: ::AudioFormat = ::AudioFormat::U24be;
pub const AUDIO_FORMAT_U24: crate::AudioFormat = crate::AudioFormat::U24be;
#[cfg(target_endian = "big")]
pub const AUDIO_FORMAT_S20: ::AudioFormat = ::AudioFormat::S20be;
pub const AUDIO_FORMAT_S20: crate::AudioFormat = crate::AudioFormat::S20be;
#[cfg(target_endian = "big")]
pub const AUDIO_FORMAT_U20: ::AudioFormat = ::AudioFormat::U20be;
pub const AUDIO_FORMAT_U20: crate::AudioFormat = crate::AudioFormat::U20be;
#[cfg(target_endian = "big")]
pub const AUDIO_FORMAT_S18: ::AudioFormat = ::AudioFormat::S18be;
pub const AUDIO_FORMAT_S18: crate::AudioFormat = crate::AudioFormat::S18be;
#[cfg(target_endian = "big")]
pub const AUDIO_FORMAT_U18: ::AudioFormat = ::AudioFormat::U18be;
pub const AUDIO_FORMAT_U18: crate::AudioFormat = crate::AudioFormat::U18be;
#[cfg(target_endian = "big")]
pub const AUDIO_FORMAT_F32: ::AudioFormat = ::AudioFormat::F32be;
pub const AUDIO_FORMAT_F32: crate::AudioFormat = crate::AudioFormat::F32be;
#[cfg(target_endian = "big")]
pub const AUDIO_FORMAT_F64: ::AudioFormat = ::AudioFormat::F64be;
pub const AUDIO_FORMAT_F64: crate::AudioFormat = crate::AudioFormat::F64be;
#[cfg(target_endian = "little")]
pub const AUDIO_FORMAT_S16: crate::AudioFormat = crate::AudioFormat::S16le;

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)

View file

@ -23,6 +23,7 @@ macro_rules! skip_assert_initialized {
#[allow(clippy::too_many_arguments)]
#[allow(clippy::match_same_arms)]
#[allow(clippy::use_self)]
#[allow(clippy::needless_borrow)]
mod auto;
pub use crate::auto::*;

View file

@ -555,7 +555,7 @@ unsafe extern "C" fn audio_decoder_open<T: AudioDecoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.open(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -574,7 +574,7 @@ unsafe extern "C" fn audio_decoder_close<T: AudioDecoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.close(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -593,7 +593,7 @@ unsafe extern "C" fn audio_decoder_start<T: AudioDecoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.start(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -612,7 +612,7 @@ unsafe extern "C" fn audio_decoder_stop<T: AudioDecoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.stop(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -632,7 +632,7 @@ unsafe extern "C" fn audio_decoder_set_format<T: AudioDecoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.set_format(wrap.unsafe_cast_ref(), &from_glib_borrow(caps)) {
Ok(()) => true,
Err(err) => {
@ -654,7 +654,7 @@ unsafe extern "C" fn audio_decoder_parse<T: AudioDecoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
match imp.parse(wrap.unsafe_cast_ref(), &from_glib_borrow(adapter)) {
Ok((new_offset, new_len)) => {
assert!(new_offset <= std::i32::MAX as u32);
@ -680,7 +680,7 @@ unsafe extern "C" fn audio_decoder_handle_frame<T: AudioDecoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
imp.handle_frame(
wrap.unsafe_cast_ref(),
Option::<gst::Buffer>::from_glib_none(buffer).as_ref(),
@ -698,7 +698,7 @@ unsafe extern "C" fn audio_decoder_pre_push<T: AudioDecoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
match imp.pre_push(wrap.unsafe_cast_ref(), from_glib_full(*buffer)) {
Ok(Some(new_buffer)) => {
*buffer = new_buffer.into_ptr();
@ -723,7 +723,7 @@ unsafe extern "C" fn audio_decoder_flush<T: AudioDecoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), (), {
gst::panic_to_error!(&wrap, imp.panicked(), (), {
AudioDecoderImpl::flush(imp, wrap.unsafe_cast_ref(), from_glib(hard))
})
}
@ -735,7 +735,7 @@ unsafe extern "C" fn audio_decoder_negotiate<T: AudioDecoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.negotiate(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -755,7 +755,7 @@ unsafe extern "C" fn audio_decoder_getcaps<T: AudioDecoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::Caps::new_empty(), {
gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), {
AudioDecoderImpl::caps(
imp,
wrap.unsafe_cast_ref(),
@ -775,7 +775,7 @@ unsafe extern "C" fn audio_decoder_sink_event<T: AudioDecoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.sink_event(wrap.unsafe_cast_ref(), from_glib_full(event))
})
.into_glib()
@ -789,7 +789,7 @@ unsafe extern "C" fn audio_decoder_sink_query<T: AudioDecoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.sink_query(wrap.unsafe_cast_ref(), gst::QueryRef::from_mut_ptr(query))
})
.into_glib()
@ -803,7 +803,7 @@ unsafe extern "C" fn audio_decoder_src_event<T: AudioDecoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.src_event(wrap.unsafe_cast_ref(), from_glib_full(event))
})
.into_glib()
@ -817,7 +817,7 @@ unsafe extern "C" fn audio_decoder_src_query<T: AudioDecoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.src_query(wrap.unsafe_cast_ref(), gst::QueryRef::from_mut_ptr(query))
})
.into_glib()
@ -832,7 +832,7 @@ unsafe extern "C" fn audio_decoder_propose_allocation<T: AudioDecoderImpl>(
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.propose_allocation(wrap.unsafe_cast_ref(), query) {
Ok(()) => true,
Err(err) => {
@ -853,7 +853,7 @@ unsafe extern "C" fn audio_decoder_decide_allocation<T: AudioDecoderImpl>(
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.decide_allocation(wrap.unsafe_cast_ref(), query) {
Ok(()) => true,
Err(err) => {

View file

@ -504,7 +504,7 @@ unsafe extern "C" fn audio_encoder_open<T: AudioEncoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.open(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -523,7 +523,7 @@ unsafe extern "C" fn audio_encoder_close<T: AudioEncoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.close(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -542,7 +542,7 @@ unsafe extern "C" fn audio_encoder_start<T: AudioEncoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.start(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -561,7 +561,7 @@ unsafe extern "C" fn audio_encoder_stop<T: AudioEncoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.stop(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -581,7 +581,7 @@ unsafe extern "C" fn audio_encoder_set_format<T: AudioEncoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.set_format(wrap.unsafe_cast_ref(), &from_glib_none(info)) {
Ok(()) => true,
Err(err) => {
@ -603,7 +603,7 @@ unsafe extern "C" fn audio_encoder_handle_frame<T: AudioEncoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
imp.handle_frame(
wrap.unsafe_cast_ref(),
Option::<gst::Buffer>::from_glib_none(buffer).as_ref(),
@ -621,7 +621,7 @@ unsafe extern "C" fn audio_encoder_pre_push<T: AudioEncoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
match imp.pre_push(wrap.unsafe_cast_ref(), from_glib_full(*buffer)) {
Ok(Some(new_buffer)) => {
*buffer = new_buffer.into_ptr();
@ -643,7 +643,7 @@ unsafe extern "C" fn audio_encoder_flush<T: AudioEncoderImpl>(ptr: *mut ffi::Gst
let imp = instance.impl_();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), (), {
gst::panic_to_error!(&wrap, imp.panicked(), (), {
AudioEncoderImpl::flush(imp, wrap.unsafe_cast_ref())
})
}
@ -655,7 +655,7 @@ unsafe extern "C" fn audio_encoder_negotiate<T: AudioEncoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.negotiate(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -675,7 +675,7 @@ unsafe extern "C" fn audio_encoder_getcaps<T: AudioEncoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::Caps::new_empty(), {
gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), {
AudioEncoderImpl::caps(
imp,
wrap.unsafe_cast_ref(),
@ -695,7 +695,7 @@ unsafe extern "C" fn audio_encoder_sink_event<T: AudioEncoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.sink_event(wrap.unsafe_cast_ref(), from_glib_full(event))
})
.into_glib()
@ -709,7 +709,7 @@ unsafe extern "C" fn audio_encoder_sink_query<T: AudioEncoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.sink_query(wrap.unsafe_cast_ref(), gst::QueryRef::from_mut_ptr(query))
})
.into_glib()
@ -723,7 +723,7 @@ unsafe extern "C" fn audio_encoder_src_event<T: AudioEncoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.src_event(wrap.unsafe_cast_ref(), from_glib_full(event))
})
.into_glib()
@ -737,7 +737,7 @@ unsafe extern "C" fn audio_encoder_src_query<T: AudioEncoderImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.src_query(wrap.unsafe_cast_ref(), gst::QueryRef::from_mut_ptr(query))
})
.into_glib()
@ -752,7 +752,7 @@ unsafe extern "C" fn audio_encoder_propose_allocation<T: AudioEncoderImpl>(
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.propose_allocation(wrap.unsafe_cast_ref(), query) {
Ok(()) => true,
Err(err) => {
@ -773,7 +773,7 @@ unsafe extern "C" fn audio_encoder_decide_allocation<T: AudioEncoderImpl>(
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.decide_allocation(wrap.unsafe_cast_ref(), query) {
Ok(()) => true,
Err(err) => {

View file

@ -207,7 +207,7 @@ unsafe extern "C" fn audiosink_close<T: AudioSinkImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.close(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -224,7 +224,7 @@ unsafe extern "C" fn audiosink_delay<T: AudioSinkImpl>(ptr: *mut ffi::GstAudioSi
let imp = instance.impl_();
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), 0, {
gst::panic_to_error!(&wrap, imp.panicked(), 0, {
imp.delay(wrap.unsafe_cast_ref())
})
}
@ -236,7 +236,7 @@ unsafe extern "C" fn audiosink_open<T: AudioSinkImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.open(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -258,7 +258,7 @@ unsafe extern "C" fn audiosink_prepare<T: AudioSinkImpl>(
let spec = &mut *(spec as *mut AudioRingBufferSpec);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match AudioSinkImpl::prepare(imp, wrap.unsafe_cast_ref(), spec) {
Ok(()) => true,
Err(err) => {
@ -277,7 +277,7 @@ unsafe extern "C" fn audiosink_unprepare<T: AudioSinkImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.unprepare(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -299,7 +299,7 @@ unsafe extern "C" fn audiosink_write<T: AudioSinkImpl>(
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
let data_slice = std::slice::from_raw_parts(data as *const u8, length as usize);
gst::panic_to_error!(&wrap, &imp.panicked(), -1, {
gst::panic_to_error!(&wrap, imp.panicked(), -1, {
imp.write(wrap.unsafe_cast_ref(), data_slice).unwrap_or(-1)
})
}
@ -309,7 +309,7 @@ unsafe extern "C" fn audiosink_reset<T: AudioSinkImpl>(ptr: *mut ffi::GstAudioSi
let imp = instance.impl_();
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), (), {
gst::panic_to_error!(&wrap, imp.panicked(), (), {
imp.reset(wrap.unsafe_cast_ref());
});
}

View file

@ -223,7 +223,7 @@ unsafe extern "C" fn audiosrc_close<T: AudioSrcImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.close(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -240,7 +240,7 @@ unsafe extern "C" fn audiosrc_delay<T: AudioSrcImpl>(ptr: *mut ffi::GstAudioSrc)
let imp = instance.impl_();
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), 0, {
gst::panic_to_error!(&wrap, imp.panicked(), 0, {
imp.delay(wrap.unsafe_cast_ref())
})
}
@ -252,7 +252,7 @@ unsafe extern "C" fn audiosrc_open<T: AudioSrcImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.open(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -274,7 +274,7 @@ unsafe extern "C" fn audiosrc_prepare<T: AudioSrcImpl>(
let spec = &mut *(spec as *mut AudioRingBufferSpec);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match AudioSrcImpl::prepare(imp, wrap.unsafe_cast_ref(), spec) {
Ok(()) => true,
Err(err) => {
@ -293,7 +293,7 @@ unsafe extern "C" fn audiosrc_unprepare<T: AudioSrcImpl>(
let imp = instance.impl_();
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.unprepare(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -316,7 +316,7 @@ unsafe extern "C" fn audiosrc_read<T: AudioSrcImpl>(
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
let data_slice = std::slice::from_raw_parts_mut(data as *mut u8, length as usize);
gst::panic_to_error!(&wrap, &imp.panicked(), 0, {
gst::panic_to_error!(&wrap, imp.panicked(), 0, {
let (res, timestamp_res) = imp
.read(wrap.unsafe_cast_ref(), data_slice)
.unwrap_or((0, gst::ClockTime::NONE));
@ -331,7 +331,7 @@ unsafe extern "C" fn audiosrc_reset<T: AudioSrcImpl>(ptr: *mut ffi::GstAudioSrc)
let imp = instance.impl_();
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), (), {
gst::panic_to_error!(&wrap, imp.panicked(), (), {
imp.reset(wrap.unsafe_cast_ref());
});
}

View file

@ -1,181 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
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.9.1] - 2020-09-08
### Changed
- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any
API behind the "v1_18" feature is considered stable now.
## [0.9.0] - 2020-07-05
### Added
- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be
opted-in via the "v1_18" feature flag but there might still be API changes
in the newly added API.
### Changed
- Minimum supported GStreamer version is 1.8 now.
- The `system-deps` crate is now used for declaring the dependency on the C
libraries instead of directly using `pkg-config`.
### Fixed
- Various missing version markers were added, which should allow compilation
against GStreamer 1.8 on Windows again. On Windows missing symbols are
apparently an error even if they're not used.
- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent.
## [0.8.1] - 2019-12-16
### Added
- GStreamer RTP bindings
### Changed
- Update minimum supported Rust version to 1.36
- Update introspection data to GStreamer 1.16.2 release
## [0.8.0] - 2019-06-24
### Added
- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in
addition to GstGLDisplayEGL that existed before
### Changed
- Updated to GStreamer 1.16.0 .gir files, plus backported fixes
- Updated to latest gir
- Run all code through rustfmt after code generation
## [0.7.0] - 2019-02-22
### Added
- GstGL (OpenGL/GLES) bindings
### Changed
- Switch to Rust 1.31 as minimum supported version
- Generate GstVideoOverlayFormatFlags as flags type instead of enum
- Updates GstMpegts with various annotation fixes from GStreamer git master
## [0.6.1] - 2018-11-10
### Added
- GstCheck and GES (gstreamer editing services) bindings
### Changed
- Updated .gir files to 1.14.4 release
- All references were updated from GitHub to freedesktop.org GitLab
- Various functions take \*const instead of \*mut as parameters now
### Fixed
- Various functions and structs having pointer-of-array parameters/fields have
now fixed types. They were previously flat arrays instead of
pointer-of-arrays.
- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before
that
## [0.6.0] - 2018-09-08
### Changed
- Updated everything to GStreamer 1.14.2
- Various fixes to how the code generator is used
- Regenerate with latest GIR code generator
### Fixed
- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class
struct
- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys
- Removed unneeded dependencies from the code generator configuration files
## [0.5.0] - 2018-03-20
### Changed
- Updated everything to GStreamer 1.14.0
### Added
- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings
### Fixed
- Use external_libraries feature of gir to require less manual editing
- Remove some unused crates from dependencies
- Disale print_system_libs in calls to pkg-config to work better with
non-system installs of GStreamer
## [0.4.1] - 2018-02-18
### Fixed
- Fix native library name of GstNet bindings
## [0.4.0] - 2017-12-23
### Added
- GstNet bindings
- Debug impls for basically every type
- Script to automatically regenerate everything
### Changed
- gst_player_[sg]et_multiview_mode() argument types were changed from
GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset
of the former that is allowed here
- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead
of *mut *const c_char
## [0.3.0] - 2017-11-26
### Added
- GstMpegTs bindings
### Changed
- GstDebugColorFlags from an enum to a bitfield
- Updated to bitflags 1.0
- Added support for the "dox" feature to generate documentation for all
possible versions
- Depend on glib-sys/gobject-sys 0.5
### Fixes
- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since
1.12 and 1.12.1 respectively
- All C enums are represented as integers + constants now to prevent undefined
behaviour when out-of-range values are received
## [0.2.1] - 2017-09-10
### Changed
- Add README.md to all crates directly
### Fixed
- Fix various compiler warnings
- Fix versioning/feature mess. Now each library has features for all major
versions and for the correct minor versions that added API.
- Removed Cargo.lock from GIT
## [0.2.0] - 2017-08-28
### Added
- Add GstPlayer bindings
### Changed
- Depend on bitflags 0.9
- Update GIR files to 1.12.1 release
- Fix various errors in the GIR files, backported from GStreamer GIT master
- Depend on gobject-sys/glib-sys 0.4.0 for various improvements
- Regenerated everything with latest GIR
## [0.1.1] - 2017-05-10
### Added
- Add GstTag and GstApp bindings
- Add lots of missing fields to all the structs thanks to GIR improvements
### Changed
- Update GIR files to 1.12.0 release
- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs
- Regenerated everything with latest GIR
## 0.1.0 - 2017-04-09
- Initial release of the autogenerated GStreamer FFI bindings.
[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD
[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1
[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0
[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1
[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0
[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0
[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1
[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0
[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0
[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1
[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0
[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0
[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1
[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0
[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1

View file

@ -0,0 +1 @@
../../gstreamer/CHANGELOG.md

View file

@ -5,15 +5,17 @@ system-deps = "3"
libc = "0.2"
[dependencies.glib-sys]
git = "https://github.com/gtk-rs/gtk-rs-core"
version = "0.14"
[dependencies.gobject-sys]
git = "https://github.com/gtk-rs/gtk-rs-core"
version = "0.14"
[dependencies.gstreamer-base-sys]
version = "0.17"
path = "../../gstreamer-base/sys"
[dependencies.gstreamer-sys]
version = "0.17"
path = "../../gstreamer/sys"
[dev-dependencies]
@ -48,7 +50,7 @@ links = "gstaudio-1.0"
name = "gstreamer-audio-sys"
readme = "README.md"
repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
version = "0.17.0"
version = "0.17.4"
edition = "2018"
[package.metadata.docs.rs]
features = ["dox"]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#[cfg(not(feature = "dox"))]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
use gstreamer_audio_sys::*;

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#include "manual.h"

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#include "manual.h"

View file

@ -1,974 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
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.7] - 2021-02-13
### Fixed
- Usage of the logging system with a GStreamer library with the logging system
compiled out does not crash any longer.
- Double-free in `gst_video::VideoTimeCode` API when converting between
validated and unvalidated timecodes.
### Added
- `gst::Element::get_current_state()` and `get_pending_state()` convenience APIs.
- `gst_audio::AudioConverterConfig` for setting the configuration on e.g. the
`audiomixer` element. The low-level `AudioConverter` API is still not
included in the bindings.
## [0.16.6] - 2020-12-20
### Fixed
- `VideoTimeCodeInterval`'s `Ord` and `PartialEq` implementations compare
against the correct fields now.
- `SDPMessage::medias_mut()` iterator does not crash any longer.
### Added
- `PartialEq` and `Eq` implementations on `VideoAlignment`.
- Alignment API for `VideoMeta` and `get_plane_height()` / `get_plane_size()`.
- `VideoInfo::align_full()`.
## [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
`VideoFormat` iterators. Previously they returned the overall size instead
of the remaining size, and they didn't implement `Iterator::size_hint()`.
- Don't implement `ExactSizeIterator` on the buffer `gst::Meta` iterator. The
overall length is not known easily and the implementation would've simply
panicked in the past.
### Added
- `gst::ClockID::wait_async_stream()` for async integration for clock waiting.
- `From` / `TryFrom` impls for converting between `gst::ClockTime` and
`std::time::Duration`.
## [0.16.3] - 2020-09-08
### Fixed
- Reset vfuncs if calling `BaseTransformClass::configure()` multiple times.
- Fix `gst::debug_remove_default_log_function()` to actually remove the
default log function.
### Added
- Some more new APIs added in 1.18.
- API for getting an owned buffer from a readable `gst_video::VideoFrame` /
`VideoFrameRef`.
### Changed
- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any
API behind the "v1_18" feature is considered stable now.
- Factor out some common code from `gst::Pad::ProbeInfo` code. This reduces
the code generated for each pad probe considerably.
- Update paste dependency to 1.0 and pretty-hex to 0.2.
## [0.16.2] - 2020-07-27
### Fixed
- Use correct pointer for the plane data in `gst_audio::AudioBuffer`.
### Added
- Add `gst::GhostPad` convenience constructors that take a target pad, similar
to the ones that existed in 0.15 and before.
- Add `gst::parse_bin_from_description_with_name` that allows setting a name
for the created bin without having to use unsafe code in application code.
## [0.16.1] - 2020-07-10
### Fixed
- Allow calling `gst::DebugCategory::new()` before `gst::init()` again.
## [0.16.0] - 2020-07-06
### Added
- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be
opted-in via the "v1_18" feature flag but there might still be API changes
in the newly added API.
- `gst::MemoryRef::dump()` for dumping contents of a memory.
- `gst::Bus::stream()` instead of a custom constructor on the `BusStream`.
- Use more accurate types for `Seqnum`, `GroupId` and `MetaSeqnum`. These are
now proper wrapper types instead of plain integers, which makes mis-use
harder.
- Provide `TryFrom` impls for conversion between `glib::DateTime` and
`gst::DateTime`.
- Add `get_allocator()` functions to `gst_base::{Aggregator, BaseTransform,
BaseSrc}`, and allow overriding `BaseSrc::alloc()`.
- Add subclassing bindings for `gst_base::PushSrc`.
- Add new `gst::BufferCursor` API that allows to handle a buffer as `Read`,
`Write` and `Seek` and accesses the underlying memories of the buffer
individually without mapping them all together.
- Add `gst::Plugin::get_plugin_name()`.
- Support for `gst_video::VideoAFDMeta` and `VideoBarMeta`.
- API for getting all / iterating over all `gst_audio::AudioFormat` and
`gst_video::VideoFormat`.
- Bindings and subclassing bindings for `gst_video::VideoSink`.
- `gst::Pad` can be constructed via the builder pattern and `gst::PadBuilder`
now, which allows to safely set the pad functions and various other fields
during construction. The `PadBuilder` works on any `gst::Pad` subclass and
also has special support for `GhostPad`s by allowing to set pad functions of
the proxy pad.
- `gst::Message`, `gst::Event` and `gst::Query` type constructors are now on
the specific target type instead of various `new_XXX()` functions on the
basic type. E.g. `gst::message::Eos::new()`.
- Support for overriding `gst_audio::AudioSrc/Sink::reset()`.
- Support for overriding `gst_base::BaseParse::stop()`.
- Support for overriding `gst::Element::post_message()`.
- Added bindings for `gst::BufferList::foreach()` and `foreach_mut()`.
- Added bindings for `gst::Buffer::foreach_meta()` and `foreach_meta_mut()`.
### Fixed
- Allow using any `glib::Object` as target object for logging instead of just
`gst::Object`.
- Remove restriction API from `gst_pbutils::EncodingContainerProfile`. They
are supposed to be used only with the other encoding profiles.
- Return `&'static str` for various `gst::StructureRef` functions where the
string is backed by a `glib::Quark`.
- Fix various `gst::DateTime` functions to actually return `Option`s.
- Add support for filling in a buffer passed to the `gst::Pad` getrange
function, allow passing one in into `get_range()` and `pull_range()` and
provide the corresponding API on `gst_base::BaseSrc` too.
- Allocator in audio/video `Decoder` base classes is optional and can return
`None`.
- `gst_video::ValidVideoTimeCode::add_interval()` always returns a valid
timecode again.
- Allow resolving a `gst::Promise` with `None` and also handle that correctly
in the callback. This is allowed by the API.
- Allow calling various debugging related functions before `gst::init()`.
- Various enum/function versions were fixed to only show up if the
corresponding version feature is enabled.
- `gst::Pad` function setters are marked unsafe now as changing the functions
is not thread-safe.
- Remove `gst::Object::set_name()` as changing the name after construction
generally causes problems and is potentially unsafe.
- Remove `gst::Pad::set_pad_template()` as changing the pad template after
construction is generally unsafe.
- `gst::Pad::stream_lock()` borrows the pad now instead of taking a new
reference.
- Unimplemented `Jitter` and `Buffer` queries were removed from the bindings.
These are not implemented in C and only have a type registered.
- Various `LAST`, `NONE` variants of enums and flags were removed as these
only make sense in C.
- Call the parent impl of various vfuncs that were omitted before to not
require further subclasses of them to implement them but automatically call
the parent ones.
### Changed
- Use `NonZeroU64/U32` for various ID types to allow further optimizations.
- Use `thiserror` crate for deriving error types.
- Switch from `lazy_static` to `once_cell`.
- Change various miniobject functions like `gst::Caps::append()` from taking
the object by value to modifying it internally. This makes them easier to
use and only applies to functions that are defined on the non-reference type
and take ownership of the values passed in.
- Use `mem::ManuallyDrop` instead of `mem::forget()` everywhere.
- Replace most `mem::transmute()` calls with safer alternatives.
- `gst:StreamCollection` API was changed to the builder pattern for
construction as the collection must not be changed after construction.
- `gst::ProxyPad` default functions are plain functions on `ProxyPad` now
instead of trait functions to allow easier usage of them.
- Use proper error types in various `TryFrom` impls.
- `gst_video::VideoMeta::add()` returns a `Result` now instead of panicking.
- Various constructors were renamed from `new_with_XXX()` and `new_from_XXX()`
to the more idiomatic `with_XXX()` and `from_XXX()`.
- Miniobject bindings are simplified now and there is no `gst::GstRc` type
anymore, instead everything is directly implemented on the concrete types.
As part of this the `gst::MiniObject` trait was also removed as it was
unneeded now.
## [0.15.7] - 2020-06-08
### Fixed
- Allow multiple filter types per process with `gst::Iterator::filter()`.
- Check that `VideoInfo` is valid when creating a `VideoFrame`.
- Don't potentially dereference a `NULL` pointer when getting the format
from an invalid `VideoInfo` or `AudioInfo`.
- Don't unmap borrowed `VideoFrameRef`s.
### Added
- `gst::ProtectionMeta`, `gst_video::VideoAffineTransformationMeta`,
`VideoCropMeta` and `VideoRegionOfInterestMeta` bindings.
- Various new `gst_rtp::RTPBuffer` methods.
- `gst_audio::audio_buffer_truncate()`, `AudioMeta` and `AudioBuffer`
bindings.
## [0.15.6] - 2020-05-28
### Fixed
- Assert that the data passed to `VideoCaptionMeta::add()` is not empty.
- Don't store strong references to the object in the bus, appsink and appsrc
futures `Stream` / `Sink` adapters. This would keep them alive unnecessarily
and would prevent the `Stream` / `Sink` to ever "finish" on its own.
- Handle receiving a `None` reply in the change function of `gst::Promise`.
This is apparently valid. For backwards compatibility reasons this is
currently replaced with an empty structure but in 0.16 the API will
explicitly handle `None`.
### Added
- `gst::Stream::debug()` and `gst::StreamCollection::debug()` for converting
into a structured string with the actual contents of each.
- `gst::Structure::from_iter()` and `gst::Caps::from_iter()` to create
structures/caps from iterators.
- `gst::Event` support for getting/setting the `gst::Stream` in the
`StreamStart` event.
- `gst_video::calculate_display_ratio()` and `::guess_framerate()`.
- Various video related `gst::CapsFeatures` in `gst_video`.
- `TryFrom`/`From` impls for converting between `gst::Structure` and
`gst_video::VideoConverterConfig`.
- Various `glib::Value` trait impls for `SDPMessage`, `StructureRef`,
`CapsFeatureRef` and all borrowed variants of miniobjects to be able to
work with the borrowed, non-owned variants when handling `glib::Value`s.
## [0.15.5] - 2020-05-03
### Fixed
- Revert: Allow logging any `glib::Object` and not just `gst::Object`. This
broke API in subtile ways and needs to wait until 0.16
- Replace `%` in log output with `%%` to prevent accidental C formatting
- Add missing manual traits to the documentation
### Added
- `BufferRef::peek_memory_mut()` to give a mutable reference to a given memory
- Different iterators for iterating over the memories of a buffer
- Support for `gst_audio::AudioClippingMeta`
- `gst::Plugin::get_plugin_name()` was added
- `gst::Element::get_current_clock_time()` and
`gst::Element::get_current_running_time() helper functions
- `gst::State` and `StateChange` API for calculating next/previous state and
convert from/to the components of a state change
### Changed
- Use `mem::ManuallyDrop` instead of `mem::forget` everywhere
## [0.15.4] - 2020-03-09
### Fixed
- Allow logging any `glib::Object` and not just `gst::Object`
- Fix floating reference handling in `RTSPMedia::take_pipeline()`
- Hold `GMutex` guards for the remainder of the function and warn if they're
directly dropped
- Work around empty/any caps handling bugs in `Caps::fixate()`
### Added
- Add `BaseTransform::prepare_output_buffer()` subclassing support
- `RTSPServer`, `RTSPClient`, `RTSPMedia` and `RTSPMediaFactory` subclassing
support
- Handle panicking in `appsrc`/`appsink` callbacks by posting an error message
instead of killing the process
## [0.15.3] - 2020-02-15
### Fixed
- `UniqueFlowCombiner::clear()` should take a mutable reference.
- `AudioStreamAlign` doesn't require mutable references for getters anymore.
- Don't use bool return value of `gst_video_info_set_format()` and
`gst_video_info_align()` with GStreamer < 1.11.1 as it returned void back
then. We'd otherwise use some random value.
- Make `VideoInfo::align()` is available since 1.8.
- Fix changing/clearing of `AppSrc`, `AppSink` callbacks and `Bus` sync
handler. Before 1.16.3 this was not thread-safe and caused crashes. When
running with older versions changing them causes a panic now and unsetting
the bus sync handler has not effect. With newer versions it works correctly.
### Added
- Add `Clone` impls for `BufferPoolConfig` and `PlayerConfig`.
- Add `VideoConverter` bindings.
- Add `Future`s variant for `gst::Promise` constructor.
- Add `Future`s variant for `gst_video::convert_sample_async()`.
- Add `submit_input_buffer()`, `generate_output()`, `before_transform()`,
`copy_metadata()` and `transform_meta()` virtual method support for
`BaseTransform`.
- Add `AppSink` `Stream` adapter and `AppSrc` `Sink` adapter for integrating
both into Rust async contexts.
### Changed
- More generic implementations of `VideoFrame` / `VideoFrameRef` functions to
allow usage in more generic contexts.
## [0.15.2] - 2020-01-30
### Fixed
- Fix another race condition in the `gst::Bus` `Stream` that could cause it to
not wake up although a message is available.
## [0.15.1] - 2020-01-23
### Added
- Use static inner lifetime for `VideoCodecState<Readable>` so that it can be
stored safely on the heap.
- Getters/setters for `BinFlags` on `gst::Bin`.
- `gst::Caps::builder_full()` for building caps with multiple structures
conveniently.
- `gst::Element::call_async_future()` for asynchronously spawning a closure
and returning a `Future` for awaiting its return value.
### Fixed
- Various clippy warnings.
- Getters/setters for `PadFlags` on `gst::Pad` now provide the correct
behaviour.
- Take mutex before popping messages in the `gst::Bus` `Stream` to close a
small race condition that could cause it to not be woken up.
- `gst::ChildProxy` implementers do not have to provide `child_added()` and
`child_removed()` functions anymore but these are optional now.
- Manually implement `Debug` impls for various generic types where to `Debug`
impl should not depend on their type parameters also implementing `Debug`.
## [0.15.0] - 2019-12-18
### Added
- `StructureRef::get_optional()` for returning `None` if the field does not
exist instead of `Err`
- Bindings for `gstreamer-rtp` library, mostly `RTPBuffer`
- Support for writing `Preset`, `TagSetter`, `Clock`, `SystemClock` subclasses
- Bindings for `Typefind::get_length()`
- Bindings for `BaseSrcImpl::get_times()`
- Bindings (incl. subclassing) for `AudioSink` and `AudioSrc`
- Missing `Send`/`Sync` impl for various types
### Fixed
- Cleanup of cargo features/dependencies to improve build times
- Serde serialization with optional values.
Attention: This changes the format of the serialization!
- `VideoEncoder`/`VideoDecoder` `proxy_getcaps()` can't return `None`
- Use non-panicking UTF8 conversion in log handler. We don't want to panic
just because some C code printed a non-UTF8 string
- Re-rexport all traits from the crate level and also ensure that all traits
are actually included in the preludes
- Actually export `is_video_overlay_prepare_window_handle_message()` function
- Use `FnMut` for the `appsink` callbacks instead of `Fn`
- `Promise` change function returns the actual reply to the promise now
instead of just passing the promise itself
- Memory leak in `Iterator::filter()`
- `BinImpl::add()` takes ownership of floating references
- `DeviceImpl::create_element()` preserves floating flag
- `BinImpl::remove()` takes a strong reference of the element now as the last
reference might be owned by the bin and otherwise we would potentially have
a use-after-free afterwards
- `BaseParseFrame` and `VideoCodecFrame` take a `&mut self` now for various
functions that actually change the frame
### Changed
- Minimum supported Rust version is 1.39
- Allow passing `None` to `VideoEncoder::finish_frame()`
- Various `to_string()` methods were moved into the `Display` trait impl and
for some types `to_str()` was added to return a `&'static str`
- .gir files were updated to 1.16.2 release
- `Sample` constructor uses the builder pattern now
- `VideoMeta::add_full()` is simplified and requires parameters
- `BasetransformImpl::set_caps()` returns a `Result` instead of `bool`
- SDP data type getters for strings return an `Option` now as these can be
`None` in practice although not allowed by the SDP spec
- Various functions returning `Option`s were changed to return `Results` if
`None` actually signalled an error instead of just a missing value
### Removed
- "subclassing" and "futures" cargo features. These are enabled by default now
## [0.14.5] - 2019-09-17
### Added
- Support subclassing of `gst::Device`, `gst::DeviceProvider`,
`gst_audio::AudioDecoder` and `::AudioEncoder`
- Support for `Element::set_clock` and `::provide_clock` virtual methods
- `ElementClass::add_metadata` was added
- `gst_video::VideoDecoder` and `::VideoEncoder` got support for `get_caps`,
`negotiate`, `src/sink_query/event` and the `drain` virtual methods
- `Element::num_pads`, `::num_src_pads` and `::num_sink_pads` functions
- `gst_video::VideoDecoder` and `::VideoEncoder` got `get_allocator` bindings
- `gst::Iterator` implements `IntoIterator` now for providing
`std::iter::Iterator<Item=<Result<T, IteratorError>>` adapter
- Error macros for audio/video decoder subclasses to handle decoding errors
more gracefully and only actually error out after many consecutive errors
### Fixed
- Macros now also work in Rust 2018 edition without `#[macro_use]` but
explicit imports
- The log handler unit test runs reliable in parallel with other tests
- Manually implement `Debug` for `gst::Iterator` to allow it for any `T`
instead of `T: Debug`
- `Device::create_element` has correct reference count handling now
- Return `NotNegotiated` in the video codec base classes if setting the output
state fails instead of `Error`
## [0.14.4] - 2019-08-14
### Added
- Bindings for adding/removing custom log functions
- Bindings for `calculate_linear_regression()`
- Constants for base class custom flow returns
### Fixed
- Ownership of pad in `Element::release_pad()` virtual method implementations
## [0.14.3] - 2019-07-16
### Added
- `Buffer::unset_flags()` for unsetting specific buffer flags
- `VideoBufferFlags` flags type and `VideoBufferExt::set_video_flags()`,
`unset_video_flags()` and `get_video_flags()` for working with video buffer
flags from safe code.
### Fixed
- Setting buffer flags does not override arbitrary other flags anymore but
only sets the flags in question. This is necessary to not override extension
buffer flags like `gst_video::VideoBufferFlags`.
## [0.14.2] - 2019-07-15
### Added
- Support for `ReferenceTimestampMeta`
## [0.14.1] - 2019-07-06
### Added
- Various new WebRTC enum types from 1.14.1/1.16.0
### Fixed
- Correctly generate interlaced `VideoInfo` by using
`gst_video_info_set_interlaced_format()` instead of the generic function.
- serde serialization unit tests for `gst::format` succeed again now.
### Changed
- `Debug` impls for `VideoFormatInfo` and `AudioFormatInfo` now print all the
details of the format instead of only the name, and the `Debug` impls for
`VideoInfo` and `AudioInfo` also print the format now.
## [0.14.0] - 2019-06-24
### Added
- Bindings for `GLSyncMeta`.
- Bindings for setting/getting `TagScope` on a `TagList`
- Bindings for `GLDisplayWayland` and `GLDisplayX11` in addition to the
already existing `GLDisplayEGL`
- Bindings for `Bus::pop_filtered()` and related functions
- Bindings for getting/setting `Object`, `Element`, `Bin`, `Pipeline` and
`Plugin` flags
- Bindings for `VideoCaptionMeta`
- `Debug` impl of `Buffer` now also shows the metas of the buffers
- Expose flow return in `PadProbeInfo` for overriding the return value
- Bindings for `VideoDecoder` and `VideoEncoder`, including subclassing
support
- Bindings for `Memory`, `Allocator` and `VideoBufferPool`
- Bindings for `VideoFormatInfo::pack` and `::unpack` for format conversion
- Bindings for `BaseParse`, including subclassing support
- Various new arithmetic operation impls for fractions, formatted values and
`ClockTime`
- Bindings for `VideoInfo::align()`
### Changed
- The `SDPMessage` and `SDPMedia` bindings were completely rewritten as they
were broken before and caused crashes in various usages. As part of this
there's also some more convenience API available on these types, like
iterators for example, and API to modify the `SDPMedia` contained in a
`SDPMessage`.
- Update to GStreamer 1.16.
- Regenerate with latest gir.
- Run all autogenerated code through rustfmt after generation too.
- Updated to latest versions of GLib/GIO/etc crates.
- Updated to futures 0.3 / `std::future`
- `ProxyPad` default functions moved to an extension trait instead of plain
functions on `ProxyPad`, making them more in sync with the default `Pad`
functions
- GStreamer plugins are now exporting the new 1.14+ plugin symbols if they
were configured for GStreamer 1.14+
- Arithmetic operations on formatted values and `ClockTime` do overflow checks
now and replace the result with the `NONE` value on overflow
- `TryFrom`/`TryInto` traits are used in various places now instead of the
previous ad-hoc implementations of them.
- Registering element/typefind/device monitor factories requires passing a
value of `gst::Rank` now instead of an arbitrary `u32`
### Fixed
- Use correct type for destroying pad task closure data. This was previously
using the wrong type, causing crashes at runtime.
- `DeviceAdded`/`DeviceRemoved` message getters are transfer full so we don't
need to take an additional reference that would be leaked.
- `AppSink` callbacks are correctly marked as `Send` instead of `Send+Sync`,
allowing a wider range of closures to be used for them.
- Handle `PadProbeReturn::Handled` return values from pad probes more
correctly.
- `ToOwned::to_owned()` on miniobjects has to create copies instead of
only increasing the reference count. Otherwise it was possible to create
multiple mutable and immutable references to the same object at the same
time.
- Various functions take references to owned miniobjects instead of borrowed
references as it was otherwise possible to create multiple mutable or
immutable references to the same object at the same time.
- `URIHandler::set_uri` does not accept `None` anymore as this is not allowed
by the C function.
- Comparisons and addition of `TypeFindProbability` and `Rank` work correctly now
- Various `Display` implementations were fixed to not cause a stack overflow
due to infinite recursion anymore
- Various `::to_string()` functions don't take ownership of C strings anymore
that they do not own, which caused double frees before
### Removed
- MIKEY related bindings from the SDP library. The bindings were broken and
until someone needs them these are not available anymore.
## [0.13.0] - 2019-02-22
### Added
- Subclassing infrastructure was moved directly into the bindings,
making the `gst-plugin` crate deprecated. This involves many API
changes but generally cleans up code and makes it more flexible.
Take a look at the `gst-plugins-rs` crate for various examples.
- Bindings for GStreamer GL library
- Bindings for `CapsFeatures` and `Meta`
- Bindings for `ParentBufferMeta, `VideoMeta` and `VideoOverlayCompositionMeta`
- Bindings for `VideoOverlayComposition` and `VideoOverlayRectangle`
- Bindings for `VideoTimeCode`
- Bindings for `NetAddressMeta`
- Bindings for registering custom tags
- `UniqueFlowCombiner` and `UniqueAdapter` wrappers that make use of
the Rust compile-time mutability checks and expose more API in a safe
way, and as a side-effect implement `Sync` and `Send` now
- `Bus::add_watch_local()` and `gst_video::convert_frame_async_local()` that
allows to use a closure that does not implement `Send` but can only be
called from the thread owning the main context.
- More complete bindings for `Allocation` `Query`
- `pbutils` functions for codec descriptions
- `TagList::iter()` for iterating over all tags while getting a single
value per tag. The old `::iter_tag_list()` function was renamed to
`::iter_generic()` and still provides access to each value for a tag
- `Bus::iter()` and `Bus::iter_timed()` iterators around the
corresponding `::pop*()` functions
- Getters for `VideoColorimetry` to access its fields
- `Debug` impls for various missing types.
- serde serialization of `Value` can also handle `Buffer` now
- Extensive comments to all examples with explanations
- Transmuxing example showing how to use `typefind`, `multiqueue` and
dynamic pads
- basic-tutorial-12 was ported and added
### Changed
- Rust 1.31 is the minimum supported Rust version now
- Update to latest gir code generator and glib bindings
- Functions returning e.g. `gst::FlowReturn` or other "combined" enums
were changed to return split enums like `Result<gst::FlowSuccess,
gst::FlowError>` to allow usage of the standard Rust error handling.
- Various functions and callbacks returning `bool` or `Option<_>` were
changed to return a `Result<_, glib::BoolError>` or
`Result<_, gst::LoggableError>` or `Result<_, gst::ErrorMessage>` for
better integration with Rust's error handling infrastructure.
- Some infallible functions returning `bool` were changed to return `()`.
- `MiniObject` subclasses are now newtype wrappers around the
underlying `GstRc<FooRef>` wrapper. This does not change the
API in any breaking way for the current usages, but allows
`MiniObject`s to also be implemented in other crates and
makes sure `rustdoc` places the documentation in the right places.
- `BinExt` extension trait was renamed to `GstBinExt` to prevent
conflicts with `gtk::Bin` if both are imported
- `Buffer::from_slice()` can't possible return `None`
### Fixed
- `gst::tag::Album` is the album tag now instead of artist sortname
- Return `0` for the channel mask corresponding to negative
`AudioChannelPosition`s.
- `PartialOrd` and related traits are implemented via pointer equality on
`ClockId` instead of using the compare function. Two clock ids with the same
timestamp are not necessarily the same.
- Various functions that are actually fallible are now returning an
`Option<_>`.
- Various `clippy` warnings
## [0.12.2] - 2018-11-26
### Fixed
- PTP clock constructor actually creates a PTP instead of NTP clock
### Added
- Bindings for GStreamer Editing Services
- Bindings for GStreamer Check testing library
- Bindings for the encoding profile API (encodebin)
- VideoFrame, VideoInfo, AudioInfo, StructureRef implements Send and Sync now
- VideoFrame has a function to get the raw FFI pointer
- From impls from the Error/Success enums to the combined enums like
FlowReturn
- Bin-to-dot file functions were added to the Bin trait
- gst_base::Adapter implements SendUnique now
### Changed
- All references were updated from GitHub to freedesktop.org GitLab
- Fix various links in the README.md
- Link to the correct location for the documentation
- Remove GitLab badge as that only works with gitlab.com currently
## [0.12.1] - 2018-09-21
### Added
- More complete bindings for the gst_video::VideoOverlay interface, especially
gst_video::is_video_overlay_prepare_window_handle_message()
## [0.12.0] - 2018-09-08
### Added
- Bindings for the GStreamer SDP and WebRTC libraries
- Generic API for working with tags that is based on string tag names and
glib::Value for the tag values
- Bindings for Aggregator and AggregatorPad
- Bindings for BaseTransform/BaseSrc::get_buffer_pool()
- Optional serde implementations for the basic GStreamer data flow and metadata types
### Changed
- Use ptr::NonNull in various places
- Updated to muldiv 0.2, num-rational 0.2
- Bus::create_watch() can't return None
- Remove CallbackGuard as unwinding across FFI boundaries is not undefined
behaviour anymore but will directly cause a panic
- Changed from the futures to the futures-preview crate as an optional
dependency
- Various Caps operations take a &CapsRef instead of &Caps
- "deep-notify" signal takes the whole ParamSpec as parameter instead of only
the signal name
- Some structs were changed from empty struct to empty enums
- Pad probe code does not take an additional reference to the data anymore,
potentially passing writable events/buffers into the probe
- ValueExt::compare() is implemented around std::cmp::Ordering now instead of
a custom enum that was basically the same
### Fixed
- Pad::add_probe() can return None if an IDLE probe was already called and
removed in the meantime
- Various compiler and clippy warnings
### Removed
- std::Iterator impl for gst::Iterator. It was awkward to use because the
gst::Iterator could fail at each iteration
## [0.11.6] - 2018-08-27
### Fixed
- Build with NLL/two-phase borrows
- Explicitly define [bin] section for discoverer example to fix a cargo
warning
### Added
- Add unsafe gst::deinit() function
- Ord/PartialOrd impls on gst::Seqnum
- Getter for current pad mode
- gst::Pad::sticky_events_foreach() for iterating over all sticky events
in a thread-safe way
## [0.11.5] - 2018-07-24
### Fixed
- `gst::Bus`'s sync handler must unref every message if
`gst::BusSyncReply::Drop` is returned, otherwise they are all leaked
## [0.11.4] - 2018-07-19
### Fixed
- `gst::Caps::subtract()` does not leak its arguments anymore
- `gst::Caps::get_structure()` gracefully returns `None` if the index
is out of bounds instead of a `g_return_val_if_fail()`
- `gst::Structure::new()` has to give away ownership of the info structure
but didn't. For 0.11 we internally copy, in 0.12 it will take the info
structure by value
- Typefind tests don't fail anymore if the system has typefind factories
without caps
### Added
- An additional assertion that ensures that miniobjects are actually
writable before creating a mutable reference
## [0.11.3] - 2018-06-08
### Added
- `gst::Bus::remove_watch()` is now available to remove a bus watch again
- `fmt::Debug` impls for `AudioInfo` and `VideoInfo` were added
- `fmt::Debug` impls for mini objects also print the pointer value now to make
it easier to track them in debug logs
- `PlayerVisualization` has accessors for the name and description fields now,
without which there is no sensible way to use them or to set a player
visualization
## [0.11.2] - 2018-05-09
### Fixed
- Work-around various floating reference handling changes between 1.12 and
1.14 to be able to run with both versions without memory leaks or other
reference count problems.
This affects NetTimeProvider, BufferPool, DeviceMonitor, Stream,
StreamCollection, and Player, NetClientClock, NetClock, PtpClock which were
already previously fixed.
### Changed
- Change the appsrc need-data and all appsink callbacks to not require the
Sync bound anymore and change from Fn to FnMut. They can only be called from
a single thread at a time. This change is only done for the corresponding
callbacks, not the signals.
## [0.11.1] - 2018-04-07
### Fixed
- Fix Structure::to_string() to not run into an infinite recursion but call
the method on the contained StructureRef instead of on itself
## [0.11.0] - 2018-03-20
### Changed
- Updated everything to GStreamer 1.14.0
- Event, Message and Query types were refactored to improve usability.
Especially newly constructed queries allow to directly use the type-specific
functions to be used without first creating a view
- VideoFrameRef::copy_to_ref() and ::copy_plane_to_ref() are gone now and the
original functions work with refs instead of full frames
- PadProbeId and NotifyIds are not Copy/Clone anymore and are taken by value
- GstPlayer has GstObject as parent class now
### Added
- GstPbutils, GstSdp, GstRtsp and GstRtspServer bindings
- GstPromise, GstAudioStreamAlign and various other 1.14 API
- GstVideoFilter and GstBufferPool bindings
- Element::call_async()
- Debug impl For Toc and TocEntry
- Various new examples (RTP FEC, RTSP server, tag usage, ...)
### Fixed
- Memory leak in gst_video::convert_sample_async()
## [0.10.2] - 2018-02-18
### Fixed
- Fix building of messages with custom fields for types that don't have a
GstStructure
### Added
- VideoFrameRef::copy_to_ref() and ::copy_plane_to_ref(), which work with
VideoFrameRefs instead of full VideoFrames
- Getters for the BaseSrc/Sink/Transform configured segment
- Document the gstreamer-player-1.0 dependency in the README.md
## [0.10.1] - 2018-01-03
### Fixed
- Don't require &mut self for TagSetterExtManual::add()
### Added
- A TagSetter example application
- Bindings for gst_video::convert_sample() and ::convert_sample_async()
- Bindings for gst_video::VideoRectangle
- Debug impl for Sample and ::with_buffer_list() constructor
- A borrowing version of VideoFrame: VideoFrameRef
- Bindings for GstVideoFilter
### Changed
- Deprecated Sample::get_info() in favour of ::get_structure()
- Player has gst::Object as another parent class now
## [0.10.0] - 2017-12-22
### Fixed
- Various clippy warnings
- Memory leak of the tag list in Toc::merge_tags()
- Property getters use Values of the correct type
- Event::get_structure(), Message::get_structure() and
Query::get_structure() can return None for the structure
- Various other nullability fixes all over the API, changing functions to
accept Option<> or returning Option<>, or only plain types
- Functions taking paths/filenames now actually take Paths instead of &strs
- Element::remove_pad() is not giving away a new reference to the pad
anymore, which caused a memory leak of all pads ever removed
- Precision handling in ClockTime's Display impl
- Video/AudioInfo are only Send, not Sync
### Added
- Various enums now also derive useful traits like Copy, Clone and Hash in
addition to PartialEq, Eq and Debug
- TagList::merge() and insert() for combining tag lists
- EventType gained many useful functions to work with event types and
a PartialOrd impl to check expected event order of event types where it matters
- MessageRef/EventRef/QueryRef implement ToOwned
- Bindings for Registry and PluginFeature
- Event::set_running_time_offset() for adjusting the offset while events
pass through the pipeline
- Event/Message GroupIds and Seqnums now have a newtype wrapper around u32
instead of the plain value, making usage of them slightly more typesafe.
Also add an "invalid" value for both, as exists in latest GStreamer now.
- FormattedValue, GenericFormattedValue and related types were
implemented now, which allows more convenient and type-safe usage of
formatted values (time, bytes, etc)
- Bindings for force-keyunit and still-frame events were added
- MappedBuffer/BufferMap now implement various other useful traits, including
AsRef<[u8]>, AsMut, Deref, DerefMut, Debug, PartialEq and Eq
- Add VideoMultiviewFramePacking enum, and use it in Player
- Bindings for the GStreamer Net library, including PTP/NTP/network client
clocks and the GStreamer NetClock provider for network synchronization of
pipelines
- IteratorError implements std::error:Error
- Plugin::add_dependency() and ::add_dependency_simple() was added
- Rank and TypeFindProbability implement PartialOrd/Ord now
- Bindings for TypeFind, TypeFindFactory and the typefind helpers
- StreamCollection::iter() for iterating over all contained streams
- ErrorMessage type that can be used e.g. in a Result for passing an error
message from somewhere to upper layers to then be posted on an element the
same way gst_element_error!() would've done
### Changed
- Sample::new(), TagList::add(), Structure::set() and similar
functions take the values (ToSendValue impls) by reference instead of value.
They were not consumed by the function before.
- The Debug impls of various types, including Event/Buffer/Message/Query/Structure
were improved to print all the fields, similar to what GST_PTR_FORMAT would
do in C
- Switched to lazy_static 1.0
- Gap event and Duration tag are using ClockTimes now, as well as various
Player signals
- Segment is now based on a generic type FormattedSegment that can
take any format (time, bytes, etc) or a GenericFormattedValue for more
type-safety and convenience. Also functions for "casting" between a generic
segment and a segment with a specific format exist on this now
- AppSrc and AppSink now have a builder for the callbacks, making it
unnecessary to always provide all callbacks even if only one is actually
needed
- Various functions that returned bool for errors, are now returning a Result
- Player configuration is now a custom type with more convenient API
- Player VideoInfo uses a Fraction instead of (u32,u32) for the framerate and
pixel-aspect-ratio
- VideoFrame API has more consistent API between writable and read-only
variants
- Buffer::copy_into() was added, and ::copy_region() now takes a
BufferCopyFlags parameter instead of always using the default flags
- ChildProxy::set_child_property() takes a &ToValue now to follow the API of
Object::set_property() and improve usability
- Proxy/GhostPad default pad functions use the correct specific pad type now
instead of a generic Pad
- Bus::add_signal_watch_full() takes a Priority for the priority instead of u32
- Clock::(un)adjust_with_calibration() takes no clock parameter anymore
### Removed
- FormatValue was removed in favour of GenericFormattedValue and the
connected traits and specific format impls
## [0.9.1] - 2017-11-26
### Fixed
- Export `FlowError`/`FlowSuccess`, `ClockError`/`ClockSuccess`,
`PadLinkError`/`PadLinkSuccess` too
## [0.9.0] - 2017-11-26
### Added
- Bindings for (outputting to) the GStreamer logging system
- Bindings for the GStreamer base library
- Bindings for all the `Pad` functions to override pad behaviour, and pad task
functions
- Bindings for `StaticCaps` and `StaticPadTemplate`
- Bindings for `deep-notify` signal on `Object`
- Support for directly creating `Error`/`Warning`/`Info` `Messages` and posting them
from an element with context information (file, line, module, etc.) similar
to the C `GST_ELEMENT_ERROR` macro
- Support for setting custom fields in `Messages`/`Events` during construction
- Support for creating Buffers out of anything that is `AsRef<[u8]>` or
`AsMut<[u8]>`
- Support for using the `Read` trait on `Adapter`
- Functions for getting all sink/src/all pads of an `Element`, and all children
of a `Bin`
- Builder for `Caps` and `Structures` in addition to the existing functions
- `AppSrc`/`AppSink` implement `BaseSrc`/`BaseSink` and `URIHandler`
- Rust ports of the basic tutorials 1 to 8 from
https://gstreamer.freedesktop.org/documentation/tutorials/
- "Getting started" and "Installation" sections to the README.md
- "dox" feature for generating documentation for all available configurations
### Fixed
- `StackTraceFlags` are only available since 1.12
- Worked around macOS requiring a `NSRunLoop` running on the main thread in all
examples and tutorials, to be able to show a window or anything else
### Changed
- `ClockTime` is now a wrapper around `Option<u64>` to handle the
`CLOCK_TIME_NONE` case better. This wrapper implements all the arithmetic
and other traits as needed and ensures that no accidential calculations with
`CLOCK_TIME_NONE` can happen
- "Values with format", like in `Duration`/`Position`/`Convert` queries or
`Seek` events now return a `FormatValue` type. This contains the actual
`Format` together with the value and does any required conversions. This
also makes it harder to accidentially mix e.g. values in bytes and time
- `PadProbeId` does not implement `Clone`/`Copy` anymore
- Property notify watches return a custom type instead of ulong
- `Error`/`Warning`/`Info` `Messages` can only be created with specific kinds of
`glib::Error` now. Using arbitrary ones does not work
- `Iterator` bindings were completely rewritten and provide the item type as a
generic type parameter now, greatly simplifying its usage
- All `glib::Values` are now `glib::SendValue` instead, e.g. in `Caps` and
`Structures`, as their content must be possible to send to different threads
safely
- `Message::get_src()` can return `None`
- Allow `None` as `Caps` in `AppSrc`/`AppSink`
- Allow everything implementing `Into<Option<&str>>` to be used as a pad name
- Moved `copy()` from `GstRc` directly to `MiniObject`
- Success/Error enums (like `FlowReturn`, `PadLinkReturn`, `StateChangeReturn`) now
implement an `into_result()` function that splits them into a `Result` with
the good and bad cases. Also mark them as `#[must_use]` to make it harder to
accidentially ignore errors.
- Error enums implement the `Error` trait
- Many examples use the `failure` crate for error handling now, cleaning up the
error handling code quite a bit
- Lots of other code cleanup, compiler/clippy warning cleanup, etc.
## [0.8.2] - 2017-11-11
### Fixed
- Implement StaticType of BufferRef instead of Buffer. Buffer aka
GstRc<BufferRef> already implements StaticType if BufferRef does, and
without this it was not possible to use Buffers in GValues.
- Free memory of the appsink/appsrc callbacks with the correct type. It was
crashing because of using the wrong type before.
- Fix documentation URLs in Cargo.toml.
### Added
- Installation instructions and links to documentation for getting started to
README.md.
## [0.8.1] - 2017-09-15
### Added
- Implement Send+Sync for Query, Message and Event, and their corresponding
Ref types.
### Fixed
- Constructor for gst_player::Player now works properly with GStreamer 1.12
when passing a video renderer or signal dispatcher. There was a reference
counting bug.
- Instead of returning &'static references from functions, return references
with a generic, unbound lifetime instead.
See https://github.com/rust-lang/rust/pull/42417#issue-233404573
- Various "unused external crate" warnings and clippy warnings everywhere.
### Changed
- Remove Cargo.lock from GIT, it's not very useful for library crates.
- Run everything through latest rustfmt-nightly.
- Use while-let (instead of loop and if-let) and CLOCK_TIME_NONE (instead of
u64::MAX) in the examples.
## 0.8.0 - 2017-08-31
- Initial release of the autogenerated GStreamer bindings. Older versions
(< 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.6...HEAD
[0.16.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.5...0.16.6
[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
[0.16.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.7...0.16.0
[0.15.7]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.6...0.15.7
[0.15.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.5...0.15.6
[0.15.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.4...0.15.5
[0.15.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.3...0.15.4
[0.15.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.2...0.15.3
[0.15.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.1...0.15.2
[0.15.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.0...0.15.1
[0.15.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.2...0.15.0
[0.14.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.1...0.14.2
[0.14.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.0...0.14.1
[0.14.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.13.0...0.14.0
[0.13.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.2...0.13.0
[0.12.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.1...0.12.2
[0.12.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.0...0.12.1
[0.12.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.6...0.12.0
[0.11.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.5...0.11.6
[0.11.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.4...0.11.5
[0.11.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.3...0.11.4
[0.11.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.2...0.11.3
[0.11.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.1...0.11.2
[0.11.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.0...0.11.1
[0.11.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.2...0.11.0
[0.10.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.1...0.10.2
[0.10.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.0...0.10.1
[0.10.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.9.1...0.10.0
[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.9.0...0.9.1
[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.1...0.9.0
[0.8.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.1...0.8.2
[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.0...0.8.1

1
gstreamer-base/CHANGELOG.md Symbolic link
View file

@ -0,0 +1 @@
../gstreamer/CHANGELOG.md

View file

@ -1,6 +1,6 @@
[package]
name = "gstreamer-base"
version = "0.17.0"
version = "0.17.4"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
categories = ["api-bindings", "multimedia"]
description = "Rust bindings for GStreamer Base library"
@ -16,9 +16,9 @@ edition = "2018"
cfg-if = "1.0"
libc = "0.2"
bitflags = "1.0"
ffi = { package = "gstreamer-base-sys", path = "sys", features = ["v1_8"] }
glib = { git = "https://github.com/gtk-rs/gtk-rs-core" }
gst = { package = "gstreamer", path = "../gstreamer" }
ffi = { package = "gstreamer-base-sys", version = "0.17", path = "sys", features = ["v1_8"] }
glib = { version = "0.14" }
gst = { package = "gstreamer", version = "0.17", path = "../gstreamer" }
[features]
default = []

View file

@ -249,7 +249,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
{
let f: &F = &*(f as *const F);
f(
&Aggregator::from_glib_borrow(this).unsafe_cast_ref(),
Aggregator::from_glib_borrow(this).unsafe_cast_ref(),
&gst::Segment::from_glib_borrow(segment),
from_glib(pts),
from_glib(dts),
@ -286,5 +286,5 @@ unsafe extern "C" fn notify_min_upstream_latency_trampoline<P, F: Fn(&P) + Send
P: IsA<Aggregator>,
{
let f: &F = &*(f as *const F);
f(&Aggregator::from_glib_borrow(this).unsafe_cast_ref())
f(Aggregator::from_glib_borrow(this).unsafe_cast_ref())
}

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)

View file

@ -21,9 +21,9 @@ glib::wrapper! {
unref => |ptr| {
cfg_if::cfg_if! {
if #[cfg(feature = "v1_12_1")] {
ffi::gst_flow_combiner_unref(ptr)
ffi::gst_flow_combiner_unref(ptr);
} else {
glib::gobject_ffi::g_boxed_free(ffi::gst_flow_combiner_get_type(), ptr as *mut _)
glib::gobject_ffi::g_boxed_free(ffi::gst_flow_combiner_get_type(), ptr as *mut _);
}
}
},

View file

@ -739,7 +739,7 @@ unsafe extern "C" fn aggregator_flush<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
imp.flush(wrap.unsafe_cast_ref()).into()
})
.into_glib()
@ -754,7 +754,7 @@ unsafe extern "C" fn aggregator_clip<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
let ret = gst::panic_to_error!(&wrap, &imp.panicked(), None, {
let ret = gst::panic_to_error!(&wrap, imp.panicked(), None, {
imp.clip(
wrap.unsafe_cast_ref(),
&from_glib_borrow(aggregator_pad),
@ -773,7 +773,7 @@ unsafe extern "C" fn aggregator_finish_buffer<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
imp.finish_buffer(wrap.unsafe_cast_ref(), from_glib_full(buffer))
.into()
})
@ -790,7 +790,7 @@ unsafe extern "C" fn aggregator_finish_buffer_list<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
imp.finish_buffer_list(wrap.unsafe_cast_ref(), from_glib_full(buffer_list))
.into()
})
@ -806,7 +806,7 @@ unsafe extern "C" fn aggregator_sink_event<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(wrap, &imp.panicked(), false, {
gst::panic_to_error!(wrap, imp.panicked(), false, {
imp.sink_event(
wrap.unsafe_cast_ref(),
&from_glib_borrow(aggregator_pad),
@ -827,7 +827,7 @@ unsafe extern "C" fn aggregator_sink_event_pre_queue<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
imp.sink_event_pre_queue(
wrap.unsafe_cast_ref(),
&from_glib_borrow(aggregator_pad),
@ -847,7 +847,7 @@ unsafe extern "C" fn aggregator_sink_query<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.sink_query(
wrap.unsafe_cast_ref(),
&from_glib_borrow(aggregator_pad),
@ -868,7 +868,7 @@ unsafe extern "C" fn aggregator_sink_query_pre_queue<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.sink_query_pre_queue(
wrap.unsafe_cast_ref(),
&from_glib_borrow(aggregator_pad),
@ -886,7 +886,7 @@ unsafe extern "C" fn aggregator_src_event<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.src_event(wrap.unsafe_cast_ref(), from_glib_full(event))
})
.into_glib()
@ -900,7 +900,7 @@ unsafe extern "C" fn aggregator_src_query<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.src_query(wrap.unsafe_cast_ref(), gst::QueryRef::from_mut_ptr(query))
})
.into_glib()
@ -915,7 +915,7 @@ unsafe extern "C" fn aggregator_src_activate<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.src_activate(wrap.unsafe_cast_ref(), from_glib(mode), from_glib(active)) {
Ok(()) => true,
Err(err) => {
@ -935,7 +935,7 @@ unsafe extern "C" fn aggregator_aggregate<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
imp.aggregate(wrap.unsafe_cast_ref(), from_glib(timeout))
.into()
})
@ -949,7 +949,7 @@ unsafe extern "C" fn aggregator_start<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.start(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -968,7 +968,7 @@ unsafe extern "C" fn aggregator_stop<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.stop(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -987,7 +987,7 @@ unsafe extern "C" fn aggregator_get_next_time<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::ClockTime::NONE, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::ClockTime::NONE, {
imp.next_time(wrap.unsafe_cast_ref())
})
.into_glib()
@ -1003,7 +1003,7 @@ unsafe extern "C" fn aggregator_create_new_pad<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), None, {
gst::panic_to_error!(&wrap, imp.panicked(), None, {
let req_name: Borrowed<Option<glib::GString>> = from_glib_borrow(req_name);
imp.create_new_pad(
@ -1029,7 +1029,7 @@ unsafe extern "C" fn aggregator_update_src_caps<T: AggregatorImpl>(
*res = ptr::null_mut();
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
match imp.update_src_caps(wrap.unsafe_cast_ref(), &from_glib_borrow(caps)) {
Ok(res_caps) => {
*res = res_caps.into_ptr();
@ -1049,7 +1049,7 @@ unsafe extern "C" fn aggregator_fixate_src_caps<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::Caps::new_empty(), {
gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), {
imp.fixate_src_caps(wrap.unsafe_cast_ref(), from_glib_full(caps))
})
.into_ptr()
@ -1063,7 +1063,7 @@ unsafe extern "C" fn aggregator_negotiated_src_caps<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.negotiated_src_caps(wrap.unsafe_cast_ref(), &from_glib_borrow(caps)) {
Ok(()) => true,
Err(err) => {
@ -1084,7 +1084,7 @@ unsafe extern "C" fn aggregator_negotiate<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.negotiate(wrap.unsafe_cast_ref())
})
.into_glib()
@ -1100,7 +1100,7 @@ unsafe extern "C" fn aggregator_peek_next_sample<T: AggregatorImpl>(
let imp = instance.impl_();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), None, {
gst::panic_to_error!(&wrap, imp.panicked(), None, {
imp.peek_next_sample(wrap.unsafe_cast_ref(), &from_glib_borrow(pad))
})
.to_glib_full()

View file

@ -220,7 +220,7 @@ unsafe extern "C" fn base_parse_start<T: BaseParseImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.start(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -239,7 +239,7 @@ unsafe extern "C" fn base_parse_stop<T: BaseParseImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.stop(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -260,7 +260,7 @@ unsafe extern "C" fn base_parse_set_sink_caps<T: BaseParseImpl>(
let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr);
let caps: Borrowed<gst::Caps> = from_glib_borrow(caps);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.set_sink_caps(wrap.unsafe_cast_ref(), &caps) {
Ok(()) => true,
Err(err) => {
@ -282,8 +282,8 @@ unsafe extern "C" fn base_parse_handle_frame<T: BaseParseImpl>(
let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr);
let wrap_frame = BaseParseFrame::new(frame, &wrap);
let res = gst::panic_to_error!(&wrap, &imp.panicked(), Err(gst::FlowError::Error), {
imp.handle_frame(&wrap.unsafe_cast_ref(), wrap_frame)
let res = gst::panic_to_error!(&wrap, imp.panicked(), Err(gst::FlowError::Error), {
imp.handle_frame(wrap.unsafe_cast_ref(), wrap_frame)
});
match res {
@ -308,7 +308,7 @@ unsafe extern "C" fn base_parse_convert<T: BaseParseImpl>(
let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr);
let source = gst::GenericFormattedValue::new(from_glib(source_format), source_value);
let res = gst::panic_to_error!(&wrap, &imp.panicked(), None, {
let res = gst::panic_to_error!(&wrap, imp.panicked(), None, {
imp.convert(wrap.unsafe_cast_ref(), source, from_glib(dest_format))
});

View file

@ -418,7 +418,7 @@ unsafe extern "C" fn base_sink_start<T: BaseSinkImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.start(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -437,7 +437,7 @@ unsafe extern "C" fn base_sink_stop<T: BaseSinkImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.stop(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -458,7 +458,7 @@ unsafe extern "C" fn base_sink_render<T: BaseSinkImpl>(
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let buffer = from_glib_borrow(buffer);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
imp.render(wrap.unsafe_cast_ref(), &buffer).into()
})
.into_glib()
@ -473,7 +473,7 @@ unsafe extern "C" fn base_sink_prepare<T: BaseSinkImpl>(
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let buffer = from_glib_borrow(buffer);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
imp.prepare(wrap.unsafe_cast_ref(), &buffer).into()
})
.into_glib()
@ -488,7 +488,7 @@ unsafe extern "C" fn base_sink_render_list<T: BaseSinkImpl>(
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let list = from_glib_borrow(list);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
imp.render_list(wrap.unsafe_cast_ref(), &list).into()
})
.into_glib()
@ -503,7 +503,7 @@ unsafe extern "C" fn base_sink_prepare_list<T: BaseSinkImpl>(
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let list = from_glib_borrow(list);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
imp.prepare_list(wrap.unsafe_cast_ref(), &list).into()
})
.into_glib()
@ -518,7 +518,7 @@ unsafe extern "C" fn base_sink_query<T: BaseSinkImpl>(
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query_ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
BaseSinkImpl::query(imp, wrap.unsafe_cast_ref(), query)
})
.into_glib()
@ -532,7 +532,7 @@ unsafe extern "C" fn base_sink_event<T: BaseSinkImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.event(wrap.unsafe_cast_ref(), from_glib_full(event_ptr))
})
.into_glib()
@ -547,7 +547,7 @@ unsafe extern "C" fn base_sink_get_caps<T: BaseSinkImpl>(
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let filter = Option::<gst::Caps>::from_glib_borrow(filter);
gst::panic_to_error!(&wrap, &imp.panicked(), None, {
gst::panic_to_error!(&wrap, imp.panicked(), None, {
imp.caps(wrap.unsafe_cast_ref(), filter.as_ref().as_ref())
})
.map(|caps| caps.into_ptr())
@ -563,7 +563,7 @@ unsafe extern "C" fn base_sink_set_caps<T: BaseSinkImpl>(
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let caps = from_glib_borrow(caps);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.set_caps(wrap.unsafe_cast_ref(), &caps) {
Ok(()) => true,
Err(err) => {
@ -584,7 +584,7 @@ unsafe extern "C" fn base_sink_fixate<T: BaseSinkImpl>(
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let caps = from_glib_full(caps);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::Caps::new_empty(), {
gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), {
imp.fixate(wrap.unsafe_cast_ref(), caps)
})
.into_ptr()
@ -597,7 +597,7 @@ unsafe extern "C" fn base_sink_unlock<T: BaseSinkImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.unlock(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -616,7 +616,7 @@ unsafe extern "C" fn base_sink_unlock_stop<T: BaseSinkImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.unlock_stop(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {

View file

@ -606,7 +606,7 @@ unsafe extern "C" fn base_src_start<T: BaseSrcImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.start(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -625,7 +625,7 @@ unsafe extern "C" fn base_src_stop<T: BaseSrcImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.stop(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -644,7 +644,7 @@ unsafe extern "C" fn base_src_is_seekable<T: BaseSrcImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.is_seekable(wrap.unsafe_cast_ref())
})
.into_glib()
@ -658,7 +658,7 @@ unsafe extern "C" fn base_src_get_size<T: BaseSrcImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.size(wrap.unsafe_cast_ref()) {
Some(s) => {
*size = s;
@ -684,7 +684,7 @@ unsafe extern "C" fn base_src_get_times<T: BaseSrcImpl>(
*start = gst::ffi::GST_CLOCK_TIME_NONE;
*stop = gst::ffi::GST_CLOCK_TIME_NONE;
gst::panic_to_error!(&wrap, &imp.panicked(), (), {
gst::panic_to_error!(&wrap, imp.panicked(), (), {
let (start_, stop_) = imp.times(wrap.unsafe_cast_ref(), buffer);
*start = start_.into_glib();
*stop = stop_.into_glib();
@ -702,7 +702,7 @@ unsafe extern "C" fn base_src_fill<T: BaseSrcImpl>(
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let buffer = gst::BufferRef::from_mut_ptr(buffer);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
imp.fill(wrap.unsafe_cast_ref(), offset, length, buffer)
.into()
})
@ -722,7 +722,7 @@ unsafe extern "C" fn base_src_alloc<T: BaseSrcImpl>(
// https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/3
let buffer_ptr = buffer_ptr as *mut *mut gst::ffi::GstBuffer;
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
match imp.alloc(wrap.unsafe_cast_ref(), offset, length) {
Ok(buffer) => {
*buffer_ptr = buffer.into_ptr();
@ -753,7 +753,7 @@ unsafe extern "C" fn base_src_create<T: BaseSrcImpl>(
Some(gst::BufferRef::from_mut_ptr(*buffer_ptr))
};
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
match imp.create(
wrap.unsafe_cast_ref(),
offset,
@ -828,7 +828,7 @@ unsafe extern "C" fn base_src_do_seek<T: BaseSrcImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
let mut s = from_glib_none(segment);
let res = imp.do_seek(wrap.unsafe_cast_ref(), &mut s);
ptr::write(segment, *(s.to_glib_none().0));
@ -847,7 +847,7 @@ unsafe extern "C" fn base_src_query<T: BaseSrcImpl>(
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query_ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
BaseSrcImpl::query(imp, wrap.unsafe_cast_ref(), query)
})
.into_glib()
@ -861,7 +861,7 @@ unsafe extern "C" fn base_src_event<T: BaseSrcImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.event(wrap.unsafe_cast_ref(), &from_glib_borrow(event_ptr))
})
.into_glib()
@ -876,7 +876,7 @@ unsafe extern "C" fn base_src_get_caps<T: BaseSrcImpl>(
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let filter = Option::<gst::Caps>::from_glib_borrow(filter);
gst::panic_to_error!(&wrap, &imp.panicked(), None, {
gst::panic_to_error!(&wrap, imp.panicked(), None, {
imp.caps(wrap.unsafe_cast_ref(), filter.as_ref().as_ref())
})
.map(|caps| caps.into_ptr())
@ -890,7 +890,7 @@ unsafe extern "C" fn base_src_negotiate<T: BaseSrcImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.negotiate(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -911,7 +911,7 @@ unsafe extern "C" fn base_src_set_caps<T: BaseSrcImpl>(
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let caps = from_glib_borrow(caps);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.set_caps(wrap.unsafe_cast_ref(), &caps) {
Ok(()) => true,
Err(err) => {
@ -932,7 +932,7 @@ unsafe extern "C" fn base_src_fixate<T: BaseSrcImpl>(
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let caps = from_glib_full(caps);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::Caps::new_empty(), {
gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), {
imp.fixate(wrap.unsafe_cast_ref(), caps)
})
.into_ptr()
@ -945,7 +945,7 @@ unsafe extern "C" fn base_src_unlock<T: BaseSrcImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.unlock(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -964,7 +964,7 @@ unsafe extern "C" fn base_src_unlock_stop<T: BaseSrcImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.unlock_stop(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {

View file

@ -891,7 +891,7 @@ unsafe extern "C" fn base_transform_start<T: BaseTransformImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.start(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -910,7 +910,7 @@ unsafe extern "C" fn base_transform_stop<T: BaseTransformImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.stop(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
@ -932,7 +932,7 @@ unsafe extern "C" fn base_transform_transform_caps<T: BaseTransformImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), None, {
gst::panic_to_error!(&wrap, imp.panicked(), None, {
let filter: Borrowed<Option<gst::Caps>> = from_glib_borrow(filter);
imp.transform_caps(
@ -956,7 +956,7 @@ unsafe extern "C" fn base_transform_fixate_caps<T: BaseTransformImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::Caps::new_empty(), {
gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), {
imp.fixate_caps(
wrap.unsafe_cast_ref(),
from_glib(direction),
@ -976,7 +976,7 @@ unsafe extern "C" fn base_transform_set_caps<T: BaseTransformImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.set_caps(
wrap.unsafe_cast_ref(),
&from_glib_borrow(incaps),
@ -1001,7 +1001,7 @@ unsafe extern "C" fn base_transform_accept_caps<T: BaseTransformImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.accept_caps(
wrap.unsafe_cast_ref(),
from_glib(direction),
@ -1020,7 +1020,7 @@ unsafe extern "C" fn base_transform_query<T: BaseTransformImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
BaseTransformImpl::query(
imp,
wrap.unsafe_cast_ref(),
@ -1043,7 +1043,7 @@ unsafe extern "C" fn base_transform_transform_size<T: BaseTransformImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.transform_size(
wrap.unsafe_cast_ref(),
from_glib(direction),
@ -1070,7 +1070,7 @@ unsafe extern "C" fn base_transform_get_unit_size<T: BaseTransformImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
match imp.unit_size(wrap.unsafe_cast_ref(), &from_glib_borrow(caps)) {
Some(s) => {
*size = s;
@ -1094,7 +1094,7 @@ unsafe extern "C" fn base_transform_prepare_output_buffer<T: BaseTransformImpl>(
// FIXME: Wrong signature in FFI
let outbuf = outbuf as *mut *mut gst::ffi::GstBuffer;
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
match imp.prepare_output_buffer(wrap.unsafe_cast_ref(), gst::BufferRef::from_ptr(inbuf)) {
Ok(PrepareOutputBufferSuccess::InputBuffer) => {
*outbuf = inbuf;
@ -1118,7 +1118,7 @@ unsafe extern "C" fn base_transform_sink_event<T: BaseTransformImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.sink_event(wrap.unsafe_cast_ref(), from_glib_full(event))
})
.into_glib()
@ -1132,7 +1132,7 @@ unsafe extern "C" fn base_transform_src_event<T: BaseTransformImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.src_event(wrap.unsafe_cast_ref(), from_glib_full(event))
})
.into_glib()
@ -1147,7 +1147,7 @@ unsafe extern "C" fn base_transform_transform<T: BaseTransformImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
imp.transform(
wrap.unsafe_cast_ref(),
&from_glib_borrow(inbuf),
@ -1169,7 +1169,7 @@ unsafe extern "C" fn base_transform_transform_ip<T: BaseTransformImpl>(
// FIXME: Wrong signature in FFI
let buf = buf as *mut gst::ffi::GstBuffer;
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
if from_glib(ffi::gst_base_transform_is_passthrough(ptr)) {
imp.transform_ip_passthrough(wrap.unsafe_cast_ref(), &from_glib_borrow(buf))
.into()
@ -1193,7 +1193,7 @@ unsafe extern "C" fn base_transform_transform_meta<T: BaseTransformImpl>(
let inbuf = gst::BufferRef::from_ptr(inbuf);
gst::panic_to_error!(&wrap, &imp.panicked(), false, {
gst::panic_to_error!(&wrap, imp.panicked(), false, {
imp.transform_meta(
wrap.unsafe_cast_ref(),
gst::BufferRef::from_mut_ptr(outbuf),
@ -1223,7 +1223,7 @@ unsafe extern "C" fn base_transform_copy_metadata<T: BaseTransformImpl>(
return glib::ffi::GFALSE;
}
gst::panic_to_error!(&wrap, &imp.panicked(), true, {
gst::panic_to_error!(&wrap, imp.panicked(), true, {
match imp.copy_metadata(
wrap.unsafe_cast_ref(),
gst::BufferRef::from_ptr(inbuf),
@ -1247,7 +1247,7 @@ unsafe extern "C" fn base_transform_before_transform<T: BaseTransformImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), (), {
gst::panic_to_error!(&wrap, imp.panicked(), (), {
imp.before_transform(wrap.unsafe_cast_ref(), gst::BufferRef::from_ptr(inbuf));
})
}
@ -1261,7 +1261,7 @@ unsafe extern "C" fn base_transform_submit_input_buffer<T: BaseTransformImpl>(
let imp = instance.impl_();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
imp.submit_input_buffer(
wrap.unsafe_cast_ref(),
from_glib(is_discont),
@ -1282,7 +1282,7 @@ unsafe extern "C" fn base_transform_generate_output<T: BaseTransformImpl>(
*buf = ptr::null_mut();
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
match imp.generate_output(wrap.unsafe_cast_ref()) {
Ok(GenerateOutputSuccess::Dropped) => crate::BASE_TRANSFORM_FLOW_DROPPED.into(),
Ok(GenerateOutputSuccess::NoOutput) => gst::FlowReturn::Ok,

View file

@ -130,7 +130,7 @@ unsafe extern "C" fn push_src_fill<T: PushSrcImpl>(
let wrap: Borrowed<PushSrc> = from_glib_borrow(ptr);
let buffer = gst::BufferRef::from_mut_ptr(buffer);
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
PushSrcImpl::fill(imp, wrap.unsafe_cast_ref(), buffer).into()
})
.into_glib()
@ -147,7 +147,7 @@ unsafe extern "C" fn push_src_alloc<T: PushSrcImpl>(
// https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/3
let buffer_ptr = buffer_ptr as *mut *mut gst::ffi::GstBuffer;
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
match PushSrcImpl::alloc(imp, wrap.unsafe_cast_ref()) {
Ok(buffer) => {
*buffer_ptr = buffer.into_ptr();
@ -170,7 +170,7 @@ unsafe extern "C" fn push_src_create<T: PushSrcImpl>(
// https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/3
let buffer_ptr = buffer_ptr as *mut *mut gst::ffi::GstBuffer;
gst::panic_to_error!(&wrap, &imp.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
match PushSrcImpl::create(imp, wrap.unsafe_cast_ref()) {
Ok(buffer) => {
*buffer_ptr = buffer.into_ptr();

View file

@ -1,181 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
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.9.1] - 2020-09-08
### Changed
- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any
API behind the "v1_18" feature is considered stable now.
## [0.9.0] - 2020-07-05
### Added
- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be
opted-in via the "v1_18" feature flag but there might still be API changes
in the newly added API.
### Changed
- Minimum supported GStreamer version is 1.8 now.
- The `system-deps` crate is now used for declaring the dependency on the C
libraries instead of directly using `pkg-config`.
### Fixed
- Various missing version markers were added, which should allow compilation
against GStreamer 1.8 on Windows again. On Windows missing symbols are
apparently an error even if they're not used.
- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent.
## [0.8.1] - 2019-12-16
### Added
- GStreamer RTP bindings
### Changed
- Update minimum supported Rust version to 1.36
- Update introspection data to GStreamer 1.16.2 release
## [0.8.0] - 2019-06-24
### Added
- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in
addition to GstGLDisplayEGL that existed before
### Changed
- Updated to GStreamer 1.16.0 .gir files, plus backported fixes
- Updated to latest gir
- Run all code through rustfmt after code generation
## [0.7.0] - 2019-02-22
### Added
- GstGL (OpenGL/GLES) bindings
### Changed
- Switch to Rust 1.31 as minimum supported version
- Generate GstVideoOverlayFormatFlags as flags type instead of enum
- Updates GstMpegts with various annotation fixes from GStreamer git master
## [0.6.1] - 2018-11-10
### Added
- GstCheck and GES (gstreamer editing services) bindings
### Changed
- Updated .gir files to 1.14.4 release
- All references were updated from GitHub to freedesktop.org GitLab
- Various functions take \*const instead of \*mut as parameters now
### Fixed
- Various functions and structs having pointer-of-array parameters/fields have
now fixed types. They were previously flat arrays instead of
pointer-of-arrays.
- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before
that
## [0.6.0] - 2018-09-08
### Changed
- Updated everything to GStreamer 1.14.2
- Various fixes to how the code generator is used
- Regenerate with latest GIR code generator
### Fixed
- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class
struct
- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys
- Removed unneeded dependencies from the code generator configuration files
## [0.5.0] - 2018-03-20
### Changed
- Updated everything to GStreamer 1.14.0
### Added
- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings
### Fixed
- Use external_libraries feature of gir to require less manual editing
- Remove some unused crates from dependencies
- Disale print_system_libs in calls to pkg-config to work better with
non-system installs of GStreamer
## [0.4.1] - 2018-02-18
### Fixed
- Fix native library name of GstNet bindings
## [0.4.0] - 2017-12-23
### Added
- GstNet bindings
- Debug impls for basically every type
- Script to automatically regenerate everything
### Changed
- gst_player_[sg]et_multiview_mode() argument types were changed from
GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset
of the former that is allowed here
- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead
of *mut *const c_char
## [0.3.0] - 2017-11-26
### Added
- GstMpegTs bindings
### Changed
- GstDebugColorFlags from an enum to a bitfield
- Updated to bitflags 1.0
- Added support for the "dox" feature to generate documentation for all
possible versions
- Depend on glib-sys/gobject-sys 0.5
### Fixes
- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since
1.12 and 1.12.1 respectively
- All C enums are represented as integers + constants now to prevent undefined
behaviour when out-of-range values are received
## [0.2.1] - 2017-09-10
### Changed
- Add README.md to all crates directly
### Fixed
- Fix various compiler warnings
- Fix versioning/feature mess. Now each library has features for all major
versions and for the correct minor versions that added API.
- Removed Cargo.lock from GIT
## [0.2.0] - 2017-08-28
### Added
- Add GstPlayer bindings
### Changed
- Depend on bitflags 0.9
- Update GIR files to 1.12.1 release
- Fix various errors in the GIR files, backported from GStreamer GIT master
- Depend on gobject-sys/glib-sys 0.4.0 for various improvements
- Regenerated everything with latest GIR
## [0.1.1] - 2017-05-10
### Added
- Add GstTag and GstApp bindings
- Add lots of missing fields to all the structs thanks to GIR improvements
### Changed
- Update GIR files to 1.12.0 release
- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs
- Regenerated everything with latest GIR
## 0.1.0 - 2017-04-09
- Initial release of the autogenerated GStreamer FFI bindings.
[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD
[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1
[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0
[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1
[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0
[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0
[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1
[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0
[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0
[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1
[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0
[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0
[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1
[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0
[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1

View file

@ -0,0 +1 @@
../../gstreamer/CHANGELOG.md

View file

@ -5,12 +5,13 @@ system-deps = "3"
libc = "0.2"
[dependencies.glib-sys]
git = "https://github.com/gtk-rs/gtk-rs-core"
version = "0.14"
[dependencies.gobject-sys]
git = "https://github.com/gtk-rs/gtk-rs-core"
version = "0.14"
[dependencies.gstreamer-sys]
version = "0.17"
path = "../../gstreamer/sys"
[dev-dependencies]
@ -49,7 +50,7 @@ links = "gstbase-1.0"
name = "gstreamer-base-sys"
readme = "README.md"
repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
version = "0.17.0"
version = "0.17.4"
edition = "2018"
[package.metadata.docs.rs]
features = ["dox"]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#[cfg(not(feature = "dox"))]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
use gstreamer_base_sys::*;

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#include "manual.h"

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#include "manual.h"

View file

@ -1,974 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
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.7] - 2021-02-13
### Fixed
- Usage of the logging system with a GStreamer library with the logging system
compiled out does not crash any longer.
- Double-free in `gst_video::VideoTimeCode` API when converting between
validated and unvalidated timecodes.
### Added
- `gst::Element::get_current_state()` and `get_pending_state()` convenience APIs.
- `gst_audio::AudioConverterConfig` for setting the configuration on e.g. the
`audiomixer` element. The low-level `AudioConverter` API is still not
included in the bindings.
## [0.16.6] - 2020-12-20
### Fixed
- `VideoTimeCodeInterval`'s `Ord` and `PartialEq` implementations compare
against the correct fields now.
- `SDPMessage::medias_mut()` iterator does not crash any longer.
### Added
- `PartialEq` and `Eq` implementations on `VideoAlignment`.
- Alignment API for `VideoMeta` and `get_plane_height()` / `get_plane_size()`.
- `VideoInfo::align_full()`.
## [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
`VideoFormat` iterators. Previously they returned the overall size instead
of the remaining size, and they didn't implement `Iterator::size_hint()`.
- Don't implement `ExactSizeIterator` on the buffer `gst::Meta` iterator. The
overall length is not known easily and the implementation would've simply
panicked in the past.
### Added
- `gst::ClockID::wait_async_stream()` for async integration for clock waiting.
- `From` / `TryFrom` impls for converting between `gst::ClockTime` and
`std::time::Duration`.
## [0.16.3] - 2020-09-08
### Fixed
- Reset vfuncs if calling `BaseTransformClass::configure()` multiple times.
- Fix `gst::debug_remove_default_log_function()` to actually remove the
default log function.
### Added
- Some more new APIs added in 1.18.
- API for getting an owned buffer from a readable `gst_video::VideoFrame` /
`VideoFrameRef`.
### Changed
- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any
API behind the "v1_18" feature is considered stable now.
- Factor out some common code from `gst::Pad::ProbeInfo` code. This reduces
the code generated for each pad probe considerably.
- Update paste dependency to 1.0 and pretty-hex to 0.2.
## [0.16.2] - 2020-07-27
### Fixed
- Use correct pointer for the plane data in `gst_audio::AudioBuffer`.
### Added
- Add `gst::GhostPad` convenience constructors that take a target pad, similar
to the ones that existed in 0.15 and before.
- Add `gst::parse_bin_from_description_with_name` that allows setting a name
for the created bin without having to use unsafe code in application code.
## [0.16.1] - 2020-07-10
### Fixed
- Allow calling `gst::DebugCategory::new()` before `gst::init()` again.
## [0.16.0] - 2020-07-06
### Added
- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be
opted-in via the "v1_18" feature flag but there might still be API changes
in the newly added API.
- `gst::MemoryRef::dump()` for dumping contents of a memory.
- `gst::Bus::stream()` instead of a custom constructor on the `BusStream`.
- Use more accurate types for `Seqnum`, `GroupId` and `MetaSeqnum`. These are
now proper wrapper types instead of plain integers, which makes mis-use
harder.
- Provide `TryFrom` impls for conversion between `glib::DateTime` and
`gst::DateTime`.
- Add `get_allocator()` functions to `gst_base::{Aggregator, BaseTransform,
BaseSrc}`, and allow overriding `BaseSrc::alloc()`.
- Add subclassing bindings for `gst_base::PushSrc`.
- Add new `gst::BufferCursor` API that allows to handle a buffer as `Read`,
`Write` and `Seek` and accesses the underlying memories of the buffer
individually without mapping them all together.
- Add `gst::Plugin::get_plugin_name()`.
- Support for `gst_video::VideoAFDMeta` and `VideoBarMeta`.
- API for getting all / iterating over all `gst_audio::AudioFormat` and
`gst_video::VideoFormat`.
- Bindings and subclassing bindings for `gst_video::VideoSink`.
- `gst::Pad` can be constructed via the builder pattern and `gst::PadBuilder`
now, which allows to safely set the pad functions and various other fields
during construction. The `PadBuilder` works on any `gst::Pad` subclass and
also has special support for `GhostPad`s by allowing to set pad functions of
the proxy pad.
- `gst::Message`, `gst::Event` and `gst::Query` type constructors are now on
the specific target type instead of various `new_XXX()` functions on the
basic type. E.g. `gst::message::Eos::new()`.
- Support for overriding `gst_audio::AudioSrc/Sink::reset()`.
- Support for overriding `gst_base::BaseParse::stop()`.
- Support for overriding `gst::Element::post_message()`.
- Added bindings for `gst::BufferList::foreach()` and `foreach_mut()`.
- Added bindings for `gst::Buffer::foreach_meta()` and `foreach_meta_mut()`.
### Fixed
- Allow using any `glib::Object` as target object for logging instead of just
`gst::Object`.
- Remove restriction API from `gst_pbutils::EncodingContainerProfile`. They
are supposed to be used only with the other encoding profiles.
- Return `&'static str` for various `gst::StructureRef` functions where the
string is backed by a `glib::Quark`.
- Fix various `gst::DateTime` functions to actually return `Option`s.
- Add support for filling in a buffer passed to the `gst::Pad` getrange
function, allow passing one in into `get_range()` and `pull_range()` and
provide the corresponding API on `gst_base::BaseSrc` too.
- Allocator in audio/video `Decoder` base classes is optional and can return
`None`.
- `gst_video::ValidVideoTimeCode::add_interval()` always returns a valid
timecode again.
- Allow resolving a `gst::Promise` with `None` and also handle that correctly
in the callback. This is allowed by the API.
- Allow calling various debugging related functions before `gst::init()`.
- Various enum/function versions were fixed to only show up if the
corresponding version feature is enabled.
- `gst::Pad` function setters are marked unsafe now as changing the functions
is not thread-safe.
- Remove `gst::Object::set_name()` as changing the name after construction
generally causes problems and is potentially unsafe.
- Remove `gst::Pad::set_pad_template()` as changing the pad template after
construction is generally unsafe.
- `gst::Pad::stream_lock()` borrows the pad now instead of taking a new
reference.
- Unimplemented `Jitter` and `Buffer` queries were removed from the bindings.
These are not implemented in C and only have a type registered.
- Various `LAST`, `NONE` variants of enums and flags were removed as these
only make sense in C.
- Call the parent impl of various vfuncs that were omitted before to not
require further subclasses of them to implement them but automatically call
the parent ones.
### Changed
- Use `NonZeroU64/U32` for various ID types to allow further optimizations.
- Use `thiserror` crate for deriving error types.
- Switch from `lazy_static` to `once_cell`.
- Change various miniobject functions like `gst::Caps::append()` from taking
the object by value to modifying it internally. This makes them easier to
use and only applies to functions that are defined on the non-reference type
and take ownership of the values passed in.
- Use `mem::ManuallyDrop` instead of `mem::forget()` everywhere.
- Replace most `mem::transmute()` calls with safer alternatives.
- `gst:StreamCollection` API was changed to the builder pattern for
construction as the collection must not be changed after construction.
- `gst::ProxyPad` default functions are plain functions on `ProxyPad` now
instead of trait functions to allow easier usage of them.
- Use proper error types in various `TryFrom` impls.
- `gst_video::VideoMeta::add()` returns a `Result` now instead of panicking.
- Various constructors were renamed from `new_with_XXX()` and `new_from_XXX()`
to the more idiomatic `with_XXX()` and `from_XXX()`.
- Miniobject bindings are simplified now and there is no `gst::GstRc` type
anymore, instead everything is directly implemented on the concrete types.
As part of this the `gst::MiniObject` trait was also removed as it was
unneeded now.
## [0.15.7] - 2020-06-08
### Fixed
- Allow multiple filter types per process with `gst::Iterator::filter()`.
- Check that `VideoInfo` is valid when creating a `VideoFrame`.
- Don't potentially dereference a `NULL` pointer when getting the format
from an invalid `VideoInfo` or `AudioInfo`.
- Don't unmap borrowed `VideoFrameRef`s.
### Added
- `gst::ProtectionMeta`, `gst_video::VideoAffineTransformationMeta`,
`VideoCropMeta` and `VideoRegionOfInterestMeta` bindings.
- Various new `gst_rtp::RTPBuffer` methods.
- `gst_audio::audio_buffer_truncate()`, `AudioMeta` and `AudioBuffer`
bindings.
## [0.15.6] - 2020-05-28
### Fixed
- Assert that the data passed to `VideoCaptionMeta::add()` is not empty.
- Don't store strong references to the object in the bus, appsink and appsrc
futures `Stream` / `Sink` adapters. This would keep them alive unnecessarily
and would prevent the `Stream` / `Sink` to ever "finish" on its own.
- Handle receiving a `None` reply in the change function of `gst::Promise`.
This is apparently valid. For backwards compatibility reasons this is
currently replaced with an empty structure but in 0.16 the API will
explicitly handle `None`.
### Added
- `gst::Stream::debug()` and `gst::StreamCollection::debug()` for converting
into a structured string with the actual contents of each.
- `gst::Structure::from_iter()` and `gst::Caps::from_iter()` to create
structures/caps from iterators.
- `gst::Event` support for getting/setting the `gst::Stream` in the
`StreamStart` event.
- `gst_video::calculate_display_ratio()` and `::guess_framerate()`.
- Various video related `gst::CapsFeatures` in `gst_video`.
- `TryFrom`/`From` impls for converting between `gst::Structure` and
`gst_video::VideoConverterConfig`.
- Various `glib::Value` trait impls for `SDPMessage`, `StructureRef`,
`CapsFeatureRef` and all borrowed variants of miniobjects to be able to
work with the borrowed, non-owned variants when handling `glib::Value`s.
## [0.15.5] - 2020-05-03
### Fixed
- Revert: Allow logging any `glib::Object` and not just `gst::Object`. This
broke API in subtile ways and needs to wait until 0.16
- Replace `%` in log output with `%%` to prevent accidental C formatting
- Add missing manual traits to the documentation
### Added
- `BufferRef::peek_memory_mut()` to give a mutable reference to a given memory
- Different iterators for iterating over the memories of a buffer
- Support for `gst_audio::AudioClippingMeta`
- `gst::Plugin::get_plugin_name()` was added
- `gst::Element::get_current_clock_time()` and
`gst::Element::get_current_running_time() helper functions
- `gst::State` and `StateChange` API for calculating next/previous state and
convert from/to the components of a state change
### Changed
- Use `mem::ManuallyDrop` instead of `mem::forget` everywhere
## [0.15.4] - 2020-03-09
### Fixed
- Allow logging any `glib::Object` and not just `gst::Object`
- Fix floating reference handling in `RTSPMedia::take_pipeline()`
- Hold `GMutex` guards for the remainder of the function and warn if they're
directly dropped
- Work around empty/any caps handling bugs in `Caps::fixate()`
### Added
- Add `BaseTransform::prepare_output_buffer()` subclassing support
- `RTSPServer`, `RTSPClient`, `RTSPMedia` and `RTSPMediaFactory` subclassing
support
- Handle panicking in `appsrc`/`appsink` callbacks by posting an error message
instead of killing the process
## [0.15.3] - 2020-02-15
### Fixed
- `UniqueFlowCombiner::clear()` should take a mutable reference.
- `AudioStreamAlign` doesn't require mutable references for getters anymore.
- Don't use bool return value of `gst_video_info_set_format()` and
`gst_video_info_align()` with GStreamer < 1.11.1 as it returned void back
then. We'd otherwise use some random value.
- Make `VideoInfo::align()` is available since 1.8.
- Fix changing/clearing of `AppSrc`, `AppSink` callbacks and `Bus` sync
handler. Before 1.16.3 this was not thread-safe and caused crashes. When
running with older versions changing them causes a panic now and unsetting
the bus sync handler has not effect. With newer versions it works correctly.
### Added
- Add `Clone` impls for `BufferPoolConfig` and `PlayerConfig`.
- Add `VideoConverter` bindings.
- Add `Future`s variant for `gst::Promise` constructor.
- Add `Future`s variant for `gst_video::convert_sample_async()`.
- Add `submit_input_buffer()`, `generate_output()`, `before_transform()`,
`copy_metadata()` and `transform_meta()` virtual method support for
`BaseTransform`.
- Add `AppSink` `Stream` adapter and `AppSrc` `Sink` adapter for integrating
both into Rust async contexts.
### Changed
- More generic implementations of `VideoFrame` / `VideoFrameRef` functions to
allow usage in more generic contexts.
## [0.15.2] - 2020-01-30
### Fixed
- Fix another race condition in the `gst::Bus` `Stream` that could cause it to
not wake up although a message is available.
## [0.15.1] - 2020-01-23
### Added
- Use static inner lifetime for `VideoCodecState<Readable>` so that it can be
stored safely on the heap.
- Getters/setters for `BinFlags` on `gst::Bin`.
- `gst::Caps::builder_full()` for building caps with multiple structures
conveniently.
- `gst::Element::call_async_future()` for asynchronously spawning a closure
and returning a `Future` for awaiting its return value.
### Fixed
- Various clippy warnings.
- Getters/setters for `PadFlags` on `gst::Pad` now provide the correct
behaviour.
- Take mutex before popping messages in the `gst::Bus` `Stream` to close a
small race condition that could cause it to not be woken up.
- `gst::ChildProxy` implementers do not have to provide `child_added()` and
`child_removed()` functions anymore but these are optional now.
- Manually implement `Debug` impls for various generic types where to `Debug`
impl should not depend on their type parameters also implementing `Debug`.
## [0.15.0] - 2019-12-18
### Added
- `StructureRef::get_optional()` for returning `None` if the field does not
exist instead of `Err`
- Bindings for `gstreamer-rtp` library, mostly `RTPBuffer`
- Support for writing `Preset`, `TagSetter`, `Clock`, `SystemClock` subclasses
- Bindings for `Typefind::get_length()`
- Bindings for `BaseSrcImpl::get_times()`
- Bindings (incl. subclassing) for `AudioSink` and `AudioSrc`
- Missing `Send`/`Sync` impl for various types
### Fixed
- Cleanup of cargo features/dependencies to improve build times
- Serde serialization with optional values.
Attention: This changes the format of the serialization!
- `VideoEncoder`/`VideoDecoder` `proxy_getcaps()` can't return `None`
- Use non-panicking UTF8 conversion in log handler. We don't want to panic
just because some C code printed a non-UTF8 string
- Re-rexport all traits from the crate level and also ensure that all traits
are actually included in the preludes
- Actually export `is_video_overlay_prepare_window_handle_message()` function
- Use `FnMut` for the `appsink` callbacks instead of `Fn`
- `Promise` change function returns the actual reply to the promise now
instead of just passing the promise itself
- Memory leak in `Iterator::filter()`
- `BinImpl::add()` takes ownership of floating references
- `DeviceImpl::create_element()` preserves floating flag
- `BinImpl::remove()` takes a strong reference of the element now as the last
reference might be owned by the bin and otherwise we would potentially have
a use-after-free afterwards
- `BaseParseFrame` and `VideoCodecFrame` take a `&mut self` now for various
functions that actually change the frame
### Changed
- Minimum supported Rust version is 1.39
- Allow passing `None` to `VideoEncoder::finish_frame()`
- Various `to_string()` methods were moved into the `Display` trait impl and
for some types `to_str()` was added to return a `&'static str`
- .gir files were updated to 1.16.2 release
- `Sample` constructor uses the builder pattern now
- `VideoMeta::add_full()` is simplified and requires parameters
- `BasetransformImpl::set_caps()` returns a `Result` instead of `bool`
- SDP data type getters for strings return an `Option` now as these can be
`None` in practice although not allowed by the SDP spec
- Various functions returning `Option`s were changed to return `Results` if
`None` actually signalled an error instead of just a missing value
### Removed
- "subclassing" and "futures" cargo features. These are enabled by default now
## [0.14.5] - 2019-09-17
### Added
- Support subclassing of `gst::Device`, `gst::DeviceProvider`,
`gst_audio::AudioDecoder` and `::AudioEncoder`
- Support for `Element::set_clock` and `::provide_clock` virtual methods
- `ElementClass::add_metadata` was added
- `gst_video::VideoDecoder` and `::VideoEncoder` got support for `get_caps`,
`negotiate`, `src/sink_query/event` and the `drain` virtual methods
- `Element::num_pads`, `::num_src_pads` and `::num_sink_pads` functions
- `gst_video::VideoDecoder` and `::VideoEncoder` got `get_allocator` bindings
- `gst::Iterator` implements `IntoIterator` now for providing
`std::iter::Iterator<Item=<Result<T, IteratorError>>` adapter
- Error macros for audio/video decoder subclasses to handle decoding errors
more gracefully and only actually error out after many consecutive errors
### Fixed
- Macros now also work in Rust 2018 edition without `#[macro_use]` but
explicit imports
- The log handler unit test runs reliable in parallel with other tests
- Manually implement `Debug` for `gst::Iterator` to allow it for any `T`
instead of `T: Debug`
- `Device::create_element` has correct reference count handling now
- Return `NotNegotiated` in the video codec base classes if setting the output
state fails instead of `Error`
## [0.14.4] - 2019-08-14
### Added
- Bindings for adding/removing custom log functions
- Bindings for `calculate_linear_regression()`
- Constants for base class custom flow returns
### Fixed
- Ownership of pad in `Element::release_pad()` virtual method implementations
## [0.14.3] - 2019-07-16
### Added
- `Buffer::unset_flags()` for unsetting specific buffer flags
- `VideoBufferFlags` flags type and `VideoBufferExt::set_video_flags()`,
`unset_video_flags()` and `get_video_flags()` for working with video buffer
flags from safe code.
### Fixed
- Setting buffer flags does not override arbitrary other flags anymore but
only sets the flags in question. This is necessary to not override extension
buffer flags like `gst_video::VideoBufferFlags`.
## [0.14.2] - 2019-07-15
### Added
- Support for `ReferenceTimestampMeta`
## [0.14.1] - 2019-07-06
### Added
- Various new WebRTC enum types from 1.14.1/1.16.0
### Fixed
- Correctly generate interlaced `VideoInfo` by using
`gst_video_info_set_interlaced_format()` instead of the generic function.
- serde serialization unit tests for `gst::format` succeed again now.
### Changed
- `Debug` impls for `VideoFormatInfo` and `AudioFormatInfo` now print all the
details of the format instead of only the name, and the `Debug` impls for
`VideoInfo` and `AudioInfo` also print the format now.
## [0.14.0] - 2019-06-24
### Added
- Bindings for `GLSyncMeta`.
- Bindings for setting/getting `TagScope` on a `TagList`
- Bindings for `GLDisplayWayland` and `GLDisplayX11` in addition to the
already existing `GLDisplayEGL`
- Bindings for `Bus::pop_filtered()` and related functions
- Bindings for getting/setting `Object`, `Element`, `Bin`, `Pipeline` and
`Plugin` flags
- Bindings for `VideoCaptionMeta`
- `Debug` impl of `Buffer` now also shows the metas of the buffers
- Expose flow return in `PadProbeInfo` for overriding the return value
- Bindings for `VideoDecoder` and `VideoEncoder`, including subclassing
support
- Bindings for `Memory`, `Allocator` and `VideoBufferPool`
- Bindings for `VideoFormatInfo::pack` and `::unpack` for format conversion
- Bindings for `BaseParse`, including subclassing support
- Various new arithmetic operation impls for fractions, formatted values and
`ClockTime`
- Bindings for `VideoInfo::align()`
### Changed
- The `SDPMessage` and `SDPMedia` bindings were completely rewritten as they
were broken before and caused crashes in various usages. As part of this
there's also some more convenience API available on these types, like
iterators for example, and API to modify the `SDPMedia` contained in a
`SDPMessage`.
- Update to GStreamer 1.16.
- Regenerate with latest gir.
- Run all autogenerated code through rustfmt after generation too.
- Updated to latest versions of GLib/GIO/etc crates.
- Updated to futures 0.3 / `std::future`
- `ProxyPad` default functions moved to an extension trait instead of plain
functions on `ProxyPad`, making them more in sync with the default `Pad`
functions
- GStreamer plugins are now exporting the new 1.14+ plugin symbols if they
were configured for GStreamer 1.14+
- Arithmetic operations on formatted values and `ClockTime` do overflow checks
now and replace the result with the `NONE` value on overflow
- `TryFrom`/`TryInto` traits are used in various places now instead of the
previous ad-hoc implementations of them.
- Registering element/typefind/device monitor factories requires passing a
value of `gst::Rank` now instead of an arbitrary `u32`
### Fixed
- Use correct type for destroying pad task closure data. This was previously
using the wrong type, causing crashes at runtime.
- `DeviceAdded`/`DeviceRemoved` message getters are transfer full so we don't
need to take an additional reference that would be leaked.
- `AppSink` callbacks are correctly marked as `Send` instead of `Send+Sync`,
allowing a wider range of closures to be used for them.
- Handle `PadProbeReturn::Handled` return values from pad probes more
correctly.
- `ToOwned::to_owned()` on miniobjects has to create copies instead of
only increasing the reference count. Otherwise it was possible to create
multiple mutable and immutable references to the same object at the same
time.
- Various functions take references to owned miniobjects instead of borrowed
references as it was otherwise possible to create multiple mutable or
immutable references to the same object at the same time.
- `URIHandler::set_uri` does not accept `None` anymore as this is not allowed
by the C function.
- Comparisons and addition of `TypeFindProbability` and `Rank` work correctly now
- Various `Display` implementations were fixed to not cause a stack overflow
due to infinite recursion anymore
- Various `::to_string()` functions don't take ownership of C strings anymore
that they do not own, which caused double frees before
### Removed
- MIKEY related bindings from the SDP library. The bindings were broken and
until someone needs them these are not available anymore.
## [0.13.0] - 2019-02-22
### Added
- Subclassing infrastructure was moved directly into the bindings,
making the `gst-plugin` crate deprecated. This involves many API
changes but generally cleans up code and makes it more flexible.
Take a look at the `gst-plugins-rs` crate for various examples.
- Bindings for GStreamer GL library
- Bindings for `CapsFeatures` and `Meta`
- Bindings for `ParentBufferMeta, `VideoMeta` and `VideoOverlayCompositionMeta`
- Bindings for `VideoOverlayComposition` and `VideoOverlayRectangle`
- Bindings for `VideoTimeCode`
- Bindings for `NetAddressMeta`
- Bindings for registering custom tags
- `UniqueFlowCombiner` and `UniqueAdapter` wrappers that make use of
the Rust compile-time mutability checks and expose more API in a safe
way, and as a side-effect implement `Sync` and `Send` now
- `Bus::add_watch_local()` and `gst_video::convert_frame_async_local()` that
allows to use a closure that does not implement `Send` but can only be
called from the thread owning the main context.
- More complete bindings for `Allocation` `Query`
- `pbutils` functions for codec descriptions
- `TagList::iter()` for iterating over all tags while getting a single
value per tag. The old `::iter_tag_list()` function was renamed to
`::iter_generic()` and still provides access to each value for a tag
- `Bus::iter()` and `Bus::iter_timed()` iterators around the
corresponding `::pop*()` functions
- Getters for `VideoColorimetry` to access its fields
- `Debug` impls for various missing types.
- serde serialization of `Value` can also handle `Buffer` now
- Extensive comments to all examples with explanations
- Transmuxing example showing how to use `typefind`, `multiqueue` and
dynamic pads
- basic-tutorial-12 was ported and added
### Changed
- Rust 1.31 is the minimum supported Rust version now
- Update to latest gir code generator and glib bindings
- Functions returning e.g. `gst::FlowReturn` or other "combined" enums
were changed to return split enums like `Result<gst::FlowSuccess,
gst::FlowError>` to allow usage of the standard Rust error handling.
- Various functions and callbacks returning `bool` or `Option<_>` were
changed to return a `Result<_, glib::BoolError>` or
`Result<_, gst::LoggableError>` or `Result<_, gst::ErrorMessage>` for
better integration with Rust's error handling infrastructure.
- Some infallible functions returning `bool` were changed to return `()`.
- `MiniObject` subclasses are now newtype wrappers around the
underlying `GstRc<FooRef>` wrapper. This does not change the
API in any breaking way for the current usages, but allows
`MiniObject`s to also be implemented in other crates and
makes sure `rustdoc` places the documentation in the right places.
- `BinExt` extension trait was renamed to `GstBinExt` to prevent
conflicts with `gtk::Bin` if both are imported
- `Buffer::from_slice()` can't possible return `None`
### Fixed
- `gst::tag::Album` is the album tag now instead of artist sortname
- Return `0` for the channel mask corresponding to negative
`AudioChannelPosition`s.
- `PartialOrd` and related traits are implemented via pointer equality on
`ClockId` instead of using the compare function. Two clock ids with the same
timestamp are not necessarily the same.
- Various functions that are actually fallible are now returning an
`Option<_>`.
- Various `clippy` warnings
## [0.12.2] - 2018-11-26
### Fixed
- PTP clock constructor actually creates a PTP instead of NTP clock
### Added
- Bindings for GStreamer Editing Services
- Bindings for GStreamer Check testing library
- Bindings for the encoding profile API (encodebin)
- VideoFrame, VideoInfo, AudioInfo, StructureRef implements Send and Sync now
- VideoFrame has a function to get the raw FFI pointer
- From impls from the Error/Success enums to the combined enums like
FlowReturn
- Bin-to-dot file functions were added to the Bin trait
- gst_base::Adapter implements SendUnique now
### Changed
- All references were updated from GitHub to freedesktop.org GitLab
- Fix various links in the README.md
- Link to the correct location for the documentation
- Remove GitLab badge as that only works with gitlab.com currently
## [0.12.1] - 2018-09-21
### Added
- More complete bindings for the gst_video::VideoOverlay interface, especially
gst_video::is_video_overlay_prepare_window_handle_message()
## [0.12.0] - 2018-09-08
### Added
- Bindings for the GStreamer SDP and WebRTC libraries
- Generic API for working with tags that is based on string tag names and
glib::Value for the tag values
- Bindings for Aggregator and AggregatorPad
- Bindings for BaseTransform/BaseSrc::get_buffer_pool()
- Optional serde implementations for the basic GStreamer data flow and metadata types
### Changed
- Use ptr::NonNull in various places
- Updated to muldiv 0.2, num-rational 0.2
- Bus::create_watch() can't return None
- Remove CallbackGuard as unwinding across FFI boundaries is not undefined
behaviour anymore but will directly cause a panic
- Changed from the futures to the futures-preview crate as an optional
dependency
- Various Caps operations take a &CapsRef instead of &Caps
- "deep-notify" signal takes the whole ParamSpec as parameter instead of only
the signal name
- Some structs were changed from empty struct to empty enums
- Pad probe code does not take an additional reference to the data anymore,
potentially passing writable events/buffers into the probe
- ValueExt::compare() is implemented around std::cmp::Ordering now instead of
a custom enum that was basically the same
### Fixed
- Pad::add_probe() can return None if an IDLE probe was already called and
removed in the meantime
- Various compiler and clippy warnings
### Removed
- std::Iterator impl for gst::Iterator. It was awkward to use because the
gst::Iterator could fail at each iteration
## [0.11.6] - 2018-08-27
### Fixed
- Build with NLL/two-phase borrows
- Explicitly define [bin] section for discoverer example to fix a cargo
warning
### Added
- Add unsafe gst::deinit() function
- Ord/PartialOrd impls on gst::Seqnum
- Getter for current pad mode
- gst::Pad::sticky_events_foreach() for iterating over all sticky events
in a thread-safe way
## [0.11.5] - 2018-07-24
### Fixed
- `gst::Bus`'s sync handler must unref every message if
`gst::BusSyncReply::Drop` is returned, otherwise they are all leaked
## [0.11.4] - 2018-07-19
### Fixed
- `gst::Caps::subtract()` does not leak its arguments anymore
- `gst::Caps::get_structure()` gracefully returns `None` if the index
is out of bounds instead of a `g_return_val_if_fail()`
- `gst::Structure::new()` has to give away ownership of the info structure
but didn't. For 0.11 we internally copy, in 0.12 it will take the info
structure by value
- Typefind tests don't fail anymore if the system has typefind factories
without caps
### Added
- An additional assertion that ensures that miniobjects are actually
writable before creating a mutable reference
## [0.11.3] - 2018-06-08
### Added
- `gst::Bus::remove_watch()` is now available to remove a bus watch again
- `fmt::Debug` impls for `AudioInfo` and `VideoInfo` were added
- `fmt::Debug` impls for mini objects also print the pointer value now to make
it easier to track them in debug logs
- `PlayerVisualization` has accessors for the name and description fields now,
without which there is no sensible way to use them or to set a player
visualization
## [0.11.2] - 2018-05-09
### Fixed
- Work-around various floating reference handling changes between 1.12 and
1.14 to be able to run with both versions without memory leaks or other
reference count problems.
This affects NetTimeProvider, BufferPool, DeviceMonitor, Stream,
StreamCollection, and Player, NetClientClock, NetClock, PtpClock which were
already previously fixed.
### Changed
- Change the appsrc need-data and all appsink callbacks to not require the
Sync bound anymore and change from Fn to FnMut. They can only be called from
a single thread at a time. This change is only done for the corresponding
callbacks, not the signals.
## [0.11.1] - 2018-04-07
### Fixed
- Fix Structure::to_string() to not run into an infinite recursion but call
the method on the contained StructureRef instead of on itself
## [0.11.0] - 2018-03-20
### Changed
- Updated everything to GStreamer 1.14.0
- Event, Message and Query types were refactored to improve usability.
Especially newly constructed queries allow to directly use the type-specific
functions to be used without first creating a view
- VideoFrameRef::copy_to_ref() and ::copy_plane_to_ref() are gone now and the
original functions work with refs instead of full frames
- PadProbeId and NotifyIds are not Copy/Clone anymore and are taken by value
- GstPlayer has GstObject as parent class now
### Added
- GstPbutils, GstSdp, GstRtsp and GstRtspServer bindings
- GstPromise, GstAudioStreamAlign and various other 1.14 API
- GstVideoFilter and GstBufferPool bindings
- Element::call_async()
- Debug impl For Toc and TocEntry
- Various new examples (RTP FEC, RTSP server, tag usage, ...)
### Fixed
- Memory leak in gst_video::convert_sample_async()
## [0.10.2] - 2018-02-18
### Fixed
- Fix building of messages with custom fields for types that don't have a
GstStructure
### Added
- VideoFrameRef::copy_to_ref() and ::copy_plane_to_ref(), which work with
VideoFrameRefs instead of full VideoFrames
- Getters for the BaseSrc/Sink/Transform configured segment
- Document the gstreamer-player-1.0 dependency in the README.md
## [0.10.1] - 2018-01-03
### Fixed
- Don't require &mut self for TagSetterExtManual::add()
### Added
- A TagSetter example application
- Bindings for gst_video::convert_sample() and ::convert_sample_async()
- Bindings for gst_video::VideoRectangle
- Debug impl for Sample and ::with_buffer_list() constructor
- A borrowing version of VideoFrame: VideoFrameRef
- Bindings for GstVideoFilter
### Changed
- Deprecated Sample::get_info() in favour of ::get_structure()
- Player has gst::Object as another parent class now
## [0.10.0] - 2017-12-22
### Fixed
- Various clippy warnings
- Memory leak of the tag list in Toc::merge_tags()
- Property getters use Values of the correct type
- Event::get_structure(), Message::get_structure() and
Query::get_structure() can return None for the structure
- Various other nullability fixes all over the API, changing functions to
accept Option<> or returning Option<>, or only plain types
- Functions taking paths/filenames now actually take Paths instead of &strs
- Element::remove_pad() is not giving away a new reference to the pad
anymore, which caused a memory leak of all pads ever removed
- Precision handling in ClockTime's Display impl
- Video/AudioInfo are only Send, not Sync
### Added
- Various enums now also derive useful traits like Copy, Clone and Hash in
addition to PartialEq, Eq and Debug
- TagList::merge() and insert() for combining tag lists
- EventType gained many useful functions to work with event types and
a PartialOrd impl to check expected event order of event types where it matters
- MessageRef/EventRef/QueryRef implement ToOwned
- Bindings for Registry and PluginFeature
- Event::set_running_time_offset() for adjusting the offset while events
pass through the pipeline
- Event/Message GroupIds and Seqnums now have a newtype wrapper around u32
instead of the plain value, making usage of them slightly more typesafe.
Also add an "invalid" value for both, as exists in latest GStreamer now.
- FormattedValue, GenericFormattedValue and related types were
implemented now, which allows more convenient and type-safe usage of
formatted values (time, bytes, etc)
- Bindings for force-keyunit and still-frame events were added
- MappedBuffer/BufferMap now implement various other useful traits, including
AsRef<[u8]>, AsMut, Deref, DerefMut, Debug, PartialEq and Eq
- Add VideoMultiviewFramePacking enum, and use it in Player
- Bindings for the GStreamer Net library, including PTP/NTP/network client
clocks and the GStreamer NetClock provider for network synchronization of
pipelines
- IteratorError implements std::error:Error
- Plugin::add_dependency() and ::add_dependency_simple() was added
- Rank and TypeFindProbability implement PartialOrd/Ord now
- Bindings for TypeFind, TypeFindFactory and the typefind helpers
- StreamCollection::iter() for iterating over all contained streams
- ErrorMessage type that can be used e.g. in a Result for passing an error
message from somewhere to upper layers to then be posted on an element the
same way gst_element_error!() would've done
### Changed
- Sample::new(), TagList::add(), Structure::set() and similar
functions take the values (ToSendValue impls) by reference instead of value.
They were not consumed by the function before.
- The Debug impls of various types, including Event/Buffer/Message/Query/Structure
were improved to print all the fields, similar to what GST_PTR_FORMAT would
do in C
- Switched to lazy_static 1.0
- Gap event and Duration tag are using ClockTimes now, as well as various
Player signals
- Segment is now based on a generic type FormattedSegment that can
take any format (time, bytes, etc) or a GenericFormattedValue for more
type-safety and convenience. Also functions for "casting" between a generic
segment and a segment with a specific format exist on this now
- AppSrc and AppSink now have a builder for the callbacks, making it
unnecessary to always provide all callbacks even if only one is actually
needed
- Various functions that returned bool for errors, are now returning a Result
- Player configuration is now a custom type with more convenient API
- Player VideoInfo uses a Fraction instead of (u32,u32) for the framerate and
pixel-aspect-ratio
- VideoFrame API has more consistent API between writable and read-only
variants
- Buffer::copy_into() was added, and ::copy_region() now takes a
BufferCopyFlags parameter instead of always using the default flags
- ChildProxy::set_child_property() takes a &ToValue now to follow the API of
Object::set_property() and improve usability
- Proxy/GhostPad default pad functions use the correct specific pad type now
instead of a generic Pad
- Bus::add_signal_watch_full() takes a Priority for the priority instead of u32
- Clock::(un)adjust_with_calibration() takes no clock parameter anymore
### Removed
- FormatValue was removed in favour of GenericFormattedValue and the
connected traits and specific format impls
## [0.9.1] - 2017-11-26
### Fixed
- Export `FlowError`/`FlowSuccess`, `ClockError`/`ClockSuccess`,
`PadLinkError`/`PadLinkSuccess` too
## [0.9.0] - 2017-11-26
### Added
- Bindings for (outputting to) the GStreamer logging system
- Bindings for the GStreamer base library
- Bindings for all the `Pad` functions to override pad behaviour, and pad task
functions
- Bindings for `StaticCaps` and `StaticPadTemplate`
- Bindings for `deep-notify` signal on `Object`
- Support for directly creating `Error`/`Warning`/`Info` `Messages` and posting them
from an element with context information (file, line, module, etc.) similar
to the C `GST_ELEMENT_ERROR` macro
- Support for setting custom fields in `Messages`/`Events` during construction
- Support for creating Buffers out of anything that is `AsRef<[u8]>` or
`AsMut<[u8]>`
- Support for using the `Read` trait on `Adapter`
- Functions for getting all sink/src/all pads of an `Element`, and all children
of a `Bin`
- Builder for `Caps` and `Structures` in addition to the existing functions
- `AppSrc`/`AppSink` implement `BaseSrc`/`BaseSink` and `URIHandler`
- Rust ports of the basic tutorials 1 to 8 from
https://gstreamer.freedesktop.org/documentation/tutorials/
- "Getting started" and "Installation" sections to the README.md
- "dox" feature for generating documentation for all available configurations
### Fixed
- `StackTraceFlags` are only available since 1.12
- Worked around macOS requiring a `NSRunLoop` running on the main thread in all
examples and tutorials, to be able to show a window or anything else
### Changed
- `ClockTime` is now a wrapper around `Option<u64>` to handle the
`CLOCK_TIME_NONE` case better. This wrapper implements all the arithmetic
and other traits as needed and ensures that no accidential calculations with
`CLOCK_TIME_NONE` can happen
- "Values with format", like in `Duration`/`Position`/`Convert` queries or
`Seek` events now return a `FormatValue` type. This contains the actual
`Format` together with the value and does any required conversions. This
also makes it harder to accidentially mix e.g. values in bytes and time
- `PadProbeId` does not implement `Clone`/`Copy` anymore
- Property notify watches return a custom type instead of ulong
- `Error`/`Warning`/`Info` `Messages` can only be created with specific kinds of
`glib::Error` now. Using arbitrary ones does not work
- `Iterator` bindings were completely rewritten and provide the item type as a
generic type parameter now, greatly simplifying its usage
- All `glib::Values` are now `glib::SendValue` instead, e.g. in `Caps` and
`Structures`, as their content must be possible to send to different threads
safely
- `Message::get_src()` can return `None`
- Allow `None` as `Caps` in `AppSrc`/`AppSink`
- Allow everything implementing `Into<Option<&str>>` to be used as a pad name
- Moved `copy()` from `GstRc` directly to `MiniObject`
- Success/Error enums (like `FlowReturn`, `PadLinkReturn`, `StateChangeReturn`) now
implement an `into_result()` function that splits them into a `Result` with
the good and bad cases. Also mark them as `#[must_use]` to make it harder to
accidentially ignore errors.
- Error enums implement the `Error` trait
- Many examples use the `failure` crate for error handling now, cleaning up the
error handling code quite a bit
- Lots of other code cleanup, compiler/clippy warning cleanup, etc.
## [0.8.2] - 2017-11-11
### Fixed
- Implement StaticType of BufferRef instead of Buffer. Buffer aka
GstRc<BufferRef> already implements StaticType if BufferRef does, and
without this it was not possible to use Buffers in GValues.
- Free memory of the appsink/appsrc callbacks with the correct type. It was
crashing because of using the wrong type before.
- Fix documentation URLs in Cargo.toml.
### Added
- Installation instructions and links to documentation for getting started to
README.md.
## [0.8.1] - 2017-09-15
### Added
- Implement Send+Sync for Query, Message and Event, and their corresponding
Ref types.
### Fixed
- Constructor for gst_player::Player now works properly with GStreamer 1.12
when passing a video renderer or signal dispatcher. There was a reference
counting bug.
- Instead of returning &'static references from functions, return references
with a generic, unbound lifetime instead.
See https://github.com/rust-lang/rust/pull/42417#issue-233404573
- Various "unused external crate" warnings and clippy warnings everywhere.
### Changed
- Remove Cargo.lock from GIT, it's not very useful for library crates.
- Run everything through latest rustfmt-nightly.
- Use while-let (instead of loop and if-let) and CLOCK_TIME_NONE (instead of
u64::MAX) in the examples.
## 0.8.0 - 2017-08-31
- Initial release of the autogenerated GStreamer bindings. Older versions
(< 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.6...HEAD
[0.16.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.5...0.16.6
[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
[0.16.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.7...0.16.0
[0.15.7]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.6...0.15.7
[0.15.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.5...0.15.6
[0.15.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.4...0.15.5
[0.15.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.3...0.15.4
[0.15.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.2...0.15.3
[0.15.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.1...0.15.2
[0.15.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.0...0.15.1
[0.15.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.2...0.15.0
[0.14.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.1...0.14.2
[0.14.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.0...0.14.1
[0.14.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.13.0...0.14.0
[0.13.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.2...0.13.0
[0.12.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.1...0.12.2
[0.12.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.0...0.12.1
[0.12.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.6...0.12.0
[0.11.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.5...0.11.6
[0.11.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.4...0.11.5
[0.11.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.3...0.11.4
[0.11.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.2...0.11.3
[0.11.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.1...0.11.2
[0.11.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.0...0.11.1
[0.11.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.2...0.11.0
[0.10.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.1...0.10.2
[0.10.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.0...0.10.1
[0.10.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.9.1...0.10.0
[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.9.0...0.9.1
[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.1...0.9.0
[0.8.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.1...0.8.2
[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.0...0.8.1

View file

@ -0,0 +1 @@
../gstreamer/CHANGELOG.md

View file

@ -1,6 +1,6 @@
[package]
name = "gstreamer-check"
version = "0.17.0"
version = "0.17.4"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
categories = ["api-bindings", "multimedia"]
description = "Rust bindings for GStreamer Check library"
@ -14,9 +14,9 @@ edition = "2018"
[dependencies]
bitflags = "1.0"
ffi = { package = "gstreamer-check-sys", path = "sys", features = ["v1_8"] }
glib = { git = "https://github.com/gtk-rs/gtk-rs-core" }
gst = { package = "gstreamer", path = "../gstreamer" }
ffi = { package = "gstreamer-check-sys", version = "0.17", path = "sys", features = ["v1_8"] }
glib = { version = "0.14" }
gst = { package = "gstreamer", version = "0.17", path = "../gstreamer" }
[features]
default = []

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)

View file

@ -1,181 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
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.9.1] - 2020-09-08
### Changed
- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any
API behind the "v1_18" feature is considered stable now.
## [0.9.0] - 2020-07-05
### Added
- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be
opted-in via the "v1_18" feature flag but there might still be API changes
in the newly added API.
### Changed
- Minimum supported GStreamer version is 1.8 now.
- The `system-deps` crate is now used for declaring the dependency on the C
libraries instead of directly using `pkg-config`.
### Fixed
- Various missing version markers were added, which should allow compilation
against GStreamer 1.8 on Windows again. On Windows missing symbols are
apparently an error even if they're not used.
- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent.
## [0.8.1] - 2019-12-16
### Added
- GStreamer RTP bindings
### Changed
- Update minimum supported Rust version to 1.36
- Update introspection data to GStreamer 1.16.2 release
## [0.8.0] - 2019-06-24
### Added
- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in
addition to GstGLDisplayEGL that existed before
### Changed
- Updated to GStreamer 1.16.0 .gir files, plus backported fixes
- Updated to latest gir
- Run all code through rustfmt after code generation
## [0.7.0] - 2019-02-22
### Added
- GstGL (OpenGL/GLES) bindings
### Changed
- Switch to Rust 1.31 as minimum supported version
- Generate GstVideoOverlayFormatFlags as flags type instead of enum
- Updates GstMpegts with various annotation fixes from GStreamer git master
## [0.6.1] - 2018-11-10
### Added
- GstCheck and GES (gstreamer editing services) bindings
### Changed
- Updated .gir files to 1.14.4 release
- All references were updated from GitHub to freedesktop.org GitLab
- Various functions take \*const instead of \*mut as parameters now
### Fixed
- Various functions and structs having pointer-of-array parameters/fields have
now fixed types. They were previously flat arrays instead of
pointer-of-arrays.
- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before
that
## [0.6.0] - 2018-09-08
### Changed
- Updated everything to GStreamer 1.14.2
- Various fixes to how the code generator is used
- Regenerate with latest GIR code generator
### Fixed
- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class
struct
- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys
- Removed unneeded dependencies from the code generator configuration files
## [0.5.0] - 2018-03-20
### Changed
- Updated everything to GStreamer 1.14.0
### Added
- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings
### Fixed
- Use external_libraries feature of gir to require less manual editing
- Remove some unused crates from dependencies
- Disale print_system_libs in calls to pkg-config to work better with
non-system installs of GStreamer
## [0.4.1] - 2018-02-18
### Fixed
- Fix native library name of GstNet bindings
## [0.4.0] - 2017-12-23
### Added
- GstNet bindings
- Debug impls for basically every type
- Script to automatically regenerate everything
### Changed
- gst_player_[sg]et_multiview_mode() argument types were changed from
GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset
of the former that is allowed here
- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead
of *mut *const c_char
## [0.3.0] - 2017-11-26
### Added
- GstMpegTs bindings
### Changed
- GstDebugColorFlags from an enum to a bitfield
- Updated to bitflags 1.0
- Added support for the "dox" feature to generate documentation for all
possible versions
- Depend on glib-sys/gobject-sys 0.5
### Fixes
- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since
1.12 and 1.12.1 respectively
- All C enums are represented as integers + constants now to prevent undefined
behaviour when out-of-range values are received
## [0.2.1] - 2017-09-10
### Changed
- Add README.md to all crates directly
### Fixed
- Fix various compiler warnings
- Fix versioning/feature mess. Now each library has features for all major
versions and for the correct minor versions that added API.
- Removed Cargo.lock from GIT
## [0.2.0] - 2017-08-28
### Added
- Add GstPlayer bindings
### Changed
- Depend on bitflags 0.9
- Update GIR files to 1.12.1 release
- Fix various errors in the GIR files, backported from GStreamer GIT master
- Depend on gobject-sys/glib-sys 0.4.0 for various improvements
- Regenerated everything with latest GIR
## [0.1.1] - 2017-05-10
### Added
- Add GstTag and GstApp bindings
- Add lots of missing fields to all the structs thanks to GIR improvements
### Changed
- Update GIR files to 1.12.0 release
- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs
- Regenerated everything with latest GIR
## 0.1.0 - 2017-04-09
- Initial release of the autogenerated GStreamer FFI bindings.
[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD
[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1
[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0
[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1
[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0
[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0
[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1
[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0
[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0
[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1
[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0
[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0
[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1
[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0
[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1

View file

@ -0,0 +1 @@
../../gstreamer/CHANGELOG.md

View file

@ -5,12 +5,13 @@ system-deps = "3"
libc = "0.2"
[dependencies.glib-sys]
git = "https://github.com/gtk-rs/gtk-rs-core"
version = "0.14"
[dependencies.gobject-sys]
git = "https://github.com/gtk-rs/gtk-rs-core"
version = "0.14"
[dependencies.gstreamer-sys]
version = "0.17"
path = "../../gstreamer/sys"
[dev-dependencies]
@ -45,7 +46,7 @@ links = "gstcheck-1.0"
name = "gstreamer-check-sys"
readme = "README.md"
repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
version = "0.17.0"
version = "0.17.4"
edition = "2018"
[package.metadata.docs.rs]
features = ["dox"]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#[cfg(not(feature = "dox"))]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
use gstreamer_check_sys::*;

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#include "manual.h"

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#include "manual.h"

View file

@ -0,0 +1 @@
../gstreamer/CHANGELOG.md

View file

@ -1,6 +1,6 @@
[package]
name = "gstreamer-controller"
version = "0.17.0"
version = "0.17.4"
authors = ["Alexey Galakhov <agalakhov@gmail.com>", "Sebastian Dröge <sebastian@centricular.com>"]
categories = ["api-bindings", "multimedia"]
description = "Rust bindings for GStreamer Controller library"
@ -15,9 +15,9 @@ edition = "2018"
[dependencies]
bitflags = "1.0"
once_cell = "1.0"
ffi = { package = "gstreamer-controller-sys", path = "sys", features = ["v1_8"] }
glib = { git = "https://github.com/gtk-rs/gtk-rs-core" }
gst = { package = "gstreamer", path = "../gstreamer" }
ffi = { package = "gstreamer-controller-sys", version = "0.17", path = "sys", features = ["v1_8"] }
glib = { version = "0.14" }
gst = { package = "gstreamer", version = "0.17", path = "../gstreamer" }
[features]
default = []

View file

@ -0,0 +1,196 @@
# gstreamer-rs [![crates.io](https://img.shields.io/crates/v/gstreamer-controller.svg)](https://crates.io/crates/gstreamer-controller) [![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/) (App library) bindings for Rust.
Documentation can be found [here](https://slomo.pages.freedesktop.org/rustdocs/gstreamer/gstreamer_controller/).
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.
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.
## Table of Contents
1. [Installation](#installation)
1. [Linux/BSDs](#installation-linux)
1. [macOS](#installation-macos)
1. [Windows](#installation-windows)
1. [Getting Started](#getting-started)
1. [License](#license)
1. [Contribution](#contribution)
<a name="installation"/>
## Installation
To build the GStreamer bindings or anything depending on them, you need to
have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition,
some of the examples/tutorials require various GStreamer plugins to be
available, which can be found in gst-plugins-base, gst-plugins-good,
gst-plugins-bad, gst-plugins-ugly and/or gst-libav.
<a name="installation-linux"/>
### Linux/BSDs
You need to install the above mentioned packages with your distributions
package manager, or build them from source.
On Debian/Ubuntu they can be installed with
```
$ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
gstreamer1.0-libav libgstrtspserver-1.0-dev
```
The minimum required version of the above libraries is >= 1.8. If you
build the gstreamer-player sub-crate, or any of the examples that
depend on gstreamer-player, you must ensure that in addition to the
above packages, `libgstreamer-plugins-bad1.0-dev` is installed and
that the version is >= 1.12. See the `Cargo.toml` files for the full
details,
```
# Only if you wish to install gstreamer-player, make sure the version
# of this package is >= 1.12.
$ apt-get install libgstreamer-plugins-bad1.0-dev
```
Package names on other distributions should be similar.
Please submit a pull request with instructions for yours.
<a name="installation-macos"/>
### macOS
You can install GStreamer and the plugins via [Homebrew](https://brew.sh/) or
by installing the [binaries](https://gstreamer.freedesktop.org/data/pkg/osx/)
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-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
version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is
sufficient.
#### GStreamer Binaries
You need to download the *two* `.pkg` files from the GStreamer website and
install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and
`gstreamer-1.0-devel-1.12.3-x86_64.pkg`.
After installation, you also need to install `pkg-config` (e.g. via Homebrew)
and set the `PKG_CONFIG_PATH` environment variable
```
$ export PKG_CONFIG_PATH="/Library/Frameworks/GStreamer.framework/Versions/Current/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
```
<a name="installation-windows"/>
### Windows
You can install GStreamer and the plugins via [MSYS2](http://www.msys2.org/)
with `pacman` or by installing the
[binaries](https://gstreamer.freedesktop.org/data/pkg/windows/) provided by
the GStreamer project.
#### MSYS2 / pacman
```
$ pacman -S pkg-config mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-plugins-base \
mingw-w64-x86_64-gst-plugins-good mingw-w64-x86_64-gst-plugins-bad \
mingw-w64-x86_64-gst-plugins-ugly mingw-w64-x86_64-gst-libav \
mingw-w64-x86_64-gst-rtsp-server
```
If you wish to install the gstreamer-player sub-crate, make sure the
version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is
sufficient.
#### GStreamer Binaries
You need to download the *two* `.msi` files for your platform from the
GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and
`gstreamer-1.0-devel-x86_64-1.12.3.msi`.
After installation, you also need to install `pkg-config` (e.g. via MSYS2 or
from [here](https://sourceforge.net/projects/pkgconfiglite/))
and set the `PKG_CONFIG_PATH` environment variable
```
$ export PKG_CONFIG_PATH="c:\\gstreamer\\1.0\\x86_64\\lib\\pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
```
<a name="getting-started"/>
## Getting Started
The API reference can be found
[here](https://gstreamer.pages.freedesktop.org/gstreamer-rs/stable/latest/docs/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
the [documentation](https://gstreamer.freedesktop.org/documentation/) on the
GStreamer website, especially the [Application Development
Manual](https://gstreamer.freedesktop.org/documentation/application-development/).
While being C-centric, it explains all the fundamental concepts of GStreamer
and the code examples should be relatively easily translatable to Rust. The
API is basically the same, function/struct names are the same and everything
is only more convenient (hopefully) and safer.
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://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://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
gstreamer-rs and all crates contained in here are licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or
http://opensource.org/licenses/MIT)
at your option.
GStreamer itself is licensed under the Lesser General Public License version
2.1 or (at your option) any later version:
https://www.gnu.org/licenses/lgpl-2.1.html
<a name="contribution"/>
## Contribution
Any kinds of contributions are welcome as a pull request.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in gstreamer-rs by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)

View file

@ -1,181 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
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.9.1] - 2020-09-08
### Changed
- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any
API behind the "v1_18" feature is considered stable now.
## [0.9.0] - 2020-07-05
### Added
- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be
opted-in via the "v1_18" feature flag but there might still be API changes
in the newly added API.
### Changed
- Minimum supported GStreamer version is 1.8 now.
- The `system-deps` crate is now used for declaring the dependency on the C
libraries instead of directly using `pkg-config`.
### Fixed
- Various missing version markers were added, which should allow compilation
against GStreamer 1.8 on Windows again. On Windows missing symbols are
apparently an error even if they're not used.
- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent.
## [0.8.1] - 2019-12-16
### Added
- GStreamer RTP bindings
### Changed
- Update minimum supported Rust version to 1.36
- Update introspection data to GStreamer 1.16.2 release
## [0.8.0] - 2019-06-24
### Added
- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in
addition to GstGLDisplayEGL that existed before
### Changed
- Updated to GStreamer 1.16.0 .gir files, plus backported fixes
- Updated to latest gir
- Run all code through rustfmt after code generation
## [0.7.0] - 2019-02-22
### Added
- GstGL (OpenGL/GLES) bindings
### Changed
- Switch to Rust 1.31 as minimum supported version
- Generate GstVideoOverlayFormatFlags as flags type instead of enum
- Updates GstMpegts with various annotation fixes from GStreamer git master
## [0.6.1] - 2018-11-10
### Added
- GstCheck and GES (gstreamer editing services) bindings
### Changed
- Updated .gir files to 1.14.4 release
- All references were updated from GitHub to freedesktop.org GitLab
- Various functions take \*const instead of \*mut as parameters now
### Fixed
- Various functions and structs having pointer-of-array parameters/fields have
now fixed types. They were previously flat arrays instead of
pointer-of-arrays.
- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before
that
## [0.6.0] - 2018-09-08
### Changed
- Updated everything to GStreamer 1.14.2
- Various fixes to how the code generator is used
- Regenerate with latest GIR code generator
### Fixed
- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class
struct
- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys
- Removed unneeded dependencies from the code generator configuration files
## [0.5.0] - 2018-03-20
### Changed
- Updated everything to GStreamer 1.14.0
### Added
- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings
### Fixed
- Use external_libraries feature of gir to require less manual editing
- Remove some unused crates from dependencies
- Disale print_system_libs in calls to pkg-config to work better with
non-system installs of GStreamer
## [0.4.1] - 2018-02-18
### Fixed
- Fix native library name of GstNet bindings
## [0.4.0] - 2017-12-23
### Added
- GstNet bindings
- Debug impls for basically every type
- Script to automatically regenerate everything
### Changed
- gst_player_[sg]et_multiview_mode() argument types were changed from
GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset
of the former that is allowed here
- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead
of *mut *const c_char
## [0.3.0] - 2017-11-26
### Added
- GstMpegTs bindings
### Changed
- GstDebugColorFlags from an enum to a bitfield
- Updated to bitflags 1.0
- Added support for the "dox" feature to generate documentation for all
possible versions
- Depend on glib-sys/gobject-sys 0.5
### Fixes
- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since
1.12 and 1.12.1 respectively
- All C enums are represented as integers + constants now to prevent undefined
behaviour when out-of-range values are received
## [0.2.1] - 2017-09-10
### Changed
- Add README.md to all crates directly
### Fixed
- Fix various compiler warnings
- Fix versioning/feature mess. Now each library has features for all major
versions and for the correct minor versions that added API.
- Removed Cargo.lock from GIT
## [0.2.0] - 2017-08-28
### Added
- Add GstPlayer bindings
### Changed
- Depend on bitflags 0.9
- Update GIR files to 1.12.1 release
- Fix various errors in the GIR files, backported from GStreamer GIT master
- Depend on gobject-sys/glib-sys 0.4.0 for various improvements
- Regenerated everything with latest GIR
## [0.1.1] - 2017-05-10
### Added
- Add GstTag and GstApp bindings
- Add lots of missing fields to all the structs thanks to GIR improvements
### Changed
- Update GIR files to 1.12.0 release
- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs
- Regenerated everything with latest GIR
## 0.1.0 - 2017-04-09
- Initial release of the autogenerated GStreamer FFI bindings.
[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD
[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1
[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0
[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1
[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0
[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0
[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1
[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0
[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0
[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1
[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0
[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0
[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1
[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0
[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1

View file

@ -0,0 +1 @@
../../gstreamer/CHANGELOG.md

View file

@ -6,12 +6,13 @@ system-deps = "3"
libc = "0.2"
[dependencies.glib-sys]
git = "https://github.com/gtk-rs/gtk-rs-core"
version = "0.14"
[dependencies.gobject-sys]
git = "https://github.com/gtk-rs/gtk-rs-core"
version = "0.14"
[dependencies.gstreamer-sys]
version = "0.17"
path = "../../gstreamer/sys"
[dev-dependencies]
@ -46,7 +47,7 @@ links = "gstcontroller-1.0"
name = "gstreamer-controller-sys"
readme = "README.md"
repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
version = "0.17.0"
version = "0.17.4"
edition = "2018"
[package.metadata.docs.rs]
features = ["dox"]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#[cfg(not(feature = "dox"))]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
use gstreamer_controller_sys::*;

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#include "manual.h"

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#include "manual.h"

View file

@ -1,974 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
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.7] - 2021-02-13
### Fixed
- Usage of the logging system with a GStreamer library with the logging system
compiled out does not crash any longer.
- Double-free in `gst_video::VideoTimeCode` API when converting between
validated and unvalidated timecodes.
### Added
- `gst::Element::get_current_state()` and `get_pending_state()` convenience APIs.
- `gst_audio::AudioConverterConfig` for setting the configuration on e.g. the
`audiomixer` element. The low-level `AudioConverter` API is still not
included in the bindings.
## [0.16.6] - 2020-12-20
### Fixed
- `VideoTimeCodeInterval`'s `Ord` and `PartialEq` implementations compare
against the correct fields now.
- `SDPMessage::medias_mut()` iterator does not crash any longer.
### Added
- `PartialEq` and `Eq` implementations on `VideoAlignment`.
- Alignment API for `VideoMeta` and `get_plane_height()` / `get_plane_size()`.
- `VideoInfo::align_full()`.
## [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
`VideoFormat` iterators. Previously they returned the overall size instead
of the remaining size, and they didn't implement `Iterator::size_hint()`.
- Don't implement `ExactSizeIterator` on the buffer `gst::Meta` iterator. The
overall length is not known easily and the implementation would've simply
panicked in the past.
### Added
- `gst::ClockID::wait_async_stream()` for async integration for clock waiting.
- `From` / `TryFrom` impls for converting between `gst::ClockTime` and
`std::time::Duration`.
## [0.16.3] - 2020-09-08
### Fixed
- Reset vfuncs if calling `BaseTransformClass::configure()` multiple times.
- Fix `gst::debug_remove_default_log_function()` to actually remove the
default log function.
### Added
- Some more new APIs added in 1.18.
- API for getting an owned buffer from a readable `gst_video::VideoFrame` /
`VideoFrameRef`.
### Changed
- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any
API behind the "v1_18" feature is considered stable now.
- Factor out some common code from `gst::Pad::ProbeInfo` code. This reduces
the code generated for each pad probe considerably.
- Update paste dependency to 1.0 and pretty-hex to 0.2.
## [0.16.2] - 2020-07-27
### Fixed
- Use correct pointer for the plane data in `gst_audio::AudioBuffer`.
### Added
- Add `gst::GhostPad` convenience constructors that take a target pad, similar
to the ones that existed in 0.15 and before.
- Add `gst::parse_bin_from_description_with_name` that allows setting a name
for the created bin without having to use unsafe code in application code.
## [0.16.1] - 2020-07-10
### Fixed
- Allow calling `gst::DebugCategory::new()` before `gst::init()` again.
## [0.16.0] - 2020-07-06
### Added
- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be
opted-in via the "v1_18" feature flag but there might still be API changes
in the newly added API.
- `gst::MemoryRef::dump()` for dumping contents of a memory.
- `gst::Bus::stream()` instead of a custom constructor on the `BusStream`.
- Use more accurate types for `Seqnum`, `GroupId` and `MetaSeqnum`. These are
now proper wrapper types instead of plain integers, which makes mis-use
harder.
- Provide `TryFrom` impls for conversion between `glib::DateTime` and
`gst::DateTime`.
- Add `get_allocator()` functions to `gst_base::{Aggregator, BaseTransform,
BaseSrc}`, and allow overriding `BaseSrc::alloc()`.
- Add subclassing bindings for `gst_base::PushSrc`.
- Add new `gst::BufferCursor` API that allows to handle a buffer as `Read`,
`Write` and `Seek` and accesses the underlying memories of the buffer
individually without mapping them all together.
- Add `gst::Plugin::get_plugin_name()`.
- Support for `gst_video::VideoAFDMeta` and `VideoBarMeta`.
- API for getting all / iterating over all `gst_audio::AudioFormat` and
`gst_video::VideoFormat`.
- Bindings and subclassing bindings for `gst_video::VideoSink`.
- `gst::Pad` can be constructed via the builder pattern and `gst::PadBuilder`
now, which allows to safely set the pad functions and various other fields
during construction. The `PadBuilder` works on any `gst::Pad` subclass and
also has special support for `GhostPad`s by allowing to set pad functions of
the proxy pad.
- `gst::Message`, `gst::Event` and `gst::Query` type constructors are now on
the specific target type instead of various `new_XXX()` functions on the
basic type. E.g. `gst::message::Eos::new()`.
- Support for overriding `gst_audio::AudioSrc/Sink::reset()`.
- Support for overriding `gst_base::BaseParse::stop()`.
- Support for overriding `gst::Element::post_message()`.
- Added bindings for `gst::BufferList::foreach()` and `foreach_mut()`.
- Added bindings for `gst::Buffer::foreach_meta()` and `foreach_meta_mut()`.
### Fixed
- Allow using any `glib::Object` as target object for logging instead of just
`gst::Object`.
- Remove restriction API from `gst_pbutils::EncodingContainerProfile`. They
are supposed to be used only with the other encoding profiles.
- Return `&'static str` for various `gst::StructureRef` functions where the
string is backed by a `glib::Quark`.
- Fix various `gst::DateTime` functions to actually return `Option`s.
- Add support for filling in a buffer passed to the `gst::Pad` getrange
function, allow passing one in into `get_range()` and `pull_range()` and
provide the corresponding API on `gst_base::BaseSrc` too.
- Allocator in audio/video `Decoder` base classes is optional and can return
`None`.
- `gst_video::ValidVideoTimeCode::add_interval()` always returns a valid
timecode again.
- Allow resolving a `gst::Promise` with `None` and also handle that correctly
in the callback. This is allowed by the API.
- Allow calling various debugging related functions before `gst::init()`.
- Various enum/function versions were fixed to only show up if the
corresponding version feature is enabled.
- `gst::Pad` function setters are marked unsafe now as changing the functions
is not thread-safe.
- Remove `gst::Object::set_name()` as changing the name after construction
generally causes problems and is potentially unsafe.
- Remove `gst::Pad::set_pad_template()` as changing the pad template after
construction is generally unsafe.
- `gst::Pad::stream_lock()` borrows the pad now instead of taking a new
reference.
- Unimplemented `Jitter` and `Buffer` queries were removed from the bindings.
These are not implemented in C and only have a type registered.
- Various `LAST`, `NONE` variants of enums and flags were removed as these
only make sense in C.
- Call the parent impl of various vfuncs that were omitted before to not
require further subclasses of them to implement them but automatically call
the parent ones.
### Changed
- Use `NonZeroU64/U32` for various ID types to allow further optimizations.
- Use `thiserror` crate for deriving error types.
- Switch from `lazy_static` to `once_cell`.
- Change various miniobject functions like `gst::Caps::append()` from taking
the object by value to modifying it internally. This makes them easier to
use and only applies to functions that are defined on the non-reference type
and take ownership of the values passed in.
- Use `mem::ManuallyDrop` instead of `mem::forget()` everywhere.
- Replace most `mem::transmute()` calls with safer alternatives.
- `gst:StreamCollection` API was changed to the builder pattern for
construction as the collection must not be changed after construction.
- `gst::ProxyPad` default functions are plain functions on `ProxyPad` now
instead of trait functions to allow easier usage of them.
- Use proper error types in various `TryFrom` impls.
- `gst_video::VideoMeta::add()` returns a `Result` now instead of panicking.
- Various constructors were renamed from `new_with_XXX()` and `new_from_XXX()`
to the more idiomatic `with_XXX()` and `from_XXX()`.
- Miniobject bindings are simplified now and there is no `gst::GstRc` type
anymore, instead everything is directly implemented on the concrete types.
As part of this the `gst::MiniObject` trait was also removed as it was
unneeded now.
## [0.15.7] - 2020-06-08
### Fixed
- Allow multiple filter types per process with `gst::Iterator::filter()`.
- Check that `VideoInfo` is valid when creating a `VideoFrame`.
- Don't potentially dereference a `NULL` pointer when getting the format
from an invalid `VideoInfo` or `AudioInfo`.
- Don't unmap borrowed `VideoFrameRef`s.
### Added
- `gst::ProtectionMeta`, `gst_video::VideoAffineTransformationMeta`,
`VideoCropMeta` and `VideoRegionOfInterestMeta` bindings.
- Various new `gst_rtp::RTPBuffer` methods.
- `gst_audio::audio_buffer_truncate()`, `AudioMeta` and `AudioBuffer`
bindings.
## [0.15.6] - 2020-05-28
### Fixed
- Assert that the data passed to `VideoCaptionMeta::add()` is not empty.
- Don't store strong references to the object in the bus, appsink and appsrc
futures `Stream` / `Sink` adapters. This would keep them alive unnecessarily
and would prevent the `Stream` / `Sink` to ever "finish" on its own.
- Handle receiving a `None` reply in the change function of `gst::Promise`.
This is apparently valid. For backwards compatibility reasons this is
currently replaced with an empty structure but in 0.16 the API will
explicitly handle `None`.
### Added
- `gst::Stream::debug()` and `gst::StreamCollection::debug()` for converting
into a structured string with the actual contents of each.
- `gst::Structure::from_iter()` and `gst::Caps::from_iter()` to create
structures/caps from iterators.
- `gst::Event` support for getting/setting the `gst::Stream` in the
`StreamStart` event.
- `gst_video::calculate_display_ratio()` and `::guess_framerate()`.
- Various video related `gst::CapsFeatures` in `gst_video`.
- `TryFrom`/`From` impls for converting between `gst::Structure` and
`gst_video::VideoConverterConfig`.
- Various `glib::Value` trait impls for `SDPMessage`, `StructureRef`,
`CapsFeatureRef` and all borrowed variants of miniobjects to be able to
work with the borrowed, non-owned variants when handling `glib::Value`s.
## [0.15.5] - 2020-05-03
### Fixed
- Revert: Allow logging any `glib::Object` and not just `gst::Object`. This
broke API in subtile ways and needs to wait until 0.16
- Replace `%` in log output with `%%` to prevent accidental C formatting
- Add missing manual traits to the documentation
### Added
- `BufferRef::peek_memory_mut()` to give a mutable reference to a given memory
- Different iterators for iterating over the memories of a buffer
- Support for `gst_audio::AudioClippingMeta`
- `gst::Plugin::get_plugin_name()` was added
- `gst::Element::get_current_clock_time()` and
`gst::Element::get_current_running_time() helper functions
- `gst::State` and `StateChange` API for calculating next/previous state and
convert from/to the components of a state change
### Changed
- Use `mem::ManuallyDrop` instead of `mem::forget` everywhere
## [0.15.4] - 2020-03-09
### Fixed
- Allow logging any `glib::Object` and not just `gst::Object`
- Fix floating reference handling in `RTSPMedia::take_pipeline()`
- Hold `GMutex` guards for the remainder of the function and warn if they're
directly dropped
- Work around empty/any caps handling bugs in `Caps::fixate()`
### Added
- Add `BaseTransform::prepare_output_buffer()` subclassing support
- `RTSPServer`, `RTSPClient`, `RTSPMedia` and `RTSPMediaFactory` subclassing
support
- Handle panicking in `appsrc`/`appsink` callbacks by posting an error message
instead of killing the process
## [0.15.3] - 2020-02-15
### Fixed
- `UniqueFlowCombiner::clear()` should take a mutable reference.
- `AudioStreamAlign` doesn't require mutable references for getters anymore.
- Don't use bool return value of `gst_video_info_set_format()` and
`gst_video_info_align()` with GStreamer < 1.11.1 as it returned void back
then. We'd otherwise use some random value.
- Make `VideoInfo::align()` is available since 1.8.
- Fix changing/clearing of `AppSrc`, `AppSink` callbacks and `Bus` sync
handler. Before 1.16.3 this was not thread-safe and caused crashes. When
running with older versions changing them causes a panic now and unsetting
the bus sync handler has not effect. With newer versions it works correctly.
### Added
- Add `Clone` impls for `BufferPoolConfig` and `PlayerConfig`.
- Add `VideoConverter` bindings.
- Add `Future`s variant for `gst::Promise` constructor.
- Add `Future`s variant for `gst_video::convert_sample_async()`.
- Add `submit_input_buffer()`, `generate_output()`, `before_transform()`,
`copy_metadata()` and `transform_meta()` virtual method support for
`BaseTransform`.
- Add `AppSink` `Stream` adapter and `AppSrc` `Sink` adapter for integrating
both into Rust async contexts.
### Changed
- More generic implementations of `VideoFrame` / `VideoFrameRef` functions to
allow usage in more generic contexts.
## [0.15.2] - 2020-01-30
### Fixed
- Fix another race condition in the `gst::Bus` `Stream` that could cause it to
not wake up although a message is available.
## [0.15.1] - 2020-01-23
### Added
- Use static inner lifetime for `VideoCodecState<Readable>` so that it can be
stored safely on the heap.
- Getters/setters for `BinFlags` on `gst::Bin`.
- `gst::Caps::builder_full()` for building caps with multiple structures
conveniently.
- `gst::Element::call_async_future()` for asynchronously spawning a closure
and returning a `Future` for awaiting its return value.
### Fixed
- Various clippy warnings.
- Getters/setters for `PadFlags` on `gst::Pad` now provide the correct
behaviour.
- Take mutex before popping messages in the `gst::Bus` `Stream` to close a
small race condition that could cause it to not be woken up.
- `gst::ChildProxy` implementers do not have to provide `child_added()` and
`child_removed()` functions anymore but these are optional now.
- Manually implement `Debug` impls for various generic types where to `Debug`
impl should not depend on their type parameters also implementing `Debug`.
## [0.15.0] - 2019-12-18
### Added
- `StructureRef::get_optional()` for returning `None` if the field does not
exist instead of `Err`
- Bindings for `gstreamer-rtp` library, mostly `RTPBuffer`
- Support for writing `Preset`, `TagSetter`, `Clock`, `SystemClock` subclasses
- Bindings for `Typefind::get_length()`
- Bindings for `BaseSrcImpl::get_times()`
- Bindings (incl. subclassing) for `AudioSink` and `AudioSrc`
- Missing `Send`/`Sync` impl for various types
### Fixed
- Cleanup of cargo features/dependencies to improve build times
- Serde serialization with optional values.
Attention: This changes the format of the serialization!
- `VideoEncoder`/`VideoDecoder` `proxy_getcaps()` can't return `None`
- Use non-panicking UTF8 conversion in log handler. We don't want to panic
just because some C code printed a non-UTF8 string
- Re-rexport all traits from the crate level and also ensure that all traits
are actually included in the preludes
- Actually export `is_video_overlay_prepare_window_handle_message()` function
- Use `FnMut` for the `appsink` callbacks instead of `Fn`
- `Promise` change function returns the actual reply to the promise now
instead of just passing the promise itself
- Memory leak in `Iterator::filter()`
- `BinImpl::add()` takes ownership of floating references
- `DeviceImpl::create_element()` preserves floating flag
- `BinImpl::remove()` takes a strong reference of the element now as the last
reference might be owned by the bin and otherwise we would potentially have
a use-after-free afterwards
- `BaseParseFrame` and `VideoCodecFrame` take a `&mut self` now for various
functions that actually change the frame
### Changed
- Minimum supported Rust version is 1.39
- Allow passing `None` to `VideoEncoder::finish_frame()`
- Various `to_string()` methods were moved into the `Display` trait impl and
for some types `to_str()` was added to return a `&'static str`
- .gir files were updated to 1.16.2 release
- `Sample` constructor uses the builder pattern now
- `VideoMeta::add_full()` is simplified and requires parameters
- `BasetransformImpl::set_caps()` returns a `Result` instead of `bool`
- SDP data type getters for strings return an `Option` now as these can be
`None` in practice although not allowed by the SDP spec
- Various functions returning `Option`s were changed to return `Results` if
`None` actually signalled an error instead of just a missing value
### Removed
- "subclassing" and "futures" cargo features. These are enabled by default now
## [0.14.5] - 2019-09-17
### Added
- Support subclassing of `gst::Device`, `gst::DeviceProvider`,
`gst_audio::AudioDecoder` and `::AudioEncoder`
- Support for `Element::set_clock` and `::provide_clock` virtual methods
- `ElementClass::add_metadata` was added
- `gst_video::VideoDecoder` and `::VideoEncoder` got support for `get_caps`,
`negotiate`, `src/sink_query/event` and the `drain` virtual methods
- `Element::num_pads`, `::num_src_pads` and `::num_sink_pads` functions
- `gst_video::VideoDecoder` and `::VideoEncoder` got `get_allocator` bindings
- `gst::Iterator` implements `IntoIterator` now for providing
`std::iter::Iterator<Item=<Result<T, IteratorError>>` adapter
- Error macros for audio/video decoder subclasses to handle decoding errors
more gracefully and only actually error out after many consecutive errors
### Fixed
- Macros now also work in Rust 2018 edition without `#[macro_use]` but
explicit imports
- The log handler unit test runs reliable in parallel with other tests
- Manually implement `Debug` for `gst::Iterator` to allow it for any `T`
instead of `T: Debug`
- `Device::create_element` has correct reference count handling now
- Return `NotNegotiated` in the video codec base classes if setting the output
state fails instead of `Error`
## [0.14.4] - 2019-08-14
### Added
- Bindings for adding/removing custom log functions
- Bindings for `calculate_linear_regression()`
- Constants for base class custom flow returns
### Fixed
- Ownership of pad in `Element::release_pad()` virtual method implementations
## [0.14.3] - 2019-07-16
### Added
- `Buffer::unset_flags()` for unsetting specific buffer flags
- `VideoBufferFlags` flags type and `VideoBufferExt::set_video_flags()`,
`unset_video_flags()` and `get_video_flags()` for working with video buffer
flags from safe code.
### Fixed
- Setting buffer flags does not override arbitrary other flags anymore but
only sets the flags in question. This is necessary to not override extension
buffer flags like `gst_video::VideoBufferFlags`.
## [0.14.2] - 2019-07-15
### Added
- Support for `ReferenceTimestampMeta`
## [0.14.1] - 2019-07-06
### Added
- Various new WebRTC enum types from 1.14.1/1.16.0
### Fixed
- Correctly generate interlaced `VideoInfo` by using
`gst_video_info_set_interlaced_format()` instead of the generic function.
- serde serialization unit tests for `gst::format` succeed again now.
### Changed
- `Debug` impls for `VideoFormatInfo` and `AudioFormatInfo` now print all the
details of the format instead of only the name, and the `Debug` impls for
`VideoInfo` and `AudioInfo` also print the format now.
## [0.14.0] - 2019-06-24
### Added
- Bindings for `GLSyncMeta`.
- Bindings for setting/getting `TagScope` on a `TagList`
- Bindings for `GLDisplayWayland` and `GLDisplayX11` in addition to the
already existing `GLDisplayEGL`
- Bindings for `Bus::pop_filtered()` and related functions
- Bindings for getting/setting `Object`, `Element`, `Bin`, `Pipeline` and
`Plugin` flags
- Bindings for `VideoCaptionMeta`
- `Debug` impl of `Buffer` now also shows the metas of the buffers
- Expose flow return in `PadProbeInfo` for overriding the return value
- Bindings for `VideoDecoder` and `VideoEncoder`, including subclassing
support
- Bindings for `Memory`, `Allocator` and `VideoBufferPool`
- Bindings for `VideoFormatInfo::pack` and `::unpack` for format conversion
- Bindings for `BaseParse`, including subclassing support
- Various new arithmetic operation impls for fractions, formatted values and
`ClockTime`
- Bindings for `VideoInfo::align()`
### Changed
- The `SDPMessage` and `SDPMedia` bindings were completely rewritten as they
were broken before and caused crashes in various usages. As part of this
there's also some more convenience API available on these types, like
iterators for example, and API to modify the `SDPMedia` contained in a
`SDPMessage`.
- Update to GStreamer 1.16.
- Regenerate with latest gir.
- Run all autogenerated code through rustfmt after generation too.
- Updated to latest versions of GLib/GIO/etc crates.
- Updated to futures 0.3 / `std::future`
- `ProxyPad` default functions moved to an extension trait instead of plain
functions on `ProxyPad`, making them more in sync with the default `Pad`
functions
- GStreamer plugins are now exporting the new 1.14+ plugin symbols if they
were configured for GStreamer 1.14+
- Arithmetic operations on formatted values and `ClockTime` do overflow checks
now and replace the result with the `NONE` value on overflow
- `TryFrom`/`TryInto` traits are used in various places now instead of the
previous ad-hoc implementations of them.
- Registering element/typefind/device monitor factories requires passing a
value of `gst::Rank` now instead of an arbitrary `u32`
### Fixed
- Use correct type for destroying pad task closure data. This was previously
using the wrong type, causing crashes at runtime.
- `DeviceAdded`/`DeviceRemoved` message getters are transfer full so we don't
need to take an additional reference that would be leaked.
- `AppSink` callbacks are correctly marked as `Send` instead of `Send+Sync`,
allowing a wider range of closures to be used for them.
- Handle `PadProbeReturn::Handled` return values from pad probes more
correctly.
- `ToOwned::to_owned()` on miniobjects has to create copies instead of
only increasing the reference count. Otherwise it was possible to create
multiple mutable and immutable references to the same object at the same
time.
- Various functions take references to owned miniobjects instead of borrowed
references as it was otherwise possible to create multiple mutable or
immutable references to the same object at the same time.
- `URIHandler::set_uri` does not accept `None` anymore as this is not allowed
by the C function.
- Comparisons and addition of `TypeFindProbability` and `Rank` work correctly now
- Various `Display` implementations were fixed to not cause a stack overflow
due to infinite recursion anymore
- Various `::to_string()` functions don't take ownership of C strings anymore
that they do not own, which caused double frees before
### Removed
- MIKEY related bindings from the SDP library. The bindings were broken and
until someone needs them these are not available anymore.
## [0.13.0] - 2019-02-22
### Added
- Subclassing infrastructure was moved directly into the bindings,
making the `gst-plugin` crate deprecated. This involves many API
changes but generally cleans up code and makes it more flexible.
Take a look at the `gst-plugins-rs` crate for various examples.
- Bindings for GStreamer GL library
- Bindings for `CapsFeatures` and `Meta`
- Bindings for `ParentBufferMeta, `VideoMeta` and `VideoOverlayCompositionMeta`
- Bindings for `VideoOverlayComposition` and `VideoOverlayRectangle`
- Bindings for `VideoTimeCode`
- Bindings for `NetAddressMeta`
- Bindings for registering custom tags
- `UniqueFlowCombiner` and `UniqueAdapter` wrappers that make use of
the Rust compile-time mutability checks and expose more API in a safe
way, and as a side-effect implement `Sync` and `Send` now
- `Bus::add_watch_local()` and `gst_video::convert_frame_async_local()` that
allows to use a closure that does not implement `Send` but can only be
called from the thread owning the main context.
- More complete bindings for `Allocation` `Query`
- `pbutils` functions for codec descriptions
- `TagList::iter()` for iterating over all tags while getting a single
value per tag. The old `::iter_tag_list()` function was renamed to
`::iter_generic()` and still provides access to each value for a tag
- `Bus::iter()` and `Bus::iter_timed()` iterators around the
corresponding `::pop*()` functions
- Getters for `VideoColorimetry` to access its fields
- `Debug` impls for various missing types.
- serde serialization of `Value` can also handle `Buffer` now
- Extensive comments to all examples with explanations
- Transmuxing example showing how to use `typefind`, `multiqueue` and
dynamic pads
- basic-tutorial-12 was ported and added
### Changed
- Rust 1.31 is the minimum supported Rust version now
- Update to latest gir code generator and glib bindings
- Functions returning e.g. `gst::FlowReturn` or other "combined" enums
were changed to return split enums like `Result<gst::FlowSuccess,
gst::FlowError>` to allow usage of the standard Rust error handling.
- Various functions and callbacks returning `bool` or `Option<_>` were
changed to return a `Result<_, glib::BoolError>` or
`Result<_, gst::LoggableError>` or `Result<_, gst::ErrorMessage>` for
better integration with Rust's error handling infrastructure.
- Some infallible functions returning `bool` were changed to return `()`.
- `MiniObject` subclasses are now newtype wrappers around the
underlying `GstRc<FooRef>` wrapper. This does not change the
API in any breaking way for the current usages, but allows
`MiniObject`s to also be implemented in other crates and
makes sure `rustdoc` places the documentation in the right places.
- `BinExt` extension trait was renamed to `GstBinExt` to prevent
conflicts with `gtk::Bin` if both are imported
- `Buffer::from_slice()` can't possible return `None`
### Fixed
- `gst::tag::Album` is the album tag now instead of artist sortname
- Return `0` for the channel mask corresponding to negative
`AudioChannelPosition`s.
- `PartialOrd` and related traits are implemented via pointer equality on
`ClockId` instead of using the compare function. Two clock ids with the same
timestamp are not necessarily the same.
- Various functions that are actually fallible are now returning an
`Option<_>`.
- Various `clippy` warnings
## [0.12.2] - 2018-11-26
### Fixed
- PTP clock constructor actually creates a PTP instead of NTP clock
### Added
- Bindings for GStreamer Editing Services
- Bindings for GStreamer Check testing library
- Bindings for the encoding profile API (encodebin)
- VideoFrame, VideoInfo, AudioInfo, StructureRef implements Send and Sync now
- VideoFrame has a function to get the raw FFI pointer
- From impls from the Error/Success enums to the combined enums like
FlowReturn
- Bin-to-dot file functions were added to the Bin trait
- gst_base::Adapter implements SendUnique now
### Changed
- All references were updated from GitHub to freedesktop.org GitLab
- Fix various links in the README.md
- Link to the correct location for the documentation
- Remove GitLab badge as that only works with gitlab.com currently
## [0.12.1] - 2018-09-21
### Added
- More complete bindings for the gst_video::VideoOverlay interface, especially
gst_video::is_video_overlay_prepare_window_handle_message()
## [0.12.0] - 2018-09-08
### Added
- Bindings for the GStreamer SDP and WebRTC libraries
- Generic API for working with tags that is based on string tag names and
glib::Value for the tag values
- Bindings for Aggregator and AggregatorPad
- Bindings for BaseTransform/BaseSrc::get_buffer_pool()
- Optional serde implementations for the basic GStreamer data flow and metadata types
### Changed
- Use ptr::NonNull in various places
- Updated to muldiv 0.2, num-rational 0.2
- Bus::create_watch() can't return None
- Remove CallbackGuard as unwinding across FFI boundaries is not undefined
behaviour anymore but will directly cause a panic
- Changed from the futures to the futures-preview crate as an optional
dependency
- Various Caps operations take a &CapsRef instead of &Caps
- "deep-notify" signal takes the whole ParamSpec as parameter instead of only
the signal name
- Some structs were changed from empty struct to empty enums
- Pad probe code does not take an additional reference to the data anymore,
potentially passing writable events/buffers into the probe
- ValueExt::compare() is implemented around std::cmp::Ordering now instead of
a custom enum that was basically the same
### Fixed
- Pad::add_probe() can return None if an IDLE probe was already called and
removed in the meantime
- Various compiler and clippy warnings
### Removed
- std::Iterator impl for gst::Iterator. It was awkward to use because the
gst::Iterator could fail at each iteration
## [0.11.6] - 2018-08-27
### Fixed
- Build with NLL/two-phase borrows
- Explicitly define [bin] section for discoverer example to fix a cargo
warning
### Added
- Add unsafe gst::deinit() function
- Ord/PartialOrd impls on gst::Seqnum
- Getter for current pad mode
- gst::Pad::sticky_events_foreach() for iterating over all sticky events
in a thread-safe way
## [0.11.5] - 2018-07-24
### Fixed
- `gst::Bus`'s sync handler must unref every message if
`gst::BusSyncReply::Drop` is returned, otherwise they are all leaked
## [0.11.4] - 2018-07-19
### Fixed
- `gst::Caps::subtract()` does not leak its arguments anymore
- `gst::Caps::get_structure()` gracefully returns `None` if the index
is out of bounds instead of a `g_return_val_if_fail()`
- `gst::Structure::new()` has to give away ownership of the info structure
but didn't. For 0.11 we internally copy, in 0.12 it will take the info
structure by value
- Typefind tests don't fail anymore if the system has typefind factories
without caps
### Added
- An additional assertion that ensures that miniobjects are actually
writable before creating a mutable reference
## [0.11.3] - 2018-06-08
### Added
- `gst::Bus::remove_watch()` is now available to remove a bus watch again
- `fmt::Debug` impls for `AudioInfo` and `VideoInfo` were added
- `fmt::Debug` impls for mini objects also print the pointer value now to make
it easier to track them in debug logs
- `PlayerVisualization` has accessors for the name and description fields now,
without which there is no sensible way to use them or to set a player
visualization
## [0.11.2] - 2018-05-09
### Fixed
- Work-around various floating reference handling changes between 1.12 and
1.14 to be able to run with both versions without memory leaks or other
reference count problems.
This affects NetTimeProvider, BufferPool, DeviceMonitor, Stream,
StreamCollection, and Player, NetClientClock, NetClock, PtpClock which were
already previously fixed.
### Changed
- Change the appsrc need-data and all appsink callbacks to not require the
Sync bound anymore and change from Fn to FnMut. They can only be called from
a single thread at a time. This change is only done for the corresponding
callbacks, not the signals.
## [0.11.1] - 2018-04-07
### Fixed
- Fix Structure::to_string() to not run into an infinite recursion but call
the method on the contained StructureRef instead of on itself
## [0.11.0] - 2018-03-20
### Changed
- Updated everything to GStreamer 1.14.0
- Event, Message and Query types were refactored to improve usability.
Especially newly constructed queries allow to directly use the type-specific
functions to be used without first creating a view
- VideoFrameRef::copy_to_ref() and ::copy_plane_to_ref() are gone now and the
original functions work with refs instead of full frames
- PadProbeId and NotifyIds are not Copy/Clone anymore and are taken by value
- GstPlayer has GstObject as parent class now
### Added
- GstPbutils, GstSdp, GstRtsp and GstRtspServer bindings
- GstPromise, GstAudioStreamAlign and various other 1.14 API
- GstVideoFilter and GstBufferPool bindings
- Element::call_async()
- Debug impl For Toc and TocEntry
- Various new examples (RTP FEC, RTSP server, tag usage, ...)
### Fixed
- Memory leak in gst_video::convert_sample_async()
## [0.10.2] - 2018-02-18
### Fixed
- Fix building of messages with custom fields for types that don't have a
GstStructure
### Added
- VideoFrameRef::copy_to_ref() and ::copy_plane_to_ref(), which work with
VideoFrameRefs instead of full VideoFrames
- Getters for the BaseSrc/Sink/Transform configured segment
- Document the gstreamer-player-1.0 dependency in the README.md
## [0.10.1] - 2018-01-03
### Fixed
- Don't require &mut self for TagSetterExtManual::add()
### Added
- A TagSetter example application
- Bindings for gst_video::convert_sample() and ::convert_sample_async()
- Bindings for gst_video::VideoRectangle
- Debug impl for Sample and ::with_buffer_list() constructor
- A borrowing version of VideoFrame: VideoFrameRef
- Bindings for GstVideoFilter
### Changed
- Deprecated Sample::get_info() in favour of ::get_structure()
- Player has gst::Object as another parent class now
## [0.10.0] - 2017-12-22
### Fixed
- Various clippy warnings
- Memory leak of the tag list in Toc::merge_tags()
- Property getters use Values of the correct type
- Event::get_structure(), Message::get_structure() and
Query::get_structure() can return None for the structure
- Various other nullability fixes all over the API, changing functions to
accept Option<> or returning Option<>, or only plain types
- Functions taking paths/filenames now actually take Paths instead of &strs
- Element::remove_pad() is not giving away a new reference to the pad
anymore, which caused a memory leak of all pads ever removed
- Precision handling in ClockTime's Display impl
- Video/AudioInfo are only Send, not Sync
### Added
- Various enums now also derive useful traits like Copy, Clone and Hash in
addition to PartialEq, Eq and Debug
- TagList::merge() and insert() for combining tag lists
- EventType gained many useful functions to work with event types and
a PartialOrd impl to check expected event order of event types where it matters
- MessageRef/EventRef/QueryRef implement ToOwned
- Bindings for Registry and PluginFeature
- Event::set_running_time_offset() for adjusting the offset while events
pass through the pipeline
- Event/Message GroupIds and Seqnums now have a newtype wrapper around u32
instead of the plain value, making usage of them slightly more typesafe.
Also add an "invalid" value for both, as exists in latest GStreamer now.
- FormattedValue, GenericFormattedValue and related types were
implemented now, which allows more convenient and type-safe usage of
formatted values (time, bytes, etc)
- Bindings for force-keyunit and still-frame events were added
- MappedBuffer/BufferMap now implement various other useful traits, including
AsRef<[u8]>, AsMut, Deref, DerefMut, Debug, PartialEq and Eq
- Add VideoMultiviewFramePacking enum, and use it in Player
- Bindings for the GStreamer Net library, including PTP/NTP/network client
clocks and the GStreamer NetClock provider for network synchronization of
pipelines
- IteratorError implements std::error:Error
- Plugin::add_dependency() and ::add_dependency_simple() was added
- Rank and TypeFindProbability implement PartialOrd/Ord now
- Bindings for TypeFind, TypeFindFactory and the typefind helpers
- StreamCollection::iter() for iterating over all contained streams
- ErrorMessage type that can be used e.g. in a Result for passing an error
message from somewhere to upper layers to then be posted on an element the
same way gst_element_error!() would've done
### Changed
- Sample::new(), TagList::add(), Structure::set() and similar
functions take the values (ToSendValue impls) by reference instead of value.
They were not consumed by the function before.
- The Debug impls of various types, including Event/Buffer/Message/Query/Structure
were improved to print all the fields, similar to what GST_PTR_FORMAT would
do in C
- Switched to lazy_static 1.0
- Gap event and Duration tag are using ClockTimes now, as well as various
Player signals
- Segment is now based on a generic type FormattedSegment that can
take any format (time, bytes, etc) or a GenericFormattedValue for more
type-safety and convenience. Also functions for "casting" between a generic
segment and a segment with a specific format exist on this now
- AppSrc and AppSink now have a builder for the callbacks, making it
unnecessary to always provide all callbacks even if only one is actually
needed
- Various functions that returned bool for errors, are now returning a Result
- Player configuration is now a custom type with more convenient API
- Player VideoInfo uses a Fraction instead of (u32,u32) for the framerate and
pixel-aspect-ratio
- VideoFrame API has more consistent API between writable and read-only
variants
- Buffer::copy_into() was added, and ::copy_region() now takes a
BufferCopyFlags parameter instead of always using the default flags
- ChildProxy::set_child_property() takes a &ToValue now to follow the API of
Object::set_property() and improve usability
- Proxy/GhostPad default pad functions use the correct specific pad type now
instead of a generic Pad
- Bus::add_signal_watch_full() takes a Priority for the priority instead of u32
- Clock::(un)adjust_with_calibration() takes no clock parameter anymore
### Removed
- FormatValue was removed in favour of GenericFormattedValue and the
connected traits and specific format impls
## [0.9.1] - 2017-11-26
### Fixed
- Export `FlowError`/`FlowSuccess`, `ClockError`/`ClockSuccess`,
`PadLinkError`/`PadLinkSuccess` too
## [0.9.0] - 2017-11-26
### Added
- Bindings for (outputting to) the GStreamer logging system
- Bindings for the GStreamer base library
- Bindings for all the `Pad` functions to override pad behaviour, and pad task
functions
- Bindings for `StaticCaps` and `StaticPadTemplate`
- Bindings for `deep-notify` signal on `Object`
- Support for directly creating `Error`/`Warning`/`Info` `Messages` and posting them
from an element with context information (file, line, module, etc.) similar
to the C `GST_ELEMENT_ERROR` macro
- Support for setting custom fields in `Messages`/`Events` during construction
- Support for creating Buffers out of anything that is `AsRef<[u8]>` or
`AsMut<[u8]>`
- Support for using the `Read` trait on `Adapter`
- Functions for getting all sink/src/all pads of an `Element`, and all children
of a `Bin`
- Builder for `Caps` and `Structures` in addition to the existing functions
- `AppSrc`/`AppSink` implement `BaseSrc`/`BaseSink` and `URIHandler`
- Rust ports of the basic tutorials 1 to 8 from
https://gstreamer.freedesktop.org/documentation/tutorials/
- "Getting started" and "Installation" sections to the README.md
- "dox" feature for generating documentation for all available configurations
### Fixed
- `StackTraceFlags` are only available since 1.12
- Worked around macOS requiring a `NSRunLoop` running on the main thread in all
examples and tutorials, to be able to show a window or anything else
### Changed
- `ClockTime` is now a wrapper around `Option<u64>` to handle the
`CLOCK_TIME_NONE` case better. This wrapper implements all the arithmetic
and other traits as needed and ensures that no accidential calculations with
`CLOCK_TIME_NONE` can happen
- "Values with format", like in `Duration`/`Position`/`Convert` queries or
`Seek` events now return a `FormatValue` type. This contains the actual
`Format` together with the value and does any required conversions. This
also makes it harder to accidentially mix e.g. values in bytes and time
- `PadProbeId` does not implement `Clone`/`Copy` anymore
- Property notify watches return a custom type instead of ulong
- `Error`/`Warning`/`Info` `Messages` can only be created with specific kinds of
`glib::Error` now. Using arbitrary ones does not work
- `Iterator` bindings were completely rewritten and provide the item type as a
generic type parameter now, greatly simplifying its usage
- All `glib::Values` are now `glib::SendValue` instead, e.g. in `Caps` and
`Structures`, as their content must be possible to send to different threads
safely
- `Message::get_src()` can return `None`
- Allow `None` as `Caps` in `AppSrc`/`AppSink`
- Allow everything implementing `Into<Option<&str>>` to be used as a pad name
- Moved `copy()` from `GstRc` directly to `MiniObject`
- Success/Error enums (like `FlowReturn`, `PadLinkReturn`, `StateChangeReturn`) now
implement an `into_result()` function that splits them into a `Result` with
the good and bad cases. Also mark them as `#[must_use]` to make it harder to
accidentially ignore errors.
- Error enums implement the `Error` trait
- Many examples use the `failure` crate for error handling now, cleaning up the
error handling code quite a bit
- Lots of other code cleanup, compiler/clippy warning cleanup, etc.
## [0.8.2] - 2017-11-11
### Fixed
- Implement StaticType of BufferRef instead of Buffer. Buffer aka
GstRc<BufferRef> already implements StaticType if BufferRef does, and
without this it was not possible to use Buffers in GValues.
- Free memory of the appsink/appsrc callbacks with the correct type. It was
crashing because of using the wrong type before.
- Fix documentation URLs in Cargo.toml.
### Added
- Installation instructions and links to documentation for getting started to
README.md.
## [0.8.1] - 2017-09-15
### Added
- Implement Send+Sync for Query, Message and Event, and their corresponding
Ref types.
### Fixed
- Constructor for gst_player::Player now works properly with GStreamer 1.12
when passing a video renderer or signal dispatcher. There was a reference
counting bug.
- Instead of returning &'static references from functions, return references
with a generic, unbound lifetime instead.
See https://github.com/rust-lang/rust/pull/42417#issue-233404573
- Various "unused external crate" warnings and clippy warnings everywhere.
### Changed
- Remove Cargo.lock from GIT, it's not very useful for library crates.
- Run everything through latest rustfmt-nightly.
- Use while-let (instead of loop and if-let) and CLOCK_TIME_NONE (instead of
u64::MAX) in the examples.
## 0.8.0 - 2017-08-31
- Initial release of the autogenerated GStreamer bindings. Older versions
(< 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.6...HEAD
[0.16.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.5...0.16.6
[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
[0.16.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.7...0.16.0
[0.15.7]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.6...0.15.7
[0.15.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.5...0.15.6
[0.15.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.4...0.15.5
[0.15.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.3...0.15.4
[0.15.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.2...0.15.3
[0.15.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.1...0.15.2
[0.15.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.0...0.15.1
[0.15.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.2...0.15.0
[0.14.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.1...0.14.2
[0.14.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.0...0.14.1
[0.14.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.13.0...0.14.0
[0.13.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.2...0.13.0
[0.12.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.1...0.12.2
[0.12.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.0...0.12.1
[0.12.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.6...0.12.0
[0.11.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.5...0.11.6
[0.11.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.4...0.11.5
[0.11.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.3...0.11.4
[0.11.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.2...0.11.3
[0.11.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.1...0.11.2
[0.11.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.0...0.11.1
[0.11.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.2...0.11.0
[0.10.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.1...0.10.2
[0.10.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.0...0.10.1
[0.10.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.9.1...0.10.0
[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.9.0...0.9.1
[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.1...0.9.0
[0.8.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.1...0.8.2
[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.0...0.8.1

View file

@ -0,0 +1 @@
../gstreamer/CHANGELOG.md

View file

@ -1,6 +1,6 @@
[package]
name = "gstreamer-editing-services"
version = "0.17.0"
version = "0.17.4"
authors = ["Thibault Saunier <tsaunier@igalia.com>", "Sebastian Dröge <sebastian@centricular.com>"]
categories = ["api-bindings", "multimedia"]
description = "Rust bindings for GStreamer Editing Services"
@ -15,12 +15,12 @@ edition = "2018"
[dependencies]
libc = "0.2"
bitflags = "1.0"
ffi = { package = "gstreamer-editing-services-sys", path = "sys", features = ["v1_8"]}
glib = { git = "https://github.com/gtk-rs/gtk-rs-core" }
gio = { git = "https://github.com/gtk-rs/gtk-rs-core" }
gst = { package = "gstreamer", path = "../gstreamer" }
gst-base = { package = "gstreamer-base", path = "../gstreamer-base" }
gst-pbutils = { package = "gstreamer-pbutils", path = "../gstreamer-pbutils" }
ffi = { package = "gstreamer-editing-services-sys", version = "0.17", path = "sys", features = ["v1_8"]}
glib = { version = "0.14" }
gio = { version = "0.14" }
gst = { package = "gstreamer", version = "0.17", path = "../gstreamer" }
gst-base = { package = "gstreamer-base", version = "0.17", path = "../gstreamer-base" }
gst-pbutils = { package = "gstreamer-pbutils", version = "0.17", path = "../gstreamer-pbutils" }
[features]
v1_10 = ["gst/v1_10", "gst-base/v1_10", "gst-pbutils/v1_10", "ffi/v1_10"]

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)

View file

@ -53,6 +53,7 @@ macro_rules! skip_assert_initialized {
#[allow(clippy::too_many_arguments)]
#[allow(clippy::match_same_arms)]
#[allow(clippy::use_self)]
#[allow(clippy::needless_borrow)]
mod auto;
pub use crate::auto::*;

View file

@ -1,181 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
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.9.1] - 2020-09-08
### Changed
- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any
API behind the "v1_18" feature is considered stable now.
## [0.9.0] - 2020-07-05
### Added
- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be
opted-in via the "v1_18" feature flag but there might still be API changes
in the newly added API.
### Changed
- Minimum supported GStreamer version is 1.8 now.
- The `system-deps` crate is now used for declaring the dependency on the C
libraries instead of directly using `pkg-config`.
### Fixed
- Various missing version markers were added, which should allow compilation
against GStreamer 1.8 on Windows again. On Windows missing symbols are
apparently an error even if they're not used.
- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent.
## [0.8.1] - 2019-12-16
### Added
- GStreamer RTP bindings
### Changed
- Update minimum supported Rust version to 1.36
- Update introspection data to GStreamer 1.16.2 release
## [0.8.0] - 2019-06-24
### Added
- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in
addition to GstGLDisplayEGL that existed before
### Changed
- Updated to GStreamer 1.16.0 .gir files, plus backported fixes
- Updated to latest gir
- Run all code through rustfmt after code generation
## [0.7.0] - 2019-02-22
### Added
- GstGL (OpenGL/GLES) bindings
### Changed
- Switch to Rust 1.31 as minimum supported version
- Generate GstVideoOverlayFormatFlags as flags type instead of enum
- Updates GstMpegts with various annotation fixes from GStreamer git master
## [0.6.1] - 2018-11-10
### Added
- GstCheck and GES (gstreamer editing services) bindings
### Changed
- Updated .gir files to 1.14.4 release
- All references were updated from GitHub to freedesktop.org GitLab
- Various functions take \*const instead of \*mut as parameters now
### Fixed
- Various functions and structs having pointer-of-array parameters/fields have
now fixed types. They were previously flat arrays instead of
pointer-of-arrays.
- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before
that
## [0.6.0] - 2018-09-08
### Changed
- Updated everything to GStreamer 1.14.2
- Various fixes to how the code generator is used
- Regenerate with latest GIR code generator
### Fixed
- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class
struct
- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys
- Removed unneeded dependencies from the code generator configuration files
## [0.5.0] - 2018-03-20
### Changed
- Updated everything to GStreamer 1.14.0
### Added
- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings
### Fixed
- Use external_libraries feature of gir to require less manual editing
- Remove some unused crates from dependencies
- Disale print_system_libs in calls to pkg-config to work better with
non-system installs of GStreamer
## [0.4.1] - 2018-02-18
### Fixed
- Fix native library name of GstNet bindings
## [0.4.0] - 2017-12-23
### Added
- GstNet bindings
- Debug impls for basically every type
- Script to automatically regenerate everything
### Changed
- gst_player_[sg]et_multiview_mode() argument types were changed from
GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset
of the former that is allowed here
- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead
of *mut *const c_char
## [0.3.0] - 2017-11-26
### Added
- GstMpegTs bindings
### Changed
- GstDebugColorFlags from an enum to a bitfield
- Updated to bitflags 1.0
- Added support for the "dox" feature to generate documentation for all
possible versions
- Depend on glib-sys/gobject-sys 0.5
### Fixes
- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since
1.12 and 1.12.1 respectively
- All C enums are represented as integers + constants now to prevent undefined
behaviour when out-of-range values are received
## [0.2.1] - 2017-09-10
### Changed
- Add README.md to all crates directly
### Fixed
- Fix various compiler warnings
- Fix versioning/feature mess. Now each library has features for all major
versions and for the correct minor versions that added API.
- Removed Cargo.lock from GIT
## [0.2.0] - 2017-08-28
### Added
- Add GstPlayer bindings
### Changed
- Depend on bitflags 0.9
- Update GIR files to 1.12.1 release
- Fix various errors in the GIR files, backported from GStreamer GIT master
- Depend on gobject-sys/glib-sys 0.4.0 for various improvements
- Regenerated everything with latest GIR
## [0.1.1] - 2017-05-10
### Added
- Add GstTag and GstApp bindings
- Add lots of missing fields to all the structs thanks to GIR improvements
### Changed
- Update GIR files to 1.12.0 release
- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs
- Regenerated everything with latest GIR
## 0.1.0 - 2017-04-09
- Initial release of the autogenerated GStreamer FFI bindings.
[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD
[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1
[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0
[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1
[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0
[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0
[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1
[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0
[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0
[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1
[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0
[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0
[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1
[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0
[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1

View file

@ -0,0 +1 @@
../../gstreamer/CHANGELOG.md

View file

@ -5,18 +5,20 @@ system-deps = "3"
libc = "0.2"
[dependencies.gio-sys]
git = "https://github.com/gtk-rs/gtk-rs-core"
version = "0.14"
[dependencies.glib-sys]
git = "https://github.com/gtk-rs/gtk-rs-core"
version = "0.14"
[dependencies.gobject-sys]
git = "https://github.com/gtk-rs/gtk-rs-core"
version = "0.14"
[dependencies.gstreamer-pbutils-sys]
version = "0.17"
path = "../../gstreamer-pbutils/sys"
[dependencies.gstreamer-sys]
version = "0.17"
path = "../../gstreamer/sys"
[dev-dependencies]
@ -51,7 +53,7 @@ links = "ges-1.0"
name = "gstreamer-editing-services-sys"
readme = "README.md"
repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
version = "0.17.0"
version = "0.17.4"
edition = "2018"
[package.metadata.docs.rs]
features = ["dox"]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#[cfg(not(feature = "dox"))]

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
@ -197,7 +197,7 @@ pub const GES_TIMELINE_ELEMENT_NO_LAYER_PRIORITY: u32 = 4294967295;
pub const GES_VERSION_MAJOR: c_int = 1;
pub const GES_VERSION_MICRO: c_int = 1;
pub const GES_VERSION_MINOR: c_int = 19;
pub const GES_VERSION_NANO: c_int = 0;
pub const GES_VERSION_NANO: c_int = 1;
// Flags
pub type GESMetaFlag = c_uint;

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
use gstreamer_editing_services_sys::*;
@ -1128,7 +1128,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
("GES_VERSION_MAJOR", "1"),
("GES_VERSION_MICRO", "1"),
("GES_VERSION_MINOR", "19"),
("GES_VERSION_NANO", "0"),
("GES_VERSION_NANO", "1"),
(
"(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL",
"45",

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#include "manual.h"

View file

@ -1,6 +1,6 @@
// Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 85bd06b)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#include "manual.h"

View file

@ -1,974 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
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.7] - 2021-02-13
### Fixed
- Usage of the logging system with a GStreamer library with the logging system
compiled out does not crash any longer.
- Double-free in `gst_video::VideoTimeCode` API when converting between
validated and unvalidated timecodes.
### Added
- `gst::Element::get_current_state()` and `get_pending_state()` convenience APIs.
- `gst_audio::AudioConverterConfig` for setting the configuration on e.g. the
`audiomixer` element. The low-level `AudioConverter` API is still not
included in the bindings.
## [0.16.6] - 2020-12-20
### Fixed
- `VideoTimeCodeInterval`'s `Ord` and `PartialEq` implementations compare
against the correct fields now.
- `SDPMessage::medias_mut()` iterator does not crash any longer.
### Added
- `PartialEq` and `Eq` implementations on `VideoAlignment`.
- Alignment API for `VideoMeta` and `get_plane_height()` / `get_plane_size()`.
- `VideoInfo::align_full()`.
## [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
`VideoFormat` iterators. Previously they returned the overall size instead
of the remaining size, and they didn't implement `Iterator::size_hint()`.
- Don't implement `ExactSizeIterator` on the buffer `gst::Meta` iterator. The
overall length is not known easily and the implementation would've simply
panicked in the past.
### Added
- `gst::ClockID::wait_async_stream()` for async integration for clock waiting.
- `From` / `TryFrom` impls for converting between `gst::ClockTime` and
`std::time::Duration`.
## [0.16.3] - 2020-09-08
### Fixed
- Reset vfuncs if calling `BaseTransformClass::configure()` multiple times.
- Fix `gst::debug_remove_default_log_function()` to actually remove the
default log function.
### Added
- Some more new APIs added in 1.18.
- API for getting an owned buffer from a readable `gst_video::VideoFrame` /
`VideoFrameRef`.
### Changed
- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any
API behind the "v1_18" feature is considered stable now.
- Factor out some common code from `gst::Pad::ProbeInfo` code. This reduces
the code generated for each pad probe considerably.
- Update paste dependency to 1.0 and pretty-hex to 0.2.
## [0.16.2] - 2020-07-27
### Fixed
- Use correct pointer for the plane data in `gst_audio::AudioBuffer`.
### Added
- Add `gst::GhostPad` convenience constructors that take a target pad, similar
to the ones that existed in 0.15 and before.
- Add `gst::parse_bin_from_description_with_name` that allows setting a name
for the created bin without having to use unsafe code in application code.
## [0.16.1] - 2020-07-10
### Fixed
- Allow calling `gst::DebugCategory::new()` before `gst::init()` again.
## [0.16.0] - 2020-07-06
### Added
- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be
opted-in via the "v1_18" feature flag but there might still be API changes
in the newly added API.
- `gst::MemoryRef::dump()` for dumping contents of a memory.
- `gst::Bus::stream()` instead of a custom constructor on the `BusStream`.
- Use more accurate types for `Seqnum`, `GroupId` and `MetaSeqnum`. These are
now proper wrapper types instead of plain integers, which makes mis-use
harder.
- Provide `TryFrom` impls for conversion between `glib::DateTime` and
`gst::DateTime`.
- Add `get_allocator()` functions to `gst_base::{Aggregator, BaseTransform,
BaseSrc}`, and allow overriding `BaseSrc::alloc()`.
- Add subclassing bindings for `gst_base::PushSrc`.
- Add new `gst::BufferCursor` API that allows to handle a buffer as `Read`,
`Write` and `Seek` and accesses the underlying memories of the buffer
individually without mapping them all together.
- Add `gst::Plugin::get_plugin_name()`.
- Support for `gst_video::VideoAFDMeta` and `VideoBarMeta`.
- API for getting all / iterating over all `gst_audio::AudioFormat` and
`gst_video::VideoFormat`.
- Bindings and subclassing bindings for `gst_video::VideoSink`.
- `gst::Pad` can be constructed via the builder pattern and `gst::PadBuilder`
now, which allows to safely set the pad functions and various other fields
during construction. The `PadBuilder` works on any `gst::Pad` subclass and
also has special support for `GhostPad`s by allowing to set pad functions of
the proxy pad.
- `gst::Message`, `gst::Event` and `gst::Query` type constructors are now on
the specific target type instead of various `new_XXX()` functions on the
basic type. E.g. `gst::message::Eos::new()`.
- Support for overriding `gst_audio::AudioSrc/Sink::reset()`.
- Support for overriding `gst_base::BaseParse::stop()`.
- Support for overriding `gst::Element::post_message()`.
- Added bindings for `gst::BufferList::foreach()` and `foreach_mut()`.
- Added bindings for `gst::Buffer::foreach_meta()` and `foreach_meta_mut()`.
### Fixed
- Allow using any `glib::Object` as target object for logging instead of just
`gst::Object`.
- Remove restriction API from `gst_pbutils::EncodingContainerProfile`. They
are supposed to be used only with the other encoding profiles.
- Return `&'static str` for various `gst::StructureRef` functions where the
string is backed by a `glib::Quark`.
- Fix various `gst::DateTime` functions to actually return `Option`s.
- Add support for filling in a buffer passed to the `gst::Pad` getrange
function, allow passing one in into `get_range()` and `pull_range()` and
provide the corresponding API on `gst_base::BaseSrc` too.
- Allocator in audio/video `Decoder` base classes is optional and can return
`None`.
- `gst_video::ValidVideoTimeCode::add_interval()` always returns a valid
timecode again.
- Allow resolving a `gst::Promise` with `None` and also handle that correctly
in the callback. This is allowed by the API.
- Allow calling various debugging related functions before `gst::init()`.
- Various enum/function versions were fixed to only show up if the
corresponding version feature is enabled.
- `gst::Pad` function setters are marked unsafe now as changing the functions
is not thread-safe.
- Remove `gst::Object::set_name()` as changing the name after construction
generally causes problems and is potentially unsafe.
- Remove `gst::Pad::set_pad_template()` as changing the pad template after
construction is generally unsafe.
- `gst::Pad::stream_lock()` borrows the pad now instead of taking a new
reference.
- Unimplemented `Jitter` and `Buffer` queries were removed from the bindings.
These are not implemented in C and only have a type registered.
- Various `LAST`, `NONE` variants of enums and flags were removed as these
only make sense in C.
- Call the parent impl of various vfuncs that were omitted before to not
require further subclasses of them to implement them but automatically call
the parent ones.
### Changed
- Use `NonZeroU64/U32` for various ID types to allow further optimizations.
- Use `thiserror` crate for deriving error types.
- Switch from `lazy_static` to `once_cell`.
- Change various miniobject functions like `gst::Caps::append()` from taking
the object by value to modifying it internally. This makes them easier to
use and only applies to functions that are defined on the non-reference type
and take ownership of the values passed in.
- Use `mem::ManuallyDrop` instead of `mem::forget()` everywhere.
- Replace most `mem::transmute()` calls with safer alternatives.
- `gst:StreamCollection` API was changed to the builder pattern for
construction as the collection must not be changed after construction.
- `gst::ProxyPad` default functions are plain functions on `ProxyPad` now
instead of trait functions to allow easier usage of them.
- Use proper error types in various `TryFrom` impls.
- `gst_video::VideoMeta::add()` returns a `Result` now instead of panicking.
- Various constructors were renamed from `new_with_XXX()` and `new_from_XXX()`
to the more idiomatic `with_XXX()` and `from_XXX()`.
- Miniobject bindings are simplified now and there is no `gst::GstRc` type
anymore, instead everything is directly implemented on the concrete types.
As part of this the `gst::MiniObject` trait was also removed as it was
unneeded now.
## [0.15.7] - 2020-06-08
### Fixed
- Allow multiple filter types per process with `gst::Iterator::filter()`.
- Check that `VideoInfo` is valid when creating a `VideoFrame`.
- Don't potentially dereference a `NULL` pointer when getting the format
from an invalid `VideoInfo` or `AudioInfo`.
- Don't unmap borrowed `VideoFrameRef`s.
### Added
- `gst::ProtectionMeta`, `gst_video::VideoAffineTransformationMeta`,
`VideoCropMeta` and `VideoRegionOfInterestMeta` bindings.
- Various new `gst_rtp::RTPBuffer` methods.
- `gst_audio::audio_buffer_truncate()`, `AudioMeta` and `AudioBuffer`
bindings.
## [0.15.6] - 2020-05-28
### Fixed
- Assert that the data passed to `VideoCaptionMeta::add()` is not empty.
- Don't store strong references to the object in the bus, appsink and appsrc
futures `Stream` / `Sink` adapters. This would keep them alive unnecessarily
and would prevent the `Stream` / `Sink` to ever "finish" on its own.
- Handle receiving a `None` reply in the change function of `gst::Promise`.
This is apparently valid. For backwards compatibility reasons this is
currently replaced with an empty structure but in 0.16 the API will
explicitly handle `None`.
### Added
- `gst::Stream::debug()` and `gst::StreamCollection::debug()` for converting
into a structured string with the actual contents of each.
- `gst::Structure::from_iter()` and `gst::Caps::from_iter()` to create
structures/caps from iterators.
- `gst::Event` support for getting/setting the `gst::Stream` in the
`StreamStart` event.
- `gst_video::calculate_display_ratio()` and `::guess_framerate()`.
- Various video related `gst::CapsFeatures` in `gst_video`.
- `TryFrom`/`From` impls for converting between `gst::Structure` and
`gst_video::VideoConverterConfig`.
- Various `glib::Value` trait impls for `SDPMessage`, `StructureRef`,
`CapsFeatureRef` and all borrowed variants of miniobjects to be able to
work with the borrowed, non-owned variants when handling `glib::Value`s.
## [0.15.5] - 2020-05-03
### Fixed
- Revert: Allow logging any `glib::Object` and not just `gst::Object`. This
broke API in subtile ways and needs to wait until 0.16
- Replace `%` in log output with `%%` to prevent accidental C formatting
- Add missing manual traits to the documentation
### Added
- `BufferRef::peek_memory_mut()` to give a mutable reference to a given memory
- Different iterators for iterating over the memories of a buffer
- Support for `gst_audio::AudioClippingMeta`
- `gst::Plugin::get_plugin_name()` was added
- `gst::Element::get_current_clock_time()` and
`gst::Element::get_current_running_time() helper functions
- `gst::State` and `StateChange` API for calculating next/previous state and
convert from/to the components of a state change
### Changed
- Use `mem::ManuallyDrop` instead of `mem::forget` everywhere
## [0.15.4] - 2020-03-09
### Fixed
- Allow logging any `glib::Object` and not just `gst::Object`
- Fix floating reference handling in `RTSPMedia::take_pipeline()`
- Hold `GMutex` guards for the remainder of the function and warn if they're
directly dropped
- Work around empty/any caps handling bugs in `Caps::fixate()`
### Added
- Add `BaseTransform::prepare_output_buffer()` subclassing support
- `RTSPServer`, `RTSPClient`, `RTSPMedia` and `RTSPMediaFactory` subclassing
support
- Handle panicking in `appsrc`/`appsink` callbacks by posting an error message
instead of killing the process
## [0.15.3] - 2020-02-15
### Fixed
- `UniqueFlowCombiner::clear()` should take a mutable reference.
- `AudioStreamAlign` doesn't require mutable references for getters anymore.
- Don't use bool return value of `gst_video_info_set_format()` and
`gst_video_info_align()` with GStreamer < 1.11.1 as it returned void back
then. We'd otherwise use some random value.
- Make `VideoInfo::align()` is available since 1.8.
- Fix changing/clearing of `AppSrc`, `AppSink` callbacks and `Bus` sync
handler. Before 1.16.3 this was not thread-safe and caused crashes. When
running with older versions changing them causes a panic now and unsetting
the bus sync handler has not effect. With newer versions it works correctly.
### Added
- Add `Clone` impls for `BufferPoolConfig` and `PlayerConfig`.
- Add `VideoConverter` bindings.
- Add `Future`s variant for `gst::Promise` constructor.
- Add `Future`s variant for `gst_video::convert_sample_async()`.
- Add `submit_input_buffer()`, `generate_output()`, `before_transform()`,
`copy_metadata()` and `transform_meta()` virtual method support for
`BaseTransform`.
- Add `AppSink` `Stream` adapter and `AppSrc` `Sink` adapter for integrating
both into Rust async contexts.
### Changed
- More generic implementations of `VideoFrame` / `VideoFrameRef` functions to
allow usage in more generic contexts.
## [0.15.2] - 2020-01-30
### Fixed
- Fix another race condition in the `gst::Bus` `Stream` that could cause it to
not wake up although a message is available.
## [0.15.1] - 2020-01-23
### Added
- Use static inner lifetime for `VideoCodecState<Readable>` so that it can be
stored safely on the heap.
- Getters/setters for `BinFlags` on `gst::Bin`.
- `gst::Caps::builder_full()` for building caps with multiple structures
conveniently.
- `gst::Element::call_async_future()` for asynchronously spawning a closure
and returning a `Future` for awaiting its return value.
### Fixed
- Various clippy warnings.
- Getters/setters for `PadFlags` on `gst::Pad` now provide the correct
behaviour.
- Take mutex before popping messages in the `gst::Bus` `Stream` to close a
small race condition that could cause it to not be woken up.
- `gst::ChildProxy` implementers do not have to provide `child_added()` and
`child_removed()` functions anymore but these are optional now.
- Manually implement `Debug` impls for various generic types where to `Debug`
impl should not depend on their type parameters also implementing `Debug`.
## [0.15.0] - 2019-12-18
### Added
- `StructureRef::get_optional()` for returning `None` if the field does not
exist instead of `Err`
- Bindings for `gstreamer-rtp` library, mostly `RTPBuffer`
- Support for writing `Preset`, `TagSetter`, `Clock`, `SystemClock` subclasses
- Bindings for `Typefind::get_length()`
- Bindings for `BaseSrcImpl::get_times()`
- Bindings (incl. subclassing) for `AudioSink` and `AudioSrc`
- Missing `Send`/`Sync` impl for various types
### Fixed
- Cleanup of cargo features/dependencies to improve build times
- Serde serialization with optional values.
Attention: This changes the format of the serialization!
- `VideoEncoder`/`VideoDecoder` `proxy_getcaps()` can't return `None`
- Use non-panicking UTF8 conversion in log handler. We don't want to panic
just because some C code printed a non-UTF8 string
- Re-rexport all traits from the crate level and also ensure that all traits
are actually included in the preludes
- Actually export `is_video_overlay_prepare_window_handle_message()` function
- Use `FnMut` for the `appsink` callbacks instead of `Fn`
- `Promise` change function returns the actual reply to the promise now
instead of just passing the promise itself
- Memory leak in `Iterator::filter()`
- `BinImpl::add()` takes ownership of floating references
- `DeviceImpl::create_element()` preserves floating flag
- `BinImpl::remove()` takes a strong reference of the element now as the last
reference might be owned by the bin and otherwise we would potentially have
a use-after-free afterwards
- `BaseParseFrame` and `VideoCodecFrame` take a `&mut self` now for various
functions that actually change the frame
### Changed
- Minimum supported Rust version is 1.39
- Allow passing `None` to `VideoEncoder::finish_frame()`
- Various `to_string()` methods were moved into the `Display` trait impl and
for some types `to_str()` was added to return a `&'static str`
- .gir files were updated to 1.16.2 release
- `Sample` constructor uses the builder pattern now
- `VideoMeta::add_full()` is simplified and requires parameters
- `BasetransformImpl::set_caps()` returns a `Result` instead of `bool`
- SDP data type getters for strings return an `Option` now as these can be
`None` in practice although not allowed by the SDP spec
- Various functions returning `Option`s were changed to return `Results` if
`None` actually signalled an error instead of just a missing value
### Removed
- "subclassing" and "futures" cargo features. These are enabled by default now
## [0.14.5] - 2019-09-17
### Added
- Support subclassing of `gst::Device`, `gst::DeviceProvider`,
`gst_audio::AudioDecoder` and `::AudioEncoder`
- Support for `Element::set_clock` and `::provide_clock` virtual methods
- `ElementClass::add_metadata` was added
- `gst_video::VideoDecoder` and `::VideoEncoder` got support for `get_caps`,
`negotiate`, `src/sink_query/event` and the `drain` virtual methods
- `Element::num_pads`, `::num_src_pads` and `::num_sink_pads` functions
- `gst_video::VideoDecoder` and `::VideoEncoder` got `get_allocator` bindings
- `gst::Iterator` implements `IntoIterator` now for providing
`std::iter::Iterator<Item=<Result<T, IteratorError>>` adapter
- Error macros for audio/video decoder subclasses to handle decoding errors
more gracefully and only actually error out after many consecutive errors
### Fixed
- Macros now also work in Rust 2018 edition without `#[macro_use]` but
explicit imports
- The log handler unit test runs reliable in parallel with other tests
- Manually implement `Debug` for `gst::Iterator` to allow it for any `T`
instead of `T: Debug`
- `Device::create_element` has correct reference count handling now
- Return `NotNegotiated` in the video codec base classes if setting the output
state fails instead of `Error`
## [0.14.4] - 2019-08-14
### Added
- Bindings for adding/removing custom log functions
- Bindings for `calculate_linear_regression()`
- Constants for base class custom flow returns
### Fixed
- Ownership of pad in `Element::release_pad()` virtual method implementations
## [0.14.3] - 2019-07-16
### Added
- `Buffer::unset_flags()` for unsetting specific buffer flags
- `VideoBufferFlags` flags type and `VideoBufferExt::set_video_flags()`,
`unset_video_flags()` and `get_video_flags()` for working with video buffer
flags from safe code.
### Fixed
- Setting buffer flags does not override arbitrary other flags anymore but
only sets the flags in question. This is necessary to not override extension
buffer flags like `gst_video::VideoBufferFlags`.
## [0.14.2] - 2019-07-15
### Added
- Support for `ReferenceTimestampMeta`
## [0.14.1] - 2019-07-06
### Added
- Various new WebRTC enum types from 1.14.1/1.16.0
### Fixed
- Correctly generate interlaced `VideoInfo` by using
`gst_video_info_set_interlaced_format()` instead of the generic function.
- serde serialization unit tests for `gst::format` succeed again now.
### Changed
- `Debug` impls for `VideoFormatInfo` and `AudioFormatInfo` now print all the
details of the format instead of only the name, and the `Debug` impls for
`VideoInfo` and `AudioInfo` also print the format now.
## [0.14.0] - 2019-06-24
### Added
- Bindings for `GLSyncMeta`.
- Bindings for setting/getting `TagScope` on a `TagList`
- Bindings for `GLDisplayWayland` and `GLDisplayX11` in addition to the
already existing `GLDisplayEGL`
- Bindings for `Bus::pop_filtered()` and related functions
- Bindings for getting/setting `Object`, `Element`, `Bin`, `Pipeline` and
`Plugin` flags
- Bindings for `VideoCaptionMeta`
- `Debug` impl of `Buffer` now also shows the metas of the buffers
- Expose flow return in `PadProbeInfo` for overriding the return value
- Bindings for `VideoDecoder` and `VideoEncoder`, including subclassing
support
- Bindings for `Memory`, `Allocator` and `VideoBufferPool`
- Bindings for `VideoFormatInfo::pack` and `::unpack` for format conversion
- Bindings for `BaseParse`, including subclassing support
- Various new arithmetic operation impls for fractions, formatted values and
`ClockTime`
- Bindings for `VideoInfo::align()`
### Changed
- The `SDPMessage` and `SDPMedia` bindings were completely rewritten as they
were broken before and caused crashes in various usages. As part of this
there's also some more convenience API available on these types, like
iterators for example, and API to modify the `SDPMedia` contained in a
`SDPMessage`.
- Update to GStreamer 1.16.
- Regenerate with latest gir.
- Run all autogenerated code through rustfmt after generation too.
- Updated to latest versions of GLib/GIO/etc crates.
- Updated to futures 0.3 / `std::future`
- `ProxyPad` default functions moved to an extension trait instead of plain
functions on `ProxyPad`, making them more in sync with the default `Pad`
functions
- GStreamer plugins are now exporting the new 1.14+ plugin symbols if they
were configured for GStreamer 1.14+
- Arithmetic operations on formatted values and `ClockTime` do overflow checks
now and replace the result with the `NONE` value on overflow
- `TryFrom`/`TryInto` traits are used in various places now instead of the
previous ad-hoc implementations of them.
- Registering element/typefind/device monitor factories requires passing a
value of `gst::Rank` now instead of an arbitrary `u32`
### Fixed
- Use correct type for destroying pad task closure data. This was previously
using the wrong type, causing crashes at runtime.
- `DeviceAdded`/`DeviceRemoved` message getters are transfer full so we don't
need to take an additional reference that would be leaked.
- `AppSink` callbacks are correctly marked as `Send` instead of `Send+Sync`,
allowing a wider range of closures to be used for them.
- Handle `PadProbeReturn::Handled` return values from pad probes more
correctly.
- `ToOwned::to_owned()` on miniobjects has to create copies instead of
only increasing the reference count. Otherwise it was possible to create
multiple mutable and immutable references to the same object at the same
time.
- Various functions take references to owned miniobjects instead of borrowed
references as it was otherwise possible to create multiple mutable or
immutable references to the same object at the same time.
- `URIHandler::set_uri` does not accept `None` anymore as this is not allowed
by the C function.
- Comparisons and addition of `TypeFindProbability` and `Rank` work correctly now
- Various `Display` implementations were fixed to not cause a stack overflow
due to infinite recursion anymore
- Various `::to_string()` functions don't take ownership of C strings anymore
that they do not own, which caused double frees before
### Removed
- MIKEY related bindings from the SDP library. The bindings were broken and
until someone needs them these are not available anymore.
## [0.13.0] - 2019-02-22
### Added
- Subclassing infrastructure was moved directly into the bindings,
making the `gst-plugin` crate deprecated. This involves many API
changes but generally cleans up code and makes it more flexible.
Take a look at the `gst-plugins-rs` crate for various examples.
- Bindings for GStreamer GL library
- Bindings for `CapsFeatures` and `Meta`
- Bindings for `ParentBufferMeta, `VideoMeta` and `VideoOverlayCompositionMeta`
- Bindings for `VideoOverlayComposition` and `VideoOverlayRectangle`
- Bindings for `VideoTimeCode`
- Bindings for `NetAddressMeta`
- Bindings for registering custom tags
- `UniqueFlowCombiner` and `UniqueAdapter` wrappers that make use of
the Rust compile-time mutability checks and expose more API in a safe
way, and as a side-effect implement `Sync` and `Send` now
- `Bus::add_watch_local()` and `gst_video::convert_frame_async_local()` that
allows to use a closure that does not implement `Send` but can only be
called from the thread owning the main context.
- More complete bindings for `Allocation` `Query`
- `pbutils` functions for codec descriptions
- `TagList::iter()` for iterating over all tags while getting a single
value per tag. The old `::iter_tag_list()` function was renamed to
`::iter_generic()` and still provides access to each value for a tag
- `Bus::iter()` and `Bus::iter_timed()` iterators around the
corresponding `::pop*()` functions
- Getters for `VideoColorimetry` to access its fields
- `Debug` impls for various missing types.
- serde serialization of `Value` can also handle `Buffer` now
- Extensive comments to all examples with explanations
- Transmuxing example showing how to use `typefind`, `multiqueue` and
dynamic pads
- basic-tutorial-12 was ported and added
### Changed
- Rust 1.31 is the minimum supported Rust version now
- Update to latest gir code generator and glib bindings
- Functions returning e.g. `gst::FlowReturn` or other "combined" enums
were changed to return split enums like `Result<gst::FlowSuccess,
gst::FlowError>` to allow usage of the standard Rust error handling.
- Various functions and callbacks returning `bool` or `Option<_>` were
changed to return a `Result<_, glib::BoolError>` or
`Result<_, gst::LoggableError>` or `Result<_, gst::ErrorMessage>` for
better integration with Rust's error handling infrastructure.
- Some infallible functions returning `bool` were changed to return `()`.
- `MiniObject` subclasses are now newtype wrappers around the
underlying `GstRc<FooRef>` wrapper. This does not change the
API in any breaking way for the current usages, but allows
`MiniObject`s to also be implemented in other crates and
makes sure `rustdoc` places the documentation in the right places.
- `BinExt` extension trait was renamed to `GstBinExt` to prevent
conflicts with `gtk::Bin` if both are imported
- `Buffer::from_slice()` can't possible return `None`
### Fixed
- `gst::tag::Album` is the album tag now instead of artist sortname
- Return `0` for the channel mask corresponding to negative
`AudioChannelPosition`s.
- `PartialOrd` and related traits are implemented via pointer equality on
`ClockId` instead of using the compare function. Two clock ids with the same
timestamp are not necessarily the same.
- Various functions that are actually fallible are now returning an
`Option<_>`.
- Various `clippy` warnings
## [0.12.2] - 2018-11-26
### Fixed
- PTP clock constructor actually creates a PTP instead of NTP clock
### Added
- Bindings for GStreamer Editing Services
- Bindings for GStreamer Check testing library
- Bindings for the encoding profile API (encodebin)
- VideoFrame, VideoInfo, AudioInfo, StructureRef implements Send and Sync now
- VideoFrame has a function to get the raw FFI pointer
- From impls from the Error/Success enums to the combined enums like
FlowReturn
- Bin-to-dot file functions were added to the Bin trait
- gst_base::Adapter implements SendUnique now
### Changed
- All references were updated from GitHub to freedesktop.org GitLab
- Fix various links in the README.md
- Link to the correct location for the documentation
- Remove GitLab badge as that only works with gitlab.com currently
## [0.12.1] - 2018-09-21
### Added
- More complete bindings for the gst_video::VideoOverlay interface, especially
gst_video::is_video_overlay_prepare_window_handle_message()
## [0.12.0] - 2018-09-08
### Added
- Bindings for the GStreamer SDP and WebRTC libraries
- Generic API for working with tags that is based on string tag names and
glib::Value for the tag values
- Bindings for Aggregator and AggregatorPad
- Bindings for BaseTransform/BaseSrc::get_buffer_pool()
- Optional serde implementations for the basic GStreamer data flow and metadata types
### Changed
- Use ptr::NonNull in various places
- Updated to muldiv 0.2, num-rational 0.2
- Bus::create_watch() can't return None
- Remove CallbackGuard as unwinding across FFI boundaries is not undefined
behaviour anymore but will directly cause a panic
- Changed from the futures to the futures-preview crate as an optional
dependency
- Various Caps operations take a &CapsRef instead of &Caps
- "deep-notify" signal takes the whole ParamSpec as parameter instead of only
the signal name
- Some structs were changed from empty struct to empty enums
- Pad probe code does not take an additional reference to the data anymore,
potentially passing writable events/buffers into the probe
- ValueExt::compare() is implemented around std::cmp::Ordering now instead of
a custom enum that was basically the same
### Fixed
- Pad::add_probe() can return None if an IDLE probe was already called and
removed in the meantime
- Various compiler and clippy warnings
### Removed
- std::Iterator impl for gst::Iterator. It was awkward to use because the
gst::Iterator could fail at each iteration
## [0.11.6] - 2018-08-27
### Fixed
- Build with NLL/two-phase borrows
- Explicitly define [bin] section for discoverer example to fix a cargo
warning
### Added
- Add unsafe gst::deinit() function
- Ord/PartialOrd impls on gst::Seqnum
- Getter for current pad mode
- gst::Pad::sticky_events_foreach() for iterating over all sticky events
in a thread-safe way
## [0.11.5] - 2018-07-24
### Fixed
- `gst::Bus`'s sync handler must unref every message if
`gst::BusSyncReply::Drop` is returned, otherwise they are all leaked
## [0.11.4] - 2018-07-19
### Fixed
- `gst::Caps::subtract()` does not leak its arguments anymore
- `gst::Caps::get_structure()` gracefully returns `None` if the index
is out of bounds instead of a `g_return_val_if_fail()`
- `gst::Structure::new()` has to give away ownership of the info structure
but didn't. For 0.11 we internally copy, in 0.12 it will take the info
structure by value
- Typefind tests don't fail anymore if the system has typefind factories
without caps
### Added
- An additional assertion that ensures that miniobjects are actually
writable before creating a mutable reference
## [0.11.3] - 2018-06-08
### Added
- `gst::Bus::remove_watch()` is now available to remove a bus watch again
- `fmt::Debug` impls for `AudioInfo` and `VideoInfo` were added
- `fmt::Debug` impls for mini objects also print the pointer value now to make
it easier to track them in debug logs
- `PlayerVisualization` has accessors for the name and description fields now,
without which there is no sensible way to use them or to set a player
visualization
## [0.11.2] - 2018-05-09
### Fixed
- Work-around various floating reference handling changes between 1.12 and
1.14 to be able to run with both versions without memory leaks or other
reference count problems.
This affects NetTimeProvider, BufferPool, DeviceMonitor, Stream,
StreamCollection, and Player, NetClientClock, NetClock, PtpClock which were
already previously fixed.
### Changed
- Change the appsrc need-data and all appsink callbacks to not require the
Sync bound anymore and change from Fn to FnMut. They can only be called from
a single thread at a time. This change is only done for the corresponding
callbacks, not the signals.
## [0.11.1] - 2018-04-07
### Fixed
- Fix Structure::to_string() to not run into an infinite recursion but call
the method on the contained StructureRef instead of on itself
## [0.11.0] - 2018-03-20
### Changed
- Updated everything to GStreamer 1.14.0
- Event, Message and Query types were refactored to improve usability.
Especially newly constructed queries allow to directly use the type-specific
functions to be used without first creating a view
- VideoFrameRef::copy_to_ref() and ::copy_plane_to_ref() are gone now and the
original functions work with refs instead of full frames
- PadProbeId and NotifyIds are not Copy/Clone anymore and are taken by value
- GstPlayer has GstObject as parent class now
### Added
- GstPbutils, GstSdp, GstRtsp and GstRtspServer bindings
- GstPromise, GstAudioStreamAlign and various other 1.14 API
- GstVideoFilter and GstBufferPool bindings
- Element::call_async()
- Debug impl For Toc and TocEntry
- Various new examples (RTP FEC, RTSP server, tag usage, ...)
### Fixed
- Memory leak in gst_video::convert_sample_async()
## [0.10.2] - 2018-02-18
### Fixed
- Fix building of messages with custom fields for types that don't have a
GstStructure
### Added
- VideoFrameRef::copy_to_ref() and ::copy_plane_to_ref(), which work with
VideoFrameRefs instead of full VideoFrames
- Getters for the BaseSrc/Sink/Transform configured segment
- Document the gstreamer-player-1.0 dependency in the README.md
## [0.10.1] - 2018-01-03
### Fixed
- Don't require &mut self for TagSetterExtManual::add()
### Added
- A TagSetter example application
- Bindings for gst_video::convert_sample() and ::convert_sample_async()
- Bindings for gst_video::VideoRectangle
- Debug impl for Sample and ::with_buffer_list() constructor
- A borrowing version of VideoFrame: VideoFrameRef
- Bindings for GstVideoFilter
### Changed
- Deprecated Sample::get_info() in favour of ::get_structure()
- Player has gst::Object as another parent class now
## [0.10.0] - 2017-12-22
### Fixed
- Various clippy warnings
- Memory leak of the tag list in Toc::merge_tags()
- Property getters use Values of the correct type
- Event::get_structure(), Message::get_structure() and
Query::get_structure() can return None for the structure
- Various other nullability fixes all over the API, changing functions to
accept Option<> or returning Option<>, or only plain types
- Functions taking paths/filenames now actually take Paths instead of &strs
- Element::remove_pad() is not giving away a new reference to the pad
anymore, which caused a memory leak of all pads ever removed
- Precision handling in ClockTime's Display impl
- Video/AudioInfo are only Send, not Sync
### Added
- Various enums now also derive useful traits like Copy, Clone and Hash in
addition to PartialEq, Eq and Debug
- TagList::merge() and insert() for combining tag lists
- EventType gained many useful functions to work with event types and
a PartialOrd impl to check expected event order of event types where it matters
- MessageRef/EventRef/QueryRef implement ToOwned
- Bindings for Registry and PluginFeature
- Event::set_running_time_offset() for adjusting the offset while events
pass through the pipeline
- Event/Message GroupIds and Seqnums now have a newtype wrapper around u32
instead of the plain value, making usage of them slightly more typesafe.
Also add an "invalid" value for both, as exists in latest GStreamer now.
- FormattedValue, GenericFormattedValue and related types were
implemented now, which allows more convenient and type-safe usage of
formatted values (time, bytes, etc)
- Bindings for force-keyunit and still-frame events were added
- MappedBuffer/BufferMap now implement various other useful traits, including
AsRef<[u8]>, AsMut, Deref, DerefMut, Debug, PartialEq and Eq
- Add VideoMultiviewFramePacking enum, and use it in Player
- Bindings for the GStreamer Net library, including PTP/NTP/network client
clocks and the GStreamer NetClock provider for network synchronization of
pipelines
- IteratorError implements std::error:Error
- Plugin::add_dependency() and ::add_dependency_simple() was added
- Rank and TypeFindProbability implement PartialOrd/Ord now
- Bindings for TypeFind, TypeFindFactory and the typefind helpers
- StreamCollection::iter() for iterating over all contained streams
- ErrorMessage type that can be used e.g. in a Result for passing an error
message from somewhere to upper layers to then be posted on an element the
same way gst_element_error!() would've done
### Changed
- Sample::new(), TagList::add(), Structure::set() and similar
functions take the values (ToSendValue impls) by reference instead of value.
They were not consumed by the function before.
- The Debug impls of various types, including Event/Buffer/Message/Query/Structure
were improved to print all the fields, similar to what GST_PTR_FORMAT would
do in C
- Switched to lazy_static 1.0
- Gap event and Duration tag are using ClockTimes now, as well as various
Player signals
- Segment is now based on a generic type FormattedSegment that can
take any format (time, bytes, etc) or a GenericFormattedValue for more
type-safety and convenience. Also functions for "casting" between a generic
segment and a segment with a specific format exist on this now
- AppSrc and AppSink now have a builder for the callbacks, making it
unnecessary to always provide all callbacks even if only one is actually
needed
- Various functions that returned bool for errors, are now returning a Result
- Player configuration is now a custom type with more convenient API
- Player VideoInfo uses a Fraction instead of (u32,u32) for the framerate and
pixel-aspect-ratio
- VideoFrame API has more consistent API between writable and read-only
variants
- Buffer::copy_into() was added, and ::copy_region() now takes a
BufferCopyFlags parameter instead of always using the default flags
- ChildProxy::set_child_property() takes a &ToValue now to follow the API of
Object::set_property() and improve usability
- Proxy/GhostPad default pad functions use the correct specific pad type now
instead of a generic Pad
- Bus::add_signal_watch_full() takes a Priority for the priority instead of u32
- Clock::(un)adjust_with_calibration() takes no clock parameter anymore
### Removed
- FormatValue was removed in favour of GenericFormattedValue and the
connected traits and specific format impls
## [0.9.1] - 2017-11-26
### Fixed
- Export `FlowError`/`FlowSuccess`, `ClockError`/`ClockSuccess`,
`PadLinkError`/`PadLinkSuccess` too
## [0.9.0] - 2017-11-26
### Added
- Bindings for (outputting to) the GStreamer logging system
- Bindings for the GStreamer base library
- Bindings for all the `Pad` functions to override pad behaviour, and pad task
functions
- Bindings for `StaticCaps` and `StaticPadTemplate`
- Bindings for `deep-notify` signal on `Object`
- Support for directly creating `Error`/`Warning`/`Info` `Messages` and posting them
from an element with context information (file, line, module, etc.) similar
to the C `GST_ELEMENT_ERROR` macro
- Support for setting custom fields in `Messages`/`Events` during construction
- Support for creating Buffers out of anything that is `AsRef<[u8]>` or
`AsMut<[u8]>`
- Support for using the `Read` trait on `Adapter`
- Functions for getting all sink/src/all pads of an `Element`, and all children
of a `Bin`
- Builder for `Caps` and `Structures` in addition to the existing functions
- `AppSrc`/`AppSink` implement `BaseSrc`/`BaseSink` and `URIHandler`
- Rust ports of the basic tutorials 1 to 8 from
https://gstreamer.freedesktop.org/documentation/tutorials/
- "Getting started" and "Installation" sections to the README.md
- "dox" feature for generating documentation for all available configurations
### Fixed
- `StackTraceFlags` are only available since 1.12
- Worked around macOS requiring a `NSRunLoop` running on the main thread in all
examples and tutorials, to be able to show a window or anything else
### Changed
- `ClockTime` is now a wrapper around `Option<u64>` to handle the
`CLOCK_TIME_NONE` case better. This wrapper implements all the arithmetic
and other traits as needed and ensures that no accidential calculations with
`CLOCK_TIME_NONE` can happen
- "Values with format", like in `Duration`/`Position`/`Convert` queries or
`Seek` events now return a `FormatValue` type. This contains the actual
`Format` together with the value and does any required conversions. This
also makes it harder to accidentially mix e.g. values in bytes and time
- `PadProbeId` does not implement `Clone`/`Copy` anymore
- Property notify watches return a custom type instead of ulong
- `Error`/`Warning`/`Info` `Messages` can only be created with specific kinds of
`glib::Error` now. Using arbitrary ones does not work
- `Iterator` bindings were completely rewritten and provide the item type as a
generic type parameter now, greatly simplifying its usage
- All `glib::Values` are now `glib::SendValue` instead, e.g. in `Caps` and
`Structures`, as their content must be possible to send to different threads
safely
- `Message::get_src()` can return `None`
- Allow `None` as `Caps` in `AppSrc`/`AppSink`
- Allow everything implementing `Into<Option<&str>>` to be used as a pad name
- Moved `copy()` from `GstRc` directly to `MiniObject`
- Success/Error enums (like `FlowReturn`, `PadLinkReturn`, `StateChangeReturn`) now
implement an `into_result()` function that splits them into a `Result` with
the good and bad cases. Also mark them as `#[must_use]` to make it harder to
accidentially ignore errors.
- Error enums implement the `Error` trait
- Many examples use the `failure` crate for error handling now, cleaning up the
error handling code quite a bit
- Lots of other code cleanup, compiler/clippy warning cleanup, etc.
## [0.8.2] - 2017-11-11
### Fixed
- Implement StaticType of BufferRef instead of Buffer. Buffer aka
GstRc<BufferRef> already implements StaticType if BufferRef does, and
without this it was not possible to use Buffers in GValues.
- Free memory of the appsink/appsrc callbacks with the correct type. It was
crashing because of using the wrong type before.
- Fix documentation URLs in Cargo.toml.
### Added
- Installation instructions and links to documentation for getting started to
README.md.
## [0.8.1] - 2017-09-15
### Added
- Implement Send+Sync for Query, Message and Event, and their corresponding
Ref types.
### Fixed
- Constructor for gst_player::Player now works properly with GStreamer 1.12
when passing a video renderer or signal dispatcher. There was a reference
counting bug.
- Instead of returning &'static references from functions, return references
with a generic, unbound lifetime instead.
See https://github.com/rust-lang/rust/pull/42417#issue-233404573
- Various "unused external crate" warnings and clippy warnings everywhere.
### Changed
- Remove Cargo.lock from GIT, it's not very useful for library crates.
- Run everything through latest rustfmt-nightly.
- Use while-let (instead of loop and if-let) and CLOCK_TIME_NONE (instead of
u64::MAX) in the examples.
## 0.8.0 - 2017-08-31
- Initial release of the autogenerated GStreamer bindings. Older versions
(< 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.6...HEAD
[0.16.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.16.5...0.16.6
[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
[0.16.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.7...0.16.0
[0.15.7]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.6...0.15.7
[0.15.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.5...0.15.6
[0.15.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.4...0.15.5
[0.15.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.3...0.15.4
[0.15.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.2...0.15.3
[0.15.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.1...0.15.2
[0.15.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.15.0...0.15.1
[0.15.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.2...0.15.0
[0.14.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.1...0.14.2
[0.14.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.14.0...0.14.1
[0.14.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.13.0...0.14.0
[0.13.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.2...0.13.0
[0.12.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.1...0.12.2
[0.12.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.12.0...0.12.1
[0.12.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.6...0.12.0
[0.11.6]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.5...0.11.6
[0.11.5]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.4...0.11.5
[0.11.4]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.3...0.11.4
[0.11.3]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.2...0.11.3
[0.11.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.1...0.11.2
[0.11.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.11.0...0.11.1
[0.11.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.2...0.11.0
[0.10.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.1...0.10.2
[0.10.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.10.0...0.10.1
[0.10.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.9.1...0.10.0
[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.9.0...0.9.1
[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.1...0.9.0
[0.8.2]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.1...0.8.2
[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/compare/0.8.0...0.8.1

Some files were not shown because too many files have changed in this diff Show more