mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-09-02 01:43:49 +00:00
gstreamer: Add new meta_api_type_tags_contain_only()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1743>
This commit is contained in:
parent
1a75edba3f
commit
7daf6d9625
1 changed files with 23 additions and 0 deletions
|
@ -215,6 +215,12 @@ impl<'a, T> MetaRef<'a, T> {
|
||||||
meta_api_type_has_tag_by_quark(self.api(), tag)
|
meta_api_type_has_tag_by_quark(self.api(), tag)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
#[doc(alias = "gst_meta_api_type_tags_contain_only")]
|
||||||
|
pub fn tags_contain_only(&self, tags: &[&str]) -> bool {
|
||||||
|
meta_api_type_tags_contain_only(self.api(), tags)
|
||||||
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[doc(alias = "gst_meta_api_type_get_tags")]
|
#[doc(alias = "gst_meta_api_type_get_tags")]
|
||||||
pub fn tags<'b>(&self) -> &'b [glib::GStringPtr] {
|
pub fn tags<'b>(&self) -> &'b [glib::GStringPtr] {
|
||||||
|
@ -450,6 +456,12 @@ impl<'a, T, U> MetaRefMut<'a, T, U> {
|
||||||
self.as_meta_ref().has_tag_by_quark(tag)
|
self.as_meta_ref().has_tag_by_quark(tag)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
#[doc(alias = "gst_meta_api_type_tags_contain_only")]
|
||||||
|
pub fn tags_contain_only(&self, tags: &[&str]) -> bool {
|
||||||
|
self.as_meta_ref().tags_contain_only(tags)
|
||||||
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[doc(alias = "gst_meta_api_type_get_tags")]
|
#[doc(alias = "gst_meta_api_type_get_tags")]
|
||||||
pub fn tags<'b>(&self) -> &'b [glib::GStringPtr] {
|
pub fn tags<'b>(&self) -> &'b [glib::GStringPtr] {
|
||||||
|
@ -1128,6 +1140,17 @@ pub fn meta_api_type_has_tag_by_quark(type_: glib::Type, tag: glib::Quark) -> bo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
#[doc(alias = "gst_meta_api_type_tags_contain_only")]
|
||||||
|
pub fn meta_api_type_tags_contain_only(type_: glib::Type, tags: &[&str]) -> bool {
|
||||||
|
skip_assert_initialized!();
|
||||||
|
let meta_tags = meta_api_type_get_tags(type_);
|
||||||
|
|
||||||
|
meta_tags
|
||||||
|
.iter()
|
||||||
|
.all(|tag| tags.iter().any(|t| *t == tag.as_str()))
|
||||||
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[doc(alias = "gst_meta_api_type_get_tags")]
|
#[doc(alias = "gst_meta_api_type_get_tags")]
|
||||||
pub fn meta_api_type_get_tags<'b>(type_: glib::Type) -> &'b [glib::GStringPtr] {
|
pub fn meta_api_type_get_tags<'b>(type_: glib::Type) -> &'b [glib::GStringPtr] {
|
||||||
|
|
Loading…
Reference in a new issue