com.evolution.player.core.media
Class MediaInfoProvider

java.lang.Object
  extended by com.evolution.player.core.media.MediaInfoProvider

public abstract class MediaInfoProvider
extends java.lang.Object

A media info provider can parse a given file and provide a media info object containing information about the file. A media info provider can be contributed through the com.evolution.player.mediaInfoProvider extension point provided by the com.evolution.player.core plugin.

It is expected that the plugin providing a media info provider does also provide a MusicPlayerProvider to play the provided media infos.

Clients must implement

Since:
0.6

Constructor Summary
MediaInfoProvider()
           
 
Method Summary
abstract  boolean canHandle(java.io.File file)
          True if this media info provider can parse the given file.
abstract  java.lang.String[] getFileExtensions()
          The file extensions of the medias files handled by this media info provider.
abstract  LocalMediaInfo parse(java.io.File file)
          Parse the given file and return a media info.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MediaInfoProvider

public MediaInfoProvider()
Method Detail

getFileExtensions

public abstract java.lang.String[] getFileExtensions()
The file extensions of the medias files handled by this media info provider.

Returns:
all file extensions of media files handled by this provider

canHandle

public abstract boolean canHandle(java.io.File file)
True if this media info provider can parse the given file.

Parameters:
file - the file to parse
Returns:
true if the file can be parsed by this provider

parse

public abstract LocalMediaInfo parse(java.io.File file)
Parse the given file and return a media info.

Parsing one file must not be long running. However, it is expected that parsing hundreds or thousands of files is a long running process.

Parameters:
file - the file to parse
Returns:
the media info containing info about the file