Home | Trees | Index | Help |
---|
Package tagger :: Module id3v2frame :: Class ID3v2BaseFrame |
|
ID3v2_2_Frame
,
ID3v2_3_Frame
Base ID3v2 Frame for 2.2, 2.3 and 2.4
Abstract class that defines basic functions that are common for 2.2, 2.3 and 2.4.
o_* functions means output_*, they output a bytestring encoding the given data
x_* functions means extract_*, they extract data into accessible structures when given a suitable length bytestreamMethod Summary | |
---|---|
creates an ID3v2BaseFrame structure. | |
creates a new frame header | |
o_apic(self)
| |
o_bin(self)
| |
o_comm(self)
| |
o_geob(self)
| |
o_pcnt(self)
| |
Converts a String or Unicode String to a byte string of specified encoding. | |
Output text bytestring | |
o_url(self)
| |
o_wxxx(self)
| |
Create a bytestring representing the frame contents and the field | |
output_field(self)
| |
parse_field(self)
| |
Parse the frame header from a bytestring | |
Extract APIC | |
x_bin(self)
| |
extract comment field | |
Extract GEOB | |
Extract Play Count | |
Extract Text Fields | |
x_url(self)
| |
Extract URL |
Instance Variable Summary | |
---|---|
counter : for playcount (PCNT) | |
desc : for geob and URL | |
encoding : optional - for text fields we have the encoding name | |
fid : frame id code | |
filename : filename for GEOB | |
flags : dictionary of flags for this frame | |
language : set if this frame is a comment (2 character code) | |
length : length of the frame in bytes | |
longcomment : set if this frame is a comment (optional) | |
mimetype : mimetype for GEOB, APIC | |
obj : data for GEOB | |
rawdata : rawdata of the rest of the frame minus the header | |
shortcomment : set if this frame is a comment | |
strings : a list of strings for text fields | |
url : for URL |
Class Variable Summary | |
---|---|
dict |
format_flags : format flags required |
int |
header_length : header portion length |
dict |
status_flags : status flags required |
dict |
supported : supported frame ids |
Method Details |
---|
__init__(self,
frame=None,
fid=None)
creates an ID3v2BaseFrame structure. If you specify frame, then it
will go into parse mode. If you specify the fid, then it will create a
new frame.
|
new_frame_header(self)creates a new frame header |
o_string(self, s, toenc, fromenc='latin_1')Converts a String or Unicode String to a byte string of specified encoding.
|
o_text(self)Output text bytestring |
output(self)Create a bytestring representing the frame contents and the field
|
parse_frame_header(self, frame)Parse the frame header from a bytestring
|
x_apic(self)Extract APIC set: encoding, mimetype, desc, pict, picttype |
x_comm(self)extract comment field sets: encoding, lang, shortcomment, longcomment |
x_geob(self)Extract GEOB set: encoding, mimetype, filename, desc, obj |
x_pcnt(self)Extract Play Count sets: counter |
x_text(self)Extract Text Fields
|
x_wxxx(self)Extract URL set: encoding, desc, url |
Instance Variable Details |
---|
counterfor playcount (PCNT) |
descfor geob and URL |
encodingoptional - for text fields we have the encoding name |
fidframe id code |
filenamefilename for GEOB |
flagsdictionary of flags for this frame |
languageset if this frame is a comment (2 character code) |
lengthlength of the frame in bytes |
longcommentset if this frame is a comment (optional) |
mimetypemimetype for GEOB, APIC |
objdata for GEOB |
rawdatarawdata of the rest of the frame minus the header |
shortcommentset if this frame is a comment |
stringsa list of strings for text fields |
urlfor URL |
Class Variable Details |
---|
format_flagsformat flags required
|
header_lengthheader portion length
|
status_flagsstatus flags required
|
supportedsupported frame ids
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.0 on Sun Apr 10 14:44:00 2005 | http://epydoc.sf.net |