preset: add gst_preset_is_editable()
[platform/upstream/gstreamer.git] / gst / gstevent.h
index 39af270..ee7e8e0 100644 (file)
@@ -17,8 +17,8 @@
  *
  * 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.
  */
 
 
@@ -83,8 +83,6 @@ typedef enum {
  *                 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
@@ -143,7 +141,6 @@ typedef enum {
   /* 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)),
@@ -183,6 +180,7 @@ typedef enum {
 #include <gst/gstsegment.h>
 #include <gst/gstsegment.h>
 #include <gst/gstmessage.h>
+#include <gst/gstcontext.h>
 
 G_BEGIN_DECLS
 
@@ -277,8 +275,8 @@ GST_EXPORT GType _gst_event_type;
 #define         gst_event_make_writable(ev)   GST_EVENT_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (ev)))
 /**
  * gst_event_replace:
- * @old_event: (inout) (transfer full): pointer to a pointer to a #GstEvent
- *     to be replaced.
+ * @old_event: (inout) (transfer full) (nullable): pointer to a
+ *     pointer to a #GstEvent to be replaced.
  * @new_event: (allow-none) (transfer none): pointer to a #GstEvent that will
  *     replace the event pointed to by @old_event.
  *
@@ -287,9 +285,9 @@ GST_EXPORT GType _gst_event_type;
  * 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);
@@ -303,10 +301,10 @@ gst_event_replace (GstEvent **old_event, GstEvent *new_event)
 
 /**
  * gst_event_steal:
- * @old_event: (inout) (transfer full): pointer to a pointer to a #GstEvent
- *     to be stolen.
+ * @old_event: (inout) (transfer full) (nullable): 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
@@ -323,8 +321,8 @@ gst_event_steal (GstEvent **old_event)
 
 /**
  * gst_event_take:
- * @old_event: (inout) (transfer full): pointer to a pointer to a #GstEvent
- *     to be stolen.
+ * @old_event: (inout) (transfer full) (nullable): pointer to a
+ *     pointer to a #GstEvent to be stolen.
  * @new_event: (allow-none) (transfer full): pointer to a #GstEvent that will
  *     replace the event pointed to by @old_event.
  *
@@ -332,9 +330,9 @@ gst_event_steal (GstEvent **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);
@@ -348,15 +346,15 @@ gst_event_take (GstEvent **old_event, GstEvent *new_event)
 
 /**
  * GstQOSType:
- * @GST_QOS_TYPE_OVERFLOW: The QoS event type that is produced when downstream
+ * @GST_QOS_TYPE_OVERFLOW: The QoS event type that is produced when upstream
  *    elements are producing data too quickly and the element can't keep up
- *    processing the data. Upstream should reduce their processing rate. This
+ *    processing the data. Upstream should reduce their production rate. This
  *    type is also used when buffers arrive early or in time.
- * @GST_QOS_TYPE_UNDERFLOW: The QoS event type that is produced when downstream
- *    elements are producing data too slowly and need to speed up their processing
- *    rate.
+ * @GST_QOS_TYPE_UNDERFLOW: The QoS event type that is produced when upstream
+ *    elements are producing data too slowly and need to speed up their
+ *    production rate.
  * @GST_QOS_TYPE_THROTTLE: The QoS event type that is produced when the
- *    application enabled throttling to limit the datarate.
+ *    application enabled throttling to limit the data rate.
  *
  * The different types of QoS events that can be given to the
  * gst_event_new_qos() method.
@@ -368,15 +366,28 @@ typedef enum {
 } GstQOSType;
 
 /**
- * GstStreamConfigFlags:
- * @GST_STREAM_CONFIG_FLAG_NONE: no flags set
- *
- * GstStreamConfigFlags are flags passed with the stream config event, see
- * gst_event_new_stream_config().
+ * 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_CONFIG_FLAG_NONE = 0
-} GstStreamConfigFlags;
+  GST_STREAM_FLAG_NONE,
+  GST_STREAM_FLAG_SPARSE       = (1 << 0),
+  GST_STREAM_FLAG_SELECT       = (1 << 1),
+  GST_STREAM_FLAG_UNSELECT     = (1 << 2)
+} GstStreamFlags;
 
 /**
  * GstEvent:
@@ -471,10 +482,20 @@ gboolean        gst_event_has_name              (GstEvent *event, const gchar *n
 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      (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;
 
@@ -496,23 +517,6 @@ void            gst_event_parse_gap             (GstEvent     * event,
 GstEvent *      gst_event_new_caps              (GstCaps *caps) G_GNUC_MALLOC;
 void            gst_event_parse_caps            (GstEvent *event, GstCaps **caps);
 
-/* Stream config */
-GstEvent *      gst_event_new_stream_config                (GstStreamConfigFlags flags) G_GNUC_MALLOC;
-
-void            gst_event_parse_stream_config              (GstEvent * event, GstStreamConfigFlags * flags);
-
-
-void            gst_event_set_stream_config_setup_data     (GstEvent * event, GstBuffer  * buf);
-
-gboolean        gst_event_parse_stream_config_setup_data   (GstEvent * event, GstBuffer ** buf);
-
-
-void            gst_event_add_stream_config_header         (GstEvent * event, GstBuffer  * buf);
-
-guint           gst_event_get_n_stream_config_headers      (GstEvent * event);
-
-gboolean        gst_event_parse_nth_stream_config_header   (GstEvent * event, guint index, GstBuffer ** buf);
-
 /* segment event */
 GstEvent*       gst_event_new_segment           (const GstSegment *segment) G_GNUC_MALLOC;
 void            gst_event_parse_segment         (GstEvent *event, const GstSegment **segment);