QTMovieWin currently has a hard coded list of MIME types. The list doesn't include many common types supported by a default QuickTime install (eg. "audio/mp3" or the many other MP3 synonyms), but it also means that WebKit won't list types added by third party movie importers (eg. the ogg importers).
<rdar://problem/5969392>
Created attachment 21405 [details] proposed fix
Looks good. Some style comments, I guess this was adapted from existing code. + ComponentDescription findCD; + QTAtom mimeTag; + Component comp; + char *atomData; + int index; + long componentCount; + OSErr err = noErr; + QTAtomContainer mimeList = NULL; + ComponentDescription infoCD; + int typeIndex, typeCount; + long typeLength; WebKit code doesn't usually align variable names like this. + // grab every type from the container + QTLockContainer(mimeList); + typeCount = QTCountChildrenOfType(mimeList, kParentAtomIsContainer, kMimeInfoMimeTypeTag); + for (typeIndex = 1; typeIndex <= typeCount; typeIndex++) { + if ( 0 != (mimeTag = QTFindChildByIndex(mimeList, 0, kMimeInfoMimeTypeTag, typeIndex, NULL))) { Extra space after ( It would be better to do assignment separately from comparison. This and the next if could use continue instead, reducing code nesting. + if (0 != strncmp(typeBuffer, "audio/", 6) && 0 != strncmp(typeBuffer, "video/", 6)) 0 != is unnecessary + for ( int addedIndex = 0; addedIndex < gSupportedTypes->size(); addedIndex++ ) { extra space after ( and before )
Created attachment 21437 [details] Revised patch
Committed revision 34444.