[][src]Struct gstreamer::message::Message

pub struct Message { /* fields omitted */ }

Implementations

impl Message[src]

pub unsafe fn from_glib_none(ptr: *const GstMessage) -> Self[src]

pub unsafe fn from_glib_full(ptr: *const GstMessage) -> Self[src]

pub unsafe fn from_glib_borrow(ptr: *const GstMessage) -> Borrowed<Self>[src]

pub unsafe fn replace_ptr(&mut self, ptr: *mut GstMessage)[src]

pub fn make_mut(&mut self) -> &mut MessageRef[src]

pub fn get_mut(&mut self) -> Option<&mut MessageRef>[src]

pub fn is_writable(&self) -> bool[src]

pub unsafe fn into_ptr(self) -> *mut GstMessage[src]

impl Message[src]

pub fn new_eos<'a>() -> EosBuilder<'a>[src]

👎 Deprecated since 0.16.0:

use message::Eos::new or message::Eos::builder instead

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.

src

The object originating the message.

Returns

The new eos message.

MT safe.

pub fn new_error<T: MessageErrorDomain>(
    error: T,
    message: &str
) -> ErrorBuilder<'_, T>
[src]

👎 Deprecated since 0.16.0:

use message::Error::new or message::Error::builder instead

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.

src

The object originating the message.

error

The GError for this message.

debug

A debugging string.

Returns

the new error message.

MT safe.

pub fn new_warning<T: MessageErrorDomain>(
    error: T,
    message: &str
) -> WarningBuilder<'_, T>
[src]

👎 Deprecated since 0.16.0:

use message::Warning::new or message::Warning::builder instead

Create a new warning message. The message will make copies of error and debug.

src

The object originating the message.

error

The GError for this message.

debug

A debugging string.

Returns

the new warning message.

MT safe.

pub fn new_info<T: MessageErrorDomain>(
    error: T,
    message: &str
) -> InfoBuilder<'_, T>
[src]

👎 Deprecated since 0.16.0:

use message::Info::new or message::Info::builder instead

Create a new info message. The message will make copies of error and debug.

src

The object originating the message.

error

The GError for this message.

debug

A debugging string.

Returns

the new info message.

MT safe.

pub fn new_tag(tags: &TagList) -> TagBuilder<'_>[src]

👎 Deprecated since 0.16.0:

use message::Tag::new or message::Tag::builder instead

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.

src

The object originating the message.

tag_list

the tag list for the message.

Returns

the new tag message.

MT safe.

pub fn new_buffering<'a>(percent: i32) -> BufferingBuilder<'a>[src]

👎 Deprecated since 0.16.0:

use message::Buffering::new or message::Buffering::builder instead

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.

src

The object originating the message.

percent

The buffering percent

Returns

The new buffering message.

pub fn new_state_changed<'a>(
    old: State,
    new: State,
    pending: State
) -> StateChangedBuilder<'a>
[src]

👎 Deprecated since 0.16.0:

use message::StateChanged::new or message::StateChanged::builder instead

Create a state change message. This message is posted whenever an element changed its state.

src

The object originating the message.

oldstate

the previous state

newstate

the new (current) state

pending

the pending (target) state

Returns

the new state change message.

MT safe.

pub fn new_state_dirty<'a>() -> StateDirtyBuilder<'a>[src]

👎 Deprecated since 0.16.0:

use message::StateDirty::new or message::StateDirty::builder instead

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.

src

The object originating the message

Returns

the new state dirty message.

MT safe.

pub fn new_step_done<'a, V: Into<GenericFormattedValue>>(
    amount: V,
    rate: f64,
    flush: bool,
    intermediate: bool,
    duration: V,
    eos: bool
) -> StepDoneBuilder<'a>
[src]

👎 Deprecated since 0.16.0:

use message::StepDone::new or message::StepDone::builder instead

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.

src

The object originating the message.

format

the format of amount

amount

the amount of stepped data

rate

the rate of the stepped amount

flush

is this an flushing step

intermediate

is this an intermediate step

duration

the duration of the data

eos

the step caused EOS

Returns

the new step_done message.

MT safe.

pub fn new_clock_provide(clock: &Clock, ready: bool) -> ClockProvideBuilder<'_>[src]

👎 Deprecated since 0.16.0:

use message::ClockProvide::new or message::ClockProvide::builder instead

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.

src

The object originating the message.

clock

the clock it provides

ready

true if the sender can provide a clock

Returns

the new provide clock message.

MT safe.

pub fn new_clock_lost(clock: &Clock) -> ClockLostBuilder<'_>[src]

