gstmessage: New GST_MESSAGE_STREAM_START
authorEdward Hervey <edward.hervey@collabora.co.uk>
Mon, 9 Jul 2012 18:08:15 +0000 (20:08 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Mon, 9 Jul 2012 18:31:45 +0000 (20:31 +0200)
message counterpart to the GST_EVENT_STREAM_START event

gst/gstmessage.c
gst/gstmessage.h
win32/common/libgstreamer.def

index 108a023..106771e 100644 (file)
@@ -105,6 +105,7 @@ static GstMessageQuarks message_quarks[] = {
   {GST_MESSAGE_QOS, "qos", 0},
   {GST_MESSAGE_PROGRESS, "progress", 0},
   {GST_MESSAGE_TOC, "toc", 0},
+  {GST_MESSAGE_STREAM_START, "stream-start", 0},
   {0, NULL, 0}
 };
 
@@ -2274,3 +2275,25 @@ gst_message_parse_reset_time (GstMessage * message, GstClockTime * running_time)
         g_value_get_uint64 (gst_structure_id_get_value (structure,
             GST_QUARK (RUNNING_TIME)));
 }
+
+/**
+ * gst_message_new_stream_start:
+ * @src: (transfer none): The object originating the message.
+ *
+ * Create a new stream_start message. This message is generated and posted in
+ * the sink elements of a GstBin. The bin will only forward the STREAM_START
+ * message to the application if all sinks have posted an STREAM_START message.
+ *
+ * Returns: (transfer full): The new stream_start message.
+ *
+ * MT safe.
+ */
+GstMessage *
+gst_message_new_stream_start (GstObject * src)
+{
+  GstMessage *message;
+
+  message = gst_message_new_custom (GST_MESSAGE_STREAM_START, src, NULL);
+
+  return message;
+}
index 50e0146..38c1248 100644 (file)
@@ -128,6 +128,7 @@ typedef enum
   GST_MESSAGE_PROGRESS          = (1 << 25),
   GST_MESSAGE_TOC               = (1 << 26),
   GST_MESSAGE_RESET_TIME        = (1 << 27),
+  GST_MESSAGE_STREAM_START      = (1 << 28),
   GST_MESSAGE_ANY               = ~0
 } GstMessageType;
 
@@ -558,6 +559,9 @@ void            gst_message_parse_toc           (GstMessage *message, GstToc **t
 GstMessage *    gst_message_new_reset_time      (GstObject * src, GstClockTime running_time) G_GNUC_MALLOC;
 void            gst_message_parse_reset_time    (GstMessage *message, GstClockTime *running_time);
 
+/* STREAM_START */
+GstMessage *    gst_message_new_stream_start    (GstObject * src) G_GNUC_MALLOC;
+
 G_END_DECLS
 
 #endif /* __GST_MESSAGE_H__ */
index 7f95539..0a8042a 100644 (file)
@@ -557,6 +557,7 @@ EXPORTS
        gst_message_new_state_dirty
        gst_message_new_step_done
        gst_message_new_step_start
+       gst_message_new_stream_start
        gst_message_new_stream_status
        gst_message_new_structure_change
        gst_message_new_tag