It might just be constructed or might be finalized currently and it's
not safe to use any APIs on it.
Instead provide a small wrapper type that allows to get the underlying
pointer and that implements the Display trait to print the name of the
object.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/287
- `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.
When "{:?}" printing a Message[Ref], the following issues lower the
experience:
- If the Message seqnum is GST_SEQNUM_INVALID (0), a panic occurs due
to an assertion failure in MessageRef::get_seqnum.
- The src of the Message displays the GString address.
Origin issue for an occurrence of the first case above fixed in
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/860
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.
Crates using gst_plugin_define might not (need to) import `glib`
directly into their scope; use the one imported in `gstreamer`s root
to make this macro more portable.
Besides, `glib` is prefixed with `$crate::` just below.
We have to pass `NULL` / `None` instead of the actual default log
function as because of `-Bsymbolic` or how DLLs work on Windows the
external function pointer is different to the internal one.
This makes that part of the code non-generic and thus allows the
compiler to not put a copy of it into every caller with a different
closure.
For a test with 3 pad probes this overall reduced the number of LLVM IR
lines needed for the pad probes to about 8.5% of what it was before
(4485 -> 381 lines).
This is basically `parse_bin_from_description()` but additionally the returned
bin has the passed name. It is sometimes convenient to name those bins so they
can later be easily retrieved by name from the pipeline they belong to.