Class: TagLib::Ogg::XiphComment
Overview
Ogg Vorbis comment implementation. .
This class is an implementation of the Ogg Vorbis comment specification, to be found in section 5 of the Ogg Vorbis specification. Because this format is also used in other (currently unsupported) Xiph.org formats, it has been made part of a generic implementation rather than being limited to strictly Vorbis.Vorbis comments are a simple vector of keys and values, called fields. Multiple values for a given key are supported.fieldListMap()
Instance Method Summary collapse
-
#addField(key, value, replace = true) ⇒ Object
Add the field specified by key with the data value.
-
#album ⇒ Object
Returns the album name; if no album name is present in the tag String::null will be returned.
- #album= ⇒ Object
-
#artist ⇒ Object
Returns the artist name; if no artist name is present in the tag String::null will be returned.
- #artist= ⇒ Object
-
#comment ⇒ Object
Returns the track comment; if no comment is present in the tag String::null will be returned.
- #comment= ⇒ Object
-
#contains(key) ⇒ Object
Returns true if the field is contained within the comment.This is safer than checking for membership in the FieldListMap.
- #empty? ⇒ Boolean
-
#fieldCount ⇒ Object
Returns the number of fields present in the comment.
-
#fieldListMap ⇒ Object
Returns a reference to the map of field lists.
-
#genre ⇒ Object
Returns the genre name; if no genre is present in the tag String::null will be returned.
- #genre= ⇒ Object
-
#isEmpty ⇒ Object
Returns true if the tag does not contain any data.
-
#removeField(key, value = String::null) ⇒ Object
Remove the field specified by key with the data value.
-
#render(addFramingBit) ⇒ Object
Renders the comment to a ByteVector suitable for inserting into a file.If addFramingBit is true the standard Vorbis comment framing bit will be appended.
-
#setAlbum(s) ⇒ Object
Sets the album to s.
-
#setArtist(s) ⇒ Object
Sets the artist to s.
-
#setComment(s) ⇒ Object
Sets the comment to s.
-
#setGenre(s) ⇒ Object
Sets the genre to s.
-
#setTitle(s) ⇒ Object
Sets the title to s.
-
#setTrack(i) ⇒ Object
Sets the track to i.
-
#setYear(i) ⇒ Object
Sets the year to i.
-
#title ⇒ Object
Returns the track name; if no track name is present in the tag String::null will be returned.
- #title= ⇒ Object
-
#track ⇒ Object
Returns the track number; if there is no track number set, this will return 0.
- #track= ⇒ Object
-
#vendorID ⇒ Object
Returns the vendor ID of the Ogg Vorbis encoder.
-
#year ⇒ Object
Returns the year; if there is no year set, this will return 0.
- #year= ⇒ Object
Instance Method Details
#addField(key, value, replace = true) ⇒ Object
Add the field specified by key with the data value. If replace is true, then all of the other fields with the same key will be removed first.If the field value is empty, the field will be removed.
649 650 |
# File 'lib/TagLib_doc.rb', line 649 def addField(key,value,replace = true) end |
#album ⇒ Object
Returns the album name; if no album name is present in the tag String::null will be returned.
704 705 |
# File 'lib/TagLib_doc.rb', line 704 def album() end |
#album= ⇒ Object
716 717 |
# File 'lib/TagLib_doc.rb', line 716 def album=() end |
#artist ⇒ Object
Returns the artist name; if no artist name is present in the tag String::null will be returned.
671 672 |
# File 'lib/TagLib_doc.rb', line 671 def artist() end |
#artist= ⇒ Object
675 676 |
# File 'lib/TagLib_doc.rb', line 675 def artist=() end |
#comment ⇒ Object
Returns the track comment; if no comment is present in the tag String::null will be returned.
685 686 |
# File 'lib/TagLib_doc.rb', line 685 def comment() end |
#comment= ⇒ Object
697 698 |
# File 'lib/TagLib_doc.rb', line 697 def comment=() end |
#contains(key) ⇒ Object
Returns true if the field is contained within the comment.This is safer than checking for membership in the FieldListMap.
727 728 |
# File 'lib/TagLib_doc.rb', line 727 def contains(key) end |
#empty? ⇒ Boolean
699 700 |
# File 'lib/TagLib_doc.rb', line 699 def empty?() end |
#fieldCount ⇒ Object
Returns the number of fields present in the comment.
709 710 |
# File 'lib/TagLib_doc.rb', line 709 def fieldCount() end |
#fieldListMap ⇒ Object
Returns a reference to the map of field lists. Because Xiph comments support multiple fields with the same key, a pure Map would not work. As such this is a Map of string lists, keyed on the comment field name.The standard set of Xiph/Vorbis fields (which may or may not be contained in any specific comment) is:
TITLE
VERSION
ALBUM
ARTIST
PERFORMER
COPYRIGHT
ORGANIZATION
DESCRIPTION
GENRE
DATE
LOCATION
CONTACT
ISRC
For a more detailed description of these fields, please see the Ogg Vorbis specification, section 5.2.2.1.The Ogg Vorbis comment specification does allow these key values to be either upper or lower case. However, it is conventional for them to be upper case. As such, TagLib, when parsing a Xiph/Vorbis comment, converts all fields to uppercase. When you are using this data structure, you will need to specify the field name in upper case. You should not modify this data structure directly, instead use addField() and removeField().
767 768 |
# File 'lib/TagLib_doc.rb', line 767 def fieldListMap() end |
#genre ⇒ Object
Returns the genre name; if no genre is present in the tag String::null will be returned.
772 773 |
# File 'lib/TagLib_doc.rb', line 772 def genre() end |
#genre= ⇒ Object
774 775 |
# File 'lib/TagLib_doc.rb', line 774 def genre=() end |
#isEmpty ⇒ Object
Returns true if the tag does not contain any data. This should be reimplemented in subclasses that provide more than the basic tagging abilities in this class.
732 733 |
# File 'lib/TagLib_doc.rb', line 732 def isEmpty() end |
#removeField(key, value = String::null) ⇒ Object
Remove the field specified by key with the data value. If value is null, all of the fields with the given key will be removed.
690 691 |
# File 'lib/TagLib_doc.rb', line 690 def removeField(key,value = String::null) end |
#render(addFramingBit) ⇒ Object
Renders the comment to a ByteVector suitable for inserting into a file.If addFramingBit is true the standard Vorbis comment framing bit will be appended. However some formats (notably FLAC) do not work with this in place.
714 715 |
# File 'lib/TagLib_doc.rb', line 714 def render(addFramingBit) end |
#setAlbum(s) ⇒ Object
Sets the album to s. If s is String::null then this value will be cleared.
721 722 |
# File 'lib/TagLib_doc.rb', line 721 def setAlbum(s) end |
#setArtist(s) ⇒ Object
Sets the artist to s. If s is String::null then this value will be cleared.
680 681 |
# File 'lib/TagLib_doc.rb', line 680 def setArtist(s) end |
#setComment(s) ⇒ Object
Sets the comment to s. If s is String::null then this value will be cleared.
779 780 |
# File 'lib/TagLib_doc.rb', line 779 def setComment(s) end |
#setGenre(s) ⇒ Object
Sets the genre to s. If s is String::null then this value will be cleared. For tag formats that use a fixed set of genres, the appropriate value will be selected based on a string comparison. A list of available genres for those formats should be available in that type's implementation.
639 640 |
# File 'lib/TagLib_doc.rb', line 639 def setGenre(s) end |
#setTitle(s) ⇒ Object
Sets the title to s. If s is String::null then this value will be cleared.
656 657 |
# File 'lib/TagLib_doc.rb', line 656 def setTitle(s) end |
#setTrack(i) ⇒ Object
Sets the track to i. If s is 0 then this value will be cleared.
695 696 |
# File 'lib/TagLib_doc.rb', line 695 def setTrack(i) end |
#setYear(i) ⇒ Object
Sets the year to i. If s is 0 then this value will be cleared.
666 667 |
# File 'lib/TagLib_doc.rb', line 666 def setYear(i) end |
#title ⇒ Object
Returns the track name; if no track name is present in the tag String::null will be returned.
644 645 |
# File 'lib/TagLib_doc.rb', line 644 def title() end |
#title= ⇒ Object
651 652 |
# File 'lib/TagLib_doc.rb', line 651 def title=() end |
#track ⇒ Object
Returns the track number; if there is no track number set, this will return 0.
784 785 |
# File 'lib/TagLib_doc.rb', line 784 def track() end |
#track= ⇒ Object
634 635 |
# File 'lib/TagLib_doc.rb', line 634 def track=() end |
#vendorID ⇒ Object
Returns the vendor ID of the Ogg Vorbis encoder. libvorbis 1.0 as the most common case always returns "Xiph.Org libVorbis I 20020717".
789 790 |
# File 'lib/TagLib_doc.rb', line 789 def vendorID() end |
#year ⇒ Object
Returns the year; if there is no year set, this will return 0.
661 662 |
# File 'lib/TagLib_doc.rb', line 661 def year() end |
#year= ⇒ Object
673 674 |
# File 'lib/TagLib_doc.rb', line 673 def year=() end |