Package ch.bailu.gtk.gst
Klasse Message
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.gst.Message
- Alle implementierten Schnittstellen:
PointerInterface
Messages are implemented as a subclass of #GstMiniObject with a generic
#GstStructure 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 #GstBus.
The basic use pattern of posting a message on a #GstBus is as follows:
A #GstElement usually posts messages on the bus provided by the parent
container using gst_element_post_message().
#GstStructure 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 #GstBus.
The basic use pattern of posting a message on a #GstBus is as follows:
<!-- language="C" --> gst_bus_post (bus, gst_message_new_eos());
A #GstElement usually posts messages on the bus provided by the parent
container using gst_element_post_message().
https://gstreamer.freedesktop.org/documentation/gstreamer/gi-index.html
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final String
the parent structure
Private field: direct-typestatic final String
the sequence number of the messagestatic final String
the src of the messagestatic final String
the timestamp of the messagestatic final String
the #GstMessageType of the message -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
addRedirectEntry
(Str location, TagList tag_list, Structure entry_struct) Creates and appends a new entry.void
addRedirectEntry
(String location, TagList tag_list, Structure entry_struct) Creates and appends a new entry.copy()
Creates a copy of the message.static ClassHandler
Returns the optional details structure of the message.int
the sequence number of the messagethe src of the messagelong
the timestamp of the messageint
the #GstMessageType of the messagestatic int
long
static long
static TypeSystem.TypeSize
int
Retrieve the sequence number of a message.Extracts the object managing the streaming thread from @message.Access the structure of the message.static long
static TypeSystem.TypeSize
boolean
Checks if @message has the given @name.boolean
Checks if @message has the given @name.static Message
newApplicationMessage
(Object src, Structure structure) Create a new application-typed message.static Message
newAsyncDoneMessage
(Object src, long running_time) The message is posted when elements completed an ASYNC state change.static Message
This message is posted by elements when they start an ASYNC state change.static Message
newBufferingMessage
(Object src, int percent) Create a new buffering message.static Message
newClockLostMessage
(Object src, Clock clock) Create a clock lost message.static Message
newClockProvideMessage
(Object src, Clock clock, boolean ready) Create a clock provide message.static Message
newCustomMessage
(int type, Object src, Structure structure) Create a new custom-typed message.static Message
newDeviceAddedMessage
(Object src, Device device) Creates a new device-added message.static Message
newDeviceChangedMessage
(Object src, Device device, Device changed_device) Creates a new device-changed message.static Message
newDeviceRemovedMessage
(Object src, Device device) Creates a new device-removed message.static Message
Create a new duration changed message.static Message
newElementMessage
(Object src, Structure structure) Create a new element-specific message.static Message
newEosMessage
(Object src) Create a new eos message.static Message
newErrorMessage
(Object src, Error error, Str debug) Create a new error message.static Message
newErrorMessage
(Object src, Error error, String debug) Create a new error message.static Message
newErrorWithDetailsMessage
(Object src, Error error, Str debug, Structure details) Create a new error message.static Message
newErrorWithDetailsMessage
(Object src, Error error, String debug, Structure details) Create a new error message.static Message
newHaveContextMessage
(Object src, Context context) This message is posted when an element has a new local #GstContext.static Message
newInfoMessage
(Object src, Error error, Str debug) Create a new info message.static Message
newInfoMessage
(Object src, Error error, String debug) Create a new info message.static Message
newInfoWithDetailsMessage
(Object src, Error error, Str debug, Structure details) Create a new info message.static Message
newInfoWithDetailsMessage
(Object src, Error error, String debug, Structure details) Create a new info message.static Message
newInstantRateRequestMessage
(Object src, double rate_multiplier) Creates a new instant-rate-request message.static Message
newLatencyMessage
(Object src) This message can be posted by elements when their latency requirements have
changed.static Message
newNeedContextMessage
(Object src, Str context_type) This message is posted when an element needs a specific #GstContext.static Message
newNeedContextMessage
(Object src, String context_type) This message is posted when an element needs a specific #GstContext.static Message
newNewClockMessage
(Object src, Clock clock) Create a new clock message.static Message
newProgressMessage
(Object src, int type, Str code, Str text) Progress messages are posted by elements when they use an asynchronous task
to perform actions triggered by a state change.static Message
newProgressMessage
(Object src, int type, String code, String text) Progress messages are posted by elements when they use an asynchronous task
to perform actions triggered by a state change.static Message
newPropertyNotifyMessage
(Object src, Str property_name, Value val) static Message
newPropertyNotifyMessage
(Object src, String property_name, Value val) static Message
newQosMessage
(Object src, boolean live, long running_time, long stream_time, long timestamp, long duration) A QOS message is posted on the bus whenever an element decides to drop a
buffer because of QoS reasons or whenever it changes its processing strategy
because of QoS reasons (quality adjustments such as processing at lower
accuracy).static Message
newRedirectMessage
(Object src, Str location, TagList tag_list, Structure entry_struct) Creates a new redirect message and adds a new entry to it.static Message
newRedirectMessage
(Object src, String location, TagList tag_list, Structure entry_struct) Creates a new redirect message and adds a new entry to it.static Message
newRequestStateMessage
(Object src, int state) This message can be posted by elements when they want to have their state
changed.static Message
newResetTimeMessage
(Object src, long running_time) This message is posted when the pipeline running-time should be reset to
@running_time, like after a flushing seek.static Message
newSegmentDoneMessage
(Object src, int format, long position) Create a new segment done message.static Message
newSegmentStartMessage
(Object src, int format, long position) Create a new segment message.static Message
newStateChangedMessage
(Object src, int oldstate, int newstate, int pending) Create a state change message.static Message
Create a state dirty message.static Message
newStepDoneMessage
(Object src, int format, long amount, double rate, boolean flush, boolean intermediate, long duration, boolean eos) This message is posted by elements when they complete a part, when @intermediate set
to %TRUE, or a complete step operation.static Message
newStepStartMessage
(Object src, boolean active, int format, long amount, double rate, boolean flush, boolean intermediate) This message is posted by elements when they accept or activate a new step
event for @amount in @format.static Message
newStreamCollectionMessage
(Object src, StreamCollection collection) Creates a new stream-collection message.static Message
newStreamsSelectedMessage
(Object src, StreamCollection collection) Creates a new steams-selected message.static Message
Create a new stream_start message.static Message
newStreamStatusMessage
(Object src, int type, Element owner) Create a new stream status message.static Message
newStructureChangeMessage
(Object src, int type, Element owner, boolean busy) Create a new structure change message.static Message
newTagMessage
(Object src, TagList tag_list) Create a new tag message.static Message
newTocMessage
(Object src, Toc toc, boolean updated) Create a new TOC message.static Message
newWarningMessage
(Object src, Error error, Str debug) Create a new warning message.static Message
newWarningMessage
(Object src, Error error, String debug) Create a new warning message.static Message
newWarningWithDetailsMessage
(Object src, Error error, Str debug, Structure details) Create a new warning message.static Message
newWarningWithDetailsMessage
(Object src, Error error, String debug, Structure details) Create a new warning message.void
parseBuffering
(Int percent) Extracts the buffering percent from the GstMessage. see also
gst_message_new_buffering().void
parseInstantRateRequest
(Dbl rate_multiplier) Parses the rate_multiplier from the instant-rate-request message.void
parseRequestState
(Int state) Extract the requested state from the request_state message.void
parseStateChanged
(Int oldstate, Int newstate, Int pending) Extracts the old and new states from the GstMessage.void
setBufferingStats
(int mode, int avg_in, int avg_out, long buffering_left) Configures the buffering stats values in @message.void
setDetails
(Structure details) Add @details to @message.void
setFieldSeqnum
(int seqnum) the sequence number of the messagevoid
setFieldSrc
(Object src) the src of the messagevoid
setFieldTimestamp
(long timestamp) the timestamp of the messagevoid
setFieldType
(int type) the #GstMessageType of the messagevoid
setGroupId
(int group_id) Sets the group id on the stream-start message.void
setQosStats
(int format, long processed, long dropped) Set the QoS stats representing the history of the current continuous pipeline
playback period.void
setQosValues
(long jitter, double proportion, int quality) Set the QoS values that have been calculated/analysed from the QoS data
MT safe.void
setSeqnum
(int seqnum) Set the sequence number of a message.void
setStreamStatusObject
(Value object) Configures the object handling the streaming thread.void
streamsSelectedAdd
(Stream stream) Adds the @stream to the @message.int
Returns the number of streams contained in the @message.streamsSelectedGetStream
(int idx) Retrieves the #GstStream with index @index from the @message.Returns the details structure of the @message.Get a writable version of the structure.Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
Konstruktordetails
-
Methodendetails
-
getClassHandler
-
setFieldType
public void setFieldType(int type) the #GstMessageType of the message -
getFieldType
public int getFieldType()the #GstMessageType of the message -
setFieldTimestamp
public void setFieldTimestamp(long timestamp) the timestamp of the message -
getFieldTimestamp
public long getFieldTimestamp()the timestamp of the message -
setFieldSrc
the src of the message -
getFieldSrc
the src of the message -
setFieldSeqnum
public void setFieldSeqnum(int seqnum) the sequence number of the message -
getFieldSeqnum
public int getFieldSeqnum()the sequence number of the message -
newApplicationMessage
Create a new application-typed message. GStreamer will never create these
messages; they are a gift from us to you. Enjoy.- Parameter:
src
- The object originating the message.structure
- the structure for the message. The message will take ownership of the structure.- Gibt zurück:
- The new application message. MT safe.
-
newAsyncDoneMessage
The message is posted when elements completed an ASYNC state change.
@running_time contains the time of the desired running_time when this
elements goes to PLAYING. A value of #GST_CLOCK_TIME_NONE for @running_time
means that the element has no clock interaction and thus doesn't care about
the running_time of the pipeline.- Parameter:
src
- The object originating the message.running_time
- the desired running_time- Gibt zurück:
- The new async_done message. MT safe.
-
newAsyncStartMessage
This message is posted by elements when they start an ASYNC state change.- Parameter:
src
- The object originating the message.- Gibt zurück:
- The new async_start message. MT safe.
-
newBufferingMessage
Create a new buffering message. This message can be posted by an element that
needs to buffer data before it can continue processing. @percent should be a
value between 0 and 100. A value of 100 means that the buffering completed.
When @percent is < 100 the application should PAUSE a PLAYING pipeline. When
@percent is 100, the application can set the pipeline (back) to PLAYING.
The application must be prepared to receive BUFFERING messages in the
PREROLLING state and may only set the pipeline to PLAYING after receiving a
message with @percent set to 100, which can happen after the pipeline
completed prerolling.
MT safe.- Parameter:
src
- The object originating the message.percent
- The buffering percent- Gibt zurück:
- The new buffering message.
-
newClockLostMessage
Create a clock lost message. This message is posted whenever the
clock is not valid anymore.
If this message is posted by the pipeline, the pipeline will
select a new clock again when it goes to PLAYING. It might therefore
be needed to set the pipeline to PAUSED and PLAYING again.- Parameter:
src
- The object originating the message.clock
- the clock that was lost- Gibt zurück:
- The new clock lost message. MT safe.
-
newClockProvideMessage
public static Message newClockProvideMessage(@Nullable Object src, @Nonnull Clock clock, boolean ready) Create a clock provide message. This message is posted whenever an
element is ready to provide a clock or lost its ability to provide
a clock (maybe because it paused or became EOS).
This message is mainly used internally to manage the clock
selection.- Parameter:
src
- The object originating the message.clock
- the clock it providesready
- %TRUE if the sender can provide a clock- Gibt zurück:
- the new provide clock message. MT safe.
-
newCustomMessage
public static Message newCustomMessage(int type, @Nullable Object src, @Nullable Structure structure) Create a new custom-typed message. This can be used for anything not
handled by other message-specific functions to pass a message to the
app. The structure field can be %NULL.- Parameter:
type
- The #GstMessageType to distinguish messagessrc
- The object originating the message.structure
- the structure for the message. The message will take ownership of the structure.- Gibt zurück:
- The new message. MT safe.
-
newDeviceAddedMessage
Creates a new device-added message. The device-added message is produced by
#GstDeviceProvider or a #GstDeviceMonitor. They announce the appearance
of monitored devices.- Parameter:
src
- The #GstObject that created the messagedevice
- The new #GstDevice- Gibt zurück:
- a newly allocated #GstMessage
-
newDeviceChangedMessage
public static Message newDeviceChangedMessage(@Nullable Object src, @Nonnull Device device, @Nonnull Device changed_device) Creates a new device-changed message. The device-changed message is produced
by #GstDeviceProvider or a #GstDeviceMonitor. They announce that a device
properties has changed and @device represent the new modified version of @changed_device.- Parameter:
src
- The #GstObject that created the messagedevice
- The newly created device representing @changed_device with its new configuration.changed_device
- The old version of the device.- Gibt zurück:
- a newly allocated #GstMessage
-
newDeviceRemovedMessage
Creates a new device-removed message. The device-removed message is produced
by #GstDeviceProvider or a #GstDeviceMonitor. They announce the
disappearance of monitored devices.- Parameter:
src
- The #GstObject that created the messagedevice
- The removed #GstDevice- Gibt zurück:
- a newly allocated #GstMessage
-
newDurationChangedMessage
Create a new duration changed message. This message is posted by elements
that know the duration of a stream when the duration changes. This message
is received by bins and is used to calculate the total duration of a
pipeline.- Parameter:
src
- The object originating the message.- Gibt zurück:
- The new duration-changed message. MT safe.
-
newElementMessage
Create a new element-specific message. This is meant as a generic way of
allowing one-way communication from an element to an application, for example
"the firewire cable was unplugged". The format of the message should be
documented in the element's documentation. The structure field can be %NULL.- Parameter:
src
- The object originating the message.structure
- The structure for the message. The message will take ownership of the structure.- Gibt zurück:
- The new element message. MT safe.
-
newEosMessage
Create a new eos message. This message is generated and posted in
the sink elements of a GstBin. The bin will only forward the EOS
message to the application if all sinks have posted an EOS message.- Parameter:
src
- The object originating the message.- Gibt zurück:
- The new eos message. MT safe.
-
newErrorMessage
public static Message newErrorMessage(@Nullable Object src, @Nonnull Error error, @Nonnull Str debug) Create a new error message. The message will copy @error and
@debug. This message is posted by element when a fatal event
occurred. The pipeline will probably (partially) stop. The application
receiving this message should stop the pipeline.- Parameter:
src
- The object originating the message.error
- The GError for this message.debug
- A debugging string.- Gibt zurück:
- the new error message. MT safe.
-
newErrorMessage
Create a new error message. The message will copy @error and
@debug. This message is posted by element when a fatal event
occurred. The pipeline will probably (partially) stop. The application
receiving this message should stop the pipeline.- Parameter:
src
- The object originating the message.error
- The GError for this message.debug
- A debugging string.- Gibt zurück:
- the new error message. MT safe.
-
newErrorWithDetailsMessage
public static Message newErrorWithDetailsMessage(@Nullable Object src, @Nonnull Error error, @Nonnull Str debug, @Nullable Structure details) Create a new error message. The message will copy @error and
@debug. This message is posted by element when a fatal event
occurred. The pipeline will probably (partially) stop. The application
receiving this message should stop the pipeline.- Parameter:
src
- The object originating the message.error
- The GError for this message.debug
- A debugging string.details
- A GstStructure with details- Gibt zurück:
- the new error message.
-
newErrorWithDetailsMessage
public static Message newErrorWithDetailsMessage(@Nullable Object src, @Nonnull Error error, String debug, @Nullable Structure details) Create a new error message. The message will copy @error and
@debug. This message is posted by element when a fatal event
occurred. The pipeline will probably (partially) stop. The application
receiving this message should stop the pipeline.- Parameter:
src
- The object originating the message.error
- The GError for this message.debug
- A debugging string.details
- A GstStructure with details- Gibt zurück:
- the new error message.
-
newHaveContextMessage
This message is posted when an element has a new local #GstContext.- Parameter:
src
- The object originating the message.context
- the context- Gibt zurück:
- The new have-context message. MT safe.
-
newInfoMessage
public static Message newInfoMessage(@Nullable Object src, @Nonnull Error error, @Nonnull Str debug) Create a new info message. The message will make copies of @error and
@debug.- Parameter:
src
- The object originating the message.error
- The GError for this message.debug
- A debugging string.- Gibt zurück:
- the new info message. MT safe.
-
newInfoMessage
Create a new info message. The message will make copies of @error and
@debug.- Parameter:
src
- The object originating the message.error
- The GError for this message.debug
- A debugging string.- Gibt zurück:
- the new info message. MT safe.
-
newInfoWithDetailsMessage
public static Message newInfoWithDetailsMessage(@Nullable Object src, @Nonnull Error error, @Nonnull Str debug, @Nullable Structure details) Create a new info message. The message will make copies of @error and
@debug.- Parameter:
src
- The object originating the message.error
- The GError for this message.debug
- A debugging string.details
- A GstStructure with details- Gibt zurück:
- the new warning message.
-
newInfoWithDetailsMessage
public static Message newInfoWithDetailsMessage(@Nullable Object src, @Nonnull Error error, String debug, @Nullable Structure details) Create a new info message. The message will make copies of @error and
@debug.- Parameter:
src
- The object originating the message.error
- The GError for this message.debug
- A debugging string.details
- A GstStructure with details- Gibt zurück:
- the new warning message.
-
newInstantRateRequestMessage
Creates a new instant-rate-request message. Elements handling the
instant-rate-change event must post this message. The message is
handled at the pipeline, and allows the pipeline to select the
running time when the rate change should happen and to send an
@GST_EVENT_INSTANT_RATE_SYNC_TIME event to notify the elements
in the pipeline.- Parameter:
src
- The #GstObject that posted the messagerate_multiplier
- the rate multiplier factor that should be applied- Gibt zurück:
- a newly allocated #GstMessage
-
newLatencyMessage
This message can be posted by elements when their latency requirements have
changed.- Parameter:
src
- The object originating the message.- Gibt zurück:
- The new latency message. MT safe.
-
newNeedContextMessage
This message is posted when an element needs a specific #GstContext.- Parameter:
src
- The object originating the message.context_type
- The context type that is needed- Gibt zurück:
- The new need-context message. MT safe.
-
newNeedContextMessage
This message is posted when an element needs a specific #GstContext.- Parameter:
src
- The object originating the message.context_type
- The context type that is needed- Gibt zurück:
- The new need-context message. MT safe.
-
newNewClockMessage
Create a new clock message. This message is posted whenever the
pipeline selects a new clock for the pipeline.- Parameter:
src
- The object originating the message.clock
- the new selected clock- Gibt zurück:
- The new new clock message. MT safe.
-
newProgressMessage
public static Message newProgressMessage(@Nullable Object src, int type, @Nonnull Str code, @Nonnull Str text) Progress messages are posted by elements when they use an asynchronous task
to perform actions triggered by a state change.
@code contains a well defined string describing the action.
@text should contain a user visible string detailing the current action.- Parameter:
src
- The object originating the message.type
- a #GstProgressTypecode
- a progress codetext
- free, user visible text describing the progress- Gibt zurück:
- The new qos message.
-
newProgressMessage
Progress messages are posted by elements when they use an asynchronous task
to perform actions triggered by a state change.
@code contains a well defined string describing the action.
@text should contain a user visible string detailing the current action.- Parameter:
src
- The object originating the message.type
- a #GstProgressTypecode
- a progress codetext
- free, user visible text describing the progress- Gibt zurück:
- The new qos message.
-
newPropertyNotifyMessage
public static Message newPropertyNotifyMessage(@Nonnull Object src, @Nonnull Str property_name, @Nullable Value val) - Parameter:
src
- The #GstObject whose property changed (may or may not be a #GstElement)property_name
- name of the property that changedval
- new property value, or %NULL- Gibt zurück:
- a newly allocated #GstMessage
-
newPropertyNotifyMessage
public static Message newPropertyNotifyMessage(@Nonnull Object src, String property_name, @Nullable Value val) - Parameter:
src
- The #GstObject whose property changed (may or may not be a #GstElement)property_name
- name of the property that changedval
- new property value, or %NULL- Gibt zurück:
- a newly allocated #GstMessage
-
newQosMessage
public static Message newQosMessage(@Nullable Object src, boolean live, long running_time, long stream_time, long timestamp, long duration) A QOS message is posted on the bus whenever an element decides to drop a
buffer because of QoS reasons or whenever it changes its processing strategy
because of QoS reasons (quality adjustments such as processing at lower
accuracy).
This message can be posted by an element that performs synchronisation against the
clock (live) or it could be dropped by an element that performs QoS because of QOS
events received from a downstream element (!live).
@running_time, @stream_time, @timestamp, @duration should be set to the
respective running-time, stream-time, timestamp and duration of the (dropped)
buffer that generated the QoS event. Values can be left to
GST_CLOCK_TIME_NONE when unknown.- Parameter:
src
- The object originating the message.live
- if the message was generated by a live elementrunning_time
- the running time of the buffer that generated the messagestream_time
- the stream time of the buffer that generated the messagetimestamp
- the timestamps of the buffer that generated the messageduration
- the duration of the buffer that generated the message- Gibt zurück:
- The new qos message. MT safe.
-
newRedirectMessage
public static Message newRedirectMessage(@Nullable Object src, @Nonnull Str location, @Nullable TagList tag_list, @Nullable Structure entry_struct) Creates a new redirect message and adds a new entry to it. Redirect messages
are posted when an element detects that the actual data has to be retrieved
from a different location. This is useful if such a redirection cannot be
handled inside a source element, for example when HTTP 302/303 redirects
return a non-HTTP URL.
The redirect message can hold multiple entries. The first one is added
when the redirect message is created, with the given location, tag_list,
entry_struct arguments. Use gst_message_add_redirect_entry() to add more
entries.
Each entry has a location, a tag list, and a structure. All of these are
optional. The tag list and structure are useful for additional metadata,
such as bitrate statistics for the given location.
By default, message recipients should treat entries in the order they are
stored. The recipient should therefore try entry \#0 first, and if this
entry is not acceptable or working, try entry \#1 etc. Senders must make
sure that they add entries in this order. However, recipients are free to
ignore the order and pick an entry that is "best" for them. One example
would be a recipient that scans the entries for the one with the highest
bitrate tag.
The specified location string is copied. However, ownership over the tag
list and structure are transferred to the message.- Parameter:
src
- The #GstObject whose property changed (may or may not be a #GstElement)location
- location string for the new entrytag_list
- tag list for the new entryentry_struct
- structure for the new entry- Gibt zurück:
- a newly allocated #GstMessage
-
newRedirectMessage
public static Message newRedirectMessage(@Nullable Object src, String location, @Nullable TagList tag_list, @Nullable Structure entry_struct) Creates a new redirect message and adds a new entry to it. Redirect messages
are posted when an element detects that the actual data has to be retrieved
from a different location. This is useful if such a redirection cannot be
handled inside a source element, for example when HTTP 302/303 redirects
return a non-HTTP URL.
The redirect message can hold multiple entries. The first one is added
when the redirect message is created, with the given location, tag_list,
entry_struct arguments. Use gst_message_add_redirect_entry() to add more
entries.
Each entry has a location, a tag list, and a structure. All of these are
optional. The tag list and structure are useful for additional metadata,
such as bitrate statistics for the given location.
By default, message recipients should treat entries in the order they are
stored. The recipient should therefore try entry \#0 first, and if this
entry is not acceptable or working, try entry \#1 etc. Senders must make
sure that they add entries in this order. However, recipients are free to
ignore the order and pick an entry that is "best" for them. One example
would be a recipient that scans the entries for the one with the highest
bitrate tag.
The specified location string is copied. However, ownership over the tag
list and structure are transferred to the message.- Parameter:
src
- The #GstObject whose property changed (may or may not be a #GstElement)location
- location string for the new entrytag_list
- tag list for the new entryentry_struct
- structure for the new entry- Gibt zurück:
- a newly allocated #GstMessage
-
newRequestStateMessage
This message can be posted by elements when they want to have their state
changed. A typical use case would be an audio server that wants to pause the
pipeline because a higher priority stream is being played.- Parameter:
src
- The object originating the message.state
- The new requested state- Gibt zurück:
- the new request state message. MT safe.
-
newResetTimeMessage
This message is posted when the pipeline running-time should be reset to
@running_time, like after a flushing seek.- Parameter:
src
- The object originating the message.running_time
- the requested running-time- Gibt zurück:
- The new reset_time message. MT safe.
-
newSegmentDoneMessage
Create a new segment done message. This message is posted by elements that
finish playback of a segment as a result of a segment seek. This message
is received by the application after all elements that posted a segment_start
have posted the segment_done.- Parameter:
src
- The object originating the message.format
- The format of the position being doneposition
- The position of the segment being done- Gibt zurück:
- the new segment done message. MT safe.
-
newSegmentStartMessage
Create a new segment message. This message is posted by elements that
start playback of a segment as a result of a segment seek. This message
is not received by the application but is used for maintenance reasons in
container elements.- Parameter:
src
- The object originating the message.format
- The format of the position being playedposition
- The position of the segment being played- Gibt zurück:
- the new segment start message. MT safe.
-
newStateChangedMessage
public static Message newStateChangedMessage(@Nullable Object src, int oldstate, int newstate, int pending) Create a state change message. This message is posted whenever an element
changed its state.- Parameter:
src
- The object originating the message.oldstate
- the previous statenewstate
- the new (current) statepending
- the pending (target) state- Gibt zurück:
- the new state change message. MT safe.
-
newStateDirtyMessage
Create a state dirty message. This message is posted whenever an element
changed its state asynchronously and is used internally to update the
states of container objects.- Parameter:
src
- The object originating the message- Gibt zurück:
- the new state dirty message. MT safe.
-
newStepDoneMessage
public static Message newStepDoneMessage(@Nullable Object src, int format, long amount, double rate, boolean flush, boolean intermediate, long duration, boolean eos) This message is posted by elements when they complete a part, when @intermediate set
to %TRUE, or a complete step operation.
@duration will contain the amount of time (in GST_FORMAT_TIME) of the stepped
@amount of media in format @format.- Parameter:
src
- The object originating the message.format
- the format of @amountamount
- the amount of stepped datarate
- the rate of the stepped amountflush
- is this an flushing stepintermediate
- is this an intermediate stepduration
- the duration of the dataeos
- the step caused EOS- Gibt zurück:
- the new step_done message. MT safe.
-
newStepStartMessage
public static Message newStepStartMessage(@Nullable Object src, boolean active, int format, long amount, double rate, boolean flush, boolean intermediate) This message is posted by elements when they accept or activate a new step
event for @amount in @format.
@active is set to %FALSE when the element accepted the new step event and has
queued it for execution in the streaming threads.
@active is set to %TRUE when the element has activated the step operation and
is now ready to start executing the step in the streaming thread. After this
message is emitted, the application can queue a new step operation in the
element.- Parameter:
src
- The object originating the message.active
- if the step is active or queuedformat
- the format of @amountamount
- the amount of stepped datarate
- the rate of the stepped amountflush
- is this an flushing stepintermediate
- is this an intermediate step- Gibt zurück:
- The new step_start message. MT safe.
-
newStreamCollectionMessage
public static Message newStreamCollectionMessage(@Nullable Object src, @Nonnull StreamCollection collection) Creates a new stream-collection message. The message is used to announce new
#GstStreamCollection- Parameter:
src
- The #GstObject that created the messagecollection
- The #GstStreamCollection- Gibt zurück:
- a newly allocated #GstMessage
-
newStreamStartMessage
Create a new stream_start message. This message is generated and posted in
the sink elements of a GstBin. The bin will only forward the STREAM_START
message to the application if all sinks have posted an STREAM_START message.- Parameter:
src
- The object originating the message.- Gibt zurück:
- The new stream_start message. MT safe.
-
newStreamStatusMessage
public static Message newStreamStatusMessage(@Nullable Object src, int type, @Nonnull Element owner) Create a new stream status message. This message is posted when a streaming
thread is created/destroyed or when the state changed.- Parameter:
src
- The object originating the message.type
- The stream status type.owner
- the owner element of @src.- Gibt zurück:
- the new stream status message. MT safe.
-
newStreamsSelectedMessage
public static Message newStreamsSelectedMessage(@Nullable Object src, @Nonnull StreamCollection collection) Creates a new steams-selected message. The message is used to announce
that an array of streams has been selected. This is generally in response
to a #GST_EVENT_SELECT_STREAMS event, or when an element (such as decodebin3)
makes an initial selection of streams.
The message also contains the #GstStreamCollection to which the various streams
belong to.
Users of gst_message_new_streams_selected() can add the selected streams with
gst_message_streams_selected_add().- Parameter:
src
- The #GstObject that created the messagecollection
- The #GstStreamCollection- Gibt zurück:
- a newly allocated #GstMessage
-
newStructureChangeMessage
public static Message newStructureChangeMessage(@Nullable Object src, int type, @Nonnull Element owner, boolean busy) Create a new structure change message. This message is posted when the
structure of a pipeline is in the process of being changed, for example
when pads are linked or unlinked.
@src should be the sinkpad that unlinked or linked.- Parameter:
src
- The object originating the message.type
- The change type.owner
- The owner element of @src.busy
- Whether the structure change is busy.- Gibt zurück:
- the new structure change message. MT safe.
-
newTagMessage
Create a new tag message. The message will take ownership of the tag list.
The message is posted by elements that discovered a new taglist.- Parameter:
src
- The object originating the message.tag_list
- the tag list for the message.- Gibt zurück:
- the new tag message. MT safe.
-
newTocMessage
Create a new TOC message. The message is posted by elements
that discovered or updated a TOC.- Parameter:
src
- the object originating the message.toc
- #GstToc structure for the message.updated
- whether TOC was updated or not.- Gibt zurück:
- a new TOC message. MT safe.
-
newWarningMessage
public static Message newWarningMessage(@Nullable Object src, @Nonnull Error error, @Nonnull Str debug) Create a new warning message. The message will make copies of @error and
@debug.- Parameter:
src
- The object originating the message.error
- The GError for this message.debug
- A debugging string.- Gibt zurück:
- the new warning message. MT safe.
-
newWarningMessage
Create a new warning message. The message will make copies of @error and
@debug.- Parameter:
src
- The object originating the message.error
- The GError for this message.debug
- A debugging string.- Gibt zurück:
- the new warning message. MT safe.
-
newWarningWithDetailsMessage
public static Message newWarningWithDetailsMessage(@Nullable Object src, @Nonnull Error error, @Nonnull Str debug, @Nullable Structure details) Create a new warning message. The message will make copies of @error and
@debug.- Parameter:
src
- The object originating the message.error
- The GError for this message.debug
- A debugging string.details
- A GstStructure with details- Gibt zurück:
- the new warning message.
-
newWarningWithDetailsMessage
public static Message newWarningWithDetailsMessage(@Nullable Object src, @Nonnull Error error, String debug, @Nullable Structure details) Create a new warning message. The message will make copies of @error and
@debug.- Parameter:
src
- The object originating the message.error
- The GError for this message.debug
- A debugging string.details
- A GstStructure with details- Gibt zurück:
- the new warning message.
-
addRedirectEntry
public void addRedirectEntry(@Nonnull Str location, @Nullable TagList tag_list, @Nullable Structure entry_struct) Creates and appends a new entry.
The specified location string is copied. However, ownership over the tag
list and structure are transferred to the message.- Parameter:
location
- location string for the new entrytag_list
- tag list for the new entryentry_struct
- structure for the new entry
-
addRedirectEntry
public void addRedirectEntry(String location, @Nullable TagList tag_list, @Nullable Structure entry_struct) Creates and appends a new entry.
The specified location string is copied. However, ownership over the tag
list and structure are transferred to the message.- Parameter:
location
- location string for the new entrytag_list
- tag list for the new entryentry_struct
- structure for the new entry
-
copy
Creates a copy of the message. Returns a copy of the message.- Gibt zurück:
- a new copy of @msg. MT safe
-
getDetails
Returns the optional details structure of the message. May be NULL if none.
The returned structure must not be freed.- Gibt zurück:
- The details, or NULL if none.
-
getNumRedirectEntries
public long getNumRedirectEntries()- Gibt zurück:
- the number of entries stored in the message
-
getSeqnum
public int getSeqnum()Retrieve the sequence number of a message.
Messages have ever-incrementing sequence numbers, which may also be set
explicitly via gst_message_set_seqnum(). Sequence numbers are typically used
to indicate that a message corresponds to some other set of messages or
events, for example a SEGMENT_DONE message corresponding to a SEEK event. It
is considered good practice to make this correspondence when possible, though
it is not required.
Note that events and messages share the same sequence number incrementor;
two events or messages will never have the same sequence number unless
that correspondence was made explicitly.- Gibt zurück:
- The message's sequence number. MT safe.
-
getStreamStatusObject
Extracts the object managing the streaming thread from @message.- Gibt zurück:
- a GValue containing the object that manages the streaming thread. This object is usually of type GstTask but other types can be added in the future. The object remains valid as long as @message is valid.
-
getStructure
Access the structure of the message.- Gibt zurück:
- The structure of the message. The structure is still owned by the message, which means that you should not free it and that the pointer becomes invalid when you free the message. MT safe.
-
hasName
Checks if @message has the given @name. This function is usually used to
check the name of a custom message.- Parameter:
name
- name to check- Gibt zurück:
- %TRUE if @name matches the name of the message structure.
-
hasName
Checks if @message has the given @name. This function is usually used to
check the name of a custom message.- Parameter:
name
- name to check- Gibt zurück:
- %TRUE if @name matches the name of the message structure.
-
parseBuffering
Extracts the buffering percent from the GstMessage. see also
gst_message_new_buffering().
MT safe.- Parameter:
percent
- Return location for the percent.
-
parseInstantRateRequest
Parses the rate_multiplier from the instant-rate-request message.- Parameter:
rate_multiplier
- return location for the rate, or %NULL
-
parseRequestState
Extract the requested state from the request_state message.
MT safe.- Parameter:
state
- Result location for the requested state or %NULL
-
parseStateChanged
public void parseStateChanged(@Nullable Int oldstate, @Nullable Int newstate, @Nullable Int pending) Extracts the old and new states from the GstMessage.
Typical usage of this function might be:<!-- language="C" --> ... switch (GST_MESSAGE_TYPE (msg)) { case GST_MESSAGE_STATE_CHANGED: { GstState old_state, new_state; gst_message_parse_state_changed (msg, &old_state, &new_state, NULL); g_print ("Element %s changed state from %s to %s.\n", GST_OBJECT_NAME (msg->src), gst_element_state_get_name (old_state), gst_element_state_get_name (new_state)); break; } ... } ...
MT safe.- Parameter:
oldstate
- the previous state, or %NULLnewstate
- the new (current) state, or %NULLpending
- the pending (target) state, or %NULL
-
setBufferingStats
public void setBufferingStats(int mode, int avg_in, int avg_out, long buffering_left) Configures the buffering stats values in @message.- Parameter:
mode
- a buffering modeavg_in
- the average input rateavg_out
- the average output ratebuffering_left
- amount of buffering time left in milliseconds
-
setDetails
Add @details to @message. Will fail if the message already has details set on
it or if it is not writable.- Parameter:
details
- A GstStructure with details
-
setGroupId
public void setGroupId(int group_id) Sets the group id on the stream-start message.
All streams that have the same group id are supposed to be played
together, i.e. all streams inside a container file should have the
same group id but different stream ids. The group id should change
each time the stream is started, resulting in different group ids
each time a file is played for example.
MT safe.- Parameter:
group_id
- the group id
-
setQosStats
public void setQosStats(int format, long processed, long dropped) Set the QoS stats representing the history of the current continuous pipeline
playback period.
When @format is @GST_FORMAT_UNDEFINED both @dropped and @processed are
invalid. Values of -1 for either @processed or @dropped mean unknown values.
MT safe.- Parameter:
format
- Units of the 'processed' and 'dropped' fields. Video sinks and video filters will use GST_FORMAT_BUFFERS (frames). Audio sinks and audio filters will likely use GST_FORMAT_DEFAULT (samples).processed
- Total number of units correctly processed since the last state change to READY or a flushing operation.dropped
- Total number of units dropped since the last state change to READY or a flushing operation.
-
setQosValues
public void setQosValues(long jitter, double proportion, int quality) Set the QoS values that have been calculated/analysed from the QoS data
MT safe.- Parameter:
jitter
- The difference of the running-time against the deadline.proportion
- Long term prediction of the ideal rate relative to normal rate to get optimal quality.quality
- An element dependent integer value that specifies the current quality level of the element. The default maximum quality is 1000000.
-
setSeqnum
public void setSeqnum(int seqnum) Set the sequence number of a message.
This function might be called by the creator of a message to indicate that
the message relates to other messages or events. See gst_message_get_seqnum()
for more information.
MT safe.- Parameter:
seqnum
- A sequence number.
-
setStreamStatusObject
Configures the object handling the streaming thread. This is usually a
GstTask object but other objects might be added in the future.- Parameter:
object
- the object controlling the streaming
-
streamsSelectedAdd
Adds the @stream to the @message.- Parameter:
stream
- a #GstStream to add to @message
-
streamsSelectedGetSize
public int streamsSelectedGetSize()Returns the number of streams contained in the @message.- Gibt zurück:
- The number of streams contained within.
-
streamsSelectedGetStream
Retrieves the #GstStream with index @index from the @message.- Parameter:
idx
- Index of the stream to retrieve- Gibt zurück:
- A #GstStream
-
writableDetails
Returns the details structure of the @message. If not present it will be
created. Use this function (instead of gst_message_get_details()) if you
want to write to the @details structure.
The returned structure must not be freed.- Gibt zurück:
- The details
-
writableStructure
Get a writable version of the structure.- Gibt zurück:
- The structure of the message. The structure is still owned by the message, which means that you should not free it and that the pointer becomes invalid when you free the message. This function ensures that @message is writable, and if so, will never return %NULL. MT safe.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-