mp3

package module
v0.0.0-...-8c15c1c Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: Unlicense Imports: 10 Imported by: 0

README

mp3

Utility to get id3v2 frame information from MP3 files

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Err_NoID3v2Tag             = errors.New("No ID3v2 Tag found")
	Err_EOF                    = errors.New("End of frames")
	Err_InvalidSyncSafe        = errors.New("Non-SyncSafe byte in integer")
	Err_IllegalID3v2Header     = errors.New("Illegal ID3v2 header data")
	Err_IllegalID3v2ExtHeader  = errors.New("Illegal ID3v2 extended header data")
	Err_UnknownID3v2Version    = errors.New("Unknown ID3v2 version")
	Err_ObsoleteID3v2Version   = errors.New("Obsolete ID3v2 version")
	Err_IllegalFrame           = errors.New("Illegal frame header")
	Err_IllegalFrameData       = errors.New("Illegal/Unknown frame data")
	Err_IllegalFrameString     = errors.New("Illegal frame string")
	Err_IllegalFrameStringType = errors.New("Illegal frame string type")
)
View Source
var Dbg = dbg.Dbg{false, 0}

Functions

func InvalidID3v2FrameID

func InvalidID3v2FrameID(s string) bool

Types

type ID3v2Frame

type ID3v2Frame struct {
	Tag    string
	Size   uint32 // data len size if id3v2.4
	Flags  [2]byte
	Data   []byte
	VerMaj byte
	// contains filtered or unexported fields
}

func (ID3v2Frame) ToString

func (frm ID3v2Frame) ToString() (string, error)

type MP3File

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

func OpenMP3File

func OpenMP3File(filename string) (*MP3File, error)

Opens a file, may or maynot be an MP3 file...

func (*MP3File) Close

func (m *MP3File) Close()

func (*MP3File) FindFrame

func (m *MP3File) FindFrame(f string) (ID3v2Frame, error)

func (*MP3File) ID3Area

func (m *MP3File) ID3Area() int

func (*MP3File) ID3v2Flags

func (m *MP3File) ID3v2Flags() byte

func (*MP3File) ID3v2Version

func (m *MP3File) ID3v2Version() (int, int)

func (*MP3File) Path

func (m *MP3File) Path() string

func (*MP3File) ReadID3v2Frame

func (m *MP3File) ReadID3v2Frame() (ID3v2Frame, error)

func (*MP3File) ValidateID3v2File

func (m *MP3File) ValidateID3v2File() error

Validates a file has ID3v2 tag at start, captures info & updates bufio buffer only if ID3v2 tag found

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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