1 | // Take a look at the license at the top of the repository in the LICENSE file. |
2 | |
3 | use glib::{prelude::*, translate::*}; |
4 | |
5 | use crate::{tags::*, TagMergeMode, TagSetter}; |
6 | |
7 | mod sealed { |
8 | pub trait Sealed {} |
9 | impl<T: super::IsA<super::TagSetter>> Sealed for T {} |
10 | } |
11 | |
12 | pub trait TagSetterExtManual: sealed::Sealed + IsA<TagSetter> + 'static { |
13 | #[doc (alias = "gst_tag_setter_add_tag_value" )] |
14 | fn add_tag<'a, T: Tag<'a>>(&self, value: &T::TagType, mode: TagMergeMode) { |
15 | unsafe { |
16 | let v: SendValue = value.to_send_value(); |
17 | |
18 | ffi::gst_tag_setter_add_tag_value( |
19 | self.as_ref().to_glib_none().0, |
20 | mode:mode.into_glib(), |
21 | T::TAG_NAME.as_ptr(), |
22 | value:v.to_glib_none().0, |
23 | ); |
24 | } |
25 | } |
26 | } |
27 | |
28 | impl<O: IsA<TagSetter>> TagSetterExtManual for O {} |
29 | |