frame

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	V24CommonIDs = map[string]string{
		"Title":            "TIT2",
		"Artist":           "TPE1",
		"Album":            "TALB",
		"Year":             "TYER",
		"Genre":            "TCON",
		"Attached picture": "APIC",
		"USLT":             "USLT",
		"Comment":          "COMM",
	}
)

Actual IDs for ID3v2.4

Functions

This section is empty.

Types

type CommentFrame added in v0.5.1

type CommentFrame struct {
	// contains filtered or unexported fields
}

Just implementation of CommentFramer interface.

func (CommentFrame) Bytes added in v0.5.1

func (cf CommentFrame) Bytes() ([]byte, error)

func (CommentFrame) Description added in v0.5.1

func (cf CommentFrame) Description() string

func (CommentFrame) Encoding added in v0.5.1

func (cf CommentFrame) Encoding() util.Encoding

func (CommentFrame) Language added in v0.5.1

func (cf CommentFrame) Language() string

func (*CommentFrame) SetDescription added in v0.5.1

func (cf *CommentFrame) SetDescription(d string)

func (*CommentFrame) SetEncoding added in v0.5.1

func (cf *CommentFrame) SetEncoding(e util.Encoding)

func (*CommentFrame) SetLanguage added in v0.5.1

func (cf *CommentFrame) SetLanguage(lang string)

func (*CommentFrame) SetText added in v0.5.1

func (cf *CommentFrame) SetText(text string)

func (CommentFrame) Text added in v0.5.1

func (cf CommentFrame) Text() string

type CommentFramer added in v0.5.1

type CommentFramer interface {
	Framer

	Encoding() util.Encoding
	SetEncoding(util.Encoding)

	Language() string
	SetLanguage(string)

	Description() string
	SetDescription(string)

	Text() string
	SetText(string)
}

CommentFramer is used to work with COMM frames.

type CommentSequence added in v0.5.1

type CommentSequence struct {
	// contains filtered or unexported fields
}

CommentSequence stores several comment frames. Key for CommentSequence is language and description, so there is only one comment frame with the same language and description.

It's only needed for internal operations. Users of library id3v2 should not use any sequence in no case.

func (*CommentSequence) AddFrame added in v0.5.1

func (cs *CommentSequence) AddFrame(f Framer)

func (CommentSequence) Comment added in v0.5.1

func (cs CommentSequence) Comment(language string, description string) CommentFramer

func (CommentSequence) Frames added in v0.5.1

func (cs CommentSequence) Frames() []Framer

type Framer

type Framer interface {
	Bytes() ([]byte, error)
}

Framer provides a generic interface for frames.

type PictureFrame

type PictureFrame struct {
	// contains filtered or unexported fields
}

Just implementation of PictureFramer interface.

func (PictureFrame) Bytes added in v0.5.1

func (pf PictureFrame) Bytes() ([]byte, error)

func (PictureFrame) Description

func (pf PictureFrame) Description() string

func (PictureFrame) Encoding added in v0.5.1

func (pf PictureFrame) Encoding() util.Encoding

func (PictureFrame) MimeType

func (pf PictureFrame) MimeType() string

func (PictureFrame) Picture

func (pf PictureFrame) Picture() io.Reader

func (PictureFrame) PictureType

func (pf PictureFrame) PictureType() byte

func (*PictureFrame) SetDescription

func (pf *PictureFrame) SetDescription(desc string)

func (*PictureFrame) SetEncoding added in v0.5.1

func (pf *PictureFrame) SetEncoding(e util.Encoding)

func (*PictureFrame) SetMimeType

func (pf *PictureFrame) SetMimeType(mt string)

func (*PictureFrame) SetPicture

func (pf *PictureFrame) SetPicture(rd io.Reader)

func (*PictureFrame) SetPictureFromFile

func (pf *PictureFrame) SetPictureFromFile(name string) error

func (*PictureFrame) SetPictureType

func (pf *PictureFrame) SetPictureType(pt byte)

type PictureFramer

type PictureFramer interface {
	Framer

	Encoding() util.Encoding
	SetEncoding(util.Encoding)

	Description() string
	SetDescription(string)

	MimeType() string
	SetMimeType(string)

	Picture() io.Reader
	SetPicture(io.Reader)

	PictureType() byte
	SetPictureType(byte)
}

PictureFramer is used to work with APIC frames.

type PictureSequence added in v0.5.1

type PictureSequence struct {
	// contains filtered or unexported fields
}

PictureSequence stores several picture frames. Key for PictureSequence is a picture type code, so there is only one picture with the same picture type.

It's only needed for internal operations. Users of library id3v2 should not use any sequence in no case.

