Last active
August 29, 2015 14:01
-
-
Save johnmurrayvi/3b6a83d55f35f2f8b4dd to your computer and use it in GitHub Desktop.
metadata_artwork debugging output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nsresult sbMetadataHandlerTaglib::ReadImageITunes(TagLib::MP4::Tag *aTag, | |
nsACString &aMimeType, | |
PRUint32 *aDataLen, | |
PRUint8 **aData) | |
{ | |
NS_ENSURE_ARG_POINTER(aTag); | |
NS_ENSURE_ARG_POINTER(aData); | |
NS_ENSURE_ARG_POINTER(aDataLen); | |
nsCOMPtr<nsIThread> mainThread; | |
nsresult rv = NS_OK; | |
/* | |
* Extract the requested image from the metadata | |
*/ | |
MP4::ItemListMap::Iterator itr = aTag->itemListMap().begin(); | |
#ifdef PR_LOGGING | |
{ | |
LOG(("Printing ItemListMap...")); | |
MP4::ItemListMap lm = aTag->itemListMap(); | |
MP4::ItemListMap::Iterator lmit; | |
StringList slist; | |
StringList::Iterator siter; | |
for(lmit = lm.begin(); lmit != lm.end(); lmit++) { | |
LOG((" Key = %s", lmit->first.toCString())); | |
slist = lmit->second.toStringList(); | |
for (siter = slist.begin(); siter != slist.end(); siter++) { | |
LOG((" %s", siter->toCString())); | |
} | |
} | |
} | |
#endif /* PR_LOGGING */ | |
#ifdef PR_LOGGING | |
{ | |
LOG(("Printing PropertyMap...")); | |
PropertyMap pm = aTag->properties(); | |
PropertyMap::Iterator pmit; | |
StringList slist; | |
StringList::Iterator siter; | |
for (pmit = pm.begin(); pmit != pm.end(); pmit++) { | |
LOG((" Key = %s", pmit->first.toCString())); | |
slist = pmit->second; | |
for (siter = slist.begin(); siter != slist.end(); siter++) { | |
LOG((" %s", siter->toCString())); | |
} | |
} | |
} | |
#endif /* PR_LOGGING */ | |
if (aTag->itemListMap().contains("covr")) { | |
... | |
} else { | |
LOG(("sbMetadataHandlerTaglib::ReadImageITunes Didn't find cover art!")); | |
} | |
return NS_OK; | |
} | |
790390656[7fc22d960370]: Printing ItemListMap... | |
790390656[7fc22d960370]: Key = disk | |
790390656[7fc22d960370]: Key = trkn | |
790390656[7fc22d960370]: Key = �ART | |
790390656[7fc22d960370]: Songbird | |
790390656[7fc22d960370]: Key = �alb | |
790390656[7fc22d960370]: Unit Test Classics | |
790390656[7fc22d960370]: Key = �day | |
790390656[7fc22d960370]: 17/04/08 | |
790390656[7fc22d960370]: Key = �gen | |
790390656[7fc22d960370]: A cappella | |
790390656[7fc22d960370]: Key = �nam | |
790390656[7fc22d960370]: Sample | |
790390656[7fc22d960370]: Key = �too | |
790390656[7fc22d960370]: Max 0.8 | |
790390656[7fc22d960370]: Key = �wrt | |
790390656[7fc22d960370]: Matt | |
790390656[7fc22d960370]: Printing PropertyMap... | |
790390656[7fc22d960370]: Key = ALBUM | |
790390656[7fc22d960370]: Unit Test Classics | |
790390656[7fc22d960370]: Key = ARTIST | |
790390656[7fc22d960370]: Songbird | |
790390656[7fc22d960370]: Key = DATE | |
790390656[7fc22d960370]: 17 | |
790390656[7fc22d960370]: Key = GENRE | |
790390656[7fc22d960370]: A cappella | |
790390656[7fc22d960370]: Key = TITLE | |
790390656[7fc22d960370]: Sample | |
790390656[7fc22d960370]: Key = TRACKNUMBER | |
790390656[7fc22d960370]: 1 | |
790390656[7fc22d960370]: sbMetadataHandlerTaglib::ReadImageITunes Didn't find cover art! | |
relevant parts of hexdump of m4a: | |
00000270 61 00 00 00 00 00 00 00 21 68 64 6c 72 00 00 00 |a.......!hdlr...| | |
00000280 00 00 00 00 00 6d 64 69 72 61 70 70 6c 00 00 00 |.....mdirappl...| | |
00000290 00 00 00 00 00 00 00 00 1e 9b 69 6c 73 74 00 00 |..........ilst..| | |
000002a0 00 2a a9 61 6c 62 00 00 00 22 64 61 74 61 00 00 |.*.alb..."data..| | |
000002b0 00 01 00 00 00 00 55 6e 69 74 20 54 65 73 74 20 |......Unit Test | | |
000002c0 43 6c 61 73 73 69 63 73 00 00 00 20 a9 41 52 54 |Classics... .ART| | |
000002d0 00 00 00 18 64 61 74 61 00 00 00 01 00 00 00 00 |....data........| | |
000002e0 53 6f 6e 67 62 69 72 64 00 00 00 1c a9 77 72 74 |Songbird.....wrt| | |
000002f0 00 00 00 14 64 61 74 61 00 00 00 01 00 00 00 00 |....data........| | |
00000300 4d 61 74 74 00 00 00 22 a9 67 65 6e 00 00 00 1a |Matt...".gen....| | |
00000310 64 61 74 61 00 00 00 01 00 00 00 00 41 20 63 61 |data........A ca| | |
00000320 70 70 65 6c 6c 61 00 00 00 20 a9 64 61 79 00 00 |ppella... .day..| | |
00000330 00 18 64 61 74 61 00 00 00 01 00 00 00 00 31 37 |..data........17| | |
00000340 2f 30 34 2f 30 38 00 00 00 1e a9 6e 61 6d 00 00 |/04/08.....nam..| | |
00000350 00 16 64 61 74 61 00 00 00 01 00 00 00 00 53 61 |..data........Sa| | |
00000360 6d 70 6c 65 00 00 00 20 74 72 6b 6e 00 00 00 18 |mple... trkn....| | |
00000370 64 61 74 61 00 00 00 00 00 00 00 00 00 00 00 01 |data............| | |
00000380 00 01 00 00 00 00 00 1e 64 69 73 6b 00 00 00 16 |........disk....| | |
00000390 64 61 74 61 00 00 00 00 00 00 00 00 00 00 00 01 |data............| | |
000003a0 00 01 00 00 1d 70 63 6f 76 72 00 00 1d 68 64 61 |.....pcovr...hda| | |
000003b0 74 61 00 00 00 00 00 00 00 00 89 50 4e 47 0d 0a |ta.........PNG..| | |
000003c0 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 5f 00 00 |......IHDR..._..| | |
000003d0 00 89 08 02 00 00 00 c5 49 73 90 00 00 00 04 67 |........Is.....g| | |
000003e0 41 4d 41 00 03 5b 63 04 97 6a 69 00 00 0a 45 69 |AMA..[c..ji...Ei| | |
000003f0 43 43 50 49 43 43 20 50 72 6f 66 69 6c 65 00 00 |CCPICC Profile..| |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment