call_async


Description:

[ Version ( since = "1.10" ) ]
public void call_async (owned ElementCallAsyncFunc func)

Calls func from another thread and passes user_data to it.

This is to be used for cases when a state change has to be performed from a streaming thread, directly via set_state or indirectly e.g. via SEEK events.

Calling those functions directly from the streaming thread will cause deadlocks in many situations, as they might involve waiting for the streaming thread to shut down from this very streaming thread.

MT safe.

Parameters:

this

a Element

func

Function to call asynchronously from another thread

destroy_notify

GDestroyNotify for user_data

user_data

Data to pass to func