Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QTMetaDataGetNextItem -2177




Does anyone else use QuickTime to fetch ID3 information from mp3 files?

I am coming across a large number of files which QuickTime apparently cannot parse the metadata.
On a typical problem file:
-- Right-click "Get Info" shows the metadata exactly as I would love to fetch it
-- iTunes shows the metadata exactly as I would love to fetch it
-- My code gets no metadata at all


Does this sound plausable, or am I doing something wrong when requesting the metadata, or when instantiating the movie object?
(Carbon lang:C OS:10.4.8 QT:7.1.5)


I instantiate the file:
QTNewMoviePropertyElement newMovieProperties[1] = {0};
newMovieProperties[0].propClass = kQTPropertyClass_DataLocation;
newMovieProperties[0].propID = kQTDataLocationPropertyID_CFStringPosixPath;
newMovieProperties[0].propValueSize = sizeof(CFStringRef);
newMovieProperties[0].propValueAddress = &nPathA;
err = NewMovieFromProperties( 1, newMovieProperties, 0, NULL, &m_movie );


Should I have specified something else which would help QuickTime parse the ID3 data?

When I fetch any metadata:
	err = QTMetaDataGetNextItem(
		m_meta,
		kQTMetaDataStorageFormatWildcard,
		kQTMetaDataItemUninitialized,
		kQTMetaDataKeyFormatWildcard,
		NULL, 0, &item );
always returns -2177


I know, this will probably come down to the specific file I am working on.


If you know what to look for: (sorry couldn't get fixed-width)

Here is the first few lines of a "hexdump -C My.mp3 | less" :

00000000 49 44 33 03 00 00 00 21 57 5a 41 50 49 43 00 08 |ID3....! WZAPIC..|
00000010 6b 3e 00 00 00 69 6d 61 67 65 2f 70 6e 67 00 00 | k>...image/png..|
00000020 00 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 |..PNG........IHD|
00000030 52 00 00 01 f4 00 00 01 f4 08 02 00 00 00 44 b4 | R.............D.|
00000040 48 dd 00 00 00 04 67 41 4d 41 00 00 d9 03 42 d6 | H.....gAMA....B.|
00000050 4f a1 00 00 00 09 70 48 59 73 00 00 0b 13 00 00 | O.....pHYs......|
00000060 0b 13 01 00 9a 9c 18 00 00 00 24 74 45 58 74 53 |..........$tEXtS|
00000070 6f 66 74 77 61 72 65 00 51 75 69 63 6b 54 69 6d | oftware.QuickTim|
00000080 65 20 37 2e 31 2e 33 20 28 4d 61 63 20 4f 53 20 |e 7.1.3 (Mac OS |
00000090 58 29 00 26 a5 e3 a1 00 00 00 07 74 49 4d 45 07 | X).&.......tIME.|




Here is the position where the metadata does live:

00086b40 a6 07 8f e8 12 1b 00 00 00 00 49 45 4e 44 ae 42 |..........IEND.B|
00086b50 60 82 54 49 54 32 00 00 00 12 00 00 00 53 6c 65 | `.TIT2.......Sle|
00086b60 65 70 69 6e 67 20 4c 65 73 73 6f 6e 73 00 54 50 |eping Lessons.TP|
00086b70 45 31 00 00 00 0b 00 00 00 54 68 65 20 53 68 69 | E1.......The Shi|
00086b80 6e 73 00 54 41 4c 42 00 00 00 18 00 00 00 57 69 | ns.TALB.......Wi|
00086b90 6e 63 69 6e 67 20 54 68 65 20 4e 69 67 68 74 20 |ncing The Night |
00086ba0 41 77 61 79 00 54 52 43 4b 00 00 00 06 00 00 00 | Away.TRCK.......|
00086bb0 31 2f 31 33 00 54 50 4f 53 00 00 00 05 00 00 00 | 1/13.TPOS.......|
00086bc0 31 2f 31 00 54 59 45 52 00 00 00 06 00 00 00 32 | 1/1.TYER.......2|
00086bd0 30 30 37 00 54 43 4f 4e 00 00 00 06 00 00 00 28 | 007.TCON.......(|
00086be0 31 37 29 00 ff fb 90 64 00 00 00 00 00 00 00 00 | 17)....d........|



Is there any way I can get QuickTime to parse/fetch the "TIT2" metadata from this file (other files)?
-- Or will I need to use a third-party ID3 parsing library?


Sincerely
Raymond Walsh
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.