mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 07:38:16 +00:00
gst/gstevent.c: Add some assert and docs for invalid input to the qos function.
Original commit message from CVS: * gst/gstevent.c: (gst_event_new_qos): Add some assert and docs for invalid input to the qos function.
This commit is contained in:
parent
a866e9d33b
commit
0fff6fa810
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-06-04 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* gst/gstevent.c: (gst_event_new_qos):
|
||||
Add some assert and docs for invalid input to the qos function.
|
||||
|
||||
2008-05-30 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times),
|
||||
|
|
|
@ -757,7 +757,8 @@ gst_event_parse_buffer_size (GstEvent * event, GstFormat * format,
|
|||
* The upstream element can use the @diff and @timestamp values to decide
|
||||
* whether to process more buffers. For possitive @diff, all buffers with
|
||||
* timestamp <= @timestamp + @diff will certainly arrive late in the sink
|
||||
* as well.
|
||||
* as well. A (negative) @diff value so that @timestamp + @diff would yield a
|
||||
* result smaller than 0 is not allowed.
|
||||
*
|
||||
* The application can use general event probes to intercept the QoS
|
||||
* event and implement custom application specific QoS handling.
|
||||
|
@ -768,6 +769,9 @@ GstEvent *
|
|||
gst_event_new_qos (gdouble proportion, GstClockTimeDiff diff,
|
||||
GstClockTime timestamp)
|
||||
{
|
||||
/* diff must be positive or timestamp + diff must be positive */
|
||||
g_return_val_if_fail (diff >= 0 || -diff <= timestamp, NULL);
|
||||
|
||||
GST_CAT_INFO (GST_CAT_EVENT,
|
||||
"creating qos proportion %lf, diff %" G_GINT64_FORMAT
|
||||
", timestamp %" GST_TIME_FORMAT, proportion,
|
||||
|
|
Loading…
Reference in a new issue