Gst::TagSetter Class Reference
gstreamermm Interfaces

An interface that allows setting and retrieval of media metadata. More...

`#include <gstreamermm/tagsetter.h>`

Inheritance diagram for Gst::TagSetter:
[legend]

## Public Member Functions

| TagSetter (TagSetter&& src) noexcept
TagSetter& | operator= (TagSetter&& src) noexcept
| ~TagSetter () noexcept override
GstTagSetter* | gobj ()
| Provides access to the underlying C GObject. More...
const GstTagSetter* | gobj () const
| Provides access to the underlying C GObject. More...
void | reset_tags ()
| Reset the internal taglist. More...
void | merge_tags (const Gst::TagList& list, TagMergeMode mode=TAG_MERGE_PREPEND)
| Merges the given list into the setter's list using the given mode. More...
void | add_tag (Tag tag, const Glib::ValueBase& value, TagMergeMode mode=TAG_MERGE_PREPEND)
| Adds the given Glib::ValueBase on the setter using the given merge mode. More...
void | add_tag (const Glib::ustring& tag, const Glib::ValueBase& value, TagMergeMode mode=TAG_MERGE_PREPEND)
| Adds the given Glib::ValueBase on the setter using the given merge mode. More...
template<class DataType >
void | add_tag (Tag tag, const DataType& data, TagMergeMode mode=TAG_MERGE_PREPEND)
| Adds the given value on the setter using the given merge mode. More...
template<class DataType >
void | add_tag (const Glib::ustring& tag, const DataType& data, TagMergeMode mode=TAG_MERGE_PREPEND)
| Adds the given value on the setter using the given merge mode. More...
void | add_tag (Tag tag, const char* data, TagMergeMode mode=TAG_MERGE_PREPEND)
| Adds the given value on the setter using the given merge mode. More...
void | add_tag (const Glib::ustring& tag, const char* data, TagMergeMode mode=TAG_MERGE_PREPEND)
| Adds the given value on the setter using the given merge mode. More...
const Gst::TagList | get_tag_list () const
| Returns the current list of tags the setter uses. More...
void | set_tag_merge_mode (TagMergeMode mode)
| Sets the given merge mode that is used for adding tags from events to tags specified by this interface. More...
TagMergeMode | get_tag_merge_mode () const
| Queries the mode by which tags inside the setter are overwritten by tags from events. More...
Public Member Functions inherited from Glib::Interface
| Interface ()
| Interface (Interface &&src) noexcept
Interface & | operator= (Interface &&src) noexcept
| Interface (const Glib::Interface_Class &interface_class)
| Interface (GObject *castitem)
| ~Interface () noexceptoverride
| Interface (const Interface &)=delete
Interface & | operator= (const Interface &)=delete
GObject * | gobj ()
const GObject * | gobj () const
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
void | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void > &&slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, sigc::slot< void > &&slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const
Public Member Functions inherited from sigc::trackable
| trackable () noexcept
| trackable (const trackable &src) noexcept
| trackable (trackable &&src)
| ~trackable ()
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const
void | notify_callbacks ()
trackable & | operator= (const trackable &src)
trackable & | operator= (trackable &&src)
void | remove_destroy_notify_callback (void *data) const

## Static Public Member Functions

static void | add_interface (GType gtype_implementer)
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...

## Protected Member Functions

| TagSetter ()
| You should derive from this class to use it. More...
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
| ObjectBase (ObjectBase &&src) noexcept
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)

## Related Functions

