|
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 | |||||||||
java.lang.Objectnet.java.sip.communicator.service.neomedia.AbstractMediaStream
net.java.sip.communicator.impl.neomedia.MediaStreamImpl
net.java.sip.communicator.impl.neomedia.VideoMediaStreamImpl
public class VideoMediaStreamImpl
Extends MediaStreamImpl in order to provide an implementation of VideoMediaStream.
| Field Summary |
|---|
| Fields inherited from class net.java.sip.communicator.impl.neomedia.MediaStreamImpl |
|---|
PROPERTY_NAME_RECEIVE_BUFFER_LENGTH |
| Fields inherited from interface net.java.sip.communicator.service.neomedia.MediaStream |
|---|
PNAME_LOCAL_SSRC, PNAME_REMOTE_SSRC |
| Constructor Summary | |
|---|---|
VideoMediaStreamImpl(StreamConnector connector,
MediaDevice device,
SrtpControl srtpControl)
Initializes a new VideoMediaStreamImpl instance which will use the specified MediaDevice for both capture and playback of video exchanged via the specified StreamConnector. |
|
| Method Summary | |
|---|---|
void |
addVideoListener(VideoListener listener)
Adds a specific VideoListener to this VideoMediaStream in order to receive notifications when visual/video Components are being added and removed. |
protected void |
configureDataOutputStream(RTPConnectorOutputStream dataOutputStream)
Performs any optional configuration on a specific RTPConnectorOuputStream of an RTPManager to be used by this MediaStreamImpl. |
protected void |
configureRTPManagerBufferControl(StreamRTPManager rtpManager,
javax.media.control.BufferControl bufferControl)
Performs any optional configuration on the BufferControl of the specified RTPManager which is to be used as the RTPManager of this MediaStreamImpl. |
Component |
createLocalVisualComponent()
Creates the visual Component depicting the video being streamed from the local peer to the remote peer. |
protected void |
deviceSessionChanged(MediaDeviceSession oldValue,
MediaDeviceSession newValue)
Notifies this MediaStream that the MediaDevice (and respectively the MediaDeviceSession with it) which this instance uses for capture and playback of media has been changed. |
void |
disposeLocalVisualComponent(Component component)
Disposes of the visual Component of the local peer. |
protected boolean |
fireVideoEvent(int type,
Component visualComponent,
int origin,
boolean wait)
Notifies the VideoListeners registered with this VideoMediaStream about a specific type of change in the availability of a specific visual Component depicting video. |
protected void |
fireVideoEvent(VideoEvent event,
boolean wait)
Notifies the VideoListeners registered with this instance about a specific VideoEvent. |
KeyFrameControl |
getKeyFrameControl()
Implements VideoMediaStream.getKeyFrameControl(). |
protected int |
getPriority()
The priority of the video is 5, which is meant to be higher than other threads and lower than the audio one. |
QualityControl |
getQualityControl()
Gets the QualityControl of this VideoMediaStream. |
Component |
getVisualComponent()
Deprecated. |
List<Component> |
getVisualComponents()
Gets a list of the visual Components where video from the remote peer is being rendered. |
protected void |
handleAttributes(MediaFormat format,
Map<String,String> attrs)
Handles attributes contained in MediaFormat. |
void |
movePartialDesktopStreaming(int x,
int y)
Move origin of a partial desktop streaming MediaDevice. |
static Dimension[] |
parseSendRecvResolution(String imgattr)
Extracts and returns maximum resolution can receive from the image attribute. |
void |
removeVideoListener(VideoListener listener)
Removes a specific VideoListener from this VideoMediaStream in order to have to no longer receive notifications when visual/video Components are being added and removed. |
protected void |
rtpConnectorChanged(AbstractRTPConnector oldValue,
AbstractRTPConnector newValue)
Notifies this MediaStream implementation that its RTPConnector instance has changed from a specific old value to a specific new value. |
static Dimension |
selectVideoSize(javax.media.protocol.DataSource videoDS,
int preferredWidth,
int preferredHeight)
Selects the VideoFormat from the list of supported formats of a specific video DataSource which has a size as close as possible to a specific size and sets it as the format of the specified video DataSource. |
protected void |
setLocalSourceID(long localSourceID)
Set local SSRC. |
protected void |
setRemoteSourceID(long ssrc)
Set remote SSRC. |
void |
updateQualityControl(Map<String,String> advancedParams)
Updates the QualityControl of this VideoMediaStream. |
| Methods inherited from class net.java.sip.communicator.service.neomedia.AbstractMediaStream |
|---|
addPropertyChangeListener, firePropertyChange, getName, matches, removePropertyChangeListener, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.java.sip.communicator.service.neomedia.MediaStream |
|---|
addDynamicRTPPayloadType, addPropertyChangeListener, addRTPExtension, close, getActiveRTPExtensions, getDevice, getDirection, getDynamicRTPPayloadTypes, getFormat, getLocalSourceID, getMediaStreamStats, getName, getRemoteControlAddress, getRemoteDataAddress, getRemoteSourceID, getSrtpControl, getTarget, getTransportProtocol, isMute, isStarted, removePropertyChangeListener, setConnector, setDevice, setDirection, setFormat, setMute, setName, setRTPTranslator, setTarget, start, stop |
| Constructor Detail |
|---|
public VideoMediaStreamImpl(StreamConnector connector,
MediaDevice device,
SrtpControl srtpControl)
connector - the StreamConnector the new instance is to use
for sending and receiving videodevice - the MediaDevice the new instance is to use for
both capture and playback of video exchanged via the specified
StreamConnectorsrtpControl - a control which is already created, used to control
the srtp operations.| Method Detail |
|---|
public static Dimension selectVideoSize(javax.media.protocol.DataSource videoDS,
int preferredWidth,
int preferredHeight)
videoDS - the video DataSource which is to have its
supported formats examined and its format changed to the
VideoFormat which is as close as possible to the specified
preferredWidth and preferredHeightpreferredWidth - the width of the VideoFormat to be
selectedpreferredHeight - the height of the VideoFormat to be
selected
public void addVideoListener(VideoListener listener)
Adding a listener which has already been added does nothing i.e. it is not added more than once and thus does not receive one and the same VideoEvent multiple times.
addVideoListener in interface VideoMediaStreamlistener - the VideoListener to be notified when
visual/video Components are being added or removed in this
VideoMediaStreamprotected void configureDataOutputStream(RTPConnectorOutputStream dataOutputStream)
configureDataOutputStream in class MediaStreamImpldataOutputStream - the RTPConnectorOutputStream to be used
by an RTPManager of this MediaStreamImpl and to be
configured
protected void configureRTPManagerBufferControl(StreamRTPManager rtpManager,
javax.media.control.BufferControl bufferControl)
configureRTPManagerBufferControl in class MediaStreamImplrtpManager - the RTPManager which is to be used by this
MediaStreamImplbufferControl - the BufferControl of rtpManager on
which any optional configuration is to be performedpublic Component createLocalVisualComponent()
createLocalVisualComponent in interface VideoMediaStreamVideoEvent.VIDEO_ADDED and origin
VideoEvent.LOCAL
protected void deviceSessionChanged(MediaDeviceSession oldValue,
MediaDeviceSession newValue)
deviceSessionChanged in class MediaStreamImploldValue - the MediaDeviceSession with the
MediaDevice this instance used work withnewValue - the MediaDeviceSession with the
MediaDevice this instance is to work withMediaStreamImpl.deviceSessionChanged(MediaDeviceSession,
MediaDeviceSession)public void disposeLocalVisualComponent(Component component)
disposeLocalVisualComponent in interface VideoMediaStreamcomponent - the visual Component of the local peer to
dispose of
protected boolean fireVideoEvent(int type,
Component visualComponent,
int origin,
boolean wait)
type - the type of change as defined by VideoEvent in the
availability of the specified visual Component depicting videovisualComponent - the visual Component depicting video
which has been added or removed in this VideoMediaStreamorigin - VideoEvent.LOCAL if the origin of the video is
local (e.g. it is being locally captured); VideoEvent.REMOTE if
the origin of the video is remote (e.g. a remote peer is streaming it)wait - true if the call is to wait till the specified
VideoEvent has been delivered to the VideoListeners;
otherwise, false
protected void fireVideoEvent(VideoEvent event,
boolean wait)
event - the VideoEvent to be fired to the
VideoListeners registered with this instancewait - true if the call is to wait till the specified
VideoEvent has been delivered to the VideoListeners;
otherwise, false@Deprecated public Component getVisualComponent()
getVisualComponent in interface VideoMediaStreamVideoMediaStream.getVisualComponent()public List<Component> getVisualComponents()
getVisualComponents in interface VideoMediaStreamVideoMediaStream.getVisualComponents()public void removeVideoListener(VideoListener listener)
removeVideoListener in interface VideoMediaStreamlistener - the VideoListener to no longer be notified when
visual/video Components are being added or removed in this
VideoMediaStream
protected void rtpConnectorChanged(AbstractRTPConnector oldValue,
AbstractRTPConnector newValue)
rtpConnectorChanged in class MediaStreamImploldValue - the RTPConnector of this MediaStream
implementation before it got changed to newValuenewValue - the current RTPConnector of this
MediaStream which replaced oldValueMediaStreamImpl.rtpConnectorChanged(AbstractRTPConnector,
AbstractRTPConnector)
protected void handleAttributes(MediaFormat format,
Map<String,String> attrs)
handleAttributes in class MediaStreamImplformat - the MediaFormat to handle the attributes ofattrs - the attributes Map to handlepublic static Dimension[] parseSendRecvResolution(String imgattr)
imgattr - send/recv resolution string
protected void setLocalSourceID(long localSourceID)
setLocalSourceID in class MediaStreamImpllocalSourceID - source IDprotected void setRemoteSourceID(long ssrc)
setRemoteSourceID in class MediaStreamImplssrc - remote SSRCprotected int getPriority()
getPriority in class MediaStreamImplpublic KeyFrameControl getKeyFrameControl()
VideoMediaStream.getKeyFrameControl().
Gets the KeyFrameControl of this VideoMediaStream.
getKeyFrameControl in interface VideoMediaStreamVideoMediaStream.getKeyFrameControl()public QualityControl getQualityControl()
getQualityControl in interface VideoMediaStreampublic void updateQualityControl(Map<String,String> advancedParams)
updateQualityControl in interface VideoMediaStreamadvancedParams - parameters of advanced attributes that may affect
quality control
public void movePartialDesktopStreaming(int x,
int y)
movePartialDesktopStreaming in interface VideoMediaStreamx - new x coordinate originy - new y coordinate origin
|
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 | |||||||||