mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
bus: Change the timeout argument type of gst_bus_poll() from GstClockTimeDiff to GstClockTime
This is more consistent with the other GstBus methods that have a timeout.
This commit is contained in:
parent
e08956907c
commit
9c4c9e3b6b
2 changed files with 4 additions and 4 deletions
|
@ -991,7 +991,7 @@ poll_destroy_timeout (GstBusPollData * poll_data)
|
||||||
* @bus: a #GstBus
|
* @bus: a #GstBus
|
||||||
* @events: a mask of #GstMessageType, representing the set of message types to
|
* @events: a mask of #GstMessageType, representing the set of message types to
|
||||||
* poll for.
|
* poll for.
|
||||||
* @timeout: the poll timeout, as a #GstClockTimeDiff, or -1 to poll
|
* @timeout: the poll timeout, as a #GstClockTime, or #GST_CLOCK_TIME_NONE to poll
|
||||||
* indefinitely.
|
* indefinitely.
|
||||||
*
|
*
|
||||||
* Poll the bus for messages. Will block while waiting for messages to come.
|
* Poll the bus for messages. Will block while waiting for messages to come.
|
||||||
|
@ -1031,7 +1031,7 @@ poll_destroy_timeout (GstBusPollData * poll_data)
|
||||||
* unreffed with gst_message_unref() after usage.
|
* unreffed with gst_message_unref() after usage.
|
||||||
*/
|
*/
|
||||||
GstMessage *
|
GstMessage *
|
||||||
gst_bus_poll (GstBus * bus, GstMessageType events, GstClockTimeDiff timeout)
|
gst_bus_poll (GstBus * bus, GstMessageType events, GstClockTime timeout)
|
||||||
{
|
{
|
||||||
GstBusPollData *poll_data;
|
GstBusPollData *poll_data;
|
||||||
GstMessage *ret;
|
GstMessage *ret;
|
||||||
|
@ -1043,7 +1043,7 @@ gst_bus_poll (GstBus * bus, GstMessageType events, GstClockTimeDiff timeout)
|
||||||
poll_data->events = events;
|
poll_data->events = events;
|
||||||
poll_data->message = NULL;
|
poll_data->message = NULL;
|
||||||
|
|
||||||
if (timeout >= 0)
|
if (timeout != GST_CLOCK_TIME_NONE)
|
||||||
poll_data->timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE,
|
poll_data->timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE,
|
||||||
timeout / GST_MSECOND, (GSourceFunc) poll_timeout, poll_data,
|
timeout / GST_MSECOND, (GSourceFunc) poll_timeout, poll_data,
|
||||||
(GDestroyNotify) poll_destroy_timeout);
|
(GDestroyNotify) poll_destroy_timeout);
|
||||||
|
|
|
@ -162,7 +162,7 @@ guint gst_bus_add_watch (GstBus * bus,
|
||||||
|
|
||||||
/* polling the bus */
|
/* polling the bus */
|
||||||
GstMessage* gst_bus_poll (GstBus *bus, GstMessageType events,
|
GstMessage* gst_bus_poll (GstBus *bus, GstMessageType events,
|
||||||
GstClockTimeDiff timeout);
|
GstClockTime timeout);
|
||||||
|
|
||||||
/* signal based dispatching helper functions. */
|
/* signal based dispatching helper functions. */
|
||||||
gboolean gst_bus_async_signal_func (GstBus *bus, GstMessage *message,
|
gboolean gst_bus_async_signal_func (GstBus *bus, GstMessage *message,
|
||||||
|
|
Loading…
Reference in a new issue