[−][src]Struct lv2_sys::LV2_Event
An LV2 event (header only).
LV2 events are generic time-stamped containers for any type of event. The type field defines the format of a given event's contents.
This struct defines the header of an LV2 event. An LV2 event is a single chunk of POD (plain old data), usually contained in a flat buffer (see LV2_EventBuffer below). Unless a required feature says otherwise, hosts may assume a deep copy of an LV2 event can be created safely using a simple:
memcpy(ev_copy, ev, sizeof(LV2_Event) + ev->size); (or equivalent)
Fields
frames: u32The frames portion of timestamp. The units used here can optionally be set for a port (with the lv2ev:timeUnits property), otherwise this is audio frames, corresponding to the sample_count parameter of the LV2 run method (e.g. frame 0 is the first frame for that call to run).
subframes: u32The sub-frames portion of timestamp. The units used here can optionally be set for a port (with the lv2ev:timeUnits property), otherwise this is 1/(2^32) of an audio frame.
type_: u16The type of this event, as a number which represents some URI defining an event type. This value MUST be some value previously returned from a call to the uri_to_id function defined in the LV2 URI map extension (see lv2_uri_map.h). There are special rules which must be followed depending on the type of an event. If the plugin recognizes an event type, the definition of that event type will describe how to interpret the event, and any required behaviour. Otherwise, if the type is 0, this event is a non-POD event and lv2_event_unref MUST be called if the event is 'dropped' (see above). Even if the plugin does not understand an event, it may pass the event through to an output by simply copying (and NOT calling lv2_event_unref). These rules are designed to allow for generic event handling plugins and large non-POD events, but with minimal hassle on simple plugins that "don't care" about these more advanced features.
size: u16The size of the data portion of this event in bytes, which immediately follows. The header size (12 bytes) is not included in this value.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for LV2_Event
impl Send for LV2_Event
impl Sync for LV2_Event
impl Unpin for LV2_Event
impl UnwindSafe for LV2_Event
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,