GST_TIME_ARGS (identity->prev_duration), GST_TIME_ARGS (timestamp),
GST_TIME_ARGS (t_expected), (dt < 0) ? '-' : '+',
GST_TIME_ARGS ((dt < 0) ? (GstClockTime) (-dt) : dt));
+ /*
+ * "non-perfect" bus message:
+ * @identity: the identity instance
+ * @prev-timestamp: the previous buffer timestamp
+ * @prev-duration: the previous buffer duration
+ * @prev-offset: the previous buffer offset
+ * @prev-offset-end: the previous buffer offset end
+ * @cur-timestamp: the current buffer timestamp
+ * @cur-duration: the current buffer duration
+ * @cur-offset: the current buffer offset
+ * @cur-offset_end: the current buffer offset end
+ *
+ * This bus message gets emitted if check-perfect property is set and
+ * a non perfect stream is detected between the last buffer and
+ * the newly received buffer.
+ */
+ gst_element_post_message (GST_ELEMENT (identity),
+ gst_message_new_element (GST_OBJECT (identity),
+ gst_structure_new ("non-perfect", "prev-timestamp",
+ G_TYPE_UINT64, identity->prev_timestamp, "prev-duration",
+ G_TYPE_UINT64, identity->prev_duration, "prev-offset",
+ G_TYPE_UINT64, identity->prev_offset, "prev-offset-end",
+ G_TYPE_UINT64, identity->prev_offset_end, "cur-timestamp",
+ G_TYPE_UINT64, timestamp, "cur-duration", G_TYPE_UINT64,
+ GST_BUFFER_DURATION (buf), "cur-offset", G_TYPE_UINT64,
+ GST_BUFFER_OFFSET (buf), "cur-offset-end", G_TYPE_UINT64,
+ GST_BUFFER_OFFSET_END (buf), NULL)));
+
}
offset = GST_BUFFER_OFFSET (buf);
identity->prev_timestamp = timestamp;
identity->prev_duration = GST_BUFFER_DURATION (buf);
identity->prev_offset_end = GST_BUFFER_OFFSET_END (buf);
+ identity->prev_offset = GST_BUFFER_OFFSET (buf);
}
}
identity->prev_timestamp = GST_CLOCK_TIME_NONE;
identity->prev_duration = GST_CLOCK_TIME_NONE;
identity->prev_offset_end = -1;
+ identity->prev_offset = -1;
return TRUE;
}