func (*PictureSequence) AddFrame added in v0.5.1

func (ps *PictureSequence) AddFrame(f Framer)

func (PictureSequence) Frames added in v0.5.1

func (ps PictureSequence) Frames() []Framer

func (PictureSequence) Picture added in v0.5.1

func (ps PictureSequence) Picture(pt byte) PictureFramer

type Sequencer added in v0.5.1

type Sequencer interface {
	AddFrame(Framer)
	Frames() []Framer
}

Sequencer is used to manipulate with frames, which can be in tag more than one (e.g. APIC, COMM, USLT, SYLT and etc.)

It's only needed for internal operations. Users of library id3v2 must not use any sequence in no case

func NewCommentSequence added in v0.5.1

func NewCommentSequence() Sequencer

func NewPictureSequence added in v0.5.1

func NewPictureSequence() Sequencer

func NewUSLFSequence added in v0.5.1

func NewUSLFSequence() Sequencer

type TextFrame

type TextFrame struct {
	// contains filtered or unexported fields
}

func (TextFrame) Bytes added in v0.5.1

func (tf TextFrame) Bytes() ([]byte, error)

func (TextFrame) Encoding added in v0.5.1

func (tf TextFrame) Encoding() util.Encoding

func (*TextFrame) SetEncoding added in v0.5.1

func (tf *TextFrame) SetEncoding(e util.Encoding)

func (*TextFrame) SetText

func (tf *TextFrame) SetText(text string)

func (TextFrame) Text

func (tf TextFrame) Text() string

type TextFramer

type TextFramer interface {
	Framer

	Encoding() util.Encoding
	SetEncoding(util.Encoding)

	Text() string
	SetText(string)
}

TextFramer is used to work with all text frames (all T*** frames like TIT2, TALB and so on).

type USLFSequence added in v0.5.1

type USLFSequence struct {
	// contains filtered or unexported fields
}

USLFSequence stores several USLT frames. Key for USLFSequence is language and content descriptor, so there is only one USLT frame with the same language and content descriptor.

It's only needed for internal operations. Users of library id3v2 should not use any sequence in no case.

func (*USLFSequence) AddFrame added in v0.5.1

func (us *USLFSequence) AddFrame(f Framer)

func (USLFSequence) Frames added in v0.5.1

func (us USLFSequence) Frames() []Framer

func (USLFSequence) USLF added in v0.5.1

func (us USLFSequence) USLF(language string, contentDescriptor string) UnsynchronisedLyricsFramer

type UnsynchronisedLyricsFrame added in v0.5.1

type UnsynchronisedLyricsFrame struct {
	// contains filtered or unexported fields
}

Just implementation of UnsynchronisedLyricsFramer interface.

func (UnsynchronisedLyricsFrame) Bytes added in v0.5.1

func (uslf UnsynchronisedLyricsFrame) Bytes() ([]byte, error)

func (UnsynchronisedLyricsFrame) ContentDescriptor added in v0.5.1

func (uslf UnsynchronisedLyricsFrame) ContentDescriptor() string

func (UnsynchronisedLyricsFrame) Encoding added in v0.5.1

func (uslf UnsynchronisedLyricsFrame) Encoding() util.Encoding

func (UnsynchronisedLyricsFrame) Language added in v0.5.1

func (uslf UnsynchronisedLyricsFrame) Language() string

func (UnsynchronisedLyricsFrame) Lyrics added in v0.5.1

func (uslf UnsynchronisedLyricsFrame) Lyrics() string

func (*UnsynchronisedLyricsFrame) SetContentDescriptor added in v0.5.1

func (uslf *UnsynchronisedLyricsFrame) SetContentDescriptor(cd string)

func (*UnsynchronisedLyricsFrame) SetEncoding added in v0.5.1

func (uslf *UnsynchronisedLyricsFrame) SetEncoding(e util.Encoding)

func (*UnsynchronisedLyricsFrame) SetLanguage added in v0.5.1

func (uslf *UnsynchronisedLyricsFrame) SetLanguage(lang string)

func (*UnsynchronisedLyricsFrame) SetLyrics added in v0.5.1

func (uslf *UnsynchronisedLyricsFrame) SetLyrics(lyrics string)

type UnsynchronisedLyricsFramer added in v0.5.1

type UnsynchronisedLyricsFramer interface {
	Framer

	Encoding() util.Encoding
	SetEncoding(util.Encoding)

	Language() string
	SetLanguage(string)

	ContentDescriptor() string
	SetContentDescriptor(string)

	Lyrics() string
	SetLyrics(string)
}

UnsynchronisedLyricsFramer is used to work with USLT frames.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL