frames

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package frames will provide abstractions for processing indivudal frames within tags

Index

Constants

View Source
const (
	// Version2 denotes the selection of v2.2.*
	Version2 = 2
	// Version3 denotes the selection of v2.3.*
	Version3 = 3
	// Version4 denotes the selection of v2.4.*
	Version4 = 4
	// LengthUnicode defines the byte size for each character
	LengthUnicode = 2
	// LengthStandard defines the normal byte size for a character
	LengthStandard = 1
)

Variables

View Source
var (
	// Version22Frames defines the version 2.2 frame mapping
	// http://id3.org/id3v2-00
	Version22Frames = map[string]func() IFrame{
		"BUF": Gen("BUF", "Recommended buffer size", Version2),
		"CNT": Gen("CNT", "Play counter", Version2),
		"COM": Gen("COM", "Comments", Version2),
		"CRA": Gen("CRA", "Audio encryption", Version2),
		"CRM": Gen("CRM", "Encrypted meta frame", Version2),
		"ETC": Gen("ETC", "Event timing codes", Version2),
		"EQU": Gen("EQU", "Equalization", Version2),
		"GEO": Gen("GEO", "General encapsulated object", Version2),
		"IPL": Gen("IPL", "Involved people list", Version2),
		"LNK": Gen("LNK", "Linked information", Version2),
		"MCI": Gen("MCI", "Music CD identifier", Version2),
		"MLL": Gen("MLL", "MPEG location lookup table", Version2),
		"PIC": Gen("PIC", "Attached picture", Version2),
		"POP": Gen("POP", "Popularimeter", Version2),
		"REV": Gen("REV", "Reverb", Version2),
		"RVA": Gen("RVA", "Relative volume adjustment", Version2),
		"SLT": Gen("SLT", "Synchronized lyric/text", Version2),
		"STC": Gen("STC", "Synched tempo codes", Version2),
		"TAL": Gen("TAL", "Album/Movie/Show title", Version2),
		"TBP": Gen("TBP", "BPM (Beats Per Minute)", Version2),
		"TCM": Gen("TCM", "Composer", Version2),
		"TCO": Gen("TCO", "Content type", Version2),
		"TCR": Gen("TCR", "Copyright message", Version2),
		"TDA": Gen("TDA", "Date", Version2),
		"TDY": Gen("TDY", "Playlist delay", Version2),
		"TEN": Gen("TEN", "Encoded by", Version2),
		"TFT": Gen("TFT", "File type", Version2),
		"TIM": Gen("TIM", "Time", Version2),
		"TKE": Gen("TKE", "Initial key", Version2),
		"TLA": Gen("TLA", "Language(s)", Version2),
		"TLE": Gen("TLE", "Length", Version2),
		"TMT": Gen("TMT", "Media type", Version2),
		"TOA": Gen("TOA", "Original artist(s)/performer(s)", Version2),
		"TOF": Gen("TOF", "Original filename", Version2),
		"TOL": Gen("TOL", "Original Lyricist(s)/text writer(s)", Version2),
		"TOR": Gen("TOR", "Original release year", Version2),
		"TOT": Gen("TOT", "Original album/Movie/Show title", Version2),
		"TP1": Gen("TP1", "Lead artist(s)/Lead performer(s)/Soloist(s)/Performing group", Version2),
		"TP2": Gen("TP2", "Band/Orchestra/Accompaniment", Version2),
		"TP3": Gen("TP3", "Conductor/Performer refinement", Version2),
		"TP4": Gen("TP4", "Interpreted, remixed, or otherwise modified by", Version2),
		"TPA": Gen("TPA", "Part of a set", Version2),
		"TPB": Gen("TPB", "Publisher", Version2),
		"TRC": Gen("TRC", "ISRC (International Standard Recording Code)", Version2),
		"TRD": Gen("TRD", "Recording dates", Version2),
		"TRK": Gen("TRK", "Track number/Position in set", Version2),
		"TSI": Gen("TSI", "Size", Version2),
		"TSS": Gen("TSS", "Software/hardware and settings used for encoding", Version2),
		"TT1": Gen("TT1", "Content group description", Version2),
		"TT2": Gen("TT2", "Title/Songname/Content description", Version2),
		"TT3": Gen("TT3", "Subtitle/Description refinement", Version2),
		"TXT": Gen("TXT", "Lyricist/text writer", Version2),
		"TXX": Gen("TXX", "User defined text information frame", Version2),
		"TYE": Gen("TYE", "Year", Version2),
		"UFI": Gen("UFI", "Unique file identifier", Version2),
		"ULT": Gen("ULT", "Unsynchronized lyric/text transcription", Version2),
		"WAF": Gen("WAF", "Official audio file webpage", Version2),
		"WAR": Gen("WAR", "Official artist/performer webpage", Version2),
		"WAS": Gen("WAS", "Official audio source webpage", Version2),
		"WCM": Gen("WCM", "Commercial information", Version2),
		"WCP": Gen("WCP", "Copyright/Legal information", Version2),
		"WPB": Gen("WPB", "Publishers official webpage", Version2),
		"WXX": Gen("WXX", "User defined URL link frame", Version2),
	}
)
View Source
var (
	// Version23Frames defines the version 2.3 frame mapping
	// http://id3.org/id3v2.3.0
	Version23Frames = map[string]func() IFrame{
		"AENC": Gen("AENC", "Audio encryption", Version3),
		"APIC": Gen("APIC", "Attached picture", Version3),
		"COMM": Gen("COMM", "User comment", Version3),
		"COMR": Gen("COMR", "Commercial frame", Version3),
		"ENCR": Gen("ENCR", "Encryption method registration", Version3),
		"EQUA": Gen("EQUA", "Equalization", Version3),
		"ETCO": Gen("ETCO", "Event timing codes", Version3),
		"GEOB": Gen("GEOB", "General encapsulated object", Version3),
		"GRID": Gen("GRID", "Group identification registration", Version3),
		"IPLS": Gen("IPLS", "Involved people list", Version3),
		"LINK": Gen("LINK", "Linked information", Version3),
		"MCDI": Gen("MCDI", "Music CD identifier", Version3),
		"MLLT": Gen("MLLT", "MPEG location lookup table", Version3),
		"OWNE": Gen("OWNE", "Ownership frame", Version3),
		"PRIV": Gen("PRIV", "Private frame", Version3),
		"PCNT": Gen("PCNT", "Play counter", Version3),
		"POPM": Gen("POPM", "Popularimeter", Version3),
		"POSS": Gen("POSS", "Position synchronisation frame", Version3),
		"RBUF": Gen("RBUF", "Recommended buffer size", Version3),
		"RVAD": Gen("RVAD", "Relative volume adjustment", Version3),
		"RVRB": Gen("RVRB", "Reverb", Version3),
		"SYLT": Gen("SYLT", "Synchronized lyrics/text", Version3),
		"SYTC": Gen("SYTC", "Synchronized tempo codes", Version3),
		"TALB": Gen("TALB", "Album/Show/Movie title", Version3),
		"TBPM": Gen("TBPM", "BPM (beats per minute)", Version3),
		"TCOM": Gen("TCOM", "Composer", Version3),
		"TCON": Gen("TCON", "Content type", Version3),
		"TCOP": Gen("TCOP", "Copyright message", Version3),
		"TDAT": Gen("TDAT", "Date", Version3),
		"TDLY": Gen("TDLY", "Playlist delay", Version3),
		"TENC": Gen("TENC", "Encoded by", Version3),
		"TEXT": Gen("TEXT", "Lyricist/Text writer", Version3),
		"TFLT": Gen("TFLT", "File type", Version3),
		"TIME": Gen("TIME", "Time", Version3),
		"TIT1": Gen("TIT1", "Content group description", Version3),
		"TIT2": Gen("TIT2", "Title/songname/content description", Version3),
		"TIT3": Gen("TIT3", "Subtitle/Description refinement", Version3),
		"TKEY": Gen("TKEY", "Initial key", Version3),
		"TLAN": Gen("TLAN", "Language(s)", Version3),
		"TLEN": Gen("TLEN", "Length", Version3),
		"TMED": Gen("TMED", "Media type", Version3),
		"TOAL": Gen("TOAL", "Original album/movie/show title", Version3),
		"TOFN": Gen("TOFN", "Original filename", Version3),
		"TOLY": Gen("TOLY", "Original lyricist(s)/text writer(s)", Version3),
		"TOPE": Gen("TOPE", "Original artist(s)/performer(s)", Version3),
		"TORY": Gen("TORY", "Original release year", Version3),
		"TOWN": Gen("TOWN", "File owner/licensee", Version3),
		"TPE1": Gen("TPE1", "Lead performer(s)/Soloist(s)", Version3),
		"TPE2": Gen("TPE2", "Band/orchestra/accompaniment", Version3),
		"TPE3": Gen("TPE3", "Conductor/performer refinement", Version3),
		"TPE4": Gen("TPE4", "Interpreted, remixed, or otherwise modified by", Version3),
		"TPOS": Gen("TPOS", "Part of a set", Version3),
		"TPUB": Gen("TPUB", "Publisher", Version3),
		"TRCK": Gen("TRCK", "Track number/Position in set", Version3),
		"TRDA": Gen("TRDA", "Recording dates", Version3),
		"TRSN": Gen("TRSN", "Internet radio station name", Version3),
		"TRSO": Gen("TRSO", "Internet radio station owner", Version3),
		"TSIZ": Gen("TSIZ", "Size", Version3),
		"TSRC": Gen("TSRC", "ISRC (international standard recording code)", Version3),
		"TSSE": Gen("TSSE", "Software/Hardware and settings used for encoding", Version3),
		"TYER": Gen("TYER", "Year", Version3),
		"TXXX": Gen("TXXX", "User defined text information frame", Version3),
		"UFID": Gen("UFID", "Unique File Identifier", Version3),
		"USER": Gen("USER", "Terms of use", Version3),
		"USLT": Gen("USLT", "Unsynchronised lyrics/text transcription", Version3),
		"WCOM": Gen("WCOM", "Commercial information webpage", Version3),
		"WCOP": Gen("WCOP", "Copyright/legal information webpage", Version3),
		"WOAF": Gen("WOAF", "Official audio file webpage", Version3),
		"WOAR": Gen("WOAR", "Official artist/performer webpage", Version3),
		"WOAS": Gen("WOAS", "Official audio source webpage", Version3),
		"WORS": Gen("WORS", "Official internet radio station homepage", Version3),
		"WPAY": Gen("WPAY", "Payment webpage", Version3),
		"WPUB": Gen("WPUB", "Publishers official webpage", Version3),
		"WXXX": Gen("WXXX", "User defined webpage", Version3),
	}
)
View Source
var (
	// Version24Frames defines the version 2.4 frame mapping
	// http://id3.org/id3v2.4.0-frames
	Version24Frames = map[string]func() IFrame{
		"AENC": Gen("AENC", "Audio encryption", Version4),
		"APIC": Gen("APIC", "Attached picture", Version4),
		"ASPI": Gen("ASPI", "Audio seek point index", Version4),
		"COMM": Gen("COMM", "Comments", Version4),
		"COMR": Gen("COMR", "Commercial frame", Version4),
		"ENCR": Gen("ENCR", "Encryption method registration", Version4),
		"EQUA": Gen("EQUA", "Equalization", Version4),
		"EQU2": Gen("EQU2", "Equalisation (2)", Version4),
		"ETCO": Gen("ETCO", "Event timing codes", Version4),
		"GEOB": Gen("GEOB", "General encapsulated object", Version4),
		"GRID": Gen("GRID", "Group registration identifier", Version4),
		"IPLS": Gen("IPLS", "Involved people list", Version4),
		"LINK": Gen("LINK", "Linked information", Version4),
		"MCDI": Gen("MCDI", "Music CD identifier", Version4),
		"MLLT": Gen("MLLT", "MPEG location lookup table", Version4),
		"OWNE": Gen("OWNE", "Ownership frame", Version4),
		"PRIV": Gen("PRIV", "Private frame", Version4),
		"PCNT": Gen("PCNT", "Play counter", Version4),
		"POPM": Gen("POPM", "Popularimeter", Version4),
		"POSS": Gen("POSS", "Position synchronisation frame", Version4),
		"RBUF": Gen("RBUF", "Recommended buffer size", Version4),
		"RVAD": Gen("RVAD", "Relative volume adjustment", Version4),
		"RVA2": Gen("RVA2", "Relative volume adjustment (2)", Version4),
		"RVRB": Gen("RVRB", "Reverb", Version4),
		"SEEK": Gen("SEEK", "Seek frame", Version4),
		"SIGN": Gen("SIGN", "Signature frame", Version4),
		"SYLT": Gen("SYLT", "Synchronised lyric/text", Version4),
		"SYTC": Gen("SYTC", "Synchronised tempo codes", Version4),
		"TALB": Gen("TALB", "Album/Movie/Show title", Version4),
		"TBPM": Gen("TBPM", "BPM (beats per minute)", Version4),
		"TCOM": Gen("TCOM", "Composer", Version4),
		"TCON": Gen("TCON", "Content type", Version4),
		"TCOP": Gen("TCOP", "Copyright message", Version4),
		"TDAT": Gen("TDAT", "Date", Version4),
		"TDEN": Gen("TDEN", "Encoding time", Version4),
		"TDLY": Gen("TDLY", "Playlist delay", Version4),
		"TDOR": Gen("TDOR", "Original release time", Version4),
		"TDRC": Gen("TDRC", "Recording time", Version4),
		"TDRL": Gen("TDRL", "Release time", Version4),
		"TDTG": Gen("TDTG", "Tagging time", Version4),
		"TENC": Gen("TENC", "Encoded by", Version4),
		"TEXT": Gen("TEXT", "Lyricist/Text writer", Version4),
		"TFLT": Gen("TFLT", "File type", Version4),
		"TIME": Gen("TIME", "Time", Version4),
		"TIPL": Gen("TIPL", "Involved people list", Version4),
		"TIT1": Gen("TIT1", "Content group description", Version4),
		"TIT2": Gen("TIT2", "Title/songname/content description", Version4),
		"TIT3": Gen("TIT3", "Subtitle/Description refinement", Version4),
		"TKEY": Gen("TKEY", "Initial key", Version4),
		"TLAN": Gen("TLAN", "Language(s)", Version4),
		"TLEN": Gen("TLEN", "Length", Version4),
		"TMCL": Gen("TMCL", "Musician credits list", Version4),
		"TMED": Gen("TMED", "Media type", Version4),
		"TMOO": Gen("TMOO", "Mood", Version4),
		"TOAL": Gen("TOAL", "Original album/movie/show title", Version4),
		"TOFN": Gen("TOFN", "Original filename", Version4),
		"TOLY": Gen("TOLY", "Original lyricist(s)/text writer(s)", Version4),
		"TOPE": Gen("TOPE", "Original artist(s)/performer(s)", Version4),
		"TORY": Gen("TORY", "Original release year", Version4),
		"TOWN": Gen("TOWN", "File owner/licensee", Version4),
		"TPE1": Gen("TPE1", "Lead performer(s)/Soloist(s)", Version4),
		"TPE2": Gen("TPE2", "Band/orchestra/accompaniment", Version4),
		"TPE3": Gen("TPE3", "Conductor/performer refinement", Version4),
		"TPE4": Gen("TPE4", "Interpreted, remixed, or otherwise modified by", Version4),
		"TPOS": Gen("TPOS", "Part of a set", Version4),
		"TPRO": Gen("TPRO", "Produced notice", Version4),
		"TPUB": Gen("TPUB", "Publisher", Version4),
		"TRCK": Gen("TRCK", "Track number/Position in set", Version4),
		"TRDA": Gen("TRDA", "Recording dates", Version4),
		"TRSN": Gen("TRSN", "Internet radio station name", Version4),
		"TRSO": Gen("TRSO", "Internet radio station owner", Version4),
		"TSIZ": Gen("TSIZ", "Size", Version4),
		"TSOA": Gen("TSOA", "Album sort order", Version4),
		"TSOP": Gen("TSOP", "Performer sort order", Version4),
		"TSOT": Gen("TSOT", "Title sort order", Version4),
		"TSRC": Gen("TSRC", "ISRC (international standard recording code)", Version4),
		"TSSE": Gen("TSSE", "Software/Hardware and settings used for encoding", Version4),
		"TSST": Gen("TSST", "Set subtitle", Version4),
		"TYER": Gen("TYER", "Year", Version4),
		"TXXX": Gen("TXXX", "User defined text information frame", Version4),
		"UFID": Gen("TYER", "Year", Version4),
		"USER": Gen("USER", "Terms of use", Version4),
		"USLT": Gen("USLT", "Unsynchronised lyric/text transcription", Version4),
		"WCOM": Gen("WCOM", "Commercial information", Version4),
		"WCOP": Gen("WCOP", "Copyright/Legal information", Version4),
		"WOAF": Gen("WOAF", "Official audio file webpage", Version4),
		"WOAR": Gen("WOAR", "Official artist/performer webpage", Version4),
		"WOAS": Gen("WOAS", "Official audio source webpage", Version4),
		"WORS": Gen("WORS", "Official Internet radio station homepage", Version4),
		"WPAY": Gen("WPAY", "Payment", Version4),
		"WPUB": Gen("WPUB", "Publishers official webpage", Version4),
		"WXXX": Gen("WXXX", "User defined URL link frame", Version4),
	}
)

Functions

func Gen

func Gen(n, d string, s int) func() IFrame

Gen provides a wrapper for generating Frames

func GetBitInt

func GetBitInt(b byte, ltr bool, l int) int

GetBitInt will generate an int from a range of bits in a byte

func GetBoolBit

func GetBoolBit(b byte, i uint) bool

GetBoolBit will retrieve the bit from a byte at the offset as a boolean

func GetBytePercent

func GetBytePercent(b []byte, sig uint) int

GetBytePercent will fetch an int from a byte as a percentage

func GetDirectInt

func GetDirectInt(b byte) int

GetDirectInt uses fmt to convert from []byte to int rather than using strconv

func GetInt

func GetInt(b []byte) int

GetInt will make use of GetStr and convert the input to an Integer

func GetSize

func GetSize(b []byte, sig uint) int

GetSize is used for grabbing the int value of the byte size pieces

func GetStr

func GetStr(b []byte) string

GetStr will convert the byte slice into a String

func GetUnicodeStr

func GetUnicodeStr(d []byte) string

GetUnicodeStr will read a unicode byte slice to a string

Types

type AENC

type AENC struct {
	Frame

	Contact       string `json:"contact"`
	PreviewStart  []byte `json:"preview_start"`
	PreviewLength []byte `json:"preview_length"`
	Encryption    []byte `json:"encryption"`
}

