public class VideoEvent
extends java.util.EventObject
Modifier and Type | Field and Description |
---|---|
static int |
LOCAL
The video origin of a VideoEvent which is local to the executing
client such as a local video capture device.
|
static int |
REMOTE
The video origin of a VideoEvent which is remote to the
executing client such as a video being remotely streamed from a
CallPeer.
|
static int |
VIDEO_ADDED
The type of a VideoEvent which notifies about a specific visual
Component depicting video being made available by the firing
provider.
|
static int |
VIDEO_REMOVED
The type of a VideoEvent which notifies about a specific visual
Component depicting video no longer being made available by the
firing provider.
|
Constructor and Description |
---|
VideoEvent(java.lang.Object source,
int type,
java.awt.Component visualComponent,
int origin)
Initializes a new VideoEvent which is to notify about a specific
change in the availability of a specific visual Component
depicting video and being provided by a specific source.
|
Modifier and Type | Method and Description |
---|---|
VideoEvent |
clone(java.lang.Object source)
Initializes a new instance of the run-time type of this instance which
has the same property values as this instance except for the source which
is set on the new instance to a specific value.
|
void |
consume()
Consumes this event and, more specifically, marks the Component
it describes as owned, referenced in order to let other potential
consumers know about its current ownership status (which is important
because Components belong to a single Container at a
time).
|
int |
getOrigin()
|
int |
getType()
Gets the type of availability change this VideoEvent notifies
about which is one of
VIDEO_ADDED and VIDEO_REMOVED . |
java.awt.Component |
getVisualComponent()
Gets the visual Component depicting video which had its
availability changed and which this VideoEvent notifies about.
|
boolean |
isConsumed()
Determines whether this event and, more specifically, the visual
Component it describes have been consumed and should be
considered owned, referenced (which is important because
Components belong to a single Container at a time).
|
static java.lang.String |
originToString(int origin)
Returns a human-readable representation of a specific VideoEvent
origin constant in the form of a String value.
|
static java.lang.String |
typeToString(int type)
Returns a human-readable representation of a specific VideoEvent
type constant in the form of a String value.
|
public static final int LOCAL
public static final int REMOTE
public static final int VIDEO_ADDED
public static final int VIDEO_REMOVED
public VideoEvent(java.lang.Object source, int type, java.awt.Component visualComponent, int origin)
source
- the source of the new VideoEvent and the provider
of the visual Component depicting videotype
- the type of the availability change which has caused the new
VideoEvent to be firedvisualComponent
- the visual Component depicting video
which had its availability in the source provider changedorigin
- the origin of the video the new VideoEvent is to
notify aboutpublic VideoEvent clone(java.lang.Object source)
source
- the Object which is to be reported as the source
of the new instancepublic void consume()
public int getOrigin()
public int getType()
VIDEO_ADDED
and VIDEO_REMOVED
.VIDEO_ADDED
and VIDEO_REMOVED
which
describes the type of availability change this VideoEvent
notifies aboutpublic java.awt.Component getVisualComponent()
public boolean isConsumed()
public static java.lang.String originToString(int origin)
public static java.lang.String typeToString(int type)
type
- one of the VideoEvent type constants such as
VIDEO_ADDED
or VIDEO_REMOVED
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.