Compare commits

...

11 commits
main ... 0.1.2

Author SHA1 Message Date
Sebastian Dröge 6c7e00e5f6 Update version to 0.1.2 2018-01-03 17:52:16 +02:00
Sebastian Dröge d2f47ee09e Update CHANGELOG.md for 0.1.2 2018-01-03 17:50:51 +02:00
Sebastian Dröge d25866d7c6 Also the default BaseTransform::transform_caps() should not take the caps parameter owned 2018-01-03 17:50:08 +02:00
Sebastian Dröge 7ae687740d Update version to 0.1.1 2018-01-03 17:14:06 +02:00
Sebastian Dröge 6b553c058f Update CHANGELOG.md for 0.1.1 2018-01-03 17:14:06 +02:00
Sebastian Dröge 1a5d1b2071 Caps in BaseTransform::transform_caps() are not owned 2018-01-03 17:14:06 +02:00
Sebastian Dröge 91c2c58a65 audioecho: Minor cleanup and move code to the right place
And move rejection of max-delay changes when we're started from the
property getter to the setter where it should be. We can always *get*
the current value, just not set it.
2018-01-03 17:14:06 +02:00
Sebastian Dröge 292ab63558 Use gst_element_error!() instead of Element::post_error_message(&gst_error_msg!(...)) 2018-01-03 17:14:06 +02:00
Sebastian Dröge fd54eea586 Fix documentation URL 2017-12-22 16:29:36 +02:00
Sebastian Dröge ffca043df3 Add CHANGELOG.md to gst-plugin 2017-12-22 16:20:37 +02:00
Sebastian Dröge 1b153ee597 Update versions of all dependencies and point to releases instead of GIT 2017-12-22 16:03:18 +02:00
12 changed files with 70 additions and 56 deletions

View file

@ -1,16 +1,16 @@
[package] [package]
name = "gst-plugin-audiofx" name = "gst-plugin-audiofx"
version = "0.1.0" version = "0.1.2"
authors = ["Sebastian Dröge <sebastian@centricular.com>"] authors = ["Sebastian Dröge <sebastian@centricular.com>"]
repository = "https://github.com/sdroege/gst-plugin-rs" repository = "https://github.com/sdroege/gst-plugin-rs"
license = "MIT/Apache-2.0" license = "MIT/Apache-2.0"
[dependencies] [dependencies]
gst-plugin = { path="../gst-plugin" } gst-plugin = { version = "0.1", path="../gst-plugin" }
glib = { git = "https://github.com/gtk-rs/glib" } glib = "0.4"
gstreamer = { git = "https://github.com/sdroege/gstreamer-rs", features = ["v1_10"] } gstreamer = { version = "0.10", features = ["v1_10"] }
gstreamer-base = { git = "https://github.com/sdroege/gstreamer-rs", features = ["v1_10"] } gstreamer-base = { version = "0.10", features = ["v1_10"] }
gstreamer-audio = { git = "https://github.com/sdroege/gstreamer-rs", features = ["v1_10"] } gstreamer-audio = { version = "0.10", features = ["v1_10"] }
byte-slice-cast = "0.1" byte-slice-cast = "0.1"
num-traits = "0.1" num-traits = "0.1"

View file