AENC contains the AENC frame for Audio encryption

func (*AENC) DisplayContent

func (a *AENC) DisplayContent() string

DisplayContent will comprehensively display known information

func (*AENC) ProcessData

func (a *AENC) ProcessData(l int, b []byte) IFrame

ProcessData will accept the incoming chunk and process it for the frame specifically

type APIC

type APIC struct {
	Frame

	MimeType    string `json:"mime_type"`
	PictureType string `json:"picture_type"`
	Image       []byte `json:"image" yaml:"image"`
	Title       string `json:"title"`
}

APIC will house any specific APIC frame data

func (*APIC) DisplayContent

func (a *APIC) DisplayContent() string

DisplayContent will comprehensively display known information for APIC

func (*APIC) ProcessData

func (a *APIC) ProcessData(s int, d []byte) IFrame

ProcessData grabs the meta and binary detail for the image

type ASPI

type ASPI struct {
	Frame

	Start        int    `json:"start"`
	Length       int    `json:"length"`
	Number       int    `json:"number"`
	Bits         int    `json:"bits"`
	FractionData []byte `json:"fraction_data"`
}

ASPI defines structure for a seek point index within the audio

func (*ASPI) DisplayContent

func (a *ASPI) DisplayContent() string

DisplayContent will comprehensively display known information

