public class Message extends MiniObject
Messages are implemented as a subclass of MiniObject
with a generic
Structure
as the content. This allows for writing custom messages without
requiring an API change while allowing a wide range of different types
of messages.
Messages are posted by objects in the pipeline and are passed to the
application using the Bus
.
The basic use pattern of posting a message on a Bus is as follows:
bus.post(new EOSMessage(source));
Element
usually posts messages on the bus provided by the parent
container using postMessage()
.
NativeObject.Initializer
Modifier and Type | Field and Description |
---|---|
protected GstMessageAPI.MessageStruct |
messageStruct |
defaultInit, LIFECYCLE, ownsHandle
Constructor and Description |
---|
Message(NativeObject.Initializer init)
Creates a new instance of Message.
|
Modifier and Type | Method and Description |
---|---|
Message |
copy()
Creates a copy of the message.
|
GstObject |
getSource()
Gets the Element that posted this message.
|
Structure |
getStructure()
Gets the structure containing the data in this message.
|
MessageType |
getType()
Gets the type of this message.
|
Message |
makeWritable()
Gets a writable version of this Message.
|
disposeNativeHandle, isWritable, makeWritable, ref, unref
classFor, disown, dispose, equals, finalize, getNativeAddress, handle, hashCode, initializer, initializer, instanceFor, invalidate, isDisposed, nativeValue, objectFor, objectFor, objectFor, objectFor, toString
protected GstMessageAPI.MessageStruct messageStruct
public Message(NativeObject.Initializer init)
init
- internal initialization data.public GstObject getSource()
public Structure getStructure()
public MessageType getType()
public Message makeWritable()
public Message copy()