👎 Deprecated since 0.16.0:

use message::ClockLost::new or message::ClockLost::builder instead

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.

src

The object originating the message.

clock

the clock that was lost

Returns

The new clock lost message.

MT safe.

pub fn new_new_clock(clock: &Clock) -> NewClockBuilder<'_>[src]

👎 Deprecated since 0.16.0:

use message::NewClock::new or message::NewClock::builder instead

Create a new clock message. This message is posted whenever the pipeline selects a new clock for the pipeline.

src

The object originating the message.

clock

the new selected clock

Returns

The new new clock message.

MT safe.

pub fn new_structure_change(
    type_: StructureChangeType,
    owner: &Element,
    busy: bool
) -> StructureChangeBuilder<'_>
[src]

👎 Deprecated since 0.16.0:

use message::StructureChange::new or message::StructureChange::builder instead

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.

src

The object originating the message.

type_

The change type.

owner

The owner element of src.

busy

Whether the structure change is busy.

Returns

the new structure change message.

MT safe.

pub fn new_stream_status(
    type_: StreamStatusType,
    owner: &Element
) -> StreamStatusBuilder<'_>
[src]

👎 Deprecated since 0.16.0:

use message::StreamStatus::new or message::StreamStatus::builder instead

Create a new stream status message. This message is posted when a streaming thread is created/destroyed or when the state changed.

src

The object originating the message.

type_

The stream status type.

owner

the owner element of src.

Returns

the new stream status message.

MT safe.

pub fn new_application<'a>(structure: Structure) -> ApplicationBuilder<'a>[src]

👎 Deprecated since 0.16.0:

use message::Application::new or message::Application::builder instead

Create a new application-typed message. GStreamer will never create these messages; they are a gift from us to you. Enjoy.

src

The object originating the message.

structure

the structure for the message. The message will take ownership of the structure.

Returns

The new application message.

MT safe.

pub fn new_element<'a>(structure: Structure) -> ElementBuilder<'a>[src]

👎 Deprecated since 0.16.0:

use message::Element::new or message::Element::builder instead

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 None.

src

The object originating the message.

structure

The structure for the message. The message will take ownership of the structure.

Returns

The new element message.

MT safe.

pub fn new_segment_start<'a, V: Into<GenericFormattedValue>>(
    position: V
) -> SegmentStartBuilder<'a>
[src]

👎 Deprecated since 0.16.0:

use message::SegmentStart::new or message::SegmentStart::builder instead

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.

src

The object originating the message.

format

The format of the position being played

position

The position of the segment being played

Returns

the new segment start message.

MT safe.

pub fn new_segment_done<'a, V: Into<GenericFormattedValue>>(
    position: V
) -> SegmentDoneBuilder<'a>
[src]

👎 Deprecated since 0.16.0:

use message::SegmentDone::new or message::SegmentDone::builder instead

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.

src

The object originating the message.

format

The format of the position being done

position

The position of the segment being done

Returns

the new segment done message.

MT safe.

pub fn new_duration_changed<'a>() -> DurationChangedBuilder<'a>[src]

👎 Deprecated since 0.16.0:

use message::DurationChanged::new or message::DurationChanged::builder instead

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.

src

The object originating the message.

Returns

The new duration-changed message.

MT safe.

pub fn new_latency<'a>() -> LatencyBuilder<'a>[src]

👎 Deprecated since 0.16.0:

use message::Latency::new or message::Latency::builder instead

This message can be posted by elements when their latency requirements have changed.

src

The object originating the message.

Returns

The new latency message.

MT safe.

pub fn new_async_start<'a>() -> AsyncStartBuilder<'a>[src]

👎 Deprecated since 0.16.0:

use message::AsyncStart::new or message::AsyncStart::builder instead

This message is posted by elements when they start an ASYNC state change.

src

The object originating the message.

Returns

The new async_start message.

MT safe.

pub fn new_async_done<'a>(running_time: ClockTime) -> AsyncDoneBuilder<'a>[src]

👎 Deprecated since 0.16.0:

use message::AsyncDone::new or message::AsyncDone::builder instead

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.

src

The object originating the message.

running_time

the desired running_time

Returns

The new async_done message.

MT safe.

pub fn new_request_state<'a>(state: State) -> RequestStateBuilder<'a>[src]

👎 Deprecated since 0.16.0:

use message::RequestState::new or message::RequestState::builder instead

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.

src

The object originating the message.

state

The new requested state

Returns

the new request state message.

MT safe.

