Commit graph

310 commits

Author SHA1 Message Date
Marijn Suijten
64ec364259 examples/player: set_uri now allows None to be passed in 2021-09-21 09:58:07 +02:00
Vivienne Watermeier
acb2a9e522 add option to ges.rs to render to a file instead 2021-09-10 20:13:29 +00:00
Sebastian Dröge
bdccaeee0d gstreamer: Manually implement Object::set_property_from_str() to be able to catch deserialization errors 2021-08-17 09:12:38 +03:00
Guillaume Gomez
e2264a3f3f Fix (new) clippy warnings 2021-08-03 10:08:32 +02:00
Sebastian Dröge
b1afc4804a Fix various needless-borrow clippy warnings 2021-07-30 13:19:24 +03:00
Sebastian Dröge
a091ea201c 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 07:42:46 +00:00
Sebastian Dröge
a06cf66e6d Update versions to 0.18.0 2021-06-29 00:08:16 +03:00
Prakash Duggaraju
0adc8c44df rtsp-server: Add support for subclassing GstRtspMountPoints
Implement MountPointsImpl and MountPointsExt to allow subclassing.
Update the example to show usage.
2021-06-28 09:13:02 +03:00
Sebastian Dröge
7c0fa02ffb examples: Update to glutin 0.27 2021-06-22 08:55:38 +03:00
François Laignel
e31ce9d07b Manual ClockTime updates 2021-06-04 22:09:38 +02:00
François Laignel
90bb458e64 Rework ClockTime & FormattedValues 2021-06-04 22:09:38 +02:00
Guillaume Desmottes
7c592a5b9b examples: manually destroy the GTK window when shutting down
Make the leaks tracer happy, allowing us to detect actual leaks.

Fix #341
2021-05-25 11:57:52 +02:00
Guillaume Desmottes
37a352dc35 examples: ensure pipeline is destroyed when application is shutting down 2021-05-25 11:57:52 +02:00
Guillaume Desmottes
10573d882f examples: gtksvideooverlay: call gst::deinit()
Needed so we can use the leaks tracer.
2021-05-25 11:47:14 +02:00
Guillaume Desmottes
c1c06868e9 examples: gtkvideooverlay: use app.quit() to exit properly
We can't use gtk::main_quit() as the loop is handled by the
GtkApplication.
2021-05-25 11:47:14 +02:00
Guillaume Desmottes
4ae0168aea examples: gtksink: call gst::deinit()
Needed so we can use the leaks tracer.
2021-05-22 17:38:48 +02:00
Guillaume Desmottes
87fb66f283 examples: gtksink: use app.quit() to exit properly
We can't use gtk::main_quit() as the loop is handled by the
GtkApplication.
2021-05-22 17:36:31 +02:00
Guillaume Gomez
6fdf35846e Update repository URL for gtk-rs "core" crates 2021-05-12 21:21:18 +02:00
Sebastian Dröge
b05b2b3aaa examples/overlaycomposition: Fix compilation with cairo API changes 2021-05-04 14:28:28 +03:00
François Laignel
49583597ed manual code: fix-getters-def doc aliases 2021-05-03 20:46:57 +02:00
Marijn Suijten
f89e840d27 Remove redundant prelude imports
When importing the prelude of a crate like `gst` the `glib` prelude is
provided too.  Shedding these imports saves quite a few lines and
adheres to keeping it simple; we're not reexporting base/parent preludes
for no reason :)
2021-04-29 12:05:13 +02:00
Bilal Elmoussaoui
890cd03632 manual renames of to_glib into into_glib 2021-04-27 19:44:41 +02:00
Sebastian Dröge
eda1d3d4a7 Update for Value trait refactoring 2021-04-25 14:45:08 +03:00
yatinmaan
15295f299f examples: Use .set_property_from_value for setting flags from Value 2021-04-22 16:00:19 +00:00
François Laignel
1395d773c3 manual fixes remove get prefix round 2 2021-04-20 18:18:02 +02:00
François Laignel
6ab9164dca fix-getters-calls 0.3.0 pass 2021-04-20 18:18:02 +02:00
François Laignel
e80a29372a fix-getters-def 0.3.0 pass 2021-04-20 18:18:02 +02:00
Marijn Suijten
6c3cc3c422 examples: Add simple mirror effect implemented as GLFilter element 2021-04-17 11:01:53 +02:00
Marijn Suijten
430d89539e examples: Separate common windowing logic from glupload
This allows to implement more GL-based examples reusing the same
pipeline and rendering logic.
2021-04-17 07:54:40 +00:00
François Laignel
99616ec0b4 post fix-getters manual updates 2021-04-13 17:54:40 +02:00
François Laignel
53be8e5f58 fix-getters-{def,calls} pass 2021-04-13 17:54:40 +02:00
Marijn Suijten
a65d2df25c examples: Application::new always returns an application without Result
Since https://github.com/gtk-rs/gtk-rs/pull/447, supposedly the native
function is never returning a `NULL` `Application` hence it makes little
sense to handle an "unreachable" error here.
2021-04-12 10:28:16 +02:00
Marijn Suijten
1609a7c923 examples/glupload: Replace separate mpsc channel with winit UserEvent 2021-04-11 01:09:28 +02:00
Marijn Suijten
5e8634e9eb examples/glupload: Update glutin to 0.26 with winit 0.24
Winit 0.19 uses uninitialized variables which is invalid since Rust
1.48, leading to a runtime panic [1].  Updating to the latest version
resolves these issues but requires significant refactoring since the
event loop now runs entirely within a closure.

