|
@@ -43,48 +43,48 @@
|
|
|
(write-char (code-char ,(as-octet l3)) s)
|
|
(write-char (code-char ,(as-octet l3)) s)
|
|
|
(write-char (code-char ,(as-octet l4)) s))))
|
|
(write-char (code-char ,(as-octet l4)) s))))
|
|
|
|
|
|
|
|
-(defconstant +root+ (mk-mp4-atom-type #\R #\O #\O #\T) "fake root for tree")
|
|
|
|
|
-(defconstant +itunes-album+ (mk-mp4-atom-type #xa9 #\a #\l #\b) "text: album name")
|
|
|
|
|
-(defconstant +itunes-album-artist+ (mk-mp4-atom-type #\a #\A #\R #\T) "text: album artist")
|
|
|
|
|
-(defconstant +itunes-artist+ (mk-mp4-atom-type #xa9 #\A #\R #\T) "text: artist name")
|
|
|
|
|
-(defconstant +itunes-comment+ (mk-mp4-atom-type #xa9 #\c #\m #\t) "text: comment, commonly used by iTunes for sound info, etc")
|
|
|
|
|
-(defconstant +itunes-compilation+ (mk-mp4-atom-type #\c #\p #\i #\l) "byte/boolean: is this file part of a compilation?")
|
|
|
|
|
-(defconstant +itunes-composer+ (mk-mp4-atom-type #xa9 #\c #\o #\m) "text: composer name")
|
|
|
|
|
-(defconstant +itunes-copyright+ (mk-mp4-atom-type #\c #\p #\r #\t) "text: copyright info")
|
|
|
|
|
-(defconstant +itunes-cover-art+ (mk-mp4-atom-type #\c #\o #\v #\r) "octets: cover art, PNG, etc")
|
|
|
|
|
-(defconstant +itunes-disk+ (mk-mp4-atom-type #\d #\i #\s #\k) "octets: disk number, can be n of N")
|
|
|
|
|
-(defconstant +itunes-encoder+ (mk-mp4-atom-type #xa9 #\e #\n #\c) "text: who encoded")
|
|
|
|
|
-(defconstant +itunes-genre+ (mk-mp4-atom-type #\g #\n #\r #\e) "octets: genre of file")
|
|
|
|
|
-(defconstant +itunes-genre-x+ (mk-mp4-atom-type #xa9 #\g #\e #\n) "text: yet another genre atom")
|
|
|
|
|
-(defconstant +itunes-groups+ (mk-mp4-atom-type #xa9 #\g #\r #\p) "text: ???")
|
|
|
|
|
-(defconstant +itunes-lyrics+ (mk-mp4-atom-type #xa9 #\l #\y #\r) "text: lyrics tag")
|
|
|
|
|
-(defconstant +itunes-purchased-date+ (mk-mp4-atom-type #\p #\u #\r #\d) "text: when song was purchased")
|
|
|
|
|
-(defconstant +itunes-tempo+ (mk-mp4-atom-type #\t #\m #\p #\o) "octet: tempo of song")
|
|
|
|
|
-(defconstant +itunes-title+ (mk-mp4-atom-type #xa9 #\n #\a #\m) "text: title of song")
|
|
|
|
|
-(defconstant +itunes-tool+ (mk-mp4-atom-type #xa9 #\t #\o #\o) "text: what tool encoded this file")
|
|
|
|
|
-(defconstant +itunes-track+ (mk-mp4-atom-type #xa9 #\t #\r #\k) "octet: track number")
|
|
|
|
|
-(defconstant +itunes-track-n+ (mk-mp4-atom-type #\t #\r #\k #\n) "octet: yet another track number")
|
|
|
|
|
-(defconstant +itunes-writer+ (mk-mp4-atom-type #xa9 #\w #\r #\t) "text: who wrote the song")
|
|
|
|
|
-(defconstant +itunes-year+ (mk-mp4-atom-type #xa9 #\d #\a #\y) "text: year album was released")
|
|
|
|
|
-(defconstant +itunes-ilst-data+ (mk-mp4-atom-type #\d #\a #\t #\a) "carries the actual data under an ilst atom")
|
|
|
|
|
-
|
|
|
|
|
-(defconstant +m4-ftyp+ (mk-mp4-atom-type #\f #\t #\y #\p) "This should be the first atom type found in file")
|
|
|
|
|
-
|
|
|
|
|
-(defconstant +mp4-atom-hdlr+ (mk-mp4-atom-type #\h #\d #\l #\r) "Found under trak.mdia and tells what kind of handler it is")
|
|
|
|
|
-
|
|
|
|
|
-(defconstant +audioprop-mdhd+ (mk-mp4-atom-type #\m #\d #\h #\d) "Found under trak.mdia and holds data to calculate length of audio")
|
|
|
|
|
-(defconstant +audioprop-stsd+ (mk-mp4-atom-type #\s #\t #\s #\d) "Container atom: found under trak.mdia.minf.stbl and holds bit-rate, etc")
|
|
|
|
|
-(defconstant +audioprop-mp4a+ (mk-mp4-atom-type #\m #\p #\4 #\a) "Found under trak.mdia.minf.stbl")
|
|
|
|
|
-(defconstant +audioprop-esds+ (mk-mp4-atom-type #\e #\s #\d #\s) "Found under trak.mdia.minf.stbl.mp4a")
|
|
|
|
|
-
|
|
|
|
|
-(defconstant +mp4-atom-ilst+ (mk-mp4-atom-type #\i #\l #\s #\t))
|
|
|
|
|
-(defconstant +mp4-atom-mdia+ (mk-mp4-atom-type #\m #\d #\i #\a))
|
|
|
|
|
-(defconstant +mp4-atom-meta+ (mk-mp4-atom-type #\m #\e #\t #\a))
|
|
|
|
|
-(defconstant +mp4-atom-minf+ (mk-mp4-atom-type #\m #\i #\n #\f))
|
|
|
|
|
-(defconstant +mp4-atom-moov+ (mk-mp4-atom-type #\m #\o #\o #\v))
|
|
|
|
|
-(defconstant +mp4-atom-stbl+ (mk-mp4-atom-type #\s #\t #\b #\l))
|
|
|
|
|
-(defconstant +mp4-atom-trak+ (mk-mp4-atom-type #\t #\r #\a #\k))
|
|
|
|
|
-(defconstant +mp4-atom-udta+ (mk-mp4-atom-type #\u #\d #\t #\a))
|
|
|
|
|
|
|
+(defconstant* +root+ (mk-mp4-atom-type #\R #\O #\O #\T) "fake root for tree")
|
|
|
|
|
+(defconstant* +itunes-album+ (mk-mp4-atom-type #xa9 #\a #\l #\b) "text: album name")
|
|
|
|
|
+(defconstant* +itunes-album-artist+ (mk-mp4-atom-type #\a #\A #\R #\T) "text: album artist")
|
|
|
|
|
+(defconstant* +itunes-artist+ (mk-mp4-atom-type #xa9 #\A #\R #\T) "text: artist name")
|
|
|
|
|
+(defconstant* +itunes-comment+ (mk-mp4-atom-type #xa9 #\c #\m #\t) "text: comment, commonly used by iTunes for sound info, etc")
|
|
|
|
|
+(defconstant* +itunes-compilation+ (mk-mp4-atom-type #\c #\p #\i #\l) "byte/boolean: is this file part of a compilation?")
|
|
|
|
|
+(defconstant* +itunes-composer+ (mk-mp4-atom-type #xa9 #\c #\o #\m) "text: composer name")
|
|
|
|
|
+(defconstant* +itunes-copyright+ (mk-mp4-atom-type #\c #\p #\r #\t) "text: copyright info")
|
|
|
|
|
+(defconstant* +itunes-cover-art+ (mk-mp4-atom-type #\c #\o #\v #\r) "octets: cover art, PNG, etc")
|
|
|
|
|
+(defconstant* +itunes-disk+ (mk-mp4-atom-type #\d #\i #\s #\k) "octets: disk number, can be n of N")
|
|
|
|
|
+(defconstant* +itunes-encoder+ (mk-mp4-atom-type #xa9 #\e #\n #\c) "text: who encoded")
|
|
|
|
|
+(defconstant* +itunes-genre+ (mk-mp4-atom-type #\g #\n #\r #\e) "octets: genre of file")
|
|
|
|
|
+(defconstant* +itunes-genre-x+ (mk-mp4-atom-type #xa9 #\g #\e #\n) "text: yet another genre atom")
|
|
|
|
|
+(defconstant* +itunes-groups+ (mk-mp4-atom-type #xa9 #\g #\r #\p) "text: ???")
|
|
|
|
|
+(defconstant* +itunes-lyrics+ (mk-mp4-atom-type #xa9 #\l #\y #\r) "text: lyrics tag")
|
|
|
|
|
+(defconstant* +itunes-purchased-date+ (mk-mp4-atom-type #\p #\u #\r #\d) "text: when song was purchased")
|
|
|
|
|
+(defconstant* +itunes-tempo+ (mk-mp4-atom-type #\t #\m #\p #\o) "octet: tempo of song")
|
|
|
|
|
+(defconstant* +itunes-title+ (mk-mp4-atom-type #xa9 #\n #\a #\m) "text: title of song")
|
|
|
|
|
+(defconstant* +itunes-tool+ (mk-mp4-atom-type #xa9 #\t #\o #\o) "text: what tool encoded this file")
|
|
|
|
|
+(defconstant* +itunes-track+ (mk-mp4-atom-type #xa9 #\t #\r #\k) "octet: track number")
|
|
|
|
|
+(defconstant* +itunes-track-n+ (mk-mp4-atom-type #\t #\r #\k #\n) "octet: yet another track number")
|
|
|
|
|
+(defconstant* +itunes-writer+ (mk-mp4-atom-type #xa9 #\w #\r #\t) "text: who wrote the song")
|
|
|
|
|
+(defconstant* +itunes-year+ (mk-mp4-atom-type #xa9 #\d #\a #\y) "text: year album was released")
|
|
|
|
|
+(defconstant* +itunes-ilst-data+ (mk-mp4-atom-type #\d #\a #\t #\a) "carries the actual data under an ilst atom")
|
|
|
|
|
+
|
|
|
|
|
+(defconstant* +m4-ftyp+ (mk-mp4-atom-type #\f #\t #\y #\p) "This should be the first atom type found in file")
|
|
|
|
|
+
|
|
|
|
|
+(defconstant* +mp4-atom-hdlr+ (mk-mp4-atom-type #\h #\d #\l #\r) "Found under trak.mdia and tells what kind of handler it is")
|
|
|
|
|
+
|
|
|
|
|
+(defconstant* +audioprop-mdhd+ (mk-mp4-atom-type #\m #\d #\h #\d) "Found under trak.mdia and holds data to calculate length of audio")
|
|
|
|
|
+(defconstant* +audioprop-stsd+ (mk-mp4-atom-type #\s #\t #\s #\d) "Container atom: found under trak.mdia.minf.stbl and holds bit-rate, etc")
|
|
|
|
|
+(defconstant* +audioprop-mp4a+ (mk-mp4-atom-type #\m #\p #\4 #\a) "Found under trak.mdia.minf.stbl")
|
|
|
|
|
+(defconstant* +audioprop-esds+ (mk-mp4-atom-type #\e #\s #\d #\s) "Found under trak.mdia.minf.stbl.mp4a")
|
|
|
|
|
+
|
|
|
|
|
+(defconstant* +mp4-atom-ilst+ (mk-mp4-atom-type #\i #\l #\s #\t))
|
|
|
|
|
+(defconstant* +mp4-atom-mdia+ (mk-mp4-atom-type #\m #\d #\i #\a))
|
|
|
|
|
+(defconstant* +mp4-atom-meta+ (mk-mp4-atom-type #\m #\e #\t #\a))
|
|
|
|
|
+(defconstant* +mp4-atom-minf+ (mk-mp4-atom-type #\m #\i #\n #\f))
|
|
|
|
|
+(defconstant* +mp4-atom-moov+ (mk-mp4-atom-type #\m #\o #\o #\v))
|
|
|
|
|
+(defconstant* +mp4-atom-stbl+ (mk-mp4-atom-type #\s #\t #\b #\l))
|
|
|
|
|
+(defconstant* +mp4-atom-trak+ (mk-mp4-atom-type #\t #\r #\a #\k))
|
|
|
|
|
+(defconstant* +mp4-atom-udta+ (mk-mp4-atom-type #\u #\d #\t #\a))
|
|
|
|
|
|
|
|
(defvar *in-progress* nil "the node currently being worked upon")
|
|
(defvar *in-progress* nil "the node currently being worked upon")
|
|
|
(defvar *tree* nil "the root of the atom tree")
|
|
(defvar *tree* nil "the root of the atom tree")
|
|
@@ -306,25 +306,25 @@ to read the payload of an atom."
|
|
|
len))
|
|
len))
|
|
|
|
|
|
|
|
;;; one-byte descriptor tags
|
|
;;; one-byte descriptor tags
|
|
|
-(defconstant +mp4-odescrtag+ #x01)
|
|
|
|
|
-(defconstant +mp4-iodescrtag+ #x02)
|
|
|
|
|
-(defconstant +mp4-esdescrtag+ #x03)
|
|
|
|
|
-(defconstant +mp4-decconfigdescrtag+ #x04)
|
|
|
|
|
-(defconstant +mp4-decspecificdescrtag+ #x05)
|
|
|
|
|
-(defconstant +mp4-slconfigdescrtag+ #x06)
|
|
|
|
|
-(defconstant +mp4-contentiddescrtag+ #x07)
|
|
|
|
|
-(defconstant +mp4-supplcontentiddescrtag+ #x08)
|
|
|
|
|
-(defconstant +mp4-ipiptrdescrtag+ #x09)
|
|
|
|
|
-(defconstant +mp4-ipmpptrdescrtag+ #x0a)
|
|
|
|
|
-(defconstant +mp4-ipmpdescrtag+ #x0b)
|
|
|
|
|
-(defconstant +mp4-registrationdescrtag+ #x0d)
|
|
|
|
|
-(defconstant +mp4-esidincdescrtag+ #x0e)
|
|
|
|
|
-(defconstant +mp4-esidrefdescrtag+ #x0f)
|
|
|
|
|
-(defconstant +mp4-fileiodescrtag+ #x10)
|
|
|
|
|
-(defconstant +mp4-fileodescrtag+ #x11)
|
|
|
|
|
-(defconstant +mp4-extprofileleveldescrtag+ #x13)
|
|
|
|
|
-(defconstant +mp4-extdescrtagsstart+ #x80)
|
|
|
|
|
-(defconstant +mp4-extdescrtagsend+ #xfe)
|
|
|
|
|
|
|
+(defconstant* +mp4-odescrtag+ #x01)
|
|
|
|
|
+(defconstant* +mp4-iodescrtag+ #x02)
|
|
|
|
|
+(defconstant* +mp4-esdescrtag+ #x03)
|
|
|
|
|
+(defconstant* +mp4-decconfigdescrtag+ #x04)
|
|
|
|
|
+(defconstant* +mp4-decspecificdescrtag+ #x05)
|
|
|
|
|
+(defconstant* +mp4-slconfigdescrtag+ #x06)
|
|
|
|
|
+(defconstant* +mp4-contentiddescrtag+ #x07)
|
|
|
|
|
+(defconstant* +mp4-supplcontentiddescrtag+ #x08)
|
|
|
|
|
+(defconstant* +mp4-ipiptrdescrtag+ #x09)
|
|
|
|
|
+(defconstant* +mp4-ipmpptrdescrtag+ #x0a)
|
|
|
|
|
+(defconstant* +mp4-ipmpdescrtag+ #x0b)
|
|
|
|
|
+(defconstant* +mp4-registrationdescrtag+ #x0d)
|
|
|
|
|
+(defconstant* +mp4-esidincdescrtag+ #x0e)
|
|
|
|
|
+(defconstant* +mp4-esidrefdescrtag+ #x0f)
|
|
|
|
|
+(defconstant* +mp4-fileiodescrtag+ #x10)
|
|
|
|
|
+(defconstant* +mp4-fileodescrtag+ #x11)
|
|
|
|
|
+(defconstant* +mp4-extprofileleveldescrtag+ #x13)
|
|
|
|
|
+(defconstant* +mp4-extdescrtagsstart+ #x80)
|
|
|
|
|
+(defconstant* +mp4-extdescrtagsend+ #xfe)
|
|
|
|
|
|
|
|
(defmethod initialize-instance :after ((me atom-esds) &key mp4-file &allow-other-keys)
|
|
(defmethod initialize-instance :after ((me atom-esds) &key mp4-file &allow-other-keys)
|
|
|
(declare #.utils:*standard-optimize-settings*)
|
|
(declare #.utils:*standard-optimize-settings*)
|