gst.message
Module for [Message] class
class Message
Types 1
classMessage : gobject.boxed.Boxed
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:
gst_bus_post (bus, gst_message_new_eos());A #GstElement usually posts messages on the bus provided by the parent container using gst.element.Element.postMessage.
Methods
gst.mini_object.MiniObject miniObject() @property nothrowGet `miniObject` field. Returns: the parent structuregst.types.MessageType type() @property nothrowGet `type` field. Returns: the #GstMessageType of the messagevoid type(gst.types.MessageType propval) @property nothrowSet `type` field. Params: propval = the #GstMessageType of the messagevoid timestamp(ulong propval) @property nothrowSet `timestamp` field. Params: propval = the timestamp of the messagevoid src(gst.object.ObjectWrap propval) @property nothrowSet `src` field. Params: propval = the src of the messagevoid seqnum(uint propval) @property nothrowSet `seqnum` field. Params: propval = the sequence number of the messagegst.message.Message newApplication(gst.object.ObjectWrap src, gst.structure.Structure structure) static nothrowCreate a new application-typed message. GStreamer will never create these messages; they are a gift from us to you. Enjoy.gst.message.Message newAsyncDone(gst.object.ObjectWrap src, gst.types.ClockTime runningTime) static nothrowThe 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 f...gst.message.Message newAsyncStart(gst.object.ObjectWrap src = null) static nothrowThis message is posted by elements when they start an ASYNC state change.gst.message.Message newBuffering(gst.object.ObjectWrap src, int percent) static nothrowCreate 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 mea...gst.message.Message newClockLost(gst.object.ObjectWrap src, gst.clock.Clock clock) static nothrowCreate a clock lost message. This message is posted whenever the clock is not valid anymore.gst.message.Message newClockProvide(gst.object.ObjectWrap src, gst.clock.Clock clock, bool ready) static nothrowCreate 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).gst.message.Message newCustom(gst.types.MessageType type, gst.object.ObjectWrap src = null, gst.structure.Structure structure = null) static nothrowCreate 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.gst.message.Message newDeviceAdded(gst.object.ObjectWrap src, gst.device.Device device) static nothrowCreates a new device-added message. The device-added message is produced by #GstDeviceProvider or a #GstDeviceMonitor. They announce the appearance of monitored devices.gst.message.Message newDeviceChanged(gst.object.ObjectWrap src, gst.device.Device device, gst.device.Device changedDevice) static nothrowCreates 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 th...gst.message.Message newDeviceRemoved(gst.object.ObjectWrap src, gst.device.Device device) static nothrowCreates a new device-removed message. The device-removed message is produced by #GstDeviceProvider or a #GstDeviceMonitor. They announce the disappearance of monitored devices.gst.message.Message newDurationChanged(gst.object.ObjectWrap src = null) static nothrowCreate 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...gst.message.Message newElement(gst.object.ObjectWrap src, gst.structure.Structure structure) static nothrowCreate 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...gst.message.Message newEos(gst.object.ObjectWrap src = null) static nothrowCreate 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.gst.message.Message newError(gst.object.ObjectWrap src, glib.error.ErrorWrap error, string debug_) static nothrowCreate 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 receiv...gst.message.Message newErrorWithDetails(gst.object.ObjectWrap src, glib.error.ErrorWrap error, string debug_, gst.structure.Structure details = null) static nothrowCreate 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 receiv...gst.message.Message newHaveContext(gst.object.ObjectWrap src, gst.context.Context context) static nothrowThis message is posted when an element has a new local #GstContext.gst.message.Message newInfo(gst.object.ObjectWrap src, glib.error.ErrorWrap error, string debug_) static nothrowCreate a new info message. The message will make copies of error and debug.gst.message.Message newInfoWithDetails(gst.object.ObjectWrap src, glib.error.ErrorWrap error, string debug_, gst.structure.Structure details = null) static nothrowCreate a new info message. The message will make copies of error and debug.gst.message.Message newInstantRateRequest(gst.object.ObjectWrap src, double rateMultiplier) static nothrowCreates 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 run...gst.message.Message newLatency(gst.object.ObjectWrap src = null) static nothrowThis message can be posted by elements when their latency requirements have changed.gst.message.Message newNeedContext(gst.object.ObjectWrap src, string contextType) static nothrowThis message is posted when an element needs a specific #GstContext.gst.message.Message newNewClock(gst.object.ObjectWrap src, gst.clock.Clock clock) static nothrowCreate a new clock message. This message is posted whenever the pipeline selects a new clock for the pipeline.gst.message.Message newProgress(gst.object.ObjectWrap src, gst.types.ProgressType type, string code, string text) static nothrowProgress messages are posted by elements when they use an asynchronous task to perform actions triggered by a state change.gst.message.Message newPropertyNotify(gst.object.ObjectWrap src, string propertyName, gobject.value.Value val = null) static nothrowgst.message.Message newQos(gst.object.ObjectWrap src, bool live, ulong runningTime, ulong streamTime, ulong timestamp, ulong duration) static nothrowA 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 suc...gst.message.Message newRedirect(gst.object.ObjectWrap src, string location, gst.tag_list.TagList tagList = null, gst.structure.Structure entryStruct = null) static nothrowCreates 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...gst.message.Message newRequestState(gst.object.ObjectWrap src, gst.types.State state) static nothrowThis 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 b...gst.message.Message newResetTime(gst.object.ObjectWrap src, gst.types.ClockTime runningTime) static nothrowThis message is posted when the pipeline running-time should be reset to running_time, like after a flushing seek.gst.message.Message newSegmentDone(gst.object.ObjectWrap src, gst.types.Format format, long position) static nothrowCreate 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...gst.message.Message newSegmentStart(gst.object.ObjectWrap src, gst.types.Format format, long position) static nothrowCreate 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 main...gst.message.Message newStateChanged(gst.object.ObjectWrap src, gst.types.State oldstate, gst.types.State newstate, gst.types.State pending) static nothrowCreate a state change message. This message is posted whenever an element changed its state.gst.message.Message newStateDirty(gst.object.ObjectWrap src = null) static nothrowCreate 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.gst.message.Message newStepDone(gst.object.ObjectWrap src, gst.types.Format format, ulong amount, double rate, bool flush, bool intermediate, ulong duration, bool eos) static nothrowThis message is posted by elements when they complete a part, when intermediate set to true, or a complete step operation.gst.message.Message newStepStart(gst.object.ObjectWrap src, bool active, gst.types.Format format, ulong amount, double rate, bool flush, bool intermediate) static nothrowThis message is posted by elements when they accept or activate a new step event for amount in format.gst.message.Message newStreamCollection(gst.object.ObjectWrap src, gst.stream_collection.StreamCollection collection) static nothrowCreates a new stream-collection message. The message is used to announce new #GstStreamCollectiongst.message.Message newStreamStart(gst.object.ObjectWrap src = null) static nothrowCreate 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 pos...gst.message.Message newStreamStatus(gst.object.ObjectWrap src, gst.types.StreamStatusType type, gst.element.Element owner) static nothrowCreate a new stream status message. This message is posted when a streaming thread is created/destroyed or when the state changed.gst.message.Message newStreamsSelected(gst.object.ObjectWrap src, gst.stream_collection.StreamCollection collection) static nothrowCreates 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 ele...gst.message.Message newStructureChange(gst.object.ObjectWrap src, gst.types.StructureChangeType type, gst.element.Element owner, bool busy) static nothrowCreate 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.gst.message.Message newTag(gst.object.ObjectWrap src, gst.tag_list.TagList tagList) static nothrowCreate a new tag message. The message will take ownership of the tag list. The message is posted by elements that discovered a new taglist.gst.message.Message newToc(gst.object.ObjectWrap src, gst.toc.Toc toc, bool updated) static nothrowCreate a new TOC message. The message is posted by elements that discovered or updated a TOC.gst.message.Message newWarning(gst.object.ObjectWrap src, glib.error.ErrorWrap error, string debug_) static nothrowCreate a new warning message. The message will make copies of error and debug.gst.message.Message newWarningWithDetails(gst.object.ObjectWrap src, glib.error.ErrorWrap error, string debug_, gst.structure.Structure details = null) static nothrowCreate a new warning message. The message will make copies of error and debug.void addRedirectEntry(string location, gst.tag_list.TagList tagList = null, gst.structure.Structure entryStruct = null) nothrowCreates and appends a new entry.size_t getNumRedirectEntries() nothrowgobject.value.Value getStreamStatusObject() nothrowExtracts the object managing the streaming thread from message. Returns: a GValue containing the object that manages the streaming thread. This object is usually of type GstTask but other types can...gst.structure.Structure getStructure() nothrowAccess the structure of the message. Returns: 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...bool hasName(string name) nothrowChecks if message has the given name. This function is usually used to check the name of a custom message.void parseAsyncDone(out gst.types.ClockTime runningTime) nothrowExtract the running_time from the async_done message.void parseBuffering(out int percent) nothrowExtracts the buffering percent from the GstMessage. see also [gst.message.Message.newBuffering].void parseBufferingStats(out gst.types.BufferingMode mode, out int avgIn, out int avgOut, out long bufferingLeft) nothrowExtracts the buffering stats values from message.void parseClockLost(out gst.clock.Clock clock) nothrowExtracts the lost clock from the GstMessage. The clock object returned remains valid until the message is freed.void parseClockProvide(out gst.clock.Clock clock, out bool ready) nothrowExtracts the clock and ready flag from the GstMessage. The clock object returned remains valid until the message is freed.bool parseContextType(out string contextType) nothrowParse a context type from an existing GST_MESSAGE_NEED_CONTEXT message.void parseDeviceAdded(out gst.device.Device device) nothrowParses a device-added message. The device-added message is produced by #GstDeviceProvider or a #GstDeviceMonitor. It announces the appearance of monitored devices.void parseDeviceChanged(out gst.device.Device device, out gst.device.Device changedDevice) nothrowParses a device-changed message. The device-changed message is produced by #GstDeviceProvider or a #GstDeviceMonitor. It announces the disappearance of monitored devices. * It announce that a devic...void parseDeviceRemoved(out gst.device.Device device) nothrowParses a device-removed message. The device-removed message is produced by #GstDeviceProvider or a #GstDeviceMonitor. It announces the disappearance of monitored devices.void parseError(out glib.error.ErrorWrap gerror, out string debug_) nothrowExtracts the GError and debug string from the GstMessage. The values returned in the output arguments are copies; the caller must free them when done.void parseErrorDetails(out gst.structure.Structure structure) nothrowReturns the optional details structure, may be NULL if none. The returned structure must not be freed.void parseHaveContext(out gst.context.Context context) nothrowExtract the context from the HAVE_CONTEXT message.void parseInfo(out glib.error.ErrorWrap gerror, out string debug_) nothrowExtracts the GError and debug string from the GstMessage. The values returned in the output arguments are copies; the caller must free them when done.void parseInfoDetails(out gst.structure.Structure structure) nothrowReturns the optional details structure, may be NULL if none The returned structure must not be freed.void parseInstantRateRequest(out double rateMultiplier) nothrowParses the rate_multiplier from the instant-rate-request message.void parseNewClock(out gst.clock.Clock clock) nothrowExtracts the new clock from the GstMessage. The clock object returned remains valid until the message is freed.void parseProgress(out gst.types.ProgressType type, out string code, out string text) nothrowParses the progress type, code and text.void parsePropertyNotify(out gst.object.ObjectWrap object, out string propertyName, out gobject.value.Value propertyValue) nothrowParses a property-notify message. These will be posted on the bus only when set up with [gst.element.Element.addPropertyNotifyWatch] or [gst.element.Element.addPropertyDeepNotifyWatch].void parseQos(out bool live, out ulong runningTime, out ulong streamTime, out ulong timestamp, out ulong duration) nothrowExtract the timestamps and live status from the QoS message.void parseQosStats(out gst.types.Format format, out ulong processed, out ulong dropped) nothrowExtract the QoS stats representing the history of the current continuous pipeline playback period.void parseQosValues(out long jitter, out double proportion, out int quality) nothrowExtract the QoS values that have been calculated/analysed from the QoS datavoid parseRedirectEntry(size_t entryIndex, out string location, out gst.tag_list.TagList tagList, out gst.structure.Structure entryStruct) nothrowParses the location and/or structure from the entry with the given index. The index must be between 0 and [gst.message.Message.getNumRedirectEntries] - 1. Returned pointers are valid for as long as...void parseRequestState(out gst.types.State state) nothrowExtract the requested state from the request_state message.void parseResetTime(out gst.types.ClockTime runningTime) nothrowExtract the running-time from the RESET_TIME message.void parseSegmentDone(out gst.types.Format format, out long position) nothrowExtracts the position and format from the segment done message.void parseSegmentStart(out gst.types.Format format, out long position) nothrowExtracts the position and format from the segment start message.void parseStateChanged(out gst.types.State oldstate, out gst.types.State newstate, out gst.types.State pending) nothrowExtracts the old and new states from the GstMessage.void parseStepDone(out gst.types.Format format, out ulong amount, out double rate, out bool flush, out bool intermediate, out ulong duration, out bool eos) nothrowExtract the values the step_done message.void parseStepStart(out bool active, out gst.types.Format format, out ulong amount, out double rate, out bool flush, out bool intermediate) nothrowExtract the values from step_start message.void parseStreamCollection(out gst.stream_collection.StreamCollection collection) nothrowParses a stream-collection message.void parseStreamStatus(out gst.types.StreamStatusType type, out gst.element.Element owner) nothrowExtracts the stream status type and owner the GstMessage. The returned owner remains valid for as long as the reference to message is valid and should thus not be unreffed.void parseStreamsSelected(out gst.stream_collection.StreamCollection collection) nothrowParses a streams-selected message.void parseStructureChange(out gst.types.StructureChangeType type, out gst.element.Element owner, out bool busy) nothrowExtracts the change type and completion status from the GstMessage.void parseTag(out gst.tag_list.TagList tagList) nothrowExtracts the tag list from the GstMessage. The tag list returned in the output argument is a copy; the caller must free it when done.void parseToc(out gst.toc.Toc toc, out bool updated) nothrowExtract the TOC from the #GstMessage. The TOC returned in the output argument is a copy; the caller must free it with gst_toc_unref() when done.void parseWarning(out glib.error.ErrorWrap gerror, out string debug_) nothrowExtracts the GError and debug string from the GstMessage. The values returned in the output arguments are copies; the caller must free them when done.void parseWarningDetails(out gst.structure.Structure structure) nothrowReturns the optional details structure, may be NULL if none The returned structure must not be freed.void setBufferingStats(gst.types.BufferingMode mode, int avgIn, int avgOut, long bufferingLeft) nothrowConfigures the buffering stats values in message.void setQosStats(gst.types.Format format, ulong processed, ulong dropped) nothrowSet the QoS stats representing the history of the current continuous pipeline playback period.void setQosValues(long jitter, double proportion, int quality) nothrowSet the QoS values that have been calculated/analysed from the QoS datavoid setStreamStatusObject(gobject.value.Value object) nothrowConfigures the object handling the streaming thread. This is usually a GstTask object but other objects might be added in the future.uint streamsSelectedGetSize() nothrowReturns the number of streams contained in the message. Returns: The number of streams contained within.gst.stream.Stream streamsSelectedGetStream(uint idx) nothrowRetrieves the #GstStream with index index from the message.gst.structure.Structure writableStructure() nothrowGet a writable version of the structure. Returns: 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 inv...Constructors
this(gst.types.MessageType type = gst.types.MessageType.init, ulong timestamp = ulong.init, gst.object.ObjectWrap src = gst.object.ObjectWrap.init, uint seqnum = uint.init)Create a `message.Message` boxed type. Params: type = the #GstMessageType of the message timestamp = the timestamp of the message src = the src of the message seqnum = the sequence number of the me...