|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MediaService
The MediaService service is meant to be a wrapper of media libraries such as JMF, FMJ, FFMPEG, and/or others. It takes care of all media play and capture as well as media transport (e.g. over RTP).
| Field Summary | |
|---|---|
static String |
DEFAULT_DEVICE
The name of the property of MediaService the value of which corresponds to the value returned by getDefaultDevice(MediaType, MediaUseCase). |
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to be notified about changes in the values of the properties of this instance. |
void |
addRecorderListener(Recorder.Listener listener)
Those interested in Recorder events add listener through MediaService. |
MediaStream |
createMediaStream(MediaDevice device)
Create a MediaStream which will use a specific MediaDevice for capture and playback of media. |
MediaStream |
createMediaStream(StreamConnector connector,
MediaDevice device)
Creates a MediaStream that will be using the specified MediaDevice for both capture and playback of media exchanged via the specified StreamConnector. |
MediaStream |
createMediaStream(StreamConnector connector,
MediaDevice device,
SrtpControl zrtpControl)
Creates a MediaStream that will be using the specified MediaDevice for both capture and playback of media exchanged via the specified StreamConnector. |
MediaDevice |
createMixer(MediaDevice device)
Creates a new MediaDevice which uses a specific MediaDevice to capture and play back media and performs mixing of the captured media and the media played back by any other users of the returned MediaDevice. |
Recorder |
createRecorder(MediaDevice device)
Creates a new Recorder instance that can be used to record a call which captures and plays back media using a specific MediaDevice. |
RTPTranslator |
createRTPTranslator()
Initializes a new RTPTranslator which is to forward RTP and RTCP traffic between multiple MediaStreams. |
SDesControl |
createSDesControl()
Initializes a new SDesControl instance which is to control all SDes options. |
ZrtpControl |
createZrtpControl()
Initializes a new ZrtpControl instance which is to control all ZRTP options. |
List<ScreenDevice> |
getAvailableScreenDevices()
Get available ScreenDevices. |
MediaDevice |
getDefaultDevice(MediaType mediaType,
MediaUseCase useCase)
Returns the default MediaDevice for the specified media type. |
ScreenDevice |
getDefaultScreenDevice()
Get default ScreenDevice device. |
List<MediaDevice> |
getDevices(MediaType mediaType,
MediaUseCase useCase)
Returns a list containing all devices known to this service implementation and handling the specified MediaType. |
Map<MediaFormat,Byte> |
getDynamicPayloadTypePreferences()
Returns a Map that binds indicates whatever preferences the
media service implementation may have for the RTP payload type numbers
that get dynamically assigned to MediaFormats with no static
payload type. |
MediaFormatFactory |
getFormatFactory()
Gets the MediaFormatFactory through which MediaFormat instances may be created for the purposes of working with the MediaStreams created by this MediaService. |
VolumeControl |
getInputVolumeControl()
Gets the VolumeControl which controls the volume level of audio input/capture. |
MediaDevice |
getMediaDeviceForPartialDesktopStreaming(int width,
int height,
int x,
int y)
Get a MediaDevice for a part of desktop streaming/sharing. |
Point |
getOriginForDesktopStreamingDevice(MediaDevice mediaDevice)
Get origin for desktop streaming device. |
VolumeControl |
getOutputVolumeControl()
Gets the VolumeControl which controls the volume level of audio output/playback. |
Iterator<Recorder.Listener> |
getRecorderListeners()
Gives access to currently registered Recorder.Listeners. |
Object |
getVideoPreviewComponent(MediaDevice device,
int preferredWidth,
int preferredHeight)
Creates a preview component for the specified device(video device) used to show video preview from it. |
boolean |
isPartialStreaming(MediaDevice mediaDevice)
If the MediaDevice corresponds to partial desktop streaming device. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener to no longer be notified about changes in the values of the properties of this instance. |
void |
removeRecorderListener(Recorder.Listener listener)
Removes an existing Recorder.Listener from the list of listeners interested in notifications from Recorders. |
| Field Detail |
|---|
static final String DEFAULT_DEVICE
getDefaultDevice(MediaType, MediaUseCase). The oldValue
and the newValue of the fired PropertyChangeEvent are
not to be relied on and instead a call to getDefaultDevice is to
be performed to retrieve the new value.
| Method Detail |
|---|
MediaDevice getDefaultDevice(MediaType mediaType,
MediaUseCase useCase)
mediaType - a MediaType value indicating the kind of device
that we are trying to obtain.useCase - MediaUseCase value indicating for the use-case of
device that we are trying to obtain.
List<MediaDevice> getDevices(MediaType mediaType,
MediaUseCase useCase)
mediaType - the media type (i.e. AUDIO or VIDEO) that we'd like
to obtain the device list for.useCase - MediaUseCase value indicating for the use-case of
device that we are trying to obtain.
MediaStream createMediaStream(MediaDevice device)
device - the MediaDevice to be used by the new instance for
capture and playback of media
MediaStream createMediaStream(StreamConnector connector,
MediaDevice device)
connector - the StreamConnector the stream should use for
sending and receiving media or null if the stream is to not have
a StreamConnector configured at initialization time and a
StreamConnector is to be specified later ondevice - the device to be used for both capture and playback of
media exchanged via the specified StreamConnector
MediaStream createMediaStream(StreamConnector connector,
MediaDevice device,
SrtpControl zrtpControl)
connector - the StreamConnector the stream should use for
sending and receiving media or null if the stream is to not have
a StreamConnector configured at initialization time and a
StreamConnector is to be specified later ondevice - the device to be used for both capture and playback of
media exchanged via the specified StreamConnectorzrtpControl - a control which is already created, used to control
the ZRTP operations.
MediaDevice createMixer(MediaDevice device)
device - the MediaDevice which is to be used by the
returned MediaDevice to actually capture and play back media
MediaFormatFactory getFormatFactory()
ZrtpControl createZrtpControl()
SDesControl createSDesControl()
VolumeControl getOutputVolumeControl()
VolumeControl getInputVolumeControl()
List<ScreenDevice> getAvailableScreenDevices()
ScreenDevice getDefaultScreenDevice()
Recorder createRecorder(MediaDevice device)
device - the MediaDevice which is used for media capture
and playback by the call to be recorded
Map<MediaFormat,Byte> getDynamicPayloadTypePreferences()
Map that binds indicates whatever preferences the
media service implementation may have for the RTP payload type numbers
that get dynamically assigned to MediaFormats with no static
payload type. The method is useful for formats such as "telephone-event"
for example that is statically assigned the 101 payload type by some
legacy systems. Signalling protocol implementations such as SIP and XMPP
should make sure that, whenever this is possible, they assign to formats
the dynamic payload type returned in this Map.
Map binding some formats to a preferred dynamic RTP
payload type number.
Object getVideoPreviewComponent(MediaDevice device,
int preferredWidth,
int preferredHeight)
device - the video devicepreferredWidth - the width we prefer for the componentpreferredHeight - the height we prefer for the component
MediaDevice getMediaDeviceForPartialDesktopStreaming(int width,
int height,
int x,
int y)
width - width of the partheight - height of the partx - origin of the x coordinate (relative to the full desktop)y - origin of the y coordinate (relative to the full desktop)
boolean isPartialStreaming(MediaDevice mediaDevice)
mediaDevice - MediaDevice
Point getOriginForDesktopStreamingDevice(MediaDevice mediaDevice)
mediaDevice - media device
void addRecorderListener(Recorder.Listener listener)
listener - the new Recorder.Listener to be added to the
list of listeners interested in notifications from Recorders.void removeRecorderListener(Recorder.Listener listener)
listener - the existing Listener to be removed from the
list of listeners interested in notifications from RecordersIterator<Recorder.Listener> getRecorderListeners()
RTPTranslator createRTPTranslator()
void addPropertyChangeListener(PropertyChangeListener listener)
listener - the PropertyChangeListener to be notified about
changes in the values of the properties of this instancevoid removePropertyChangeListener(PropertyChangeListener listener)
listener - the PropertyChangeListener to no longer be
notified about changes in the values of the properties of this instance
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||