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



113
114
115
# File 'docs/taglib/ogg.rb', line 113

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



80
81
# File 'docs/taglib/ogg.rb', line 80

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



20
21
# File 'docs/taglib/ogg.rb', line 20

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



94
95
# File 'docs/taglib/ogg.rb', line 94

def add_picture(picture)
end

#contains?(name) ⇒ Boolean

Check if the comment contains a field.

Parameters:

  • name (String)

    field name

Returns:

  • (Boolean)


27
28
# File 'docs/taglib/ogg.rb', line 27

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)



33
34
# File 'docs/taglib/ogg.rb', line 33

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



49
50
# File 'docs/taglib/ogg.rb', line 49

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



86
87
# File 'docs/taglib/ogg.rb', line 86

def picture_list
end

#remove_all_fieldsObject

Remove all the fields.

Since:

  • 1.0.0



74
75
# File 'docs/taglib/ogg.rb', line 74

def remove_all_fields
end

#remove_all_picturesvoid

This method returns an undefined value.

Remove all the pictures.

Since:

  • 1.0.0



109
110
# File 'docs/taglib/ogg.rb', line 109

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



68
69
# File 'docs/taglib/ogg.rb', line 68

def remove_fields
end

#remove_picture(picture) ⇒ void

This method returns an undefined value.

Remove a picture.

Parameters:

Since:

  • 1.0.0



102
103
# File 'docs/taglib/ogg.rb', line 102

def remove_picture(picture)
end