*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
/**
* GST_EVENT_MAKE_TYPE:
* @num: the event number to create
- * @idx: the index in the sticky array
* @flags: the event flags
*
* when making custom event types, use this macro with the num and
* other serialized event and only sent at the start of a new stream,
* not after flushing seeks.
* @GST_EVENT_CAPS: #GstCaps event. Notify the pad of a new media type.
- * @GST_EVENT_STREAM_CONFIG: (unimplemented) contains configuration information
- * for the stream, for example stream-headers and codec-data.
* @GST_EVENT_SEGMENT: A new media segment follows in the dataflow. The
* segment events contains information for clipping buffers and
* converting buffer timestamps to running-time and
* @GST_EVENT_SINK_MESSAGE: An event that sinks turn into a message. Used to
* send messages that should be emitted in sync with
* rendering.
- * Since: 0.10.26
* @GST_EVENT_EOS: End-Of-Stream. No more data is to be expected to follow
* without a SEGMENT event.
- * @GST_EVENT_SEGMENT_DONE: (unimplemented) Marks the end of a segment playback.
- * @GST_EVENT_GAP: (unimplemented) Marks a gap in the datastream.
+ * @GST_EVENT_SEGMENT_DONE: Marks the end of a segment playback.
+ * @GST_EVENT_GAP: Marks a gap in the datastream.
+ * @GST_EVENT_TOC: An event which indicates that a new table of contents (TOC)
+ * was found or updated.
* @GST_EVENT_QOS: A quality message. Used to indicate to upstream elements
* that the downstream elements should adjust their processing
* rate.
* to upstream elements.
* @GST_EVENT_LATENCY: Notification of new latency adjustment. Sinks will use
* the latency information to adjust their synchronisation.
- * Since: 0.10.12
* @GST_EVENT_STEP: A request for stepping through the media. Sinks will usually
- * execute the step operation. Since: 0.10.24
+ * execute the step operation.
* @GST_EVENT_RECONFIGURE: A request for upstream renegotiating caps and reconfiguring.
- * Since: 0.11.0
+ * @GST_EVENT_TOC_SELECT: A request for a new playback position based on TOC
+ * entry's UID.
* @GST_EVENT_CUSTOM_UPSTREAM: Upstream custom event
* @GST_EVENT_CUSTOM_DOWNSTREAM: Downstream custom event that travels in the
* data flow.
/* downstream serialized events */
GST_EVENT_STREAM_START = GST_EVENT_MAKE_TYPE (40, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
GST_EVENT_CAPS = GST_EVENT_MAKE_TYPE (50, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
- GST_EVENT_STREAM_CONFIG = GST_EVENT_MAKE_TYPE (60, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
GST_EVENT_SEGMENT = GST_EVENT_MAKE_TYPE (70, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
GST_EVENT_TAG = GST_EVENT_MAKE_TYPE (80, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY) | FLAG(STICKY_MULTI)),
GST_EVENT_BUFFERSIZE = GST_EVENT_MAKE_TYPE (90, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
GST_EVENT_SINK_MESSAGE = GST_EVENT_MAKE_TYPE (100, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY) | FLAG(STICKY_MULTI)),
GST_EVENT_EOS = GST_EVENT_MAKE_TYPE (110, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
+ GST_EVENT_TOC = GST_EVENT_MAKE_TYPE (120, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY) | FLAG(STICKY_MULTI)),
/* non-sticky downstream serialized */
GST_EVENT_SEGMENT_DONE = GST_EVENT_MAKE_TYPE (150, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
GST_EVENT_LATENCY = GST_EVENT_MAKE_TYPE (220, FLAG(UPSTREAM)),
GST_EVENT_STEP = GST_EVENT_MAKE_TYPE (230, FLAG(UPSTREAM)),
GST_EVENT_RECONFIGURE = GST_EVENT_MAKE_TYPE (240, FLAG(UPSTREAM)),
+ GST_EVENT_TOC_SELECT = GST_EVENT_MAKE_TYPE (250, FLAG(UPSTREAM)),
/* custom events start here */
GST_EVENT_CUSTOM_UPSTREAM = GST_EVENT_MAKE_TYPE (270, FLAG(UPSTREAM)),
#include <gst/gstsegment.h>
#include <gst/gstsegment.h>
#include <gst/gstmessage.h>
+#include <gst/gstcontext.h>
G_BEGIN_DECLS
#define GST_EVENT(obj) (GST_EVENT_CAST(obj))
/**
- * GST_EVENT_TRACE_NAME:
- *
- * The name used for memory allocation tracing
- */
-#define GST_EVENT_TRACE_NAME "GstEvent"
-
-/**
* GST_EVENT_TYPE:
* @event: the event to query
*
* in some cases), and the reference counts are updated appropriately (the old
* event is unreffed, the new one is reffed).
*
- * Either @new_event or the #GstEvent pointed to by @old_event may be NULL.
+ * Either @new_event or the #GstEvent pointed to by @old_event may be %NULL.
*
- * Returns: TRUE if @new_event was different from @old_event
+ * Returns: %TRUE if @new_event was different from @old_event
*/
#ifdef _FOOL_GTK_DOC_
G_INLINE_FUNC gboolean gst_event_replace (GstEvent **old_event, GstEvent *new_event);
* @old_event: (inout) (transfer full): pointer to a pointer to a #GstEvent
* to be stolen.
*
- * Atomically replace the #GstEvent pointed to by @old_event with NULL and
+ * Atomically replace the #GstEvent pointed to by @old_event with %NULL and
* return the original event.
*
* Returns: the #GstEvent that was in @old_event
* function is similar to gst_event_replace() except that it takes ownership of
* @new_event.
*
- * Either @new_event or the #GstEvent pointed to by @old_event may be NULL.
+ * Either @new_event or the #GstEvent pointed to by @old_event may be %NULL.
*
- * Returns: TRUE if @new_event was different from @old_event
+ * Returns: %TRUE if @new_event was different from @old_event
*/
#ifdef _FOOL_GTK_DOC_
G_INLINE_FUNC gboolean gst_event_take (GstEvent **old_event, GstEvent *new_event);
*
* The different types of QoS events that can be given to the
* gst_event_new_qos() method.
- *
- * Since: 0.10.33
*/
typedef enum {
GST_QOS_TYPE_OVERFLOW = 0,
} GstQOSType;
/**
+ * GstStreamFlags:
+ * @GST_STREAM_FLAG_NONE: This stream has no special attributes
+ * @GST_STREAM_FLAG_SPARSE: This stream is a sparse stream (e.g. a subtitle
+ * stream), data may flow only in irregular intervals with large gaps in
+ * between.
+ * @GST_STREAM_FLAG_SELECT: This stream should be selected by default. This
+ * flag may be used by demuxers to signal that a stream should be selected
+ * by default in a playback scenario.
+ * @GST_STREAM_FLAG_UNSELECT: This stream should not be selected by default.
+ * This flag may be used by demuxers to signal that a stream should not
+ * be selected by default in a playback scenario, but only if explicitly
+ * selected by the user (e.g. an audio track for the hard of hearing or
+ * a director's commentary track).
+ *
+ * Since: 1.2
+ */
+typedef enum {
+ GST_STREAM_FLAG_NONE,
+ GST_STREAM_FLAG_SPARSE = (1 << 0),
+ GST_STREAM_FLAG_SELECT = (1 << 1),
+ GST_STREAM_FLAG_UNSELECT = (1 << 2)
+} GstStreamFlags;
+
+/**
* GstEvent:
* @mini_object: the parent structure
* @type: the #GstEventType of the event
guint32 gst_event_get_seqnum (GstEvent *event);
void gst_event_set_seqnum (GstEvent *event, guint32 seqnum);
+/* accumulated pad offsets for the event */
+gint64 gst_event_get_running_time_offset (GstEvent *event);
+void gst_event_set_running_time_offset (GstEvent *event, gint64 offset);
+
/* Stream start event */
-GstEvent * gst_event_new_stream_start (void) G_GNUC_MALLOC;
+GstEvent * gst_event_new_stream_start (const gchar *stream_id) G_GNUC_MALLOC;
+void gst_event_parse_stream_start (GstEvent *event, const gchar **stream_id);
+
+void gst_event_set_stream_flags (GstEvent *event, GstStreamFlags flags);
+void gst_event_parse_stream_flags (GstEvent *event, GstStreamFlags *flags);
+
+void gst_event_set_group_id (GstEvent *event, guint group_id);
+gboolean gst_event_parse_group_id (GstEvent *event, guint *group_id);
/* flush events */
GstEvent * gst_event_new_flush_start (void) G_GNUC_MALLOC;
/* EOS event */
GstEvent * gst_event_new_eos (void) G_GNUC_MALLOC;
+/* GAP event */
+GstEvent * gst_event_new_gap (GstClockTime timestamp,
+ GstClockTime duration) G_GNUC_MALLOC;
+
+void gst_event_parse_gap (GstEvent * event,
+ GstClockTime * timestamp,
+ GstClockTime * duration);
+
/* Caps events */
GstEvent * gst_event_new_caps (GstCaps *caps) G_GNUC_MALLOC;
void gst_event_parse_caps (GstEvent *event, GstCaps **caps);
GstEvent* gst_event_new_tag (GstTagList *taglist) G_GNUC_MALLOC;
void gst_event_parse_tag (GstEvent *event, GstTagList **taglist);
+/* TOC event */
+GstEvent* gst_event_new_toc (GstToc *toc, gboolean updated);
+void gst_event_parse_toc (GstEvent *event, GstToc **toc, gboolean *updated);
+
+
/* buffer */
GstEvent * gst_event_new_buffer_size (GstFormat format, gint64 minsize, gint64 maxsize,
gboolean async) G_GNUC_MALLOC;
gint64 *maxsize, gboolean *async);
/* sink message */
-GstEvent* gst_event_new_sink_message (GstMessage *msg) G_GNUC_MALLOC;
+GstEvent* gst_event_new_sink_message (const gchar *name, GstMessage *msg) G_GNUC_MALLOC;
void gst_event_parse_sink_message (GstEvent *event, GstMessage **msg);
/* QOS events */
/* renegotiate event */
GstEvent* gst_event_new_reconfigure (void) G_GNUC_MALLOC;
+/* TOC select event */
+GstEvent* gst_event_new_toc_select (const gchar *uid) G_GNUC_MALLOC;
+void gst_event_parse_toc_select (GstEvent *event, gchar **uid);
+
+/* segment-done event */
+GstEvent* gst_event_new_segment_done (GstFormat format, gint64 position) G_GNUC_MALLOC;
+void gst_event_parse_segment_done (GstEvent *event, GstFormat *format, gint64 *position);
+
G_END_DECLS
#endif /* __GST_EVENT_H__ */