The next version of gir is going to generate doc(cfg()) attributes on
many symbols to show feature-dependence hints. While autogenerated sys
crates get this attribute in their own (generated) lib.rs file the safe
wrapper crates do not have such an autogenerated lib.rs file.
- `PartialOrd` was returning `true` for expressions such as
- `ClockTime::none() < ClockTime::from_seconds(1)`.
- `ClockTime::from_seconds(1) > ClockTime::none()`.
- Remove `Ord` because `ClockTime` is not a total order due to
`ClockTime::none()`. See test `not_ord`.
This also applies to others `Format(Option<{u32,u64}>)` types.
There is now a separate type for Single and Periodic clock ids. This
allows to have API that is only for one type on that specific type
instead of doing runtime checks, and allows for more refined async
waiting API.
This implements Read/Seek or Write/Seek and allows to read/write/seek
into the buffer without merging the memories inside.
The writer also only maps the memory write-only as compared to all other
ways of accessing the buffer/memory data in a writable way, which have
to map it read-write.
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/425
for a similar API proposal for GStreamer core.
This returns a tuple that basically works like a oneshot channel: the
Promise acts as the "sender" and once the promise resolves the
"receiver" contains the result.
For the latter introduce an actual opaque type that allows using them
for comparison purposes but is not just a plain u64.
For the former represent them as opaque type around an NonZeroU32. 0 is
the invalid case and does not happen in the majority of functions. Where
it can happen, represent this case by using an Option<_> instead.
This makes it harder to mis-use these types.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/209
The future would resolve into the return value of the closure that is
called asynchronously on the thread pool, and allows asynchronous
awaiting for it to finish.
let res = element.call_async(|element| {
element.set_state(gst::State::Playing)
}).await;
assert_eq!(res, Ok(gst::StateChangeSuccess::Success))
Transposing the item type lets us be a std-compatible Iterator.
The iterator is automatically resynced when resuming iteration after
yielding Resync. This lets some combinators like `collect` and `find`
work properly.