*updated =
__gst_toc_structure_get_updated (GST_MESSAGE_STRUCTURE (message));
}
+
+/**
+ * gst_message_new_reset_time:
+ * @src: (transfer none): The object originating the message.
+ * @running_time: the requested running-time
+ *
+ * This message is posted when the pipeline running-time should be reset to
+ * @running_time, like after a flushing seek.
+ *
+ * Returns: (transfer full): The new reset_time message.
+ *
+ * MT safe.
+ */
+GstMessage *
+gst_message_new_reset_time (GstObject * src, GstClockTime running_time)
+{
+ GstMessage *message;
+ GstStructure *structure;
+
+ structure = gst_structure_new_id (GST_QUARK (MESSAGE_RESET_TIME),
+ GST_QUARK (RUNNING_TIME), G_TYPE_UINT64, running_time, NULL);
+ message = gst_message_new_custom (GST_MESSAGE_RESET_TIME, src, structure);
+
+ return message;
+}
+
+/**
+ * gst_message_parse_reset_time:
+ * @message: A valid #GstMessage of type GST_MESSAGE_RESET_TIME.
+ * @running_time: (out): Result location for the running_time or NULL
+ *
+ * Extract the running-time from the RESET_TIME message.
+ *
+ * MT safe.
+ */
+void
+gst_message_parse_reset_time (GstMessage * message, GstClockTime * running_time)
+{
+ GstStructure *structure;
+
+ g_return_if_fail (GST_IS_MESSAGE (message));
+ g_return_if_fail (GST_MESSAGE_TYPE (message) == GST_MESSAGE_RESET_TIME);
+
+ structure = GST_MESSAGE_STRUCTURE (message);
+ if (running_time)
+ *running_time =
+ g_value_get_uint64 (gst_structure_id_get_value (structure,
+ GST_QUARK (RUNNING_TIME)));
+}
GST_MESSAGE_QOS = (1 << 24),
GST_MESSAGE_PROGRESS = (1 << 25),
GST_MESSAGE_TOC = (1 << 26),
+ GST_MESSAGE_RESET_TIME = (1 << 27),
GST_MESSAGE_ANY = ~0
} GstMessageType;
GstMessage * gst_message_new_toc (GstObject *src, GstToc *toc, gboolean updated);
void gst_message_parse_toc (GstMessage *message, GstToc **toc, gboolean *updated);
+/* RESET_TIME */
+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);
+
G_END_DECLS
#endif /* __GST_MESSAGE_H__ */
GST_ELEMENT_METADATA_KLASS, GST_ELEMENT_METADATA_DESCRIPTION,
GST_ELEMENT_METADATA_AUTHOR, "toc", "toc-entry", "updated", "extend-uid",
"uid", "tags", "sub-entries", "info", "info-structure",
- "time-structure", "GstMessageTag", "GstEventTag"
+ "time-structure", "GstMessageTag", "GstEventTag", "GstMessageResetTime"
};
GQuark _priv_gst_quark_table[GST_QUARK_MAX];
GST_QUARK_TIME_STRUCTURE = 154,
GST_QUARK_MESSAGE_TAG = 155,
GST_QUARK_EVENT_TAG = 156,
- GST_QUARK_MAX = 157
+ GST_QUARK_MESSAGE_RESET_TIME = 157,
+ GST_QUARK_MAX = 158
} GstQuarkId;
extern GQuark _priv_gst_quark_table[GST_QUARK_MAX];
gst_message_new_progress
gst_message_new_qos
gst_message_new_request_state
+ gst_message_new_reset_time
gst_message_new_segment_done
gst_message_new_segment_start
gst_message_new_state_changed
gst_message_parse_qos_stats
gst_message_parse_qos_values
gst_message_parse_request_state
+ gst_message_parse_reset_time
gst_message_parse_segment_done
gst_message_parse_segment_start
gst_message_parse_state_changed