Marijn Suijten
7ed20090d1
Fix clippy::field_reassign_with_defaults instead of ignoring it
...
Fixes: fc2d7fc4
("ci: Add some more ignored lints to the clippy configuration")
2021-01-08 11:01:02 +01:00
Sebastian Dröge
03f928ee0c
gstreamer/serde: Update for glib::Date API changes
2020-12-23 10:31:49 +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
a6c8fe0c8a
Use repr(transparent) where it is more correct and get rid of some unneeded repr(C)
2020-10-24 17:09:10 +00:00
Sebastian Dröge
ba719ac90c
Update for glib changes in glib::Value handling
2020-10-20 13:50:35 +00:00
Guillaume Desmottes
a954c03bc0
functions: rename constructors in manual API
...
The idiomatic way for Rust constructors is to be named from_XXX()
instead of new_from_XXX() and with_XXX() instead of new_with_XXX().
Fix #460
2020-06-11 12:33:52 +02:00
Guillaume Gomez
c07fe14191
gstreamer*: Add missing init checks
2020-04-12 17:25:54 +03:00
Sebastian Dröge
7dd0404927
gstreamer/datetime: new_from_g_date_time() can actually return NULL
...
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/411
2020-03-22 14:01:32 +02: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
Guillaume Gomez
457ac9118b
Regenerate with latest gir
2019-11-11 11:34:09 +01:00
François Laignel
1367becfaf
DateTime: manual impl for PartialOrd
, PartialEq
and Debug
...
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/217
2019-08-21 12:34:15 +02:00
François Laignel
ced522ed08
Implement ser / de for Date Values, Structure fields and Tags
2019-08-19 15:51:42 +02:00
François Laignel
c74eef374a
Fix serde for Values
with optional Type
s
...
Attention: these changes induce breaking changes for the serde
representation of some types.
Serialization of `Value`s used to rely on the `get` function
followed by an `unwrap`. This means that optional types couldn't
be serialized when they were `None`.
This commit distinguishes between the optional `Value` `Types` and
the ones that always return some value.
The `Value`s, `Structure` fields and `Tag`s with following types are
now represented as `Option`s:
- `Buffer`
- `DateTime`
- `Sample` (note: this type is used for `Tag` images)
- `String` (except for `Tag`s - see the comment in `tags_serde.rs`).
The representations for these `Type`s remain unchanged when they are
used in-place (not as part of a `Value`).
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/215
2019-08-19 15:34:24 +02:00
François Laignel
514a05accd
Manual update for new Value::get
signature
2019-08-13 10:57:32 +02:00
Bastian Köcher
d257ece388
Make Value
serialize/deserialize Buffer
s
2018-12-25 01:40:17 +01:00
Sebastian Dröge
fa29872863
Fix various clippy warnings in the serde code
2018-10-11 11:58:01 +03:00
Sebastian Dröge
eb0a804a50
Run everything through latest rustfmt
2018-10-08 15:02:23 +03:00
François Laignel
9fd5392a16
value: serde: use stringify
for types
2018-07-30 23:18:30 +03:00
François Laignel
6bda3ef174
serde: add roundtrip tests
...
This allows making sure serialization and deserialization are in sync for
types with asymetrical implementations.
2018-07-30 23:18:30 +03:00
François Laignel
9f2f684188
format: serde: avoid redundant ()
for some types
2018-07-30 23:18:30 +03:00
François Laignel
ab9cd29bd6
serde: fmt pass
...
Note: clippy didn't raise any warning
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