Commit graph

182 commits

Author SHA1 Message Date
Sebastian Dröge 714301d584 Don't require GStreamer 1.10
We're working just fine with 1.8 too
2018-01-15 09:34:53 +02:00
Sebastian Dröge fc5e2ae03a Update CHANGELOG.md for 0.1.2 2018-01-03 17:51:15 +02:00
Sebastian Dröge b9f6d9dc34 Pass caps by reference to BaseTransform::transform_caps() 2018-01-03 17:49:46 +02:00
Sebastian Dröge 8a41656f40 Also the default BaseTransform::transform_caps() should not take the caps parameter owned 2018-01-03 17:48:59 +02:00
Sebastian Dröge 8df8b68555 Update CHANGELOG.md for 0.1.1 2018-01-03 17:13:26 +02:00
Sebastian Dröge 3aa3d826c3 Add CHANGELOG.md to gst-plugin 2018-01-03 17:13:17 +02:00
Sebastian Dröge 43d38d0951 Caps in BaseTransform::transform_caps() are not owned 2018-01-02 19:28:43 +02:00
Aleksey Ivanov 67edf375f3 [Close #24] Update repository link 2017-12-22 23:39:22 +02:00
Sebastian Dröge 000da42b5c Fix documentation URL 2017-12-22 16:29:51 +02:00
Sebastian Dröge 2decd553d7 Update README.md and include it in the gst-plugin crate too 2017-12-22 15:56:48 +02:00
Sebastian Dröge 723409e05a Update gst-plugin Cargo.toml with lots of metadata 2017-12-22 15:41:24 +02:00
Sebastian Dröge 3fe6e1ab18 Add support for adding signals/action-signals 2017-12-20 22:22:19 +02:00
Sebastian Dröge c1ca7902f1 Don't panic when getting a property failed 2017-12-20 21:57:25 +02:00
Sebastian Dröge bda421d218 Move more things into gst-plugin-simple 2017-12-20 21:53:43 +02:00
Sebastian Dröge 22c5f93d3b Fix various clippy warnings 2017-12-20 21:36:50 +02:00
Sebastian Dröge 07ce2d64b8 Use the Into trait instead of custom into_*() functions 2017-12-20 20:13:31 +02:00
Sebastian Dröge 80a2c5033f Use ErrorMessage from gstreamer bindings 2017-12-20 20:05:04 +02:00
Sebastian Dröge cbfb30c7b5 Run everything through rustfmt again 2017-12-20 19:30:32 +02:00
Sebastian Dröge 8e1428c047 Implement Error/Display for AdapterError 2017-12-20 19:18:32 +02:00
Sebastian Dröge a99522150b Remove unused utils module 2017-12-20 19:16:14 +02:00
Sebastian Dröge 841252c5f7 Fix compilation after gstreamer-rs API changes 2017-12-16 17:42:32 +02:00
Sebastian Dröge cea5d4d03e Require fallback value in Element::catch_panic() to be given as closure 2017-12-04 21:49:27 +02:00
Sebastian Dröge ac09ae7d73 Never fail downwards state changes
This causes bugs in GStreamer and leads to crashes and deadlocks
2017-12-04 21:45:03 +02:00
Sebastian Dröge 083371866a Add helper function that allows to catch panics and poison the element 2017-12-04 21:30:10 +02:00
Sebastian Dröge b3725312c4 Update to lazy_static 1.0 2017-12-04 11:12:32 +02:00
Sebastian Dröge 2fb3952aa2 Element::request_new_pad() is (transfer none) in the return value
Which is effectively unsafe, but nothing we can do about that right now
without leaking all pads.

https://bugzilla.gnome.org/show_bug.cgi?id=791193
2017-12-04 11:08:16 +02:00
Sebastian Dröge a271b18c09 Take ownership of any floating references in Bin::add/remove_element() 2017-11-27 17:26:43 +02:00
Sebastian Dröge 3f1eb96da9 Add support for creating Pipeline subclasses 2017-11-27 15:08:24 +02:00
Sebastian Dröge b55a24c929 Add support for creating Bin subclasses 2017-11-27 15:08:24 +02:00
Sebastian Dröge 22ab56895d Remove Rs prefix from everything
We have proper namespaces in Rust
2017-11-20 13:23:30 +02:00
Sebastian Dröge 656dc990f8 Require a get_type() function for boxed/object properties
Otherwise storing the properties in a static array is not possible
2017-11-20 12:30:21 +02:00
Sebastian Dröge 768b68f94a Fix up Adapter's WouldBlock error message
With the correct values of requested and available bytes.
2017-11-06 23:25:09 +02:00
Thibault Saunier 9158c2c8e1 adapter: Implement the Read trait 2017-11-06 11:51:04 +02:00
Sebastian Dröge 176e07bf0a Move properties code to a separate file 2017-10-19 11:06:19 +02:00
Sebastian Dröge 443abffa73 Run everything through latest rustfmt-nightly 2017-10-17 12:21:53 +03:00
Sebastian Dröge 4b97d56949 Fix compilation after GstRc<T>::get_mut() API fixes in gstreamer-rs 2017-10-12 18:03:06 +03:00
Sebastian Dröge 393cd6236a Move simple Source/Sink/Demuxer traits to a separate crate
Fixes https://github.com/sdroege/gst-plugin-rs/issues/20
2017-10-11 13:32:44 +03:00
Sebastian Dröge 20f1666bc9 Run everything through rustfmt again 2017-10-07 05:01:04 +03:00
Sebastian Dröge c241a65555 Add BaseTransform support 2017-10-05 18:08:15 +03:00
Sebastian Dröge 2c0388b06d Fix BaseSink::event() signature
The event's ownership is transfered to the function, not only borrowed.
In BaseSrc::event() it is borrowed.
2017-10-05 10:23:47 +02:00
Sebastian Dröge dda3b5ff1a Fix build with latest gstreamer-rs 2017-10-01 16:19:43 +02:00
Sebastian Dröge 6a7da572f0 Use our own reimplementation of mopa for our use cases
We had to replicate the mopafy! macro already anyway and poke into the
internals of the mopa implementation.
2017-09-26 13:54:55 +03:00
Sebastian Dröge e97f4fb8c1 Fix some unused parameter warnings 2017-09-26 13:45:19 +03:00
Sebastian Dröge 60e25bcc91 Add lots more virtual method for basesrc 2017-09-26 13:39:34 +03:00
Sebastian Dröge dc231937d7 Add more virtual methods to ElementImpl 2017-09-26 13:11:52 +03:00
Sebastian Dröge 91df8f991e Add lots of missing virtual methods to BaseSink 2017-09-26 11:58:26 +03:00
Sebastian Dröge cba662934c Get rid of various clippy warnings 2017-09-26 01:58:19 +03:00
Sebastian Dröge 515f58da02 Remove obsolete FIXME comment 2017-09-26 01:52:35 +03:00
Sebastian Dröge ec1903a571 Make overriding of vfuncs safer
It can only be called from the correct class_init() now
2017-09-26 01:50:56 +03:00
Sebastian Dröge 41d6343682 Make calls into the parent class struct safer and use more useful object wrapper type (T) for virtual methods 2017-09-26 01:43:56 +03:00
Sebastian Dröge a354116336 Make ObjectImpl and subtraits generic over T: ObjectType 2017-09-26 00:25:03 +03:00
Sebastian Dröge f45723c04e Remove redundant ObjectType::RsType associated type
It's supposed to be the same as Self
2017-09-25 23:40:17 +03:00
Sebastian Dröge 5e9f42e7f8 Remove some more boilerplate 2017-09-25 15:35:27 +03:00
Sebastian Dröge b25e612458 Remove some boilerplate 2017-09-25 15:29:39 +03:00
Sebastian Dröge f322395918 Rename ObjectClassStruct to ObjectClass 2017-09-25 13:49:53 +03:00
Sebastian Dröge cd23c993ae Rename panic_to_error2() to panic_to_error()
No usage of the other one left.
2017-09-24 23:22:58 +03:00
Sebastian Dröge 0423264fea Hack around floating references
By unsetting the floating flag in our virtual method trampolines if it
was set, and resetting it at the end of the function again if it was
set.

Otherwise we can't safely use any bindings, as the assumptions about
floating references are invalid then and things just crash.
2017-09-24 23:21:15 +03:00
Sebastian Dröge 395a002f4a Store type ids in a static BTreeMap
static variables inside generic functions are shared between all
instances of the function, we can't use that for storing our generated
type id.
2017-09-24 22:47:14 +03:00
Sebastian Dröge 1260dc42bb Port sink over to new infrastructure 2017-09-24 22:28:28 +03:00
Sebastian Dröge 6e1c89d1df Add GstBaseSink bindings 2017-09-24 22:22:20 +03:00
Sebastian Dröge 1f880caee1 Port Source over to the new infrastructure 2017-09-24 22:18:12 +03:00
Sebastian Dröge 540011a4a0 Add some more boilerplate for impl trait inheritance
This needs some macros added.
2017-09-23 19:58:18 +03:00
Sebastian Dröge b7c396d70b Complete basesrc subclassing infrastructure 2017-09-23 19:54:36 +03:00
Sebastian Dröge a0bac4a722 Add interface infrastructure and GstURIHandler support 2017-09-23 19:20:23 +03:00
Sebastian Dröge 4ee8b12e66 Add infrastructure for installing various kinds of properties
From both the subclass and the implementation
2017-09-23 12:57:15 +03:00
Sebastian Dröge 1c997c171d Make some unnecessarily mutable variables immutable 2017-09-22 14:37:15 +03:00
Sebastian Dröge 950a7d5b0d Mark the abstract base types as actually abstract
Without implementation they can't be instantiated
2017-09-22 14:08:45 +03:00
Sebastian Dröge 0d22579297 Get rid of demuxer wrapper
It was just an unneeded layer of indirection now after all the
refactoring
2017-09-22 13:49:19 +03:00
Sebastian Dröge cda23d5c41 Implement generic object subclass creation in a more... generic... way
That actually works for subclasses of subclasses too without too much
boilerplate, and also keeps the GObject boilerplate in a single file
instead of having it for every single subclass.
2017-09-22 13:35:17 +03:00
Sebastian Dröge 8d253fd46a Minor cleanup 2017-09-19 16:05:21 +03:00
Sebastian Dröge 62a237ff0c Implement a generic Element implementation infrastructure
And implement the Demuxer base class on top of that, with no unsafe code
left whatsoever
2017-09-19 14:56:04 +03:00
Sebastian Dröge 2781e0b3d8 Port demuxer to plain Rust 2017-09-18 21:29:42 +03:00
Sebastian Dröge 7e7433037d Port everything over to gstreamer-rs
And remove all unneeded code and unused external crates.
2017-09-16 20:35:01 +03:00
Sebastian Dröge 5ae66e191c Run everything through latest rustfmt-nightly 2017-09-15 11:54:38 +03:00
Sebastian Dröge 71dcb979c7 Fix various compiler warnings in demuxer C code 2017-09-10 14:02:46 +03:00
Sebastian Dröge 338f2dcb92 Remove versions of git dependencies 2017-09-09 00:51:19 +03:00
Sebastian Dröge d68effa8e4 Update all kinds of dependencies 2017-08-18 12:52:17 +03:00
Sebastian Dröge dd5af12ebe Rename used crates (gst -> gst_ffi, etc) and import gstreamer code 2017-07-31 23:26:52 +01:00
Sebastian Dröge 6f04ddf797 Run everything through rustfmt-nightly 2017-07-31 14:36:35 +01:00
Sebastian Dröge 94016c39b0 Update to nom 3.0, bitflags 0.9 2017-06-06 13:29:19 +03:00
Sebastian Dröge d962acc8c3 Update to released versions of glib-sys/gstreamer-sys 2017-05-10 11:25:17 +02:00
Sebastian Dröge 52981968f6 Use raw pointers instead of &'static references
&'static is wrong here is the pointers are only valid for the lifetime
of the surrounding struct.

Also place a PhantomData<T> inside the structs as conceptually we own a
T, see std::ptr::Unique and
https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md#phantom-data

Need to add the PhantomData<T> elsewhere too.
2017-04-27 12:33:28 +03:00
Sebastian Dröge c6addbfe48 Remove From<&T> impls for GstRc<T>
Instead of this, ToOwned should be used.
2017-04-24 17:28:26 +03:00
Sebastian Dröge 139c9be958 Minor cleanup 2017-04-24 10:13:32 +01:00
Sebastian Dröge 9b593136da Rewrite MiniObject bindings
These now use references were applicable and GstRef became useless
2017-04-24 10:06:38 +01:00
Sebastian Dröge 2232af41b6 Refactor Structure bindings and allow getting Structures from Caps 2017-04-21 22:04:08 +01:00
Sebastian Dröge df51424631 Structure/Caps API improvements 2017-04-21 12:18:41 +01:00
Sebastian Dröge 757d7532c1 Fix various clippy warnings 2017-04-20 20:37:08 +01:00
Sebastian Dröge 154e996e2d Implement Iterator::size_hint(), ExactSizeIterator and DoubleEndedIterator for our iterators 2017-04-20 20:28:03 +01:00
Sebastian Dröge deef22cd28 Add bindings for GstStructure 2017-04-19 20:57:33 +01:00
Sebastian Dröge 8ea9e66797 Add Tag iterator for iterating one specific tag 2017-04-19 12:26:33 +01:00
Sebastian Dröge e45ff7241e Remove some unneeded trait bounds in the taglist bindings 2017-04-19 12:11:31 +01:00
Sebastian Dröge 1bf20bfea4 Implement ValueRef and TypedValueRef for wrapping around a unowned GValue pointer without copying
Also rename new_from*() functions to from*() for consistency.
2017-04-19 11:59:44 +01:00
Sebastian Dröge 2d97baaf96 Rewrite GValue bindings 2017-04-18 20:42:23 +01:00
Sebastian Dröge a808c34794 Use g_strndup() instead of creating a CString and then g_strdup() it
Creating a CString involves potentially some additional allocations.
2017-04-14 12:41:39 +03:00
Sebastian Dröge 9864413be2 Run everything through new rustfmt 2017-04-12 16:46:11 +03:00
Sebastian Dröge 021de8af1f Update to slog 2.0 2017-04-12 16:44:34 +03:00
Sebastian Dröge 0cf169aa20 Fix some clippy warnings 2017-04-10 20:00:22 +03:00
Sebastian Dröge 7139551773 Port sink C code to Rust 2017-04-10 19:52:00 +03:00
Sebastian Dröge d72f1f716b Port C code for the source to pure Rust 2017-04-10 19:52:00 +03:00