public abstract class DeviceSystem
extends org.jitsi.utils.event.PropertyChangeNotifier
createRenderer()
method.| Modifier and Type | Field and Description |
|---|---|
static int |
FEATURE_REINITIALIZE
The constant/flag (to be) returned by
getFeatures() in order to
indicate that the respective DeviceSystem supports invoking its
initialize() more than once. |
static String |
LOCATOR_PROTOCOL_ANDROIDCAMERA |
static String |
LOCATOR_PROTOCOL_CIVIL |
static String |
LOCATOR_PROTOCOL_DIRECTSHOW |
static String |
LOCATOR_PROTOCOL_IMGSTREAMING |
static String |
LOCATOR_PROTOCOL_MEDIARECORDER |
static String |
LOCATOR_PROTOCOL_QUICKTIME |
static String |
LOCATOR_PROTOCOL_VIDEO4LINUX2 |
static String |
PROP_DEVICES |
| Modifier | Constructor and Description |
|---|---|
protected |
DeviceSystem(org.jitsi.utils.MediaType mediaType,
String locatorProtocol) |
protected |
DeviceSystem(org.jitsi.utils.MediaType mediaType,
String locatorProtocol,
int features) |
| Modifier and Type | Method and Description |
|---|---|
javax.media.Renderer |
createRenderer()
Initializes a new Renderer instance which is to perform playback
on a device contributed by this system.
|
protected abstract void |
doInitialize()
Invoked by
initialize() to perform the very logic of the
initialization of this DeviceSystem. |
protected static List<javax.media.CaptureDeviceInfo> |
filterDeviceListByLocatorProtocol(List<javax.media.CaptureDeviceInfo> deviceList,
String locatorProtocol)
Returns a List of CaptureDeviceInfos which are elements
of a specific List of CaptureDeviceInfos and have a
specific MediaLocator protocol.
|
static DeviceSystem[] |
getDeviceSystems(org.jitsi.utils.MediaType mediaType) |
int |
getFeatures()
Gets the flags indicating the optional features supported by this
DeviceSystem.
|
javax.media.Format |
getFormat()
Returns the format depending on the media type: AudioFormat for AUDIO,
VideoFormat for VIDEO.
|
String |
getLocatorProtocol()
Gets the protocol of the MediaLocators of the
CaptureDeviceInfos (to be) registered (with FMJ) by this
DeviceSystem.
|
org.jitsi.utils.MediaType |
getMediaType() |
protected String |
getRendererClassName()
Gets the name of the class which implements the Renderer
interface to render media on a playback or notification device associated
with this DeviceSystem.
|
protected void |
initialize()
Initializes this DeviceSystem i.e.
|
static void |
initializeDeviceSystems()
Initializes the DeviceSystem instances which are to represent
the supported device systems/backends such as DirectShow, PortAudio,
PulseAudio, QuickTime, video4linux2.
|
static void |
initializeDeviceSystems(org.jitsi.utils.MediaType mediaType)
Initializes the DeviceSystem instances which are to represent
the supported device systems/backends which are to capable of capturing
and playing back media of a specific type such as audio or video.
|
protected void |
postInitialize()
Invoked as part of the execution of
initialize() after the
execution of doInitialize() regardless of whether the latter
completed successfully. |
protected void |
preInitialize()
Invoked as part of the execution of
initialize() before the
execution of doInitialize(). |
String |
toString()
Returns a human-readable representation of this DeviceSystem.
|
public static final int FEATURE_REINITIALIZE
getFeatures() in order to
indicate that the respective DeviceSystem supports invoking its
initialize() more than once.public static final String LOCATOR_PROTOCOL_ANDROIDCAMERA
public static final String LOCATOR_PROTOCOL_CIVIL
public static final String LOCATOR_PROTOCOL_DIRECTSHOW
public static final String LOCATOR_PROTOCOL_IMGSTREAMING
public static final String LOCATOR_PROTOCOL_MEDIARECORDER
public static final String LOCATOR_PROTOCOL_QUICKTIME
public static final String LOCATOR_PROTOCOL_VIDEO4LINUX2
public static final String PROP_DEVICES
protected DeviceSystem(org.jitsi.utils.MediaType mediaType,
String locatorProtocol)
throws Exception
Exceptionprotected static List<javax.media.CaptureDeviceInfo> filterDeviceListByLocatorProtocol(List<javax.media.CaptureDeviceInfo> deviceList, String locatorProtocol)
deviceList - the List of CaptureDeviceInfo which
are to be filtered based on the specified MediaLocator protocollocatorProtocol - the protocol of the MediaLocators of the
CaptureDeviceInfos which are to be returnedpublic static DeviceSystem[] getDeviceSystems(org.jitsi.utils.MediaType mediaType)
public static void initializeDeviceSystems()
initialize() method will be called
again as part of the subsequent invocation only if the
DeviceSystem in question returns a set of flags from its
getFeatures() method which contains the constant/flag
FEATURE_REINITIALIZE.public static void initializeDeviceSystems(org.jitsi.utils.MediaType mediaType)
mediaType - the MediaType of the DeviceSystems to
be initializedpublic javax.media.Renderer createRenderer()
protected abstract void doInitialize()
throws Exception
initialize() to perform the very logic of the
initialization of this DeviceSystem. This instance has been
prepared for initialization by an earlier call to
preInitialize() and the initialization will be completed with a
subsequent call to postInitialize().Exception - if an error occurs during the initialization of this
instance. The initialization of this instance will be completed with a
subsequent call to postInitialize() regardless of any
Exception thrown by doInitialize().public final int getFeatures()
public javax.media.Format getFormat()
public final String getLocatorProtocol()
public final org.jitsi.utils.MediaType getMediaType()
protected String getRendererClassName()
protected final void initialize()
throws Exception
Note: The method is synchronized on this instance in order to
guarantee that the whole initialization procedure (which includes
doInitialize()) executes once at any given time.
Exception - if an error occurs during the initialization of this
DeviceSystemprotected void postInitialize()
throws Exception
initialize() after the
execution of doInitialize() regardless of whether the latter
completed successfully. The implementation of DeviceSystem fires
a new PropertyChangeEvent to notify that the value of the
property PROP_DEVICES of this instance may have changed i.e.
that the list of devices detected by this instance may have changed.Exceptionprotected void preInitialize()
throws Exception
initialize() before the
execution of doInitialize(). The implementation of
DeviceSystem removes from FMJ's CaptureDeviceManager
the CaptureDeviceInfos whose MediaLocator has the same
protocol as getLocatorProtocol() of this instance.Exceptionpublic String toString()
Copyright © 2022 jitsi.org. All rights reserved.