Sebastian Dröge
24e5c435a7
Revert "Remove callback guards"
...
This reverts commit 75248c7f07
.
Callback guards are required since 1.24.1 again but probably not in 1.25
forwards.
2018-03-02 21:35:50 +02:00
Sebastian Dröge
da433f92af
Run everything through latest rustfmt-nightly
2018-02-22 11:23:34 +01:00
Sebastian Dröge
75248c7f07
Remove callback guards
...
Since Rust 1.24 it is safe to let panics go to the FFI boundary
2018-02-17 20:01:31 +02:00
Sebastian Dröge
cbfb30c7b5
Run everything through rustfmt again
2017-12-20 19:30: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
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
22ab56895d
Remove Rs prefix from everything
...
We have proper namespaces in Rust
2017-11-20 13:23:30 +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
dc231937d7
Add more virtual methods to ElementImpl
2017-09-26 13:11:52 +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
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
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
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
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