Package org.jitsi.impl.neomedia.device
Class AudioSilenceMediaDevice
- java.lang.Object
-
- org.jitsi.impl.neomedia.device.AbstractMediaDevice
-
- org.jitsi.impl.neomedia.device.MediaDeviceImpl
-
- org.jitsi.impl.neomedia.device.AudioMediaDeviceImpl
-
- org.jitsi.impl.neomedia.device.AudioSilenceMediaDevice
-
- All Implemented Interfaces:
MediaDevice
public class AudioSilenceMediaDevice extends AudioMediaDeviceImpl
Implements a MediaDevice which provides silence in the form of audio media and does not play back any (audio) media (because Jitsi Videobridge is a server-side technology).- Author:
- Lyubomir Marinov, Boris Grozev
-
-
Constructor Summary
Constructors Constructor Description AudioSilenceMediaDevice()Initializes a newAudioSilenceMediaDeviceinstance.AudioSilenceMediaDevice(boolean clockOnly)Initializes a newAudioSilenceMediaDeviceinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.media.protocol.CaptureDevicecreateCaptureDevice()Creates the JMF CaptureDevice this instance represents and provides an implementation of MediaDevice for.protected javax.media.ProcessorcreatePlayer(javax.media.protocol.DataSource dataSource)Initializes a new Processor instance which is to be used to play back media on this MediaDevice.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.-
Methods inherited from class org.jitsi.impl.neomedia.device.AudioMediaDeviceImpl
connect, createRenderer, getSupportedExtensions, superCreateCaptureDevice
-
Methods inherited from class org.jitsi.impl.neomedia.device.MediaDeviceImpl
createOutputDataSource, createTracingCaptureDevice, getCaptureDeviceInfo, getCaptureDeviceInfoLocatorProtocol, getFormat, getMediaType, getSupportedFormats, getSupportedFormats, getSupportedFormats, toString
-
Methods inherited from class org.jitsi.impl.neomedia.device.AbstractMediaDevice
getSupportedFormats
-
-
-
-
Constructor Detail
-
AudioSilenceMediaDevice
public AudioSilenceMediaDevice()
Initializes a newAudioSilenceMediaDeviceinstance.
-
AudioSilenceMediaDevice
public AudioSilenceMediaDevice(boolean clockOnly)
Initializes a newAudioSilenceMediaDeviceinstance.- Parameters:
clockOnly- the value to set toclockOnly.
-
-
Method Detail
-
createCaptureDevice
protected javax.media.protocol.CaptureDevice createCaptureDevice()
Creates the JMF CaptureDevice this instance represents and provides an implementation of MediaDevice for. Overrides the super implementation to initialize a CaptureDevice without asking FMJ to initialize one for a CaptureDeviceInfo.- Overrides:
createCaptureDevicein classAudioMediaDeviceImpl- Returns:
- the JMF CaptureDevice this instance represents and provides an implementation of MediaDevice for; null if the creation fails
-
createPlayer
protected javax.media.Processor createPlayer(javax.media.protocol.DataSource dataSource)
Initializes a new Processor instance which is to be used to play back media on this MediaDevice. Allows extenders to, for example, disable the playback on this MediaDevice by completely overriding and returning null. Overrides the super implementation to disable the very playback because Jitsi Videobridge is a server-side technology.- Overrides:
createPlayerin classAbstractMediaDevice- Parameters:
dataSource- the DataSource which is to be played back by the new Processor instance- Returns:
- a new Processor instance which is to be used to play back the media provided by the specified dataSource or null if the specified dataSource is to not be played back
-
createSession
public MediaDeviceSession createSession()
Creates a new MediaDeviceSession instance which is to represent the use of this MediaDevice by a MediaStream. Overrides the super implementation to initialize a MediaDeviceSession which disables the very playback because Jitsi Videobridge is a server-side technology.- Overrides:
createSessionin classAbstractMediaDevice- Returns:
- a new MediaDeviceSession instance which is to represent the use of this MediaDevice by a MediaStream
-
getDirection
public MediaDirection getDirection()
Returns the MediaDirection supported by this device. Overrides the super implementation to always returnMediaDirection.SENDRECVbecause this instance stands for a relay and because the super bases the MediaDirection on the CaptureDeviceInfo which this instance does not have.- Specified by:
getDirectionin interfaceMediaDevice- Overrides:
getDirectionin classMediaDeviceImpl- Returns:
MediaDirection.SENDONLYif this is a read-only device,MediaDirection.RECVONLYif this is a write-only device orMediaDirection.SENDRECVif this MediaDevice can both capture and render media- See Also:
MediaDevice.getDirection()
-
-