@ -98,9 +98,9 @@ impl AudioEcho {
fn new(_transform: &BaseTransform) -> Self { fn new(_transform: &BaseTransform) -> Self {
Self { Self {
cat: gst::DebugCategory::new( cat: gst::DebugCategory::new(
"rsaudiofx", "rsaudioecho",
gst::DebugColorFlags::empty(), gst::DebugColorFlags::empty(),
"Rust audiofx effect", "Rust audioecho effect",
), ),
settings: Mutex::new(Default::default()), settings: Mutex::new(Default::default()),
state: Mutex::new(None), state: Mutex::new(None),
@ -180,7 +180,9 @@ impl ObjectImpl<BaseTransform> for AudioEcho {
match *prop { match *prop {
Property::UInt64("max-delay", ..) => { Property::UInt64("max-delay", ..) => {
let mut settings = self.settings.lock().unwrap(); let mut settings = self.settings.lock().unwrap();
settings.max_delay = value.get().unwrap(); if self.state.lock().unwrap().is_none() {
settings.max_delay = value.get().unwrap();
}
} }
Property::UInt64("delay", ..) => { Property::UInt64("delay", ..) => {
let mut settings = self.settings.lock().unwrap(); let mut settings = self.settings.lock().unwrap();
@ -204,11 +206,7 @@ impl ObjectImpl<BaseTransform> for AudioEcho {
match *prop { match *prop {
Property::UInt64("max-delay", ..) => { Property::UInt64("max-delay", ..) => {
let settings = self.settings.lock().unwrap(); let settings = self.settings.lock().unwrap();
if self.state.lock().unwrap().is_none() { Ok(settings.max_delay.to_value())
Ok(settings.max_delay.to_value())
} else {
Err(())
}
} }
Property::UInt64("delay", ..) => { Property::UInt64("delay", ..) => {
let settings = self.settings.lock().unwrap(); let settings = self.settings.lock().unwrap();

View file

@ -1,15 +1,15 @@
[package] [package]
name = "gst-plugin-file" name = "gst-plugin-file"
version = "0.1.0" version = "0.1.2"
authors = ["Sebastian Dröge <sebastian@centricular.com>"] authors = ["Sebastian Dröge <sebastian@centricular.com>"]
repository = "https://github.com/sdroege/gst-plugin-rs" repository = "https://github.com/sdroege/gst-plugin-rs"
license = "MIT/Apache-2.0" license = "MIT/Apache-2.0"
[dependencies] [dependencies]
url = "1.1" url = "1.1"
gst-plugin = { path="../gst-plugin" } gst-plugin = { version = "0.1", path="../gst-plugin" }
gst-plugin-simple = { path="../gst-plugin-simple" } gst-plugin-simple = { path = "../gst-plugin-simple" }
gstreamer = { git = "https://github.com/sdroege/gstreamer-rs", features = ["v1_10"] } gstreamer = { version = "0.10", features = ["v1_10"] }
[lib] [lib]
name = "gstrsfile" name = "gstrsfile"

View file

@ -1,18 +1,18 @@
[package] [package]
name = "gst-plugin-flv" name = "gst-plugin-flv"
version = "0.1.0" version = "0.1.2"
authors = ["Sebastian Dröge <sebastian@centricular.com>"] authors = ["Sebastian Dröge <sebastian@centricular.com>"]
repository = "https://github.com/sdroege/gst-plugin-rs" repository = "https://github.com/sdroege/gst-plugin-rs"
license = "MIT/Apache-2.0" license = "MIT/Apache-2.0"
[dependencies] [dependencies]
url = "1.1" url = "1.1"
gst-plugin = { path="../gst-plugin" } gst-plugin = { version = "0.1", path="../gst-plugin" }
gst-plugin-simple = { path="../gst-plugin-simple" } gst-plugin-simple = { path="../gst-plugin-simple" }
gstreamer = { git = "https://github.com/sdroege/gstreamer-rs", features = ["v1_10"] } gstreamer = { version = "0.10", features = ["v1_10"] }
num-rational = { version = "0.1", default-features = false, features = [] } num-rational = { version = "0.1", default-features = false, features = [] }
nom = "3.0" nom = "3.0"
flavors = {git = "https://github.com/rust-av/flavors.git"} flavors = { git = "https://github.com/rust-av/flavors.git" }
muldiv = "0.1" muldiv = "0.1"
[lib] [lib]

View file

@ -1,16 +1,16 @@
[package] [package]
name = "gst-plugin-http" name = "gst-plugin-http"
version = "0.1.0" version = "0.1.2"
authors = ["Sebastian Dröge <sebastian@centricular.com>"] authors = ["Sebastian Dröge <sebastian@centricular.com>"]
repository = "https://github.com/sdroege/gst-plugin-rs" repository = "https://github.com/sdroege/gst-plugin-rs"
license = "MIT/Apache-2.0" license = "MIT/Apache-2.0"
[dependencies] [dependencies]
url = "1.1" url = "1.1"
gst-plugin = { path="../gst-plugin" } gst-plugin = { version = "0.1", path="../gst-plugin" }
gst-plugin-simple = { path="../gst-plugin-simple" } gst-plugin-simple = { path="../gst-plugin-simple" }
reqwest = "0.8" reqwest = "0.8"
gstreamer = { git = "https://github.com/sdroege/gstreamer-rs", features = ["v1_10"] } gstreamer = { version = "0.10", features = ["v1_10"] }
[lib] [lib]
name = "gstrshttp" name = "gstrshttp"

View file

@ -1,16 +1,16 @@
[package] [package]
name = "gst-plugin-simple" name = "gst-plugin-simple"
version = "0.1.0" version = "0.1.2"
authors = ["Sebastian Dröge <sebastian@centricular.com>"] authors = ["Sebastian Dröge <sebastian@centricular.com>"]
repository = "https://github.com/sdroege/gst-plugin-rs" repository = "https://github.com/sdroege/gst-plugin-rs"
license = "MIT/Apache-2.0" license = "MIT/Apache-2.0"
[dependencies] [dependencies]
url = "1.1" url = "1.1"
glib = { git = "https://github.com/gtk-rs/glib" } glib = "0.4"
gst-plugin = { path="../gst-plugin" } gst-plugin = { version = "0.1", path="../gst-plugin" }
gstreamer = { git = "https://github.com/sdroege/gstreamer-rs", features = ["v1_10"] } gstreamer = { version = "0.10", features = ["v1_10"] }
gstreamer-base = { git = "https://github.com/sdroege/gstreamer-rs", features = ["v1_10"] } gstreamer-base = { version = "0.10", features = ["v1_10"] }
[lib] [lib]
name = "gst_plugin_simple" name = "gst_plugin_simple"

View file

@ -168,10 +168,7 @@ impl BaseSinkImpl<BaseSink> for Sink {
} }
(None, _) => { (None, _) => {
gst_error!(self.cat, obj: sink, "No URI given"); gst_error!(self.cat, obj: sink, "No URI given");
sink.post_error_message(&gst_error_msg!( gst_element_error!(sink, gst::ResourceError::OpenRead, ["No URI given"]);
gst::ResourceError::OpenRead,
["No URI given"]
));
return false; return false;
} }
}; };

View file

@ -187,10 +187,7 @@ impl BaseSrcImpl<BaseSrc> for Source {
} }
(None, _) => { (None, _) => {
gst_error!(self.cat, obj: src, "No URI given"); gst_error!(self.cat, obj: src, "No URI given");
src.post_error_message(&gst_error_msg!( gst_element_error!(src, gst::ResourceError::OpenRead, ["No URI given"]);
gst::ResourceError::OpenRead,
["No URI given"]
));
return false; return false;
} }
}; };

View file

@ -1,16 +1,16 @@
[package] [package]
name = "gst-plugin-togglerecord" name = "gst-plugin-togglerecord"
version = "0.1.0" version = "0.1.2"
authors = ["Sebastian Dröge <sebastian@centricular.com>"] authors = ["Sebastian Dröge <sebastian@centricular.com>"]
license = "LGPL-2.1+" license = "LGPL-2.1+"
[dependencies] [dependencies]
glib = { git = "https://github.com/gtk-rs/glib" } glib = "0.4"
gstreamer = { git = "https://github.com/sdroege/gstreamer-rs", features = ["v1_10"] } gstreamer = { version = "0.10", features = ["v1_10"] }
gstreamer-video = { git = "https://github.com/sdroege/gstreamer-rs", features = ["v1_10"] } gstreamer-video = { version = "0.10", features = ["v1_10"] }
gst-plugin = { path = "../gst-plugin" } gst-plugin = { version = "0.1", path = "../gst-plugin" }
gtk = { git = "https://github.com/gtk-rs/gtk", features = ["v3_6"], optional = true } gtk = { version = "0.3", features = ["v3_6"], optional = true }
gio = { git = "https://github.com/gtk-rs/gio", optional = true } gio = { version = "0.3", optional = true }
send-cell = { version = "0.1", optional = true } send-cell = { version = "0.1", optional = true }
[dev-dependencies] [dev-dependencies]

21
gst-plugin/CHANGELOG.md Normal file
View file

@ -0,0 +1,21 @@
# 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.1.2] - 2018-01-03
### Fixed
- BaseTransform::transform_caps() caps parameter is not owned when chainging
to the parent class' implementation either
## [0.1.1] - 2018-01-03
### Fixed
- BaseTransform::transform_caps() caps parameter is not owned
## [0.1.0] - 2017-12-22
- Initial release of the `gst-plugin` crate.
[Unreleased]: https://github.com/sdroege/gstreamer-rs/compare/0.1.1...HEAD
[0.1.0]: https://github.com/sdroege/gstreamer-rs/compare/0.1.0...0.1.1

View file

@ -1,6 +1,6 @@
[package] [package]
name = "gst-plugin" name = "gst-plugin"
version = "0.1.0" version = "0.1.2"
authors = ["Sebastian Dröge <sebastian@centricular.com>"] authors = ["Sebastian Dröge <sebastian@centricular.com>"]
categories = ["multimedia"] categories = ["multimedia"]
description = "Infrastructure for writing GStreamer plugins in Rust" description = "Infrastructure for writing GStreamer plugins in Rust"
@ -8,20 +8,20 @@ repository = "https://github.com/sdroege/gst-plugin-rs/gst-plugin"
license = "MIT/Apache-2.0" license = "MIT/Apache-2.0"
readme = "README.md" readme = "README.md"
homepage = "https://gstreamer.freedesktop.org" homepage = "https://gstreamer.freedesktop.org"
documentation = "https://sdroege.github.io/rustdoc/gst-plugin/gst_plugin_rs" documentation = "https://sdroege.github.io/rustdoc/gst-plugin/gst_plugin/"
keywords = ["gstreamer", "multimedia", "audio", "video", "gnome"] keywords = ["gstreamer", "multimedia", "audio", "video", "gnome"]
[dependencies] [dependencies]
libc = "0.2" libc = "0.2"
lazy_static = "1.0" lazy_static = "1.0"
byteorder = "1.0" byteorder = "1.0"
glib-sys = { git = "https://github.com/gtk-rs/sys" } glib-sys = "0.5"
gobject-sys = { git = "https://github.com/gtk-rs/sys" } gobject-sys = "0.5"
gstreamer-sys = { git = "https://github.com/sdroege/gstreamer-sys", features = ["v1_10"] } gstreamer-sys = { version = "0.4", features = ["v1_10"] }
gstreamer-base-sys = { git = "https://github.com/sdroege/gstreamer-sys", features = ["v1_10"] } gstreamer-base-sys = { version = "0.4", features = ["v1_10"] }
glib = { git = "https://github.com/gtk-rs/glib" } glib = "0.4"
gstreamer = { git = "https://github.com/sdroege/gstreamer-rs", features = ["v1_10"] } gstreamer = { version = "0.10", features = ["v1_10"] }
gstreamer-base = { git = "https://github.com/sdroege/gstreamer-rs" } gstreamer-base = { version = "0.10" }
[lib] [lib]
name = "gst_plugin" name = "gst_plugin"

View file

@ -121,7 +121,7 @@ pub unsafe trait BaseTransformBase
Some(f) => from_glib_full(f( Some(f) => from_glib_full(f(
self.to_glib_none().0, self.to_glib_none().0,
direction.to_glib(), direction.to_glib(),
caps.into_ptr(), caps.to_glib_none().0,
filter.to_glib_none().0, filter.to_glib_none().0,
)), )),
None => caps, None => caps,
@ -471,7 +471,8 @@ where
imp.transform_caps( imp.transform_caps(
&wrap, &wrap,
from_glib(direction), from_glib(direction),
from_glib_full(caps), // FIXME: Should be &from_glib_borrow()
from_glib_none(caps),
filter.as_ref(), filter.as_ref(),
) )
}).into_ptr() }).into_ptr()