| Modifier and Type | Field and Description |
|---|---|
static int |
FLAG_ALLOW_DUPLICATE_DEVICES
This field is used to allow enumerating duplicate devices.
|
static int |
FLAG_DO_NOT_USE_DIRECT_SHOW
Used when user prefers not to use DirecShow for NMediaSource.
|
static int |
FLAG_DO_NOT_USE_WINDOWS_MEDIA_FOUNDATION
Used when user prefers not to use Windows Media Foundation for NMediaSource.
|
static int |
FLAG_PREFER_DIRECT_SHOW
Used when user prefers to use DirectShow for NMediaSource.
|
| Modifier and Type | Method and Description |
|---|---|
static NMediaSource[] |
enumDevices(EnumSet<NMediaType> mediaType)
Enumerates all source devices by specified media type.
|
static NMediaSource[] |
enumDevices(EnumSet<NMediaType> mediaType,
int flags)
Enumerates all source devices by specified media type.
|
static NMediaSource |
fromFile(String fileName)
Creates NMediaSource from specified file.
|
static NMediaSource |
fromFile(String fileName,
int flags)
Creates NMediaSource from specified file.
|
static NMediaSource |
fromUrl(String url)
Creates NMediaSource from specified URL.
|
static NMediaSource |
fromUrl(String url,
int flags)
Creates NMediaSource from specified URL.
|
static NMediaSource |
fromUrl(URI uri)
Creates NMediaSource from specified URL.
|
static NMediaSource |
fromUrl(URI uri,
int flags)
Creates NMediaSource from specified URL.
|
NMediaFormat |
getCurrentFormat(NMediaType mediaType)
Gets media source format for specified media type.
|
String |
getDisplayName()
Gets display name of specified media source.
|
NMediaFormat[] |
getFormats(NMediaType mediaType)
Gets media source formats.
|
String |
getId()
Gets the ID of the current media source.
|
EnumSet<NMediaType> |
getMediaType()
Gets media type of specified media source.
|
static com.neurotec.lang.NType |
nativeTypeOf()
Retrieves the native type for the enclosing class.
|
void |
setCurrentFormat(NMediaType mediaType,
NMediaFormat format)
Sets media source format for specified media type.
|
addListener, addPropertyChangeListener, captureProperties, claimHandle, clone, compareTo, copyProperties, dispose, disposeArray, equals, fromHandle, fromHandle, fromObject, getFlags, getHandle, getNativeType, getOwner, getProperty, getProperty, getSize, getSize, getSizeMany, getSizeMany, hashCode, invoke, invoke, invoke, isDisposed, nObjectCallbackNativeTypeOf, nObjectPropertyChangedCallbackNativeTypeOf, ref, removeListener, removePropertyChangeListener, reset, resetProperty, save, save, save, save, save, save, save, save, save, save, save, save, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, setFlags, setProperty, setProperty, toHandle, toObject, toString, toString, unref, unrefArray, unrefElementspublic static final int FLAG_DO_NOT_USE_DIRECT_SHOW
public static final int FLAG_DO_NOT_USE_WINDOWS_MEDIA_FOUNDATION
public static final int FLAG_PREFER_DIRECT_SHOW
public static final int FLAG_ALLOW_DUPLICATE_DEVICES
public static com.neurotec.lang.NType nativeTypeOf()
public static NMediaSource[] enumDevices(EnumSet<NMediaType> mediaType)
mediaType - Device media type.public static NMediaSource[] enumDevices(EnumSet<NMediaType> mediaType, int flags)
mediaType - Device media type.flags - Flags controlling NMediaSource.public static NMediaSource fromFile(String fileName) throws IOException
fileName - String containing file name.IOException - Throws IOException if fileName is incorrect.public static NMediaSource fromFile(String fileName, int flags) throws IOException
fileName - String containing file name.flags - Flags controlling NMediaSource.IOException - Throws IOException if fileName is incorrect.
Created NMediaSource is used by NMediaReader to read data.
These flags can be used (for flags parameter):
* FlagDoNotUseDirectShow
* FlagDoNotUseWindowsMediaFoundation
* FlagPreferDirectShow
Note: these flags work only on Windows OS.public static NMediaSource fromUrl(String url) throws IOException
url - String containing URL.IOExceptionpublic static NMediaSource fromUrl(String url, int flags) throws IOException
url - String containing URL.flags - Flags controlling NMediaSource.IOExceptionpublic static NMediaSource fromUrl(URI uri) throws IOException
uri - URI containing URL.IOExceptionpublic static NMediaSource fromUrl(URI uri, int flags) throws IOException
uri - URI containing URL.flags - Flags controlling NMediaSource.IOExceptionpublic NMediaFormat[] getFormats(NMediaType mediaType)
mediaType - Media type to retrieve its formats.public NMediaFormat getCurrentFormat(NMediaType mediaType)
mediaType - Media type to retrieve its format.public void setCurrentFormat(NMediaType mediaType, NMediaFormat format)
mediaType - Media type for which format should be set.format - Media format to set.public String getId()
public String getDisplayName()
public EnumSet<NMediaType> getMediaType()
Copyright © 2016 Neurotechnology. All rights reserved.