gstreamer: Rename TagSetter::add() to TagSetter::add_tag() to not conflict with Bin::add()

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/440

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1211>
This commit is contained in:
Sebastian Dröge 2023-02-04 16:44:40 +02:00
parent c4dc549a5e
commit 00281e98f0
2 changed files with 4 additions and 3 deletions

View file

@ -76,7 +76,8 @@ fn example_main() -> Result<(), Error> {
// Set the "title" tag to "Special randomized white-noise".
// The second parameter gst::TagMergeMode::Append tells the tagsetter to append this title
// if there already is one.
tagsetter.add::<gst::tags::Title>(&"Special randomized white-noise", gst::TagMergeMode::Append);
tagsetter
.add_tag::<gst::tags::Title>(&"Special randomized white-noise", gst::TagMergeMode::Append);
let bus = pipeline.bus().unwrap();

View file

@ -6,11 +6,11 @@ use crate::{tags::*, TagMergeMode, TagSetter};
pub trait TagSetterExtManual: 'static {
#[doc(alias = "gst_tag_setter_add_tag_value")]
fn add<'a, T: Tag<'a>>(&self, value: &T::TagType, mode: TagMergeMode);
fn add_tag<'a, T: Tag<'a>>(&self, value: &T::TagType, mode: TagMergeMode);
}
impl<O: IsA<TagSetter>> TagSetterExtManual for O {
fn add<'a, T: Tag<'a>>(&self, value: &T::TagType, mode: TagMergeMode) {
fn add_tag<'a, T: Tag<'a>>(&self, value: &T::TagType, mode: TagMergeMode) {
unsafe {
let v = value.to_send_value();