func (*ASPI) ProcessData

func (a *ASPI) ProcessData(s int, d []byte) IFrame

ProcessData will handle the acquisition of all data

type COMM

type COMM struct {
	Frame

	Language           string `json:"language"`
	ContentDescription string `json:"content_description"`
	Comment            string `json:"comment"`
}

COMM contains the processing house for Comments

func (*COMM) DisplayContent

func (c *COMM) DisplayContent() string

DisplayContent will comprehensively display known information

func (*COMM) ProcessData

func (c *COMM) ProcessData(s int, d []byte) IFrame

ProcessData will handle the acquisition of all data

type COMR

type COMR struct {
	Frame

	Price          string `json:"price"`
	ValidUntil     string `json:"valid_until"`
	ContactURL     string `json:"contact_url"`
	ReceivedAs     byte   `json:"received_as"`
	SellerName     string `json:"seller_name"`
	CommercialName string `json:"commercial_name"`
	PictureMime    string `json:"picture_mime"`
}

COMR contains commercial details

func (*COMR) DisplayContent

func (c *COMR) DisplayContent() string

DisplayContent will comprehensively display known information

func (*COMR) ProcessData

func (c *COMR) ProcessData(s int, d []byte) IFrame

ProcessData will parse the frame bytes

type CRM

type CRM struct {
	Frame

	Owner       string `json:"owner"`
	Explanation string `json:"explanation"`
	Block       []byte `json:"block"`
}

