|
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 MediaStream
The MediaStream class represents a (generally) bidirectional RTP stream between exactly two parties. The class reflects one media stream, in the SDP sense of the word. MediaStream instances are created through the openMediaStream() method of the MediaService.
| Field Summary | |
|---|---|
static String |
PNAME_LOCAL_SSRC
The name of the property which indicates whether the remote SSRC is currently available. |
static String |
PNAME_REMOTE_SSRC
The name of the property which indicates whether the local SSRC is currently available. |
| Method Summary | |
|---|---|
void |
addDynamicRTPPayloadType(byte rtpPayloadType,
MediaFormat format)
Adds a new association in this MediaStream of the specified RTP payload type with the specified MediaFormat in order to allow it to report rtpPayloadType in RTP flows sending and receiving media in format. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a property change listener to this stream so that it would be notified upon property change events like for example an SSRC ID which becomes known. |
void |
addRTPExtension(byte extensionID,
RTPExtension rtpExtension)
Adds or updates an association in this MediaStream mapping the specified extensionID to rtpExtension and enabling or disabling its use according to the direction attribute of rtpExtension. |
void |
close()
Releases the resources allocated by this instance in the course of its execution and prepares it to be garbage collected. |
Map<Byte,RTPExtension> |
getActiveRTPExtensions()
Returns a map containing all currently active RTPExtensions in use by this stream. |
MediaDevice |
getDevice()
Gets the device that this stream uses to play back and capture media. |
MediaDirection |
getDirection()
Gets the direction in which this MediaStream is allowed to stream media. |
Map<Byte,MediaFormat> |
getDynamicRTPPayloadTypes()
Gets the existing associations in this MediaStream of RTP payload types to MediaFormats. |
MediaFormat |
getFormat()
Returns the MediaFormat that this stream is currently transmitting in. |
long |
getLocalSourceID()
Returns the synchronization source (SSRC) identifier of the local participant or -1 if that identifier is not yet known at this point. |
String |
getName()
Returns the name of this stream or null if no name has been set. |
InetSocketAddress |
getRemoteControlAddress()
Returns the address that this stream is sending RTCP traffic to. |
InetSocketAddress |
getRemoteDataAddress()
Returns the address that this stream is sending RTP traffic to. |
long |
getRemoteSourceID()
Returns the synchronization source (SSRC) identifier of the remote participant or -1 if that identifier is not yet known at this point. |
SrtpControl |
getSrtpControl()
The ZrtpControl which controls the ZRTP for this stream. |
MediaStreamTarget |
getTarget()
Returns the target of this MediaStream to which it is to send and from which it is to receive data (e.g. |
boolean |
isMute()
Determines whether this MediaStream is set to transmit "silence" instead of the media being fed from its MediaDevice. |
boolean |
isStarted()
Determines whether start() has been called on this
MediaStream without stop() or close()
afterwards. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes the specified property change listener from this stream so that it won't receive further property change events. |
void |
setConnector(StreamConnector connector)
Sets the StreamConnector to be used by this MediaStream for sending and receiving media. |
void |
setDevice(MediaDevice device)
Sets the device that this stream should use to play back and capture media. |
void |
setDirection(MediaDirection direction)
Sets the direction in which media in this MediaStream is to be streamed. |
void |
setFormat(MediaFormat format)
Sets the MediaFormat that this MediaStream should transmit in. |
void |
setMute(boolean mute)
Causes this MediaStream to stop transmitting the media being fed from this stream's MediaDevice and transmit "silence" instead. |
void |
setName(String name)
Sets the name of this stream. |
void |
setRTPTranslator(RTPTranslator rtpTranslator)
Sets the RTPTranslator which is to forward RTP and RTCP traffic between this and other MediaStreams. |
void |
setTarget(MediaStreamTarget target)
Sets the target of this MediaStream to which it is to send and from which it is to receive data (e.g. |
void |
start()
Starts capturing media from this stream's MediaDevice and then streaming it through the local StreamConnector toward the stream's target address and port. |
void |
stop()
Stops all streaming and capturing in this MediaStream and closes and releases all open/allocated devices/resources. |
| Field Detail |
|---|
static final String PNAME_LOCAL_SSRC
static final String PNAME_REMOTE_SSRC
| Method Detail |
|---|
void start()
void stop()
void close()
void setFormat(MediaFormat format)
format - the MediaFormat that this MediaStream
should transmit in.MediaFormat getFormat()
void setConnector(StreamConnector connector)
connector - the StreamConnector to be used by this
MediaStream for sending and receiving mediavoid setDevice(MediaDevice device)
device - the MediaDevice that this stream should use to
play back and capture media.MediaDevice getDevice()
long getRemoteSourceID()
long getLocalSourceID()
InetSocketAddress getRemoteControlAddress()
InetSocketAddress getRemoteDataAddress()
void addPropertyChangeListener(PropertyChangeListener listener)
listener - the listener that we'd like to register for
PropertyChangeEventsvoid removePropertyChangeListener(PropertyChangeListener listener)
listener - the listener that we'd like to remove.void setTarget(MediaStreamTarget target)
target - the MediaStreamTarget describing the data
(e.g. RTP) and the control data (e.g. RTCP) locations to which this
MediaStream is to send and from which it is to receiveMediaStreamTarget getTarget()
setTarget(MediaStreamTarget)
void addDynamicRTPPayloadType(byte rtpPayloadType,
MediaFormat format)
rtpPayloadType - the RTP payload type to be associated in this
MediaStream with the specified MediaFormatformat - the MediaFormat to be associated in this
MediaStream with rtpPayloadTypeMap<Byte,MediaFormat> getDynamicRTPPayloadTypes()
addDynamicRTPPayloadType(byte, MediaFormat) and not globally or
well-known associations reported by
MediaFormat.getRTPPayloadType().
void addRTPExtension(byte extensionID,
RTPExtension rtpExtension)
extensionID - the ID that is mapped to rtpExtension for
the lifetime of this MediaStream.rtpExtension - the RTPExtension that we are mapping to
extensionID.Map<Byte,RTPExtension> getActiveRTPExtensions()
void setDirection(MediaDirection direction)
start() later on will start it only in the specified
direction. If it is currently started in a direction different
than the specified, directions other than the specified will be stopped.
direction - the MediaDirection in which this
MediaStream is to stream media when it is startedMediaDirection getDirection()
boolean isStarted()
start() has been called on this
MediaStream without stop() or close()
afterwards.
start() has been called on this
MediaStream without stop() or close()
afterwardsvoid setMute(boolean mute)
mute - true if we are to start transmitting "silence" and
false if we are to use media from this stream's
MediaDevice again.boolean isMute()
String getName()
void setName(String name)
name - the name of this stream or null if no name has been
set.SrtpControl getSrtpControl()
void setRTPTranslator(RTPTranslator rtpTranslator)
rtpTranslator - the RTPTranslator which is to forward RTP
and RTCP traffic between this and other MediaStreams
|
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 | |||||||||