Commit graph

37 commits

Author SHA1 Message Date
Bilal Elmoussaoui 4ebec84f5e Adapt to no longer renamed ffi crates
Allows us to set all the crates in the main workspace file, so changing
their versions or branch is much simpler and reduce the amount of noise
in the diff

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1450>
2024-06-02 11:20:55 +02:00
Sebastian Dröge 241338f43c audio: video: Improve Display trait impl test for AudioFormat and Video a bit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1432>
2024-04-27 16:10:49 +00:00
Sebastian Dröge 193bcbf055 Switch from once_cell to std::sync::OnceLock where it makes sense
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1379>
2024-01-31 14:59:54 +02:00
Sebastian Dröge a6470f13c9 Fix various new 1.73 clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1317>
2023-10-03 17:44:12 +03:00
Bilal Elmoussaoui f9fa7f55fc Use re-exported once_cell
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1293>
2023-07-06 16:50:35 +03: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 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
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 d4430ecc6a Implement more iterator functions / traits in custom iterators for efficiency reasons 2022-05-22 12:42:42 +03:00
Fabio Valentini e146672851
gstreamer-audio: fix audio_format code for big-endian targets 2021-08-04 13:30:53 +02:00
Sebastian Dröge a94d84e780 Silence/fix various clippy warnings 2021-06-20 10:59:49 +03:00
Marijn Suijten 540062b97c Add missing doc aliases to manual code
Using the same script as [1], called with:

    python3 add_doc_alias.py gstreamer*/**/src

[1]: https://github.com/gtk-rs/gtk-rs-core/pull/83
2021-05-19 22:36:18 +02:00
Marijn Suijten 66b60a0822 audio: Fix all clippy::use_self warnings 2021-04-30 10:02:55 +02:00
Bilal Elmoussaoui 890cd03632 manual renames of to_glib into into_glib 2021-04-27 19:44:41 +02:00
Sebastian Dröge ce1148b474 Update everything for glib macro renamings 2020-12-18 00:56:47 +02:00
Guillaume Gomez ff5a36561a Fix license header situation 2020-12-15 11:53:31 +01:00
Marijn Suijten bb8e7c3e8f audio/video: Fix more unused imports
TODO: How about use glib::translate::*;?
2020-12-07 12:12:16 +01:00
Marijn Suijten 82b4726bb7 impl FromStr: Forward implementation to autogenerated from_string() 2020-12-07 12:12:16 +01:00
Marijn Suijten 040772ab61 audio,video: Manual enum to_string returns 'static; add NULL check 2020-12-07 12:12:16 +01:00
Marijn Suijten 9ff39bae6f audio,video: Use autogenerated Display impl 2020-12-07 12:12:16 +01:00
Marijn Suijten 0763d2645d video: Reuse Self::Err in from_str 2020-12-07 12:09:39 +01:00
Marijn Suijten 2447664df6 Replace Result<(), fmt::Error> with fmt::Result 2020-12-07 12:09:39 +01:00
Sebastian Dröge 4a928136ed gstreamer-audio: Update manual code to 2018 edition 2020-11-22 19:15:20 +02:00
Sebastian Dröge 0b70e52032 gstreamer/audio/video: Correctly implement ExactSizeIterator
len() is optional but size_hint() must return the correct values. Also
this shouldn't return the overall length but the remaining length.
2020-10-09 11:35:19 +03:00
Guillaume Desmottes bb065be349 audio: sort AUDIO_FORMATS_ALL
Test also ensures that the formats list returned by
gst_audio_formats_raw() is properly sorted when running with feature
1.18.
2020-06-09 09:26:32 +02:00
Guillaume Desmottes a6faa83908 audio: manually order AudioFormat and AudioFormatInfo 2020-06-09 09:26:31 +02:00
Guillaume Desmottes d5cab61c93 audio: implement Iterator on AudioFormat
Also add AUDIO_FORMATS_ALL as public API.
2020-06-03 21:11:00 +03:00
Sebastian Dröge be3c378f28 Use Results instead of Options where they signal an error instead of just a missing value
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/216
2019-12-17 22:21:28 +02:00
Ruben Gonzalez ead607ab8e gstreamer-audio: Add the missing constants for all the audio formats
Include not target_endian related to improve developer experience.
2019-12-03 15:14:20 +01:00
Sebastian Dröge 06cfcd57fc Move to_string() methods into the Display trait or rename to to_str(), move from_string() into the FromStr trait
Fixes clippy warnings, prevents confusing errors and is more consistent.

The Display trait provides a to_string() method by itself and FromStr
provides from_str().
2019-10-04 11:01:55 +03:00
Guillaume Desmottes e81b5717e9 audio: fix AudioFormat Display implementation
We were calling the blanket implementation of ToString, which is using
Display, rather than our own, resulting in an infinite recursion.
2019-06-18 17:11:24 +05:30
Sebastian Dröge e7898c1b24 Update manual code 2019-04-15 19:19:19 +03:00
Sebastian Dröge 694bcaa697 Fix all clippy warnings
Or silence the ones we don't care about.
2018-07-20 10:28:20 +03:00
Sebastian Dröge 0eb32f0483 Some nullability fixes in gstreamer-audio 2017-12-16 10:56:59 +02:00
Sebastian Dröge 380fb319ba Don't return &'static references from functions but give them a generic lifetime
https://github.com/rust-lang/rust/pull/42417#issue-233404573
2017-09-01 11:40:32 +03:00
Sebastian Dröge f0935d7e1e Add remaining gst_init() assertions 2017-08-30 14:39:09 +03:00
Sebastian Dröge 8215770076 Move AudioFormat manual impls to new file 2017-08-10 11:24:16 +03:00