//Plugins! HOORAY! @protocol CogSource + (NSArray *)schemes; //http, file, etc - (NSURL *)url; - (NSString *)mimeType; - (BOOL)open:(NSURL *)url; - (BOOL)seekable; - (BOOL)seek:(long)position whence:(int)whence; - (long)tell; - (int)read:(void *)buffer amount:(int)amount; //reads UP TO amount, returns amount read. - (void)close; @end @protocol CogContainer + (NSArray *)fileTypes; //mp3, ogg, etc + (NSArray *)mimeTypes; + (NSArray *)urlsForContainerURL:(NSURL *)url; @end @protocol CogDecoder + (NSArray *)mimeTypes; + (NSArray *)fileTypes; //mp3, ogg, etc //For KVO //- (void)setProperties:(NSDictionary *)p; - (NSDictionary *)properties; - (BOOL)open:(id)source; - (double)seekToTime:(double)time; //time is in milleseconds, should return the time actually seeked to. - (int)fillBuffer:(void *)buf ofSize:(UInt32)size; - (void)close; @end @protocol CogMetadataReader + (NSArray *)fileTypes; + (NSArray *)mimeTypes; + (NSDictionary *)metadataForURL:(NSURL *)url; @end @protocol CogPropertiesReader + (NSArray *)fileTypes; + (NSArray *)mimeTypes; + (NSDictionary *)propertiesForSource:(id)source; @end @protocol CogPluginController + (id)sharedPluginController; - (NSDictionary *)sources; - (NSDictionary *)containers; - (NSDictionary *)metadataReaders; - (NSDictionary *)propertiesReadersByExtension; - (NSDictionary *)propertiesReadersByMimeType; - (NSDictionary *)decodersByExtension; - (NSDictionary *)decodersByMimeType; - (id) audioSourceForURL:(NSURL *)url; - (NSArray *) urlsForContainerURL:(NSURL *)url; - (NSDictionary *) metadataForURL:(NSURL *)url; - (NSDictionary *) propertiesForURL:(NSURL *)url; - (id) audioDecoderForSource:(id)source; @end