Task.this

Create a new Task that will repeatedly call the provided func with user_data as a parameter. Typically the task will run in a new thread.

The function cannot be changed after the task has been created. You must create a new gstreamer.Task to change the function.

This function will not yet create and start a thread. Use Task.start or Task.pause to create and start the GThread.

Before the task can be used, a glib.RecMutex must be configured using the Task.setLock function. This lock will always be acquired while func is called.

  1. this(GstTask* gstTask, bool ownedRef)
  2. this(GstTaskFunction func, void* userData, GDestroyNotify notify)

Parameters

func GstTaskFunction

The GstTaskFunction to use

userData void*

User data to pass to func

notify GDestroyNotify

the function to call when user_data is no longer needed.

Return Value

A new gstreamer.Task

MT safe.

Throws

ConstructionException GTK+ fails to create the object.