(Note that these are not member functions.)
Glib::RefPtr< Gst::TagSetter > | wrap (GstTagSetter* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Additional Inherited Members

Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify | func_destroy_notify

## Detailed Description

An interface that allows setting and retrieval of media metadata.

Elements that support changing a stream's metadata will implement this interface. Examples of such elements are 'vorbisenc', 'theoraenc' and 'id3v2mux'.

If you just want to retrieve metadata in your application then all you need to do is watch for tag messages on your pipeline's bus. This interface is only for setting metadata, not for extracting it. To set tags from the application, find tagsetter elements and set tags using e.g. merge_tags() or add_tags(). The application should do that before the element goes to Gst::STATE_PAUSED.

## Constructor & Destructor Documentation

## TagSetter() [1/2]

Gst::TagSetter::TagSetter | ( |  | ) |

protected

You should derive from this class to use it.

## TagSetter() [2/2]

Gst::TagSetter::TagSetter | ( | TagSetter&& | src | ) |

noexcept

## ~TagSetter()

Gst::TagSetter::~TagSetter | ( |  | ) |

override noexcept

## Member Function Documentation

## add_interface()

static void Gst::TagSetter::add_interface | ( | GType | gtype_implementer | ) |

static

## add_tag() [1/6]

void Gst::TagSetter::add_tag | ( | Tag | tag,
|  | const Glib::ValueBase & | value,
|  | TagMergeMode | mode = `TAG_MERGE_PREPEND`
| ) |  |

Adds the given Glib::ValueBase on the setter using the given merge mode.

Parameters

  tag | The tag to set.
  value | The value to set the tag to.
  mode | The mode to use.

## add_tag() [2/6]

void Gst::TagSetter::add_tag | ( | const Glib::ustring & | tag,
|  | const Glib::ValueBase & | value,
|  | TagMergeMode | mode = `TAG_MERGE_PREPEND`
| ) |  |

Adds the given Glib::ValueBase on the setter using the given merge mode.

Parameters

  tag | The tag to set.
  value | The value to set the tag to.
  mode | The mode to use.

## add_tag() [3/6]

template <class DataType >

void Gst::TagSetter::add_tag | ( | Tag | tag,
|  | const DataType & | data,
|  | TagMergeMode | mode = `TAG_MERGE_PREPEND`
| ) |  |

Adds the given value on the setter using the given merge mode.

Parameters

  tag | The tag to set.
  data | The value to set the tag to (this may be any supported C++ type).
  mode | The mode to use.

## add_tag() [4/6]

template <class DataType >

void Gst::TagSetter::add_tag | ( | const Glib::ustring & | tag,
|  | const DataType & | data,
|  | TagMergeMode | mode = `TAG_MERGE_PREPEND`
| ) |  |

Adds the given value on the setter using the given merge mode.

Parameters

  tag | The tag to set.
  data | The value to set the tag to (this may be any supported C++ type).
  mode | The mode to use.

## add_tag() [5/6]

void Gst::TagSetter::add_tag | ( | Tag | tag,
|  | const char * | data,
|  | TagMergeMode | mode = `TAG_MERGE_PREPEND`
| ) |  |

Adds the given value on the setter using the given merge mode.

Parameters

  tag | The tag to set.
  data | The value to set the tag to.
  mode | The mode to use.

## add_tag() [6/6]

void Gst::TagSetter::add_tag | ( | const Glib::ustring & | tag,
|  | const char * | data,
|  | TagMergeMode | mode = `TAG_MERGE_PREPEND`
| ) |  |

Adds the given value on the setter using the given merge mode.

Parameters

  tag | The tag to set.
  data | The value to set the tag to.
  mode | The mode to use.

## get_tag_list()

const Gst::TagList Gst::TagSetter::get_tag_list | ( |  | ) | const

Returns the current list of tags the setter uses.

The list should not be modified or freed.

This function is not thread-safe.

Returns
  A current snapshot of the taglist used in the setter or `nullptr` if none is used.

## get_tag_merge_mode()

TagMergeMode Gst::TagSetter::get_tag_merge_mode | ( |  | ) | const

Queries the mode by which tags inside the setter are overwritten by tags from events.

Returns
  The merge mode used inside the element.

## get_type()

static GType Gst::TagSetter::get_type | ( |  | ) |

static

Get the GType for this class, for use with the underlying GObject type system.

## gobj() [1/2]

GstTagSetter* Gst::TagSetter::gobj | ( |  | ) |

inline

Provides access to the underlying C GObject.

## gobj() [2/2]

const GstTagSetter* Gst::TagSetter::gobj | ( |  | ) | const

inline

Provides access to the underlying C GObject.

## merge_tags()

void Gst::TagSetter::merge_tags | ( | const Gst::TagList& | list,
|  | TagMergeMode | mode = `TAG_MERGE_PREPEND`
| ) |  |

Merges the given list into the setter's list using the given mode.

Parameters

  list | A tag list to merge from.
  mode | The mode to merge with.

## operator=()

TagSetter& Gst::TagSetter::operator= | ( | TagSetter&& | src | ) |

noexcept

## reset_tags()

void Gst::TagSetter::reset_tags | ( |  | ) |

Reset the internal taglist.

Elements should call this from within the state-change handler.

## set_tag_merge_mode()

void Gst::TagSetter::set_tag_merge_mode | ( | TagMergeMode | mode | ) |

Sets the given merge mode that is used for adding tags from events to tags specified by this interface.

The default is Gst::TAG_MERGE_KEEP, which keeps the tags set with this interface and discards tags from events.

Parameters

  mode | The mode with which tags are added.

## Friends And Related Function Documentation

## wrap()

Glib::RefPtr< Gst::TagSetter > wrap | ( | GstTagSetter * | object,
|  | bool | take_copy = `false`
| ) |  |

related

A Glib::wrap() method for this object.

Parameters

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns
  A C++ instance that wraps this C instance.