CRM provides legacy meta encryption store

func (*CRM) DisplayContent

func (c *CRM) DisplayContent() string

DisplayContent shows a simple overview for encryption

func (*CRM) ProcessData

func (c *CRM) ProcessData(s int, d []byte) IFrame

ProcessData will take some bytes and parse it

type ENCR

type ENCR struct {
	Frame

	Owner          string `json:"owner"`
	Method         byte   `json:"method"`
	EncryptionData []byte `json:"encryption_data"`
}

ENCR contains information for encryption registration

func (*ENCR) DisplayContent

func (e *ENCR) DisplayContent() string

DisplayContent will comprehensively display known information

func (*ENCR) ProcessData

func (e *ENCR) ProcessData(s int, d []byte) IFrame

ProcessData will parse bytes for details

type EQU2

type EQU2 struct {
	Frame

	Interpolation  string   `json:"interpolation"`
	Identification string   `json:"identification"`
	Points         []*point `json:"points"`
}

EQU2 provides equalisation details for the file

func (*EQU2) DisplayContent

func (e *EQU2) DisplayContent() string

DisplayContent provides a clean display of key information

func (*EQU2) ProcessData

func (e *EQU2) ProcessData(s int, d []byte) IFrame

ProcessData will take bytes and mush into something useful

type EQUA

type EQUA struct {
	Frame

	Adjustment int `json:"adjustment"`
	Steps      []*step
}

EQUA contains equalisation settings for the file

func (*EQUA) DisplayContent

func (e *EQUA) DisplayContent() string

DisplayContent will comprehensively display known information

func (*EQUA) GetName

func (e *EQUA) GetName() string

GetName will provide the Name of EQUA

func (*EQUA) ProcessData

func (e *EQUA) ProcessData(s int, d []byte) IFrame

ProcessData will parse bytes for details

type ETCO

type ETCO struct {
	Frame

	Format byte   `json:"encoding"`
	Codes  []byte `json:"codes"`
}

ETCO provides timing codes for events in the file

func (*ETCO) DisplayContent

func (e *ETCO) DisplayContent() string

DisplayContent will comprehensively display known information

func (*ETCO) ProcessData

func (e *ETCO) ProcessData(s int, d []byte) IFrame

ProcessData will handle the acquisition of all data

type Frame

type Frame struct {
	Name        string `json:"name"`
	Version     int    `json:"-" yaml:"-"`
	Description string `json:"description"`
	Data        []byte `json:"-" yaml:"-"`
	Cleaned     string `json:"cleaned"`
	Size        int    `json:"size"`

	Flags        int  `json:"flags"`
	TagPreserve  bool `json:"tag_preserve"`
	FilePreserve bool `json:"file_preserve"`
	ReadOnly     bool `json:"read_only"`
	Compression  bool `json:"compression"`
	Encryption   bool `json:"encryption"`
	Grouping     bool `json:"grouping"`

	Utf16 bool `json:"utf16"`
}

Frame defines a base structure shared across all Frame types. This frame format is "inherited" within specific Frame type for shared usage.

func (*Frame) GetExplain

func (f *Frame) GetExplain() string

