Class ParseApi

java.lang.Object
uk.co.caprica.vlcj.media.ParseApi

public final class ParseApi extends Object
Behaviour pertaining to parsing of media.

Parsing is always asynchronous - you must wait for a parsed changed event before you can read meta data.

Once a media has been parsed, it can not be parsed again - so if for example parse fails due to a timeout and you retry it, it will not parse again.

There are two special timeout values that can be used for parsing:

  • 0 means that the call will wait indefinitely;
  • -1 means that the default value set by the "preparse-timeout" native option/argument will be used
Client applications should add a MediaEventListener to be notified of changes to the parsed status - an event will fire if the parsing succeeded, timed-out, or failed for any other reason as per MediaParsedStatus.

Parsing may trigger the remote downloading of data, including for example performing a search for cover art for the media. This has clear privacy implications.

To affirmatively prevent all network access for meta data, consider trying the "--no-metadata-network-access" argument when creating a MediaPlayerFactory.

It should also be possible to prevent such network accesses by using appropriate ParseFlag values, see ParseFlag.FETCH_LOCAL vs ParseFlag.FETCH_NETWORK.

Even with network access disabled, some media covert art may still appear locally (e.g. ~/.cache/vlc) - this does not necessarily mean that a remote network request was made for the cover art, rather the art was embedded in the media file and extracted to this temporary cache directory.