#include <event.h>
Public Member Functions | |
virtual | ~Event () |
GstEvent* | gobj () |
Provides access to the underlying C GstMiniObject. | |
const GstEvent* | gobj () const |
Provides access to the underlying C GstMiniObject. | |
GstEvent* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
Structure | get_structure () const |
Get the structure of an event. | |
bool | is_downstream () const |
Check if an event can travel downstream. | |
bool | is_serialized () const |
Check if an event is serialized with the data stream. | |
bool | is_upstream () const |
Check if an event can travel upstream. | |
EventType | get_event_type () const |
Get the Gst::EventType of the event. | |
ClockTime | get_timestamp () const |
Get the Gst::ClockTime timestamp of the event. | |
Glib::RefPtr<Gst::Object> | get_source () |
The source Gst::Object that generated this event. | |
Glib::RefPtr<const Gst::Object> | get_source () const |
Static Public Member Functions | |
static Glib::RefPtr<Event> | wrap (GstEvent* event, bool take_copy=false) |
Wrap a GstEvent* in a C++ instance, creating an instance of a derived Gst::Event. |
The event class provides factory methods to construct and functions query (parse) events.
Events are usually created by using the Gst::Event derrived classes' create() methods. To send an event application will usually use Gst::Element::send_event() and elements will use Gst::Pad::send_event() or Gst::Pad::push_event().
Events that have been received can be parsed with their respective parse() functions.
Events are passed between elements in parallel to the data stream. Some events are serialized with buffers, others are not. Some events only travel downstream, others only upstream. Some events can travel both upstream and downstream.
The events are used to signal special conditions in the datastream such as EOS (end of stream) or the start of a new stream-segment. Events are also used to flush the pipeline of any pending data.
Most of the event API is used inside plugins. Applications usually only construct and use seek events. To do that Gst::EventSeek::create() is used to create a seek event. It takes the needed parameters to specity seeking time and mode. The event is then sent to the element like so:
pipeline->send_event(event);
virtual Gst::Event::~Event | ( | ) | [virtual] |
GstEvent* Gst::Event::gobj | ( | ) | [inline] |
const GstEvent* Gst::Event::gobj | ( | ) | const [inline] |
GstEvent* Gst::Event::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::RefPtr<Gst::Event> wrap | ( | GstEvent * | event, | |
bool | take_copy = false | |||
) | [static] |
Wrap a GstEvent* in a C++ instance, creating an instance of a derived Gst::Event.
object | The C instance |
take_copy | false if the result should take ownership of the C instance. true if it should take a new copy or ref. |
Structure Gst::Event::get_structure | ( | ) | const |
bool Gst::Event::is_downstream | ( | ) | const |
Check if an event can travel downstream.
bool Gst::Event::is_serialized | ( | ) | const |
Check if an event is serialized with the data stream.
bool Gst::Event::is_upstream | ( | ) | const |
Check if an event can travel upstream.
EventType Gst::Event::get_event_type | ( | ) | const |
Get the Gst::EventType of the event.
ClockTime Gst::Event::get_timestamp | ( | ) | const |
Get the Gst::ClockTime timestamp of the event.
This is the time when the event was created.
Glib::RefPtr<Gst::Object> Gst::Event::get_source | ( | ) |
The source Gst::Object that generated this event.
Glib::RefPtr<const Gst::Object> Gst::Event::get_source | ( | ) | const |