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:
gst_bus_post (bus, gst_message_new_eos());
A Element usually posts messages on the bus provided by the parent container using
post_message.
- public Message.application (Object? src, owned Structure structure)
Create a new application-typed message.
- public Message.async_done (Object? src, ClockTime running_time)
The message is posted when elements completed an ASYNC state change.
- public Message.async_start (Object? src)
This message is posted by elements when they start an ASYNC state
change.
- public Message.buffering (Object? src, int percent)
Create a new buffering message.
- public Message.clock_lost (Object? src, Clock clock)
Create a clock lost message.
- public Message.clock_provide (Object? src, Clock clock, bool ready)
Create a clock provide message.
- public Message.custom (MessageType type, Object? src, owned Structure? structure)
Create a new custom-typed message.
- public Message.device_added (Object src, Device device)
Creates a new device-added message.
- public Message.device_changed (Object src, Device device, Device changed_device)
Creates a new device-changed message.
- public Message.device_removed (Object src, Device device)
Creates a new device-removed message.
- public Message.duration_changed (Object? src)
Create a new duration changed message.
- public Message.element (Object? src, owned Structure structure)
Create a new element-specific message.
- public Message.eos (Object? src)
Create a new eos message.
- public Message.error (Object? src, Error error, string debug)
Create a new error message.
- public Message.error_with_details (Object? src, Error error, string debug, owned Structure? details)
Create a new error message.
- public Message.have_context (Object? src, owned Context context)
This message is posted when an element has a new local
Context.
- public Message.info (Object? src, Error error, string debug)
Create a new info message.
- public Message.info_with_details (Object? src, Error error, string debug, owned Structure? details)
Create a new info message.
- public Message.instant_rate_request (Object src, double rate_multiplier)
Creates a new instant-rate-request message.
- public Message.latency (Object? src)
This message can be posted by elements when their latency requirements
have changed.
- public Message.need_context (Object? src, string context_type)
This message is posted when an element needs a specific
Context.
- public Message.new_clock (Object? src, Clock clock)
Create a new clock message.
- public Message.progress (Object src, ProgressType 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.
- public Message.property_notify (Object src, string property_name, owned Value? val)
- public Message.qos (Object src, bool live, uint64 running_time, uint64 stream_time, uint64 timestamp, uint64 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).
- public Message.redirect (Object src, string location, owned TagList? tag_list, owned Structure? entry_struct)
Creates a new redirect message and adds a new entry to it.
- public Message.request_state (Object? src, State state)
This message can be posted by elements when they want to have their
state changed.
- public Message.reset_time (Object? src, ClockTime running_time)
This message is posted when the pipeline running-time should be reset
to running_time
, like after a flushing seek.
- public Message.segment_done (Object? src, Format format, int64 position)
Create a new segment done message.
- public Message.segment_start (Object? src, Format format, int64 position)
Create a new segment message.
- public Message.state_changed (Object? src, State oldstate, State newstate, State pending)
Create a state change message.
- public Message.state_dirty (Object? src)
Create a state dirty message.
- public Message.step_done (Object src, Format format, uint64 amount, double rate, bool flush, bool intermediate, uint64 duration, bool eos)
This message is posted by elements when they complete a part, when
intermediate
set to true
, or a complete step operation.
- public Message.step_start (Object src, bool active, Format format, uint64 amount, double rate, bool flush, bool intermediate)
This message is posted by elements when they accept or activate a new
step event for amount
in format
.
- public Message.stream_collection (Object src, StreamCollection collection)
Creates a new stream-collection message.
- public Message.stream_start (Object? src)
Create a new stream_start message.
- public Message.stream_status (Object src, StreamStatusType type, Element owner)
Create a new stream status message.
- public Message.streams_selected (Object src, StreamCollection collection)
Creates a new steams-selected message.
- public Message.structure_change (Object? src, StructureChangeType type, Element owner, bool busy)
Create a new structure change message.
- public Message.tag (Object? src, owned TagList tag_list)
Create a new tag message.
- public Message.toc (Object src, Toc toc, bool updated)
Create a new TOC message.
- public Message.warning (Object? src, Error error, string debug)
Create a new warning message.
- public Message.warning_with_details (Object? src, Error error, string debug, owned Structure? details)
Create a new warning message.
- public void add_redirect_entry (string location, owned TagList? tag_list, owned Structure? entry_struct)
Creates and appends a new entry.
- public size_t get_num_redirect_entries ()
- public uint32 get_seqnum ()
Retrieve the sequence number of a message.
- public unowned Value? get_stream_status_object ()
Extracts the object managing the streaming thread from
this.
- public unowned Structure? get_structure ()
Access the structure of the message.
- public bool has_name (string name)
Checks if this has the given
name
.
- public void parse_async_done (out ClockTime running_time)
Extract the running_time from the async_done message.
- public void parse_buffering (out int percent)
Extracts the buffering percent from the GstMessage.
- public void parse_buffering_stats (out BufferingMode mode, out int avg_in, out int avg_out, out int64 buffering_left)
Extracts the buffering stats values from
this.
- public void parse_clock_lost (out unowned Clock clock)
Extracts the lost clock from the GstMessage.
- public void parse_clock_provide (out unowned Clock clock, out bool ready)
Extracts the clock and ready flag from the GstMessage.
- public bool parse_context_type (out unowned string context_type)
Parse a context type from an existing GST_MESSAGE_NEED_CONTEXT
message.
- public void parse_device_added (out Device device)
Parses a device-added message.
- public void parse_device_changed (out Device device, out Device changed_device)
Parses a device-changed message.
- public void parse_device_removed (out Device device)
Parses a device-removed message.
- public void parse_error (out Error gerror, out string debug)
Extracts the GError and debug string from the GstMessage.
- public void parse_error_details (out unowned Structure structure)
Returns the optional details structure, may be NULL if none.
- public bool parse_group_id (out uint group_id)
Extract the group from the STREAM_START message.
- public void parse_have_context (out Context context)
Extract the context from the HAVE_CONTEXT message.
- public void parse_info (out Error gerror, out string debug)
Extracts the GError and debug string from the GstMessage.
- public void parse_info_details (out unowned Structure structure)
Returns the optional details structure, may be NULL if none The
returned structure must not be freed.
- public void parse_instant_rate_request (out double rate_multiplier)
Parses the rate_multiplier from the instant-rate-request message.
- public void parse_new_clock (out unowned Clock clock)
Extracts the new clock from the GstMessage.
- public void parse_progress (out ProgressType type, out string code, out string text)
Parses the progress type
, code
and
text
.
- public void parse_property_notify (out unowned Object object, out unowned string property_name, out Value property_value)
Parses a property-notify message.
- public void parse_qos (out bool live, out uint64 running_time, out uint64 stream_time, out uint64 timestamp, out uint64 duration)
Extract the timestamps and live status from the QoS message.
- public void parse_qos_stats (out Format format, out uint64 processed, out uint64 dropped)
Extract the QoS stats representing the history of the current
continuous pipeline playback period.
- public void parse_qos_values (out int64 jitter, out double proportion, out int quality)
Extract the QoS values that have been calculated/analysed from the QoS
data
- public void parse_redirect_entry (size_t entry_index, out unowned string location, out unowned TagList tag_list, out unowned Structure entry_struct)
Parses the location and/or structure from the entry with the given
index.
- public void parse_request_state (out State state)
Extract the requested state from the request_state message.
- public void parse_reset_time (out ClockTime running_time)
Extract the running-time from the RESET_TIME message.
- public void parse_segment_done (out Format format, out int64 position)
Extracts the position and format from the segment done message.
- public void parse_segment_start (out Format format, out int64 position)
Extracts the position and format from the segment start message.
- public void parse_state_changed (out State oldstate, out State newstate, out State pending)
Extracts the old and new states from the GstMessage.
- public void parse_step_done (out Format format, out uint64 amount, out double rate, out bool flush, out bool intermediate, out uint64 duration, out bool eos)
Extract the values the step_done message.
- public void parse_step_start (out bool active, out Format format, out uint64 amount, out double rate, out bool flush, out bool intermediate)
Extract the values from step_start message.
- public void parse_stream_collection (out StreamCollection collection)
Parses a stream-collection message.
- public void parse_stream_status (out StreamStatusType type, out unowned Element owner)
Extracts the stream status type and owner the GstMessage.
- public void parse_streams_selected (out StreamCollection collection)
Parses a streams-selected message.
- public void parse_structure_change (out StructureChangeType type, out unowned Element owner, out bool busy)
Extracts the change type and completion status from the GstMessage.
- public void parse_tag (out TagList tag_list)
Extracts the tag list from the GstMessage.
- public void parse_toc (out Toc toc, out bool updated)
Extract the TOC from the Message.
- public void parse_warning (out Error gerror, out string debug)
Extracts the GError and debug string from the GstMessage.
- public void parse_warning_details (out unowned Structure structure)
Returns the optional details structure, may be NULL if none The
returned structure must not be freed.
- public void set_buffering_stats (BufferingMode mode, int avg_in, int avg_out, int64 buffering_left)
Configures the buffering stats values in
this.
- public void set_group_id (uint group_id)
Sets the group id on the stream-start message.
- public void set_qos_stats (Format format, uint64 processed, uint64 dropped)
Set the QoS stats representing the history of the current continuous
pipeline playback period.
- public void set_qos_values (int64 jitter, double proportion, int quality)
Set the QoS values that have been calculated/analysed from the QoS
data
- public void set_seqnum (uint32 seqnum)
Set the sequence number of a message.
- public void set_stream_status_object (Value object)
Configures the object handling the streaming thread.
- public void streams_selected_add (Stream stream)
Adds the stream
to the this
.
- public uint streams_selected_get_size ()
Returns the number of streams contained in the
this.
- public Stream? streams_selected_get_stream (uint idx)
Retrieves the Stream with
index index
from the this.
- public unowned Structure writable_structure ()
Get a writable version of the structure.