mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
plugins/elements/gstidentity.c: Rename non-perfect to imperfect for Mike and for the sanctity of the language.
Original commit message from CVS: 2007-03-07 Zaheer Abbas Merali <zaheerabbas at merali dot org> * plugins/elements/gstidentity.c: (gst_identity_check_perfect): Rename non-perfect to imperfect for Mike and for the sanctity of the language. Also make sure bus message gets emitted for data-incontiguities.
This commit is contained in:
parent
ae43843436
commit
ca0e536e17
2 changed files with 25 additions and 8 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2007-03-07 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||||
|
|
||||||
|
* plugins/elements/gstidentity.c: (gst_identity_check_perfect):
|
||||||
|
Rename non-perfect to imperfect for Mike and for the sanctity of the
|
||||||
|
language.
|
||||||
|
Also make sure bus message gets emitted for data-incontiguities.
|
||||||
|
|
||||||
2007-03-07 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
2007-03-07 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||||
|
|
||||||
* plugins/elements/gstidentity.c: (gst_identity_check_perfect),
|
* plugins/elements/gstidentity.c: (gst_identity_check_perfect),
|
||||||
|
|
|
@ -335,7 +335,7 @@ gst_identity_check_perfect (GstIdentity * identity, GstBuffer * buf)
|
||||||
GST_TIME_ARGS (t_expected), (dt < 0) ? '-' : '+',
|
GST_TIME_ARGS (t_expected), (dt < 0) ? '-' : '+',
|
||||||
GST_TIME_ARGS ((dt < 0) ? (GstClockTime) (-dt) : dt));
|
GST_TIME_ARGS ((dt < 0) ? (GstClockTime) (-dt) : dt));
|
||||||
/*
|
/*
|
||||||
* "non-perfect" bus message:
|
* "imperfect" bus message:
|
||||||
* @identity: the identity instance
|
* @identity: the identity instance
|
||||||
* @prev-timestamp: the previous buffer timestamp
|
* @prev-timestamp: the previous buffer timestamp
|
||||||
* @prev-duration: the previous buffer duration
|
* @prev-duration: the previous buffer duration
|
||||||
|
@ -352,16 +352,15 @@ gst_identity_check_perfect (GstIdentity * identity, GstBuffer * buf)
|
||||||
*/
|
*/
|
||||||
gst_element_post_message (GST_ELEMENT (identity),
|
gst_element_post_message (GST_ELEMENT (identity),
|
||||||
gst_message_new_element (GST_OBJECT (identity),
|
gst_message_new_element (GST_OBJECT (identity),
|
||||||
gst_structure_new ("non-perfect", "prev-timestamp",
|
gst_structure_new ("imperfect", "prev-timestamp", G_TYPE_UINT64,
|
||||||
G_TYPE_UINT64, identity->prev_timestamp, "prev-duration",
|
identity->prev_timestamp, "prev-duration", G_TYPE_UINT64,
|
||||||
G_TYPE_UINT64, identity->prev_duration, "prev-offset",
|
identity->prev_duration, "prev-offset", G_TYPE_UINT64,
|
||||||
G_TYPE_UINT64, identity->prev_offset, "prev-offset-end",
|
identity->prev_offset, "prev-offset-end", G_TYPE_UINT64,
|
||||||
G_TYPE_UINT64, identity->prev_offset_end, "cur-timestamp",
|
identity->prev_offset_end, "cur-timestamp", G_TYPE_UINT64,
|
||||||
G_TYPE_UINT64, timestamp, "cur-duration", G_TYPE_UINT64,
|
timestamp, "cur-duration", G_TYPE_UINT64,
|
||||||
GST_BUFFER_DURATION (buf), "cur-offset", 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 (buf), "cur-offset-end", G_TYPE_UINT64,
|
||||||
GST_BUFFER_OFFSET_END (buf), NULL)));
|
GST_BUFFER_OFFSET_END (buf), NULL)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
offset = GST_BUFFER_OFFSET (buf);
|
offset = GST_BUFFER_OFFSET (buf);
|
||||||
|
@ -370,6 +369,17 @@ gst_identity_check_perfect (GstIdentity * identity, GstBuffer * buf)
|
||||||
"Buffer not data-contiguous with previous one: "
|
"Buffer not data-contiguous with previous one: "
|
||||||
"prev offset_end %" G_GINT64_FORMAT ", new offset %"
|
"prev offset_end %" G_GINT64_FORMAT ", new offset %"
|
||||||
G_GINT64_FORMAT, identity->prev_offset_end, offset);
|
G_GINT64_FORMAT, identity->prev_offset_end, offset);
|
||||||
|
gst_element_post_message (GST_ELEMENT (identity),
|
||||||
|
gst_message_new_element (GST_OBJECT (identity),
|
||||||
|
gst_structure_new ("imperfect", "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)));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG_OBJECT (identity, "can't check time-contiguity, no timestamp "
|
GST_DEBUG_OBJECT (identity, "can't check time-contiguity, no timestamp "
|
||||||
|
|
Loading…
Reference in a new issue