[1]: https://github.com/rust-windowing/winit/issues/1811
2021-04-11 01:08:59 +02:00
Marijn Suijten
8ab8f00005 examples/glupload: Allow EGL and Wayland features to coexist
If EGL and Wayland were both set the Wayland bit of code would never be
build-tested nor used.  Now if both are enabled try to acquire a
GLDisplay through both handles before bailing.  The methods can still be
tested in isolation by not enabling one or the other feature.
2021-04-10 20:20:49 +02:00
Marijn Suijten
28cfa91b40 examples/glupload: Close the window when Escape is pressed 2021-04-10 16:55:27 +02:00
Marijn Suijten
a310cf8842 examples: Remove features from [[bin]]
Solves the following warning:

    gstreamer-rs/examples/Cargo.toml: unused manifest key: bin.31.features

Enabling features when a single bin is built is not supported, and users
would have to manually select desired features anyway: -wayland cannot
be used in conjunction with -egl thanks to the cfg_if.
2021-04-10 16:51:50 +02:00
Marijn Suijten
d8cd01027e examples: Fix some typos 2021-04-10 13:42:04 +02:00
Sebastian Dröge
8da8e31d63 examples: Update for gio::Application::run() API simplification 2021-04-08 10:36:05 +03:00
Sebastian Dröge
ea239c587e Store panic information not in a custom instance struct but in the instance data provided by the subclassing infrastructure
This scales better as there will only be only such data instead of two
or more when having deeper class hierarchies with multiple Rust
elements, and also makes it unnecessary to use a special instance struct
so the default works well.
2021-03-09 16:36:35 +02:00
Sebastian Dröge
b8c20c07ce Update for new #[glib::object_subclass] attribute macro 2021-03-07 13:08:06 +02:00
Sebastian Dröge
8b71f5331a examples/tutorials: Update for new Bus::connect_message() API that takes signal details 2021-02-28 19:08:50 +02:00
Sebastian Dröge
a316d610eb gstreamer: Update for glib::Type API changes 2021-02-25 12:49:47 +02:00
Sebastian Dröge
cc6a51e73d examples: Improve custom-meta example to pass initialization into the init function via the params parameter 2021-02-24 14:20:45 +00:00
Sebastian Dröge
b5d5838d96 examples/tutorials: Change from emit() to emit_by_name()
And set_property_generic() to set_property_with_value()
2021-02-22 17:28:05 +02:00
Sebastian Dröge
8d685a77c2 examples/glupload: Get rid of unnecessary Result-wrapping 2021-02-11 19:32:04 +02:00
Zeeshan Ali
7a014e4024 rtsp_server: RTSPServer::attach() is fallible
If we don't handle the case of RTSPServer::attach() failing, we end up
with a panic. Unfortunately, we don't get any details from the
underlying call so we've to live with a generic error. :(
2021-02-04 22:04:39 +01:00
Sebastian Dröge
86cc982982 examples: Check for cairo::Context::{save,restore}() failing 2021-01-31 11:01:47 +02:00
Sebastian Dröge
0d5a488b86 examples: Remove two now-unused imports 2021-01-29 10:18:10 +02:00
Sebastian Dröge
e11b12df7c gstreamer: Provide class metadata, pad templates and basetransform configuration via trait methods
This is closer to how this works in Python and also how properties and
signals work now in the glib bindings.

class_init() only has to be implemented for more special uses now.
2021-01-25 13:56:55 +02:00