Package org.jitsi.impl.neomedia.device
Class VideoTranslatorMediaDevice
- java.lang.Object
-
- org.jitsi.impl.neomedia.device.AbstractMediaDevice
-
- org.jitsi.impl.neomedia.device.VideoTranslatorMediaDevice
-
- All Implemented Interfaces:
EventListener,MediaDevice,MediaDeviceWrapper,VideoListener
public class VideoTranslatorMediaDevice extends AbstractMediaDevice implements MediaDeviceWrapper, VideoListener
Implements a MediaDevice which is to be used in video conferencing implemented with an RTP translator.- Author:
- Lyubomir Marinov, Hristo Terezov, Boris Grozev
-
-
Constructor Summary
Constructors Constructor Description VideoTranslatorMediaDevice(MediaDeviceImpl device)Initializes a new VideoTranslatorMediaDevice which enables a specific MediaDevice to be used in video conferencing implemented with an RTP translator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.media.protocol.DataSourcecreateOutputDataSource()Creates a DataSource instance for this MediaDevice which gives access to the captured media.MediaDeviceSessioncreateSession()Creates a new MediaDeviceSession instance which is to represent the use of this MediaDevice by a MediaStream.MediaDirectiongetDirection()Returns the MediaDirection supported by this device.MediaFormatgetFormat()Returns the MediaFormat that this device is currently set to use when capturing data.org.jitsi.utils.MediaTypegetMediaType()Returns the MediaType that this device supports.List<MediaFormat>getSupportedFormats(QualityPreset localPreset, QualityPreset remotePreset)Returns a list of MediaFormat instances representing the media formats supported by this MediaDevice.List<MediaFormat>getSupportedFormats(QualityPreset localPreset, QualityPreset remotePreset, EncodingConfiguration encodingConfiguration)Returns a list of MediaFormat instances representing the media formats supported by this MediaDevice and enabled in encodingConfiguration..MediaDevicegetWrappedDevice()Gets the actual MediaDevice which this MediaDevice is effectively built on top of and forwarding to.voidvideoAdded(VideoEvent event)Notifies that a visual Component representing video has been added to the provider this listener has been added to.voidvideoRemoved(VideoEvent event)Notifies that a visual Component representing video has been removed from the provider this listener has been added to.voidvideoUpdate(VideoEvent event)Notifies about an update to a visual Component representing video.-
Methods inherited from class org.jitsi.impl.neomedia.device.AbstractMediaDevice
connect, createPlayer, createRenderer, getSupportedExtensions, getSupportedFormats
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jitsi.service.neomedia.device.MediaDevice
getSupportedExtensions, getSupportedFormats
-
-
-
-
Constructor Detail
-
VideoTranslatorMediaDevice
public VideoTranslatorMediaDevice(MediaDeviceImpl device)
Initializes a new VideoTranslatorMediaDevice which enables a specific MediaDevice to be used in video conferencing implemented with an RTP translator.- Parameters:
device- the MediaDevice which the new instance is to enable to be used in video conferencing implemented with an RTP translator
-
-
Method Detail
-
createOutputDataSource
protected javax.media.protocol.DataSource createOutputDataSource()
Creates a DataSource instance for this MediaDevice which gives access to the captured media.- Specified by:
createOutputDataSourcein classAbstractMediaDevice- Returns:
- a DataSource instance which gives access to the media captured by this MediaDevice
- See Also:
AbstractMediaDevice.createOutputDataSource()
-
createSession
public MediaDeviceSession createSession()
Creates a new MediaDeviceSession instance which is to represent the use of this MediaDevice by a MediaStream.- Overrides:
createSessionin classAbstractMediaDevice- Returns:
- a new MediaDeviceSession instance which is to represent the use of this MediaDevice by a MediaStream
- See Also:
AbstractMediaDevice.createSession()
-
getDirection
public MediaDirection getDirection()
Returns the MediaDirection supported by this device.- Specified by:
getDirectionin interfaceMediaDevice- Returns:
- MediaDirection.SENDONLY if this is a read-only device, MediaDirection.RECVONLY if this is a write-only device and MediaDirection.SENDRECV if this MediaDevice can both capture and render media
- See Also:
MediaDevice.getDirection()
-
getFormat
public MediaFormat getFormat()
Returns the MediaFormat that this device is currently set to use when capturing data.- Specified by:
getFormatin interfaceMediaDevice- Returns:
- the MediaFormat that this device is currently set to provide media in.
- See Also:
MediaDevice.getFormat()
-
getMediaType
public org.jitsi.utils.MediaType getMediaType()
Returns the MediaType that this device supports.- Specified by:
getMediaTypein interfaceMediaDevice- Returns:
- MediaType.AUDIO if this is an audio device or MediaType.VIDEO in case of a video device
- See Also:
MediaDevice.getMediaType()
-
getSupportedFormats
public List<MediaFormat> getSupportedFormats(QualityPreset localPreset, QualityPreset remotePreset)
Returns a list of MediaFormat instances representing the media formats supported by this MediaDevice.- Specified by:
getSupportedFormatsin interfaceMediaDevice- Parameters:
localPreset- the preset used to set the send format parameters, used for video and settingsremotePreset- the preset used to set the receive format parameters, used for video and settings- Returns:
- the list of MediaFormats supported by this device
- See Also:
MediaDevice.getSupportedFormats(QualityPreset, QualityPreset)
-
getSupportedFormats
public List<MediaFormat> getSupportedFormats(QualityPreset localPreset, QualityPreset remotePreset, EncodingConfiguration encodingConfiguration)
Returns a list of MediaFormat instances representing the media formats supported by this MediaDevice and enabled in encodingConfiguration..- Specified by:
getSupportedFormatsin interfaceMediaDevice- Parameters:
localPreset- the preset used to set the send format parameters, used for video and settingsremotePreset- the preset used to set the receive format parameters, used for video and settingsencodingConfiguration- the EncodingConfiguration instance to use- Returns:
- the list of MediaFormats supported by this device and enabled in encodingConfiguration.
- See Also:
MediaDevice.getSupportedFormats(QualityPreset, QualityPreset, EncodingConfiguration)
-
getWrappedDevice
public MediaDevice getWrappedDevice()
Gets the actual MediaDevice which this MediaDevice is effectively built on top of and forwarding to.- Specified by:
getWrappedDevicein interfaceMediaDeviceWrapper- Returns:
- the actual MediaDevice which this MediaDevice is effectively built on top of and forwarding to
- See Also:
MediaDeviceWrapper.getWrappedDevice()
-
videoAdded
public void videoAdded(VideoEvent event)
Notifies that a visual Component representing video has been added to the provider this listener has been added to. Forwards event, to each of the managed MediaStreamMediaDeviceSession instances. The event is expected to come from this.deviceSession, since this is registered there as a VideoListener.- Specified by:
videoAddedin interfaceVideoListener- Parameters:
event- a VideoEvent describing the added visual Component representing video and the provider it was added into
-
videoRemoved
public void videoRemoved(VideoEvent event)
Notifies that a visual Component representing video has been removed from the provider this listener has been added to. Forwards event, to each of the managed MediaStreamMediaDeviceSession instances. The event is expected to come from this.deviceSession, since this is registered there as a VideoListener.- Specified by:
videoRemovedin interfaceVideoListener- Parameters:
event- a VideoEvent describing the removed visual Component representing video and the provider it was removed from
-
videoUpdate
public void videoUpdate(VideoEvent event)
Notifies about an update to a visual Component representing video. Forwards event, to each of the managed MediaStreamMediaDeviceSession instances. The event is expected to come from this.deviceSession, since this is registered there as a VideoListener.- Specified by:
videoUpdatein interfaceVideoListener- Parameters:
event- a VideoEvent describing the visual Component related to the update and the details of the specific update
-
-