Module uk.co.caprica.vlcj
Class BaseNativeDiscoveryStrategy
java.lang.Object
uk.co.caprica.vlcj.factory.discovery.strategy.BaseNativeDiscoveryStrategy
- All Implemented Interfaces:
NativeDiscoveryStrategy
- Direct Known Subclasses:
DirectoryProviderDiscoveryStrategy
Base implementation of a native discovery strategy that searches a list of directories for a list of files.
-
Constructor Summary
ConstructorsConstructorDescriptionBaseNativeDiscoveryStrategy(String[] filenamePatterns, String[] pluginPathFormats) Create a new native discovery strategy. -
Method Summary
Modifier and TypeMethodDescriptionfinal Stringdiscover()Attempt to discover the location of the libvlc native shared libraries.booleanInvoked when native shared libraries found.final booleanonSetPluginPath(String path) Invoked after discovery has completed and found the native shared libraries.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface uk.co.caprica.vlcj.factory.discovery.strategy.NativeDiscoveryStrategy
supported
-
Constructor Details
-
BaseNativeDiscoveryStrategy
Create a new native discovery strategy.- Parameters:
filenamePatterns- filename patterns to search for, as regular expressionspluginPathFormats- directory name templates used to find the VLC plugin directory, printf style.
-
-
Method Details
-
discover
Description copied from interface:NativeDiscoveryStrategyAttempt to discover the location of the libvlc native shared libraries.- Specified by:
discoverin interfaceNativeDiscoveryStrategy- Returns:
- path containing the shared libraries, or
nullif this strategy did not find them
-
onFound
Description copied from interface:NativeDiscoveryStrategyInvoked when native shared libraries found.This serves two purposes: the first is to enable the strategy implementation to carry out bespoke work if needed; te second is to indicate whether or not the discovered path should be added to the JNA native library search path.
- Specified by:
onFoundin interfaceNativeDiscoveryStrategy- Parameters:
path- directory containing the shared libraries- Returns:
trueif the path should be added to the JNA native search path;falseif not
-
onSetPluginPath
Description copied from interface:NativeDiscoveryStrategyInvoked after discovery has completed and found the native shared libraries.This method will not be invoked if there is already a VLC_PLUGIN_PATH environment variable set.
- Specified by:
onSetPluginPathin interfaceNativeDiscoveryStrategy- Parameters:
path- directory containing the shared libraries- Returns:
trueif the plugin path was set successfully;falseon error
-