Commit graph

83 commits

Author SHA1 Message Date
Sebastian Dröge ae4dd88f3d Update for GLib Into<Value> changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1156>
2022-11-26 15:19:35 +02:00
Sebastian Dröge 1264eb10ac gstreamer: Add PartialEq impls between owned/borrowed miniobjects/structures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1152>
2022-11-21 12:40:37 +02:00
Sebastian Dröge 01e24d2018 Fix various new clippy warnings 2022-11-01 11:10:57 +02:00
Sebastian Dröge f9690817ad Fix nullability handling in some functions in manual code 2022-10-18 18:15:01 +03:00
Guillaume Desmottes 0c9158f404 gstreamer: taglist: improve Debug implementation 2022-08-25 10:54:16 +02:00
Sebastian Dröge aaf601831e gstreamer: Index structures/taglist more safely
Accessing after the length will lead to a critical warning and should
not happen.
2022-05-22 12:42:42 +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
Sebastian Dröge 1541fbf32a gstreamer: Add many new doc aliases for C function 2021-12-12 17:52:32 +02:00
François Laignel 90bb458e64 Rework ClockTime & FormattedValues 2021-06-04 22:09:38 +02: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
François Laignel 49583597ed manual code: fix-getters-def doc aliases 2021-05-03 20:46:57 +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
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
Sebastian Dröge bf6669a9cb gstreamer: Add TagList::remove() for removing tags
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/327
2021-04-20 10:22:14 +03:00
François Laignel 53be8e5f58 fix-getters-{def,calls} pass 2021-04-13 17:54:40 +02:00
Sebastian Dröge 7e7f358ba2 gstreamer/tags: Replace removed glib TypedValue with local TagValue
See https://github.com/gtk-rs/gtk-rs/pull/449.  This struct remains
vital in GStreamer code to tie a type to an (untyped) SendValue, so that
the underlying value can be retrieved without having to guess its type.
That type is anyway stored in a private member T::TagType.

Co-authored-by: Marijn Suijten <marijns95@gmail.com>
2021-04-12 10:04:26 +02:00
Marijn Suijten 46cb1595c0 gstreamer/tags: Fix redundant_semicolons lint warning 2021-01-08 11:01:02 +01:00
Sebastian Dröge 53aae7ddba Remove gst_ prefix from all macros except for the logging macros
The latter stay e.g. gst_debug! to be more clear and not conflict with
e.g. the debug! macro from the log crate.
2020-12-20 19:40:34 +02:00
Guillaume Gomez ff5a36561a Fix license header situation 2020-12-15 11:53:31 +01:00
Sebastian Dröge 9d9522016b gstreamer: Update manual code to 2018 edition 2020-11-22 19:15:20 +02:00
Sebastian Dröge ba719ac90c Update for glib changes in glib::Value handling 2020-10-20 13:50:35 +00:00
Sebastian Dröge af01f1bc67 gstreamer: Simplify MiniObject bindings by removing one layer of abstraction
And instead directly implementing this via the macro on the target
types.
2020-06-30 11:06:02 +03:00
Jan Alexander Steffens (heftig) 1d2609d448
gstreamer: Return any lifetime instead of 'static
Following https://github.com/gtk-rs/glib/pull/633
2020-04-30 09:50:00 +02:00
Guillaume Gomez c07fe14191 gstreamer*: Add missing init checks 2020-04-12 17:25:54 +03:00
Sebastian Dröge 7230aee069 Switch everything from lazy_static to once_cell::Lazy
Fewer macros, faster compile-time and the Lazy type will likely end up
in the standard library in a similar form to this.
2020-01-22 19:57:41 +02:00
Sebastian Dröge 69be1ce2fc Fix various new clippy warnings from 1.40 2019-12-22 12:10:27 +02: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
François Laignel 514a05accd Manual update for new Value::get signature 2019-08-13 10:57:32 +02:00
Sebastian Dröge 424a87efbf Use MaybeUninit::zeroed() everywhere possible instead of mem::zeroed() 2019-07-11 17:56:50 +03:00
Guillaume Desmottes 24d9dc6209 gstreamer: tags: make call to to_string() explicit
This one was actually working but better to be safe as it may be
ambigious.
2019-06-18 17:11:24 +05:30
Sebastian Dröge e7898c1b24 Update manual code 2019-04-15 19:19:19 +03:00
François Laignel bec3d84627 TagList: add TagScope {get, set} 2019-03-20 13:58:28 +00:00
Sebastian Dröge ca791ae4fa Use an empty enum for the custom tag in the test
There's no point in allowing to have values of it, it's only a marker
type.
2019-01-23 16:11:52 +02:00
Sebastian Dröge 9d79280929 Add some more functions for generically handling tags 2019-01-23 15:54:00 +02:00
Sebastian Dröge 598e012568 Add bindings for gst::tags::register() 2019-01-23 15:52:51 +02:00
Sebastian Dröge bd0cbe99b3 Add more Debug impls to everything possible 2019-01-22 17:46:08 +02:00
Sami Jaktholm 6f867443c9 tags: fix album tag definition
The Album tag should be defined using the GST_TAG_ALBUM constant instead
of GST_TAG_ARTIST_SORTNAME.
2018-12-28 19:51:28 +02:00
Sebastian Dröge 36bcb5630a Remove various unused use statements 2018-12-08 14:58:14 +02:00
Sebastian Dröge 9f8ec3b35b Rename TagList::iter_tag_list() to TagList::iter_generic() and ::iter_tag_list_simple() to ::iter()
It's the generic iterator for going over values, and the simple one is
the one you usually want.

Also rename iterator types, but those are internal anyway.
2018-10-28 17:30:25 +00:00
Sebastian Dröge 8a6bcbcedb Run through rustfmt once again 2018-10-28 13:47:02 +00:00
Sebastian Dröge 54d8065dd3 Add TagList::iter_tag_list_simple() for getting a single value per tag 2018-10-28 13:46:28 +00:00
Sebastian Dröge ad62d08d65 Implement Display for Caps and TagList 2018-09-28 19:14:35 +03:00
Sebastian Dröge 6fd0ed4cb3 Move all minobjects to newtype wrapper types
For consistency with external crates and to help rustdoc, which gets
confused on impl blocks for type aliases.
2018-09-28 18:11:46 +03:00
François Laignel 0eb6bcf0c0 serde: restrain unneeded visibilities 2018-07-30 23:18:30 +03:00
François Laignel 23307a4795 Tags: ser/de: gather tags with the same name together 2018-07-30 23:18:30 +03:00
François Laignel 90b046fbcf serde: separate serde impl and tests from base module
+ fix erroneous `datetime` instead of `buffer` in `BufferRef::serialize`
+ remove ser/de for `Value`s with types `ULong` & `ILong`
2018-07-30 23:18:30 +03:00
François Laignel 20834e475b Tags: serde impl 2018-07-30 23:18:30 +03:00
Sebastian Dröge 33a6aab6d7 Run everything through latest rustfmt 2018-07-27 13:36:40 +03:00