Commit graph

149 commits

Author SHA1 Message Date
Sebastian Dröge
30e501e7b0 gtk4: Don't error out when the main context channel does not exist anymore when rendering
But instead return flushing to shut down silently.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1024>
2022-12-22 22:56:48 +00:00
Sebastian Dröge
0c8e69ed7c gtk4: Flush frames from the paintable when shutting down the sink
Otherwise it will continue showing the last frames forever and keep
around the frames forever instead of rendering black.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/281

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1024>
2022-12-22 22:56:48 +00:00
Sebastian Dröge
65efdc8c81 gtk4: Only require GTK 4.6 if GL support is enabled
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1007>
2022-12-12 13:49:14 +02:00
Sebastian Dröge
a077ecba85 gtk4: Deactivate application GL context again after fill_info()
It does not need to be activate anymore, and keeping it active can cause
problems.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1001>
2022-12-12 10:51:15 +02:00
Jordan Petridis
37b0dab0e8 gtk4: Deactivate the context if we fail to fill_info
Avoid leaving the context activated if we end up erroring out.

Similar to https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3492

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1001>
2022-12-12 10:51:09 +02:00
Sebastian Dröge
8c457cfa04 gtk4: example: Use a bin with a videoconvert in the non-GL case
The sink only supports RGB formats in that case, which decoders rarely
would output.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/995>
2022-11-30 11:59:53 +02:00
Sebastian Dröge
599d3a4d8a gtk4: Make GL support fully optional
Don't depend on gstreamer-gl if it's not enabled, and don't try doing
anything with the GDK GL context at all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/995>
2022-11-30 11:59:53 +02:00
Jordan Petridis
975f0141be video/gtk4: Implement support for GLTextures when possible.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/588>
2022-11-29 21:18:46 +02:00
Jordan Petridis
51c34267a9 video/gtk4: Restrict visibility of struct related to the Frame
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/588>
2022-11-29 21:06:12 +02:00
Jordan Petridis
ea6c59e5e9 video/gtk4: Rename Object types and struct to something simpler
Avoid the confusion caused by SinkPaintable and PaintableSink,
and instead refer to the objects as Paintable for the GdkPaintable
subclass or PaintalbeSink for the gst element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/588>
2022-11-29 21:06:12 +02:00
Sebastian Dröge
a8250abbf1 Fix various new clippy warnings 2022-11-01 10:27:48 +02:00
Sebastian Dröge
f2223cf2cb Update versions to 0.10.0-alpha.1 2022-10-24 19:31:19 +03:00
Sebastian Dröge
9a68f6e221 Move from imp.instance() to imp.obj()
It's doing the same thing and is shorter.
2022-10-23 23:08:46 +03:00
Sebastian Dröge
f045099fc1 Fix GObject type names, GStreamer debug category names and element factory names
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/198
2022-10-23 20:46:08 +03:00
Sebastian Dröge
20ad9175d8 Make GStreamer plugin/crate/library/directory names and descriptions consistent
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/238
2022-10-23 20:25:08 +03:00
Sebastian Dröge
f058a5e229 Various minor cleanups 2022-10-22 19:50:24 +03:00
Sebastian Dröge
12400b6b87 Update everything for element factory builder API changes
And set properties as part of object construction wherever it makes
sense.
2022-10-19 19:43:29 +03:00
Sebastian Dröge
59daaa62aa gtk4: Update to fragile 2.0 2022-10-19 11:31:00 +03:00
Vivia Nikolaidou
f11b0fa5eb plugins, examples, tutorials: Use AudioCapsBuilder and VideoCapsBuilder
Simplify caps creation code
2022-10-13 19:24:57 +00:00
Sebastian Dröge
7ee4afacf4 Change *Impl trait methods to only take &self and not Self::Type in addition 2022-10-10 15:03:25 +03:00
Sebastian Dröge
4c57a97d4d Update for glib::Object::new() API changes 2022-10-07 23:54:53 +03:00
Nirbheek Chauhan
1d4d3e4cb0 build: Update versions to be 0.9.0-alpha.1
0.9.0 is the next release, so we can't name things that already.

