id3v2

package
v0.0.0-...-f3a3104 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const PictureTypeOther = 0

PictureTypeOther APIC picture type other

View Source
const TextEncodingUTF8 = 3

TextEncodingUTF8 constant for UTF-8 encoding in ID3v2

Variables

This section is empty.

Functions

func Encode

func Encode(w io.Writer, frames []Frame) (int, error)

Encode write ID3v2 tag

Types

type APICFrame

type APICFrame struct {
	MIMEType    string
	PictureType uint8
	Description string
	Data        []byte
}

APICFrame ID3v2 APIC frame

func (*APICFrame) ID3v2FrameID

func (af *APICFrame) ID3v2FrameID() string

ID3v2FrameID picture frame ID

func (*APICFrame) ID3v2FrameWriteTo

func (af *APICFrame) ID3v2FrameWriteTo(w io.Writer) (int, error)

ID3v2FrameWriteTo picture frame bytes

type COMMFrame

type COMMFrame struct {
	Language    string // 3 bytes
	Description string
	Text        string
}

COMMFrame ID3v2 COMM frame

func (*COMMFrame) ID3v2FrameID

func (cf *COMMFrame) ID3v2FrameID() string

ID3v2FrameID comment frame ID

func (*COMMFrame) ID3v2FrameWriteTo

func (cf *COMMFrame) ID3v2FrameWriteTo(w io.Writer) (int, error)

ID3v2FrameWriteTo comment frame bytes

type Frame

type Frame interface {
	ID3v2FrameID() string
	ID3v2FrameWriteTo(w io.Writer) (int, error)
}

Frame is an interface implemented by types to serialize to a ID3v2 frame

type TextFrame

type TextFrame struct {
	ID   string // 4 bytes
	Text string
}

TextFrame ID3v2 text frame

func (*TextFrame) ID3v2FrameID

func (tf *TextFrame) ID3v2FrameID() string

ID3v2FrameID text frame ID

func (*TextFrame) ID3v2FrameWriteTo

func (tf *TextFrame) ID3v2FrameWriteTo(w io.Writer) (int, error)

ID3v2FrameWriteTo write text frame

Jump to

Keyboard shortcuts

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