Commit graph

311 commits

Author SHA1 Message Date
Sebastian Dröge f24b38470b Fix various new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1203>
2023-01-25 10:18:33 +02:00
Seungha Yang 8ef4420257 examples: d3d11videosink: Update for windows crate v0.44
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1197>
2023-01-23 03:01:17 +09:00
Sebastian Dröge d5e24b9fbd Update various object construction functions to more efficient approaches
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1196>
2023-01-22 09:48:51 +02:00
Sebastian Dröge 003554876c Update various APIs to use glib::GStr
Currently only covers what is needed to keep code compiling, plus
everything caps/structure/tags related.

This avoids unnecessary heap allocations for adding the NUL-terminator
of C strings, and especially makes caps/structure handling as efficient
as in C.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1190>
2023-01-15 21:05:57 +02:00
Sebastian Dröge 277d63601c gstreamer: Return glib::GString for the error/warning/info message debug string
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1184>
2023-01-06 10:41:55 +02:00
Sebastian Dröge 8d30bcbf4b Use IntoGlibPtr trait instead of to_glib_full() where appropriate to reduce unnecessary refcounting/copying
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1183>
2023-01-05 12:09:57 +02:00
Sebastian Dröge 1e793f3b65 gstreamer: Return some values by reference instead
Less refcounting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1183>
2023-01-05 12:09:57 +02:00
Sebastian Dröge 32a608b76b examples: Fix for API changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182>
2023-01-04 13:26:07 +02:00
Sebastian Dröge 567ce0a3bf Group and merge imports in all manual code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182>
2023-01-04 13:25:17 +02:00
Seungha Yang b4d3bf297e examples: Add d3d11videosink example with Direct2D/DirectWrite interop
Demonstartes the use of d3d11videosink's present signal
introduced in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2923
with Direct2D/DirectWrite API interop using the windows crate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1089>
2022-12-28 11:20:51 +00:00
Sebastian Dröge e3ad1918dc Fix various new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1164>
2022-12-13 11:29:45 +02:00
Sebastian Dröge 01e24d2018 Fix various new clippy warnings 2022-11-01 11:10:57 +02:00
Sebastian Dröge 90b8ee2022 Move from imp.instance() to imp.obj()
It's doing the same thing and is shorter.
2022-10-23 23:06:44 +03:00
Sebastian Dröge a1165a7456 gstreamer: Add bin/pipeline builders
And also implement the Default trait for them.
2022-10-22 17:36:36 +03:00
Sebastian Dröge 2a4e1069a1 app: Add an AppSrc/AppSink builder
These allows to construct these elements explicitly together with all the
properties instead of going via gst::ElementFactory::make().
2022-10-22 10:19:49 +03:00
François Laignel 0e5a4f05f8 gst: fix Element::request_new_pad signature
See:

https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1133#note_1600152
2022-10-21 11:30:02 +02:00
François Laignel 4ebdfb8602 Use impl Into<Option<_>> for functions impacted by nullability fixes
This commit addresses the functions which signatures changed in
commit f9690817 so that users can still use e.g.
`query.set_result(val)` instead of `query.set_result(Some(val))`.

See [1] for an attempt at generalizing this approach.

