id3

package
v0.0.0-...-106ff61 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2012 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package id3 implements basic ID3 parsing for MP3 files.

Instead of providing access to every single ID3 frame this package exposes only the ID3v2 header and a few basic fields such as the artist, album, year, etc...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ISO8859_1ToUTF8

func ISO8859_1ToUTF8(data []byte) string

Types

type EmbeddedPicture

type EmbeddedPicture struct {
	PictureType byte
	MIMEType    string
	Image       []byte
}

type File

type File struct {
	Header ID3v2Header

	Name     string
	Artist   string
	Album    string
	Year     string
	Track    string
	Disc     string
	Genre    string
	Length   string
	Pictures []EmbeddedPicture
}

A parsed ID3 file with common fields exposed.

func Read

func Read(reader io.Reader) *File

Parse the input for ID3 information. Returns nil if parsing failed or the input didn't contain ID3 information.

func (*File) GetCoverPicture

func (f *File) GetCoverPicture() (cover []byte)

type ID3v2Header

type ID3v2Header struct {
	Version           int
	MinorVersion      int
	Unsynchronization bool
	Extended          bool
	Experimental      bool
	Footer            bool
	Size              int32
}

A parsed ID3v2 header as defined in Section 3 of http://id3.org/id3v2.4.0-structure

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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