pub fn new_step_start<'a, V: Into<GenericFormattedValue>>(
    active: bool,
    amount: V,
    rate: f64,
    flush: bool,
    intermediate: bool
) -> StepStartBuilder<'a>
[src]

👎 Deprecated since 0.16.0:

use message::StepStart::new or message::StepStart::builder instead

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.

src

The object originating the message.

active

if the step is active or queued

format

the format of amount

amount

the amount of stepped data

rate

the rate of the stepped amount

flush

is this an flushing step

intermediate

is this an intermediate step

Returns

The new step_start message.

MT safe.

pub fn new_qos_builder<'a>(
    live: bool,
    running_time: ClockTime,
    stream_time: ClockTime,
    timestamp: ClockTime,
    duration: ClockTime
) -> QosBuilder<'a>
[src]

👎 Deprecated since 0.16.0:

use message::Qos::new or message::Qos::builder instead

pub fn new_progress<'a>(
    type_: ProgressType,
    code: &'a str,
    text: &'a str
) -> ProgressBuilder<'a>
[src]

👎 Deprecated since 0.16.0:

use message::Progress::new or message::Progress::builder instead

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.

src

The object originating the message.

type_

a ProgressType

code

a progress code

text

free, user visible text describing the progress

Returns

The new qos message.

pub fn new_toc(toc: &Toc, updated: bool) -> TocBuilder<'_>[src]

👎 Deprecated since 0.16.0:

use message::Toc::new or message::Toc::builder instead

Create a new TOC message. The message is posted by elements that discovered or updated a TOC.

src

the object originating the message.

toc

Toc structure for the message.

updated

whether TOC was updated or not.

Returns

a new TOC message.

MT safe.

pub fn new_reset_time<'a>(running_time: ClockTime) -> ResetTimeBuilder<'a>[src]

👎 Deprecated since 0.16.0:

use message::ResetTime::new or message::ResetTime::builder instead

This message is posted when the pipeline running-time should be reset to running_time, like after a flushing seek.

src

The object originating the message.

running_time

the requested running-time

Returns

The new reset_time message.

MT safe.

pub fn new_stream_start<'a>() -> StreamStartBuilder<'a>[src]

👎 Deprecated since 0.16.0:

use message::StreamStart::new or message::StreamStart::builder instead

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.

src

The object originating the message.

Returns

The new stream_start message.

MT safe.

pub fn new_need_context(context_type: &str) -> NeedContextBuilder<'_>[src]

👎 Deprecated since 0.16.0:

use message::NeedContext::new or message::NeedContext::builder instead

This message is posted when an element needs a specific Context.

src

The object originating the message.

context_type

The context type that is needed

Returns

The new need-context message.

MT safe.

pub fn new_have_context<'a>(context: Context) -> HaveContextBuilder<'a>[src]

👎 Deprecated since 0.16.0:

use message::HaveContext::new or message::HaveContext::builder instead

This message is posted when an element has a new local Context.

src

The object originating the message.

context

the context

Returns

The new have-context message.

MT safe.

pub fn new_device_added(device: &Device) -> DeviceAddedBuilder<'_>[src]

👎 Deprecated since 0.16.0:

use message::DeviceAdded::new or message::DeviceAdded::builder instead

Creates a new device-added message. The device-added message is produced by DeviceProvider or a DeviceMonitor. They announce the appearance of monitored devices.

src

The Object that created the message

device

The new Device

Returns

a newly allocated Message

pub fn new_device_removed(device: &Device) -> DeviceRemovedBuilder<'_>[src]

👎 Deprecated since 0.16.0:

use message::DeviceRemoved::new or message::DeviceRemoved::builder instead

Creates a new device-removed message. The device-removed message is produced by DeviceProvider or a DeviceMonitor. They announce the disappearance of monitored devices.

src

The Object that created the message

device

The removed Device

Returns

a newly allocated Message

pub fn new_property_notify(property_name: &str) -> PropertyNotifyBuilder<'_>[src]

👎 Deprecated since 0.16.0:

use message::PropertyNotify::new or message::PropertyNotify::builder instead

Feature: v1_10

src

The Object whose property changed (may or may not be a Element)

property_name

name of the property that changed

val

new property value, or None

Returns

a newly allocated Message

pub fn new_stream_collection(
    collection: &StreamCollection
) -> StreamCollectionBuilder<'_>
[src]

👎 Deprecated since 0.16.0:

use message::StreamCollection::new or message::StreamCollection::builder instead

Creates a new stream-collection message. The message is used to announce new StreamCollection