Also the version in meson.build was 0.13.0, which is completely wrong.
2022-10-04 21:27:23 +05:30
Sebastian Dröge
1a40186485 Update for GLib ParamSpec builder API changes 2022-09-05 11:45:47 +03:00
Sebastian Dröge
46dddaf31c Update minimum supported Rust version to 1.63 2022-09-04 21:31:55 +03:00
Thibault Saunier
67e651f57c Allow "unused_doc_comments" as we use hotdoc and not rustdoc 2022-08-29 18:33:22 -04:00
Thibault Saunier
31a53bba8a Generate plugins documentation using hotdoc
Which will automatically be integrated in gstreamer documentation
2022-08-29 18:33:22 -04:00
Vivia Nikolaidou
5606111345 plugins: Simplify code using ParamSpecBuilder 2022-08-22 17:58:43 +03:00
Sebastian Dröge
803e452889 Update minimum supported GStreamer version to 1.14 2022-04-07 12:41:54 +03:00
Sebastian Dröge
b38f6cc731 Remove now unnecessary Send+Sync impls for element/etc subclasses
This is now automatically implemented.
2022-02-28 18:56:58 +02:00
François Laignel
2cf84d5ce8 Update minimum supported Rust version to 1.57 2022-02-21 23:32:32 +01:00
François Laignel
422ea740ca Update to gst::_log_macro_
See the details:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/980
2022-02-21 20:50:01 +01:00
Sebastian Dröge
858865b731 gtk4: Attach main context receiver from the main context's thread
Otherwise it will fail if the sink's state is changed from a different
thread.

See https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio/-/issues/2
2022-02-04 13:51:31 +02:00
Julian Sparber
e419c18a87 gtk4: Implement Default for PaintableSink 2022-01-31 14:11:03 +00:00
Sebastian Dröge
f44b86cd30 Simplify some code around event/query views 2022-01-22 12:18:02 +02:00
Sebastian Dröge
65fcd55160 Update for event/message/query view API changes 2022-01-19 15:07:45 +02:00
Sebastian Dröge
763ad0cb18 Rename self_ variables to imp for consistency 2022-01-17 20:09:18 +02:00
Sebastian Dröge
b2d0172422 Replace Foo::from_instance(foo) with foo.imp() 2022-01-17 19:36:41 +02:00
Sebastian Dröge
326449b3e6 Re-license LGPL-2.1 plugins to MPL-2
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/168
2022-01-15 21:05:11 +02:00
Sebastian Dröge
ab14c50d1c Ignore clippy::non_send_fields_in_send_ty lint
It's useless in its current shape and wrongly triggering on all types.

See https://github.com/rust-lang/rust-clippy/issues/8045
2022-01-14 12:09:57 +02:00
Sebastian Dröge
81f5f0f60c Fix various clippy warnings 2022-01-12 19:51:08 +02:00
Sebastian Dröge
3ed9e291c2 Update for decide/propose_allocation() API changes 2021-12-06 19:11:24 +02:00
Sebastian Dröge
55aad51141 Update for glib constructor renames
See https://github.com/gtk-rs/gtk-rs-core/pull/384
2021-11-20 14:31:06 +02:00
Bilal Elmoussaoui
82be7b3ac5 adapt to ObjectExt improvements 2021-11-08 14:43:53 +02:00
Sebastian Dröge
d9bda62a47 Update for GLib/GStreamer API changes
And clean up a lot of related property/caps/structure code.
2021-11-06 09:34:10 +02:00
Sebastian Dröge
0a7d1639e7 Update to Rust edition 2021 and minimum supported Rust version to 1.56 2021-10-31 17:40:05 +02:00
Sebastian Dröge
b9541b2ca4 Update for GstObjectImpl API change 2021-10-23 12:31:33 +03:00
Sebastian Dröge
70f0aa9758 gtk4: Add support for rendering overlay composition rectangles directly via GTK 2021-10-17 19:03:24 +00:00
Sebastian Dröge
cf637d0288 gtk4: Add gst_video::VideoMeta to the allocation metas in propose_allocation() 2021-10-16 15:05:18 +03:00
Bilal Elmoussaoui
30796fbe07 Add a GTK4 paintable sink plugin
Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Co-authored-by: Jordan Petridis <jordan@centricular.com>
2021-10-13 12:28:51 +03:00