Class: TagLib::Ogg::XiphComment

Inherits:
Tag
  • Object
show all
Defined in:
docs/taglib/ogg.rb

Overview

Xiph comments (aka VorbisComment), a metadata format used for Ogg Vorbis and other codecs.

A Xiph comment is structured as a set of fields. Each field has a name and a value. Multiple fields with the same name are allowed, so you can also view it as a map from names to a list of values.

Instance Attribute Summary collapse

Attributes inherited from Tag

#album, #artist, #comment, #genre, #title, #track, #year

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Tag

#empty?

Instance Attribute Details

#vendor_idString (readonly)

Returns vendor ID of the encoder used.

Returns:

  • (String)

    vendor ID of the encoder used


115
116
117
# File 'docs/taglib/ogg.rb', line 115

def vendor_id
  @vendor_id
end

Class Method Details

.check_key(key) ⇒ Boolean

Returns True if the specified string is a valid Xiph comment key.

Returns:

  • (Boolean)

    True if the specified string is a valid Xiph comment key.

Since:

  • 1.0.0


82
83
# File 'docs/taglib/ogg.rb', line 82

def self.check_key(key)
end

Instance Method Details

#add_field(name, value, replace = true) ⇒ void

This method returns an undefined value.

Add a name-value pair to the comment.

Parameters:

  • name (String)

    field name

  • value (String)

    field value

  • replace (Boolean) (defaults to: true)

    if true, all existing fields with the given name will be replaced


22
23
# File 'docs/taglib/ogg.rb', line 22

def add_field(name, value, replace=true)
end

#add_picture(picture) ⇒ void

This method returns an undefined value.

Add a picture.

Parameters:

Since:

  • 1.0.0


96
97
# File 'docs/taglib/ogg.rb', line 96

def add_picture(picture)
end

#contains?(name) ⇒ Boolean

Check if the comment contains a field.

Parameters:

  • name (String)

    field name

Returns:

  • (Boolean)

29
30
# File 'docs/taglib/ogg.rb', line 29

def contains?(name)
end

#field_countInteger

Count the number of fields (including the pictures).

Returns:

  • (Integer)

    the number of fields in the comment (name-value pairs)


35
36
# File 'docs/taglib/ogg.rb', line 35

def field_count
end

#field_list_mapHash<String, Array<String>>

Get the contents of the comment as a hash, with the key being a field name String and the value a list of field values for that key. Example result:

{ 'TITLE' => ["Title"],
  'GENRE' => ["Rock", "Pop"] }

Note that the returned hash is read-only. Changing it will have no effect on the comment; use #add_field and #remove_fields for that.

Returns:

  • (Hash<String, Array<String>>)

    a hash from field names to value lists


51
52
# File 'docs/taglib/ogg.rb', line 51

def field_list_map
end

#picture_listArray<TagLib::FLAC::Picture>

Returns The list of the pictures associated to this comment.

Returns:

Since:

  • 1.0.0


88
89
# File 'docs/taglib/ogg.rb', line 88

def picture_list
end

#remove_all_fieldsObject

Remove all the fields.

Since:

  • 1.0.0


76
77
# File 'docs/taglib/ogg.rb', line 76

def remove_all_fields
end

#remove_all_picturesvoid

This method returns an undefined value.

Remove all the pictures.

Since:

  • 1.0.0


111
112
# File 'docs/taglib/ogg.rb', line 111

def remove_all_pictures
end

#remove_field(name) ⇒ void #remove_field(name, value) ⇒ void

This method returns an undefined value.

Remove one or more fields.

Overloads:

  • #remove_field(name) ⇒ void

    Removes all fields with the given name.

    Parameters:

    • name (String)

      field name

  • #remove_field(name, value) ⇒ void

    Removes the field with the given name and value.

    Parameters:

    • name (String)

      field name

    • value (String)

      field value

Since:

  • 1.0.0


70
71
# File 'docs/taglib/ogg.rb', line 70

def remove_fields
end

#remove_picture(picture) ⇒ void

This method returns an undefined value.

Remove a picture.

Parameters:

Since:

  • 1.0.0


104
105
# File 'docs/taglib/ogg.rb', line 104

def remove_picture(picture)
end