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
Sebastian Dröge
50829bdec9
Store GWeakRef in a Box
...
Its memory location is important, and having it stored directly inside
the struct allows it to possible be moved to a different address.
2017-04-10 16:59:34 +03:00
Sebastian Dröge
24a10bb614
Port everything else over to glib/gobject/gstreamer-sys
2017-04-10 00:29:07 +03:00
Sebastian Dröge
e4ababa98f
Switch to gstreamer-sys crate and port buffer bindings to it
2017-04-06 15:10:22 +03:00
Sebastian Dröge
1dda357b86
Move MiniObject::is_writable() from the trait to the reference containers
2017-04-05 23:52:38 +03:00
Sebastian Dröge
2b799910fc
Update to bitflags 0.8
2017-02-19 12:12:06 +02:00
Sebastian Dröge
b3e01add5c
Remove FlowError::NotLinked
...
This will never appear in Rust code as all forwarding of buffers will
happen at the C/Rust binding layer.
2017-02-16 17:54:20 +02:00