[1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1133
2022-10-21 11:30:02 +02:00
Sebastian Dröge 7423b1dea6 elementfactory: Change make() / create() to builders and keep the old variants as create_with_name() / make_with_name()
As a side-effect, this also now includes the element factory name in the
error messages instead of giving the same error string for every
factory.

Partially fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/318

Also let them all go through the same, single object construction code.
2022-10-19 17:48:39 +03:00
Sebastian Dröge f9690817ad Fix nullability handling in some functions in manual code 2022-10-18 18:15:01 +03:00
Sebastian Dröge f5a902ba49 example: Update for pango API changes 2022-10-17 19:55:42 +03:00
Sebastian Dröge 4bdbe0022b examples: Fix compilation after pangocairo API changes 2022-10-14 18:11:42 +03:00
Vivia Nikolaidou b230d8aab6 examples, video: Use .into() instead of gst::Fraction::new()
Simplifies the code
2022-10-14 16:26:00 +03:00
Vivia Nikolaidou 6d4ad712c7 examples, audio, pbutils, video: Use AudioCapsBuilder and VideoCapsBuilder
Simplify caps creation code
2022-10-14 13:59:51 +03:00
Sebastian Dröge 08cac646be examples: Fix formatting 2022-10-12 14:33:13 +03:00
Sebastian Dröge b89a285178 Use correct gobject-sys::GObject type in the examples/tutorials 2022-10-12 14:30:19 +03:00
Sebastian Dröge a4d901ee63 gstreamer: Add an gst::element_error! variant that works on element implementations 2022-10-10 15:01:07 +03:00
Sebastian Dröge f17781e188 Change *Impl trait methods to only take &self and not Self::Type in addition 2022-10-10 15:01:07 +03:00
Sebastian Dröge 3cd902513d Update for glib::Object::new() API changes 2022-10-07 21:45:01 +03:00
Sebastian Dröge 099ffdc4b4 examples: Change cairo-compositor example to use ParamSpec builders 2022-09-05 11:48:37 +03:00
Philippe Renon 01b8279bc1 examples: add GstPlay example 2022-05-24 06:55:12 +00:00
Philippe Renon 268e351dde examples: fix clippy errors 2022-05-17 21:47:34 +02:00
Sebastian Dröge 8d001d8b16 Stop using glib::SendUnique
It is being removed because it does not add a lot of value.
2022-04-09 11:37:53 +03:00
Sebastian Dröge 4651c9db4d Update minimum supported version to 1.14
This is the version that is available in Ubuntu 18.04.
2022-04-07 12:45:47 +03:00
Sebastian Dröge ae234bb01e examples: Implement gst::ChildProxy interface in cairo compositor example 2022-03-30 21:41:28 +03:00
Sebastian Dröge 208e1ef7a4 examples: Simplify cairo compositor example a bit and improve/add comments. 2022-03-23 10:27:08 +02:00
Sebastian Dröge 21dbe86c8e examples: Add a Cairo-based compositor example based on VideoAggregator 2022-03-22 19:00:32 +02:00
Christian Meissl 163130cad7 Extend examples to showcase the use of the FdMemoryAllocator 2022-03-12 14:19:40 +00:00
Sebastian Dröge 0f22eb7633 Remove now unnecessary Send+Sync impls for element/etc subclasses
This is now automatically implemented.
2022-02-28 18:25:15 +02:00
François Laignel 972c4e75ac remove gst_ prefix for log macros
It's quite quite common to use similar macros in the form `log::debug!`
or `glib::clone!`. This MR renames the gst log macros so that we can
`gst::debug!` instead of `gst_debug!` and whithout the need for
`use gst::gst_debug`.
2022-02-21 18:56:06 +01:00
Sebastian Dröge 1ebfaee644 examples: Make use of glib::closure! for the overlay-composition example 2022-01-24 13:13:24 +00:00
Sebastian Dröge 8fa1076dfa Replace Foo::from_instance(foo) with foo.imp() 2022-01-17 19:34:06 +02:00
Sebastian Dröge ce1a25a128 examples: overlay-composition: Use cairo's new ImageSurfaceDataOwned to get rid of unsafe code 2022-01-14 21:47:08 +02:00
Sebastian Dröge 605c633579 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-13 23:38:11 +02:00
Sebastian Dröge 7cc1523e7d Fix a couple of new clippy warnings 2021-12-02 22:39:57 +02:00
Sebastian Dröge f31aa2efee examples: Update for glib::Boxed derive macro rename 2021-11-22 10:54:52 +02:00
Sebastian Dröge 27613a8901 examples/tutorials: The get-XXX-tags signals on playbin can return a None taglist 2021-11-21 18:38:39 +02:00
Bilal Elmoussaoui 1ffcea4da7 manual changes post ObjectExt::emit_by_name update 2021-11-21 09:40:27 +01:00
Sebastian Dröge 1480c65c32 examples: Use VideoFrame API in thumbnail example, use RGBX as format and correctly handle stride 2021-11-08 21:23:23 +02:00
Bilal Elmoussaoui e3a65a3a88 gst object: add a panicking variant of set_property_from_str
Similar to what was added to ObjectExt
2021-11-08 14:42:59 +01:00
Bilal Elmoussaoui 213020165a manual changes post ObjectExt improvements 2021-11-08 14:42:59 +01:00