gstreamermm
0.10.10.2
|
A class representing a pool of GStreamer streaming threads. More...
Public Types | |
typedef sigc::slot< void > | SlotPush |
For example, void on_do_push();. | |
Public Member Functions | |
virtual | ~TaskPool () |
GstTaskPool* | gobj () |
Provides access to the underlying C GObject. | |
const GstTaskPool* | gobj () const |
Provides access to the underlying C GObject. | |
GstTaskPool* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
void | prepare () |
gpointer | push (const SlotPush& slot) |
Start the execution of a new thread from pool. | |
void | join (gpointer id) |
Join a task and/or return it to the pool. | |
void | cleanup () |
Wait for all tasks to be stopped. | |
virtual void | prepare_vfunc () |
Virtual function which prepares the thread pool. | |
virtual void | cleanup_vfunc () |
Virtual function to cleanup the thread pool. | |
virtual gpointer | push_vfunc (const SlotPush& slot) |
Virtual function which starts a new thread. | |
virtual void | join_vfunc (gpointer id) |
Virtual function to join a thread. | |
Static Public Member Functions | |
static Glib::RefPtr< TaskPool > | create () |
Create a new default task pool. | |
Protected Member Functions | |
TaskPool () | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gst::TaskPool > | wrap (GstTaskPool* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
A class representing a pool of GStreamer streaming threads.
This object provides an abstraction for creating threads. The default implementation uses a regular Glib::ThreadPool to start tasks.
Subclasses can be made to create custom threads.
Last reviewed on 2009-04-23 (0.10.24)
typedef sigc::slot<void> Gst::TaskPool::SlotPush |
For example, void on_do_push();.
virtual Gst::TaskPool::~TaskPool | ( | ) | [virtual] |
Gst::TaskPool::TaskPool | ( | ) | [protected] |
void Gst::TaskPool::cleanup | ( | ) |
Wait for all tasks to be stopped.
This is mainly used internally to ensure proper cleanup of internal data structures in test suites.
MT safe.
virtual void Gst::TaskPool::cleanup_vfunc | ( | ) | [virtual] |
Virtual function to cleanup the thread pool.
static Glib::RefPtr<TaskPool> Gst::TaskPool::create | ( | ) | [static] |
Create a new default task pool.
The default task pool will use a regular Glib::ThreadPool for threads.
GstTaskPool* Gst::TaskPool::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
Reimplemented from Gst::Object.
const GstTaskPool* Gst::TaskPool::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
Reimplemented from Gst::Object.
GstTaskPool* Gst::TaskPool::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Reimplemented from Gst::Object.
void Gst::TaskPool::join | ( | gpointer | id | ) |
virtual void Gst::TaskPool::join_vfunc | ( | gpointer | id | ) | [virtual] |
Virtual function to join a thread.
void Gst::TaskPool::prepare | ( | ) |
Glib::Error. |
virtual void Gst::TaskPool::prepare_vfunc | ( | ) | [virtual] |
Virtual function which prepares the thread pool.
Glib::Error. |
gpointer Gst::TaskPool::push | ( | const SlotPush& | slot | ) |
Start the execution of a new thread from pool.
slot | The function to call. |
Glib::Error. |
virtual gpointer Gst::TaskPool::push_vfunc | ( | const SlotPush& | slot | ) | [virtual] |
Virtual function which starts a new thread.
Glib::Error. |
Glib::RefPtr< Gst::TaskPool > wrap | ( | GstTaskPool * | object, |
bool | take_copy = false |
||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |