id3v2

package
v0.0.0-...-c5379f9 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// HeaderTagID are the 3 bytes starting the ID3 v2 tag
	HeaderTagID = []byte{0x49, 0x44, 0x33}

	// ErrInvalidTagHeader
	ErrInvalidTagHeader = errors.New("invalid tag header")
)

Functions

This section is empty.

Types

type Flags

type Flags struct {
	Unsynchronisation     bool
	ExtendedHeader        bool
	ExperimentalIndicator bool
	FooterPresent         bool
}

type Frame

type Frame struct {
	Header [10]byte
	Data   []byte
}
type Header struct {
	Version Version
	Flags   Flags
	Size    int
}

type Tag

type Tag struct {
	Header *Header
	// contains filtered or unexported fields
}

func (*Tag) ReadHeader

func (t *Tag) ReadHeader(th TagHeader) error

ReadHeader reads the 10 bytes header and parses the data which gets stored in the tag header.

type TagHeader

type TagHeader [10]byte

TagHeader is the header content for an id3v2 tag

func (TagHeader) IsValidID

func (th TagHeader) IsValidID() bool

IsValidID checks that the tag header starts by the right ID

func (TagHeader) ReadFlags

func (th TagHeader) ReadFlags() Flags

ReadFlags reads the header flags

func (TagHeader) ReadSize

func (th TagHeader) ReadSize() (int, error)

ReadSize reads the size of the tag header

func (TagHeader) ReadVersion

func (th TagHeader) ReadVersion() Version

ReadVersion extracts the version information.

type Version

type Version struct {
	Major    uint8
	Revision uint8
}

Jump to

Keyboard shortcuts

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