|
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.util.PropertyChangeNotifier
net.java.sip.communicator.impl.neomedia.device.MediaDeviceSession
net.java.sip.communicator.impl.neomedia.device.VideoMediaDeviceSession
public class VideoMediaDeviceSession
Extends MediaDeviceSession to add video-specific functionality.
| Field Summary |
|---|
| Fields inherited from class net.java.sip.communicator.impl.neomedia.device.MediaDeviceSession |
|---|
OUTPUT_DATA_SOURCE, outputsizeChanged, SSRC_LIST |
| Constructor Summary | |
|---|---|
VideoMediaDeviceSession(AbstractMediaDevice device)
Initializes a new VideoMediaDeviceSession instance which is to represent the work of a MediaStream with a specific video MediaDevice. |
|
| Method Summary | |
|---|---|
void |
addVideoListener(VideoListener listener)
Adds a specific VideoListener to this instance in order to receive notifications when visual/video Components are being added and removed. |
protected void |
checkDevice(AbstractMediaDevice device)
Asserts that a specific MediaDevice is acceptable to be set as the MediaDevice of this instance. |
protected javax.media.protocol.DataSource |
createCaptureDevice()
Creates the DataSource that this instance is to read captured media from. |
protected javax.media.Player |
createLocalPlayer(javax.media.protocol.DataSource captureDevice)
Initializes a new Player instance which is to provide the local visual/video Component. |
Component |
createLocalVisualComponent()
Creates the visual Component depicting the video being streamed from the local peer to the remote peer. |
void |
disposeLocalVisualComponent(Component component)
Disposes of the local visual Component of the local peer. |
protected void |
disposePlayer(javax.media.Player player)
Releases the resources allocated by a specific Player in the course of its execution and prepares it to be garbage collected. |
protected boolean |
fireVideoEvent(int type,
Component visualComponent,
int origin,
boolean wait)
Notifies the VideoListeners registered with this instance about a specific type of change in the availability of a specific visual Component depicting video. |
protected void |
fireVideoEvent(VideoEvent videoEvent,
boolean wait)
Notifies the VideoListeners registered with this instance about a specific VideoEvent. |
List<Component> |
getVisualComponents()
Gets the visual Components where video from the remote peer is being rendered. |
protected void |
playerConfigureComplete(javax.media.Processor player)
Notifies this instance that a specific Player of remote content has generated a ConfigureCompleteEvent. |
protected void |
playerControllerUpdate(javax.media.ControllerEvent event)
Gets notified about ControllerEvents generated by a specific Player of remote content. |
protected void |
playerRealizeComplete(javax.media.Processor player)
Notifies this instance that a specific Player of remote content has generated a RealizeCompleteEvent. |
protected void |
playerSizeChange(javax.media.Controller sourceController,
int width,
int height)
Notifies this instance that a specific Player of remote content has generated a SizeChangeEvent. |
void |
removeVideoListener(VideoListener listener)
Removes a specific VideoListener from this instance in order to have to no longer receive notifications when visual/video Components are being added and removed. |
void |
setConnector(AbstractRTPConnector rtpConnector)
Sets the RTPConnector that will be used to initialize some codec for RTCP feedback. |
void |
setFormat(MediaFormat format)
Sets the MediaFormat in which this MediaDeviceSession outputs the media captured by its MediaDevice. |
void |
setKeyFrameControl(KeyFrameControl keyFrameControl)
Sets the KeyFrameControl to be used by this VideoMediaDeviceSession as a means of control over its key frame-related logic. |
void |
setLocalSSRC(long localSSRC)
Set the local SSRC. |
void |
setOutputSize(Dimension size)
Sets the size of the output video. |
protected void |
setProcessorFormat(javax.media.Processor processor,
MediaFormatImpl<? extends javax.media.Format> mediaFormat)
Sets the MediaFormatImpl in which a specific Processor producing media to be streamed to the remote peer is to output. |
protected javax.media.Format |
setProcessorFormat(javax.media.control.TrackControl trackControl,
MediaFormatImpl<? extends javax.media.Format> mediaFormat,
javax.media.Format format)
Sets the MediaFormatImpl of a specific TrackControl of the Processor which produces the media to be streamed by this MediaDeviceSession to the remote peer. |
void |
setRemoteSSRC(long remoteSSRC)
Set the remote SSRC. |
void |
setRtcpFeedbackPLI(boolean usePLI)
Use or not RTCP feedback Picture Loss Indication. |
protected void |
startedDirectionChanged(MediaDirection oldValue,
MediaDirection newValue)
Notifies this instance that the value of its startedDirection property has changed from a specific oldValue to a specific newValue. |
| Methods inherited from class net.java.sip.communicator.util.PropertyChangeNotifier |
|---|
addPropertyChangeListener, firePropertyChange, getPropertyChangeSource, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VideoMediaDeviceSession(AbstractMediaDevice device)
device - the video MediaDevice the use of which by a
MediaStream is to be represented by the new instance| Method Detail |
|---|
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.
listener - the VideoListener to be notified when
visual/video Components are being added or removed in this
instanceprotected javax.media.protocol.DataSource createCaptureDevice()
createCaptureDevice in class MediaDeviceSessionprotected void checkDevice(AbstractMediaDevice device)
MediaType.VIDEO.
checkDevice in class MediaDeviceSessiondevice - the MediaDevice to be checked for suitability to
become the MediaDevice of this instanceMediaDeviceSession.checkDevice(AbstractMediaDevice)protected void disposePlayer(javax.media.Player player)
VideoEvent.VIDEO_REMOVED VideoEvent.
disposePlayer in class MediaDeviceSessionplayer - the Player to dispose ofMediaDeviceSession.disposePlayer(Player)
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 instanceorigin - 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 videoEvent,
boolean wait)
videoEvent - 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, falseprotected javax.media.Player createLocalPlayer(javax.media.protocol.DataSource captureDevice)
captureDevice - the DataSource which is to have its media
rendered by the new instance as the local visual/video Component
public Component createLocalVisualComponent()
VideoEvent.VIDEO_ADDED and origin
VideoEvent.LOCALpublic void disposeLocalVisualComponent(Component component)
component - the local visual Component of the local peer to
dispose ofpublic List<Component> getVisualComponents()
protected void playerConfigureComplete(javax.media.Processor player)
playerConfigureComplete in class MediaDeviceSessionplayer - the Player which is the source of a
ConfigureCompleteEventMediaDeviceSession.playerConfigureComplete(Processor)protected void playerControllerUpdate(javax.media.ControllerEvent event)
playerControllerUpdate in class MediaDeviceSessionevent - the ControllerEvent specifying the
Controller which is the source of the event and the very type of
the eventMediaDeviceSession.playerControllerUpdate(ControllerEvent)protected void playerRealizeComplete(javax.media.Processor player)
playerRealizeComplete in class MediaDeviceSessionplayer - the Player which is the source of a
RealizeCompleteEvent.MediaDeviceSession.playerRealizeComplete(Processor)
protected void playerSizeChange(javax.media.Controller sourceController,
int width,
int height)
sourceController - the Player which is the source of the
eventwidth - the width reported in the eventheight - the height reported in the eventSizeChangeEventpublic void removeVideoListener(VideoListener listener)
listener - the VideoListener to no longer be notified when
visual/video Components are being added or removed in this
instancepublic void setRtcpFeedbackPLI(boolean usePLI)
usePLI - true to use PLI; otherwise, falsepublic void setOutputSize(Dimension size)
size - the size of the output videopublic void setConnector(AbstractRTPConnector rtpConnector)
rtpConnector - the RTP connectorpublic void setKeyFrameControl(KeyFrameControl keyFrameControl)
keyFrameControl - the KeyFrameControl to be used by this
VideoMediaDeviceSession as a means of control over its
key frame-related logicpublic void setLocalSSRC(long localSSRC)
localSSRC - local SSRCpublic void setRemoteSSRC(long remoteSSRC)
remoteSSRC - remote SSRC
protected void setProcessorFormat(javax.media.Processor processor,
MediaFormatImpl<? extends javax.media.Format> mediaFormat)
setProcessorFormat in class MediaDeviceSessionprocessor - the Processor to set the output
MediaFormatImpl ofmediaFormat - the MediaFormatImpl to set on
processorMediaDeviceSession.setProcessorFormat(Processor, MediaFormatImpl)
protected javax.media.Format setProcessorFormat(javax.media.control.TrackControl trackControl,
MediaFormatImpl<? extends javax.media.Format> mediaFormat,
javax.media.Format format)
setProcessorFormat in class MediaDeviceSessiontrackControl - the TrackControl to set the JMF
Format ofmediaFormat - the MediaFormatImpl to be set on the
specified TrackControl. Though mediaFormat encapsulates
a JMF Format, format is to be set on the specified
trackControl because it may be more specific. In any case, the
two JMF Formats match. The MediaFormatImpl is provided
anyway because it carries additional information such as format
parameters.format - the JMF Format to be set on the specified
TrackControl. Though mediaFormat encapsulates a JMF
Format, the specified format is to be set on the
specified trackControl because it may be more specific than the
JMF Format of the mediaFormat
MediaDeviceSession.setProcessorFormat(TrackControl, MediaFormatImpl,
Format)public void setFormat(MediaFormat format)
setFormat in class MediaDeviceSessionformat - the MediaFormat in which this
MediaDeviceSession is to output the media captured by its
MediaDevice
protected void startedDirectionChanged(MediaDirection oldValue,
MediaDirection newValue)
startedDirectionChanged in class MediaDeviceSessionoldValue - the MediaDirection which used to be the value of
the startedDirection property of this instancenewValue - the MediaDirection which is the value of the
startedDirection property 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 | |||||||||