* @GST_MESSAGE_QOS: A buffer was dropped or an element changed its processing
* strategy for Quality of Service reasons. Since: 0.10.29
* @GST_MESSAGE_PROGRESS: A progress message. Since: 0.10.33
+ * @GST_MESSAGE_TOC: A new table of contents (TOC) was found or previously found TOC
+ * was updated. Since: 0.10.37
* @GST_MESSAGE_ANY: mask for all of the above messages.
*
* The different message types that are available.
GST_MESSAGE_STEP_START = (1 << 23),
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;
#include <gst/gsttaglist.h>
#include <gst/gststructure.h>
#include <gst/gstquery.h>
-
-/**
- * GST_MESSAGE_TRACE_NAME:
- *
- * The name used for memory allocation tracing
- */
-#define GST_MESSAGE_TRACE_NAME "GstMessage"
+#include <gst/gsttoc.h>
#define GST_TYPE_MESSAGE (gst_message_get_type())
#define GST_IS_MESSAGE(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_MESSAGE))
/* the lock is used to handle the synchronous handling of messages,
* the emiting thread is block until the handling thread processed
* the message using this mutex/cond pair */
-#define GST_MESSAGE_GET_LOCK(message) (GST_MESSAGE_CAST(message)->lock)
+#define GST_MESSAGE_GET_LOCK(message) (&GST_MESSAGE_CAST(message)->lock)
#define GST_MESSAGE_LOCK(message) g_mutex_lock(GST_MESSAGE_GET_LOCK(message))
#define GST_MESSAGE_UNLOCK(message) g_mutex_unlock(GST_MESSAGE_GET_LOCK(message))
-#define GST_MESSAGE_COND(message) (GST_MESSAGE_CAST(message)->cond)
-#define GST_MESSAGE_WAIT(message) g_cond_wait(GST_MESSAGE_COND(message),GST_MESSAGE_GET_LOCK(message))
-#define GST_MESSAGE_SIGNAL(message) g_cond_signal(GST_MESSAGE_COND(message))
+#define GST_MESSAGE_GET_COND(message) (&GST_MESSAGE_CAST(message)->cond)
+#define GST_MESSAGE_WAIT(message) g_cond_wait(GST_MESSAGE_GET_COND(message),GST_MESSAGE_GET_LOCK(message))
+#define GST_MESSAGE_SIGNAL(message) g_cond_signal(GST_MESSAGE_GET_COND(message))
/**
* GST_MESSAGE_TYPE:
GST_PROGRESS_TYPE_CONTINUE = 1,
GST_PROGRESS_TYPE_COMPLETE = 2,
GST_PROGRESS_TYPE_CANCELED = 3,
- GST_PROGRESS_TYPE_ERROR = 4,
+ GST_PROGRESS_TYPE_ERROR = 4
} GstProgressType;
/**
*/
struct _GstMessage
{
- GstMiniObject mini_object;
+ GstMiniObject mini_object;
/*< public > *//* with COW */
- GstMessageType type;
- guint64 timestamp;
- GstObject *src;
- guint32 seqnum;
+ GstMessageType type;
+ guint64 timestamp;
+ GstObject *src;
+ guint32 seqnum;
/*< private >*//* with MESSAGE_LOCK */
- GMutex *lock; /* lock and cond for async delivery */
- GCond *cond;
+ GMutex lock; /* lock and cond for async delivery */
+ GCond cond;
};
GType gst_message_get_type (void);
GstMessage * gst_message_new_async_start (GstObject * src) G_GNUC_MALLOC;
/* ASYNC_DONE */
-GstMessage * gst_message_new_async_done (GstObject * src, gboolean reset_time) G_GNUC_MALLOC;
-void gst_message_parse_async_done (GstMessage *message, gboolean *reset_time);
+GstMessage * gst_message_new_async_done (GstObject * src, GstClockTime running_time) G_GNUC_MALLOC;
+void gst_message_parse_async_done (GstMessage *message, GstClockTime *running_time);
/* STRUCTURE CHANGE */
GstMessage * gst_message_new_structure_change (GstObject * src, GstStructureChangeType type,
void gst_message_parse_progress (GstMessage * message, GstProgressType * type, gchar ** code,
gchar ** text);
+/* TOC */
+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