gstreamermm 0.10.11

- Main Page
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions
Gst::TagSetter Class Reference
gstreamermm Interfaces

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

Inheritance diagram for Gst::TagSetter:
[legend]
Collaboration diagram for Gst::TagSetter:
[legend]

List of all members.

## Public Member Functions

virtual | ~TagSetter ()
GstTagSetter* | gobj ()
| Provides access to the underlying C GObject.
const GstTagSetter* | gobj () const
| Provides access to the underlying C GObject.
void | reset_tags ()
| Reset the internal taglist.
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.
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.
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.
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.
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.
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.
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.
const Gst::TagList | get_tag_list () const
| Returns the current list of tags the setter uses.
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.
TagMergeMode | get_tag_merge_mode () const
| Queries the mode by which tags inside the setter are overwritten by tags from events.

## 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.

## Protected Member Functions

| TagSetter ()
| You should derive from this class to use it.

## 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.

## 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

Gst::TagSetter::TagSetter | ( |  | ) | `[protected]`

You should derive from this class to use it.

virtual Gst::TagSetter::~TagSetter | ( |  | ) | `[virtual]`

## Member Function Documentation

static void Gst::TagSetter::add_interface | ( | GType | gtype_implementer | ) | `[static]`

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.

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.

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.

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.

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.

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.

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 `0` if none is used.

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.

static GType Gst::TagSetter::get_type | ( |  | ) | `[static]`

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

Reimplemented in Gst::VorbisEnc, and Gst::VorbisTag.

GstTagSetter* Gst::TagSetter::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gst::VorbisEnc, and Gst::VorbisTag.

const GstTagSetter* Gst::TagSetter::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gst::VorbisEnc, and Gst::VorbisTag.

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.

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

Reset the internal taglist.

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

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

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.

The documentation for this class was generated from the following file:

- gstreamermm/tagsetter.h