Feature: v1_10

src

The Object that created the message

collection

The StreamCollection

Returns

a newly allocated Message

pub fn new_streams_selected(
    collection: &StreamCollection
) -> StreamsSelectedBuilder<'_>
[src]

👎 Deprecated since 0.16.0:

use message::StreamsSelected::new or message::StreamsSelected::builder instead

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 EventType::SelectStreams event, or when an element (such as decodebin3) makes an initial selection of streams.

The message also contains the StreamCollection to which the various streams belong to.

Users of Message::new_streams_selected can add the selected streams with Message::streams_selected_add.

Feature: v1_10

src

The Object that created the message

collection

The StreamCollection

Returns

a newly allocated Message

pub fn new_redirect(location: &str) -> RedirectBuilder<'_>[src]

👎 Deprecated since 0.16.0:

use message::Redirect::new or message::Redirect::builder instead

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 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.

Feature: v1_10

src

The Object whose property changed (may or may not be a Element)

location

location string for the new entry

tag_list

tag list for the new entry

entry_struct

structure for the new entry

Returns

a newly allocated Message

pub fn new_device_changed<'a>(
    device: &'a Device,
    changed_device: &'a Device
) -> DeviceChangedBuilder<'a>
[src]

👎 Deprecated since 0.16.0:

use message::DeviceChanged::new or message::DeviceChanged::builder instead

Creates a new device-changed message. The device-changed message is produced by DeviceProvider or a DeviceMonitor. They announce that a device properties has changed and device represent the new modified version of changed_device.

Feature: v1_16

src

The Object that created the message

device

The newly created device representing replaced_device with its new configuration.

Returns

a newly allocated Message

Methods from Deref<Target = MessageRef>

pub unsafe fn as_ptr(&self) -> *const GstMessage[src]

pub unsafe fn as_mut_ptr(&self) -> *mut GstMessage[src]

pub fn copy(&self) -> Message[src]

pub fn get_src(&self) -> Option<Object>[src]

pub fn get_seqnum(&self) -> Seqnum[src]

pub fn get_structure(&self) -> Option<&StructureRef>[src]

pub fn view(&self) -> MessageView<'_>[src]

pub fn get_type(&self) -> MessageType[src]

Trait Implementations

impl AsRef<MessageRef> for Message[src]

impl Borrow<MessageRef> for Message[src]

impl Clone for Message[src]

impl Debug for Message[src]

impl Deref for Message[src]

type Target = MessageRef

The resulting type after dereferencing.

impl Drop for Message[src]

impl FromGlibContainerAsVec<*mut GstMessage, *const *mut GstMessage> for Message[src]

impl FromGlibContainerAsVec<*mut GstMessage, *mut *mut GstMessage> for Message[src]

impl FromGlibPtrArrayContainerAsVec<*mut GstMessage, *const *mut GstMessage> for Message[src]

impl FromGlibPtrArrayContainerAsVec<*mut GstMessage, *mut *mut GstMessage> for Message[src]

impl FromGlibPtrBorrow<*const GstMessage> for Message[src]

impl FromGlibPtrBorrow<*mut GstMessage> for Message[src]

impl FromGlibPtrFull<*const GstMessage> for Message[src]

impl FromGlibPtrFull<*mut GstMessage> for Message[src]

impl FromGlibPtrNone<*const GstMessage> for Message[src]

impl FromGlibPtrNone<*mut GstMessage> for Message[src]

impl<'a> FromValueOptional<'a> for Message[src]

impl GlibPtrDefault for Message[src]

type GlibType = *mut GstMessage

impl Send for Message[src]

impl SetValue for Message[src]

impl SetValueOptional for Message[src]

impl StaticType for Message[src]

impl Sync for Message[src]

impl<'a> ToGlibContainerFromSlice<'a, *const *mut GstMessage> for Message[src]

impl<'a> ToGlibContainerFromSlice<'a, *mut *mut GstMessage> for Message[src]

type Storage = (Vec<Stash<'a, *mut GstMessage, Self>>, Option<Vec<*mut GstMessage>>)

impl<'a> ToGlibPtr<'a, *const GstMessage> for Message[src]

type Storage = &'a Self

impl<'a> ToGlibPtr<'a, *mut GstMessage> for Message[src]

type Storage = &'a Self

impl<'a> ToGlibPtrMut<'a, *mut GstMessage> for Message[src]

type Storage = &'a mut Self

Auto Trait Implementations

impl RefUnwindSafe for Message

impl Unpin for Message

impl UnwindSafe for Message

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.