[gstreamermm: 163/167] added new event type



commit a933092b43ef840ef13c78f2e87dac8c922eb96d
Author: Marcin Kolny at Flytronic.pl <marcin kolny flytronic pl>
Date:   Tue Aug 20 12:28:40 2013 +0200

    added new event type

 gstreamer/src/event.ccg |    7 +++++++
 gstreamer/src/event.hg  |   33 +++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 0 deletions(-)
---
diff --git a/gstreamer/src/event.ccg b/gstreamer/src/event.ccg
index c3c382d..0fc60a9 100644
--- a/gstreamer/src/event.ccg
+++ b/gstreamer/src/event.ccg
@@ -375,4 +375,11 @@ Glib::RefPtr<const Gst::Message> EventSinkMessage::parse() const
   return Glib::wrap(gst_msg);
 }
 
+Glib::RefPtr<Gst::EventStreamStart>
+EventStreamStart::create(const Glib::ustring& stream_id)
+{
+  GstEvent* event = gst_event_new_stream_start(stream_id.c_str());
+  return Glib::wrap_event_derived<EventStreamStart>(event, false);
+}
+
 } //namespace Gst
diff --git a/gstreamer/src/event.hg b/gstreamer/src/event.hg
index 86dafb7..6f82edb 100644
--- a/gstreamer/src/event.hg
+++ b/gstreamer/src/event.hg
@@ -711,4 +711,37 @@ public:
   Glib::RefPtr<const Gst::Message> parse() const;
 };
 
+/** A stream-start event.  See create() for more details.
+ */
+class EventStreamStart : public Event
+{
+public:
+
+  /**
+   * Create a new STREAM_START event. The stream start event can only
+   * travel downstream synchronized with the buffer flow. It is expected
+   * to be the first event that is sent for a new stream.
+   *
+   * Source elements, demuxers and other elements that create new streams
+   * are supposed to send this event as the first event of a new stream. It
+   * should not be send after a flushing seek or in similar situations
+   * and is used to mark the beginning of a new logical stream. Elements
+   * combining multiple streams must ensure that this event is only forwarded
+   * downstream once and not for every single input stream.
+   *
+   * The @stream_id should be a unique string that consists of the upstream
+   * stream-id, / as separator and a unique stream-id for this specific
+   * stream. A new stream-id should only be created for a stream if the upstream
+   * stream is split into (potentially) multiple new streams, e.g. in a demuxer,
+   * but not for every single element in the pipeline.
+   * gst_pad_create_stream_id() or gst_pad_create_stream_id_printf() can be
+   * used to create a stream-id.
+   *
+   * @param stream_id Identifier for this stream.
+   * @return a new #Gst::Event.
+   */
+  static Glib::RefPtr<Gst::EventStreamStart>
+    create(const Glib::ustring& stream_id);
+};
+
 } //namespace Gst


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]