Draft: gst: changes for `GQuark` replacement by `GstIdStr`
The C type GstIdStr
was (will be) introduced in GStreamer 1.26 as a replacement for GQuarks
. GstIdStr
represents UTF-8 immutable strings which perform optimizations for short strings (< 16 bytes).
This MR adds:
- Rust bindings for the C type
GstIdStr
. - Rust bindings for new APIs using
GstIdStr
. - A compatibility implementation which can be used with GStreamer versions prior to 1.26.
See also: gstreamer!7432 (merged)
Todo
-
Validate IdStr
API. -
Decide whether a trait would be needed to enforce API equivalence between the bindings and the compat impl. Current solution is to use a plain type approach (which implementation depends on the activation of feature v1_26
) and to enforce API equivalence by running the exact same unit test collection. => Decision: don't use a trait, keep current solution. -
Add the IdStr
based APIs toStructure
&Caps
. Depending on the activation of featurev1_26
, call theIdStr
based C API or fallback to theGQuark
API. -
Deprecate the GQuark
basedStructure
&Caps
API. -
Chase code in gstreamer-rs
&gst-plugins-rs
which can make use of the new APIs. Special attention for'static
call sites. -
Merge gst-gir-files
changes + update related commits. Depends on gstreamer!7432 (merged)
Edited by François Laignel