-
François Laignel authored
IdStr represents UTF-8 immutable strings which perform optimizations for short strings (< 16 bytes). The C type `GstIdStr` was introduced in GStreamer 1.26 as a replacement for GQuarks. This commit adds Rust bindings for the C type `GstIdStr`. Since this type will be used in API which previously relied on GQuarks, the commit also adds a compatibility implementation which can be used with GStreamer versions prior to 1.26, which is the first version to implement and use `GstIdStr`. The crate [KString] was used as the inner implementation for the compatibility version as it performs similar optimizations as `GstIdStr` and uses the same threshold to trigger heap allocation. See also: gstreamer!7432 [KString]: https://crates.io/crates/kstring Part-of: <!1531>
c2cc0488
Loading