Gst.Bus.prototype.timed_pop_filtered

function timed_pop_filtered(timeout:Gst.ClockTime, types:Gst.MessageType):Gst.Message {
    // Gjs wrapper for gst_bus_timed_pop_filtered()
}

Get a message from the bus whose type matches the message type mask types, waiting up to the specified timeout (and discarding any messages that do not match the mask provided).

If timeout is 0, this function behaves like Gst.Bus.prototype.pop_filtered. If timeout is #GST_CLOCK_TIME_NONE, this function will block forever until a matching message was posted on the bus.

timeout

a timeout in nanoseconds, or GST_CLOCK_TIME_NONE to wait forever

types

message types to take into account, GST_MESSAGE_ANY for any type

Returns

a Gst.Message matching the filter in types, or NULL if no matching message was found on the bus until the timeout expired. The message is taken from the bus and needs to be unreffed with gst_message_unref() after usage. MT safe.