GetExplain will provide the English description for a Frames' purpose

func (*Frame) GetLength

func (f *Frame) GetLength() int

GetLength will provide the length of the frame content

func (*Frame) GetName

func (f *Frame) GetName() string

GetName simply returns the stored Name for the frame

func (*Frame) Init

func (f *Frame) Init(n, d string, v int)

Init will provide the initial values

type FrameFile

type FrameFile interface {
	Close() error
	Read([]byte) (int, error)
	Seek(int64, int) (int64, error)
	Write([]byte) (int, error)
}

FrameFile provides an interface for overloading of os.File

type GEOB

type GEOB struct {
	Frame

	MimeType           string `json:"mime_type"`
	ExternalFilename   string `json:"external_filename"`
	ContentDescription string `json:"content_description"`
	Object             []byte `json:"object"`
}

GEOB is a general encapsulated object frame

func (*GEOB) DisplayContent

func (g *GEOB) DisplayContent() string

DisplayContent will comprehensively display known information

func (*GEOB) ProcessData

func (g *GEOB) ProcessData(s int, d []byte) IFrame

ProcessData will parse bytes for details

type GRID

type GRID struct {
	Frame

	Owner         string `json:"owner"`
	Symbol        byte   `json:"symbol"`
	DependantData []byte `json:"dependant_data"`
}

GRID provides a group registration identifier

func (*GRID) DisplayContent

func (g *GRID) DisplayContent() string

DisplayContent will comprehensively display known information

func (*GRID) ProcessData

func (g *GRID) ProcessData(s int, d []byte) IFrame

ProcessData will parse bytes for details

type IFrame

type IFrame interface {
	DisplayContent() string

	GetExplain() string
	GetLength() int
	GetName() string

	Init(n, d string, s int)
	ProcessData(int, []byte) IFrame
}

IFrame is a shared interface for use with defining types of Frame formats for processing within the ID3 tag.

func NewFrame

func NewFrame(n, d string, s int) IFrame

NewFrame provides a fresh instance of a frame

type IPLS

type IPLS struct {
	Frame

	People map[string]string `json:"people"`
}

IPLS provides the involved people list frame

func (*IPLS) DisplayContent

func (i *IPLS) DisplayContent() string

DisplayContent will comprehensively display known information

func (*IPLS) GetName

func (i *IPLS) GetName() string

GetName includes deprecation notice for v2.4.*

func (*IPLS) ProcessData

func (i *IPLS) ProcessData(s int, d []byte) IFrame

ProcessData will handle the acquisition of all data

type LINK struct {
	Frame

	Identifier     []byte `json:"identifier"`
	URL            string `json:"url"`
	AdditionalData string `json:"additional_data"`
}

LINK provides linked information for the file

func (*LINK) DisplayContent

func (l *LINK) DisplayContent() string

DisplayContent will comprehensively display known information

func (*LINK) ProcessData

func (l *LINK) ProcessData(s int, d []byte) IFrame

ProcessData will parse bytes for details

type MCDI

type MCDI struct {
	Frame

	DiscHeader []byte   `json:"disc_header"`
	Tracks     [][]byte `json:"tracks"`
}

MCDI is the music cd identifier frame

func (*MCDI) DisplayContent

func (m *MCDI) DisplayContent() string

DisplayContent will comprehensively display known information

func (*MCDI) ProcessData

func (m *MCDI) ProcessData(s int, d []byte) IFrame

ProcessData will handle the acquisition of all data

type MLLT

type MLLT struct {
	Frame

	FramesBetween       []byte `json:"frames_between"`
	BytesBetween        []byte `json:"bytes_between"`
	MillisecondsBetween []byte `json:"milliseconds_between"`
	BitsForBytes        byte   `json:"bits_for_bytes"`
	BitsForMilliseconds byte   `json:"bits_for_milliseconds"`
	Deviations          []byte `json:"deviations"`
}

MLLT defines the mpeg location lookup table

func (*MLLT) DisplayContent

func (m *MLLT) DisplayContent() string

DisplayContent will comprehensively display known information

func (*MLLT) ProcessData

func (m *MLLT) ProcessData(s int, d []byte) IFrame

ProcessData will handle the acquisition of all data

type OWNE

type OWNE struct {
	Frame

	Currency     string `json:"currency"`
	Paid         string `json:"paid"`
	PurchaseDate string `json:"purchase_date"`
	Seller       string `json:"seller"`
}

OWNE is the ownership frame

func (*OWNE) DisplayContent

func (o *OWNE) DisplayContent() string

DisplayContent will comprehensively display known information

func (*OWNE) ProcessData

func (o *OWNE) ProcessData(s int, d []byte) IFrame

ProcessData will parse bytes for details

type PCNT

type PCNT struct {
	Frame

	Count int `json:"count"`
}

PCNT provides a frame to store a count of the times this file has been played

func (*PCNT) DisplayContent

func (p *PCNT) DisplayContent() string

DisplayContent will comprehensively display known information

func (*PCNT) ProcessData

func (p *PCNT) ProcessData(s int, d []byte) IFrame

ProcessData will parse bytes for details

type PIC

type PIC struct {
	*Frame
}

PIC is for older picture embed frames

type POPM

type POPM struct {
	Frame

	Email      string `json:"email"`
	Popularity int    `json:"popularity"`
	Counter    int    `json:"counter"`
}

POPM provides a popularity measurement frame for this file individually

func (*POPM) DisplayContent

func (p *POPM) DisplayContent() string

DisplayContent will comprehensively display known information

func (*POPM) ProcessData

func (p *POPM) ProcessData(s int, d []byte) IFrame

ProcessData will parse bytes for details

type POSS

type POSS struct {
	Frame

	Format   string `json:"format"`
	Position []byte `json:"position"`
}

POSS provides a frame for position synchronisation

func (*POSS) DisplayContent

func (p *POSS) DisplayContent() string

DisplayContent will comprehensively display known information

func (*POSS) ProcessData

func (p *POSS) ProcessData(s int, d []byte) IFrame

ProcessData will parse bytes for details

type PRIV

type PRIV struct {
	Frame

	Owner       string `json:"owner"`
	PrivateData []byte `json:"private_data"`
}

PRIV provides a private frame

func (*PRIV) DisplayContent

func (p *PRIV) DisplayContent() string

DisplayContent will comprehensively display known information

func (*PRIV) ProcessData

func (p *PRIV) ProcessData(s int, d []byte) IFrame

ProcessData will parse bytes for details

type RBUF

type RBUF struct {
	Frame

	BufferSize   int  `json:"buffer_size"`
	EmbeddedInfo bool `json:"embedded_info"`
	Offset       int  `json:"offset"`
}

RBUF provides the recommended buffer size

func (*RBUF) DisplayContent

func (r *RBUF) DisplayContent() string

DisplayContent will comprehensively display known information

func (*RBUF) ProcessData

func (r *RBUF) ProcessData(s int, d []byte) IFrame

ProcessData will parse bytes for details

type RVA2

type RVA2 struct {
	Frame

	Identification string     `json:"identification"`
	Channels       []*channel `json:"channels"`
}

RVA2 provides relative volume adjustment for the file

func (*RVA2) DisplayContent

func (r *RVA2) DisplayContent() string

DisplayContent provides a clean display of key information

func (*RVA2) ProcessData

func (r *RVA2) ProcessData(s int, d []byte) IFrame

ProcessData will take bytes and mush into something useful

type RVAD

type RVAD struct {
	Frame

	IncrementRight     bool    `json:"increment_right"`
	IncrementLeft      bool    `json:"increment_left"`
	IncrementRightBack bool    `json:"increment_right_back"`
	IncrementLeftBack  bool    `json:"increment_left_back"`
	IncrementCenter    bool    `json:"increment_center"`
	IncrementBass      bool    `json:"increment_bass"`
	Bytes              int     `json:"bits"`
	RelativeRight      float64 `json:"relative_right"`
	RelativeLeft       float64 `json:"relative_left"`
	PeakRight          float64 `json:"peak_right"`
	PeakLeft           float64 `json:"peak_left"`
	RelativeRightBack  float64 `json:"relative_right_back"`
	RelativeLeftBack   float64 `json:"relative_left_back"`
	PeakRightBack      float64 `json:"peak_right_back"`
	PeakLeftBack       float64 `json:"peak_left_back"`
	RelativeCenter     float64 `json:"relative_center"`
	PeakCenter         float64 `json:"peak_center"`
	RelativeBass       float64 `json:"relative_bass"`
	PeakBass           float64 `json:"peak_bass"`
}

RVAD is the frame for relative volume adjustment

func (*RVAD) DisplayContent

func (r *RVAD) DisplayContent() string

DisplayContent will comprehensively display known information

func (*RVAD) GetName

func (r *RVAD) GetName() string

GetName includes deprecation notice for v2.4.*

func (*RVAD) ProcessData

func (r *RVAD) ProcessData(s int, d []byte) IFrame

ProcessData will handle the acquisition of all data

type RVRB

type RVRB struct {
	Frame

	ReverbLeft   int `json:"reverb_left"`
	ReverbRight  int `json:"reverb_right"`
	BouncesLeft  int `json:"bounces_left"`
	BouncesRight int `json:"bounces_right"`
	FeedbackLtol int `json:"feedback_ltol"`
	FeedbackLtor int `json:"feedback_ltor"`
	FeedbackRtor int `json:"feedback_rtor"`
	FeedbackRtol int `json:"feedback_rtol"`
	PremixLtor   int `json:"premix_ltor"`
	PremixRtol   int `json:"premix_rtol"`
}

RVRB contains equalisation settings for the file

func (*RVRB) DisplayContent

func (r *RVRB) DisplayContent() string

DisplayContent will comprehensively display known information

func (*RVRB) ProcessData

func (r *RVRB) ProcessData(s int, d []byte) IFrame

ProcessData will parse bytes for details

type SEEK

type SEEK struct {
	Frame

	SeekPoint int `json:"seek_point"`
}

SEEK provides Seek details for the file

func (*SEEK) DisplayContent

func (e *SEEK) DisplayContent() string

DisplayContent provides a clean display of key information

func (*SEEK) ProcessData

func (e *SEEK) ProcessData(s int, d []byte) IFrame

ProcessData will take bytes and mush into something useful

type SIGN

type SIGN struct {
	Frame

	Symbol    byte   `json:"symbol"`
	Signature []byte `json:"signature"`
}

SIGN provides signature details for the file

func (*SIGN) DisplayContent

func (i *SIGN) DisplayContent() string

DisplayContent provides a clean display of key information

func (*SIGN) ProcessData

func (i *SIGN) ProcessData(s int, d []byte) IFrame

ProcessData will take bytes and mush into something useful

type SYLT

type SYLT struct {
	Frame

	Language    string     `json:"language"`
	Format      string     `json:"format"`
	ContentType string     `json:"content_type"`
	Descriptor  string     `json:"lyrics"`
	Items       []*txtItem `json:"items"`
}

SYLT defines the Synchronised lyrics/text

func (*SYLT) DisplayContent

func (y *SYLT) DisplayContent() string

DisplayContent will comprehensively display known information

func (*SYLT) ProcessData

func (y *SYLT) ProcessData(s int, d []byte) IFrame

ProcessData will handle the acquisition of all data

type SYTC

type SYTC struct {
	Frame

	Format    string   `json:"format"`
	TempoData []*tempo `json:"tempo_data"`
}

SYTC defines the synchronised tempo codes

func (*SYTC) DisplayContent

func (z *SYTC) DisplayContent() string

DisplayContent will comprehensively display known information

func (*SYTC) ProcessData

func (z *SYTC) ProcessData(s int, d []byte) IFrame

ProcessData will handle the acquisition of all data

type TEXT

type TEXT struct {
	Frame
}

TEXT houses anything just for a TEXT frame

func (*TEXT) DisplayContent

func (t *TEXT) DisplayContent() string

DisplayContent will comprehensively display known information

func (*TEXT) GetName

func (t *TEXT) GetName() string

GetName will add deprecated notes where appropriate based on version

func (*TEXT) ProcessData

func (t *TEXT) ProcessData(s int, d []byte) IFrame

ProcessData will handle the acquisition of all data

type TXXX

type TXXX struct {
	Frame

	Type  string `json:"type"`
	Value string `json:"value"`
}

TXXX provides the user string from the file

func (*TXXX) DisplayContent

func (t *TXXX) DisplayContent() string

DisplayContent will comprehensively display known information

func (*TXXX) ProcessData

func (t *TXXX) ProcessData(s int, d []byte) IFrame

ProcessData will handle the acquisition of all data

type UFID

type UFID struct {
	Frame

	Owner      string `json:"owner"`
	Identifier []byte `json:"identifier"`
}

UFID provides descriptor of uniqueness for the file

func (*UFID) DisplayContent

func (u *UFID) DisplayContent() string

DisplayContent will comprehensively display known information

func (*UFID) ProcessData

func (u *UFID) ProcessData(s int, d []byte) IFrame

ProcessData will handle the acquisition of all data

type USER

type USER struct {
	Frame

	Language string `json:"language"`
	Text     string `json:"text"`
}

USER provides terms of use for this file

func (*USER) DisplayContent

func (u *USER) DisplayContent() string

DisplayContent will comprehensively display known information

func (*USER) ProcessData

func (u *USER) ProcessData(s int, d []byte) IFrame

ProcessData will parse bytes for details

type USLT

type USLT struct {
	Frame

	Language   string `json:"language"`
	Descriptor string `json:"descriptor"`
	Lyrics     string `json:"lyrics"`
}

USLT defines the Unsynchronised lyrics/text transcription

func (*USLT) DisplayContent

func (u *USLT) DisplayContent() string

DisplayContent will comprehensively display known information

func (*USLT) ProcessData

func (u *USLT) ProcessData(s int, d []byte) IFrame

ProcessData will handle the acquisition of all data

type WOAF

type WOAF struct {
	Frame

	URL string `json:"url"`
}

WOAF provides standard URL frame handling functionality

func (*WOAF) DisplayContent

func (w *WOAF) DisplayContent() string

DisplayContent will comprehensively display known information

func (*WOAF) ProcessData

func (w *WOAF) ProcessData(s int, d []byte) IFrame

ProcessData will handle the acquisition of all data

type WXXX

type WXXX struct {
	Frame

	Title string `json:"title"`
	URL   string `json:"url"`
}

WXXX provides user defined webpage links

func (*WXXX) DisplayContent

func (w *WXXX) DisplayContent() string

DisplayContent will comprehensively display known information

func (*WXXX) ProcessData

func (w *WXXX) ProcessData(s int, d []byte) IFrame

ProcessData will handle the acquisition of all data

Jump to

Keyboard shortcuts

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