mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-13 11:34:10 +00:00
thread-pool: add more docs
This commit is contained in:
parent
0ce4d4d5c7
commit
7064b9fda7
2 changed files with 27 additions and 2 deletions
|
@ -21,6 +21,29 @@
|
|||
* @short_description: A pool of threads
|
||||
* @see_also: #GstRTSPMedia, #GstRTSPClient
|
||||
*
|
||||
* A #GstRTSPThreadPool manages reusable threads for various server tasks.
|
||||
* Currently the defined thread types can be found in #GstRTSPThreadType.
|
||||
*
|
||||
* Threads of type #GST_RTSP_THREAD_TYPE_CLIENT are used to handle requests from
|
||||
* a connected client. With gst_rtsp_thread_pool_get_max_threads() a maximum
|
||||
* number of threads can be set after which the pool will start to reuse the
|
||||
* same thread for multiple clients.
|
||||
*
|
||||
* Threads of type #GST_RTSP_THREAD_TYPE_MEDIA will be used to perform the state
|
||||
* changes of the media pipelines and handle its bus messages.
|
||||
*
|
||||
* gst_rtsp_thread_pool_get_thread() can be used to create a #GstRTSPThread
|
||||
* object of the right type. The thread object contains a mainloop and context
|
||||
* that run in a seperate thread and can be used to attached sources to.
|
||||
*
|
||||
* gst_rtsp_thread_reuse() can be used to reuse a thread for multiple purposes.
|
||||
* If all gst_rtsp_thread_reuse() calls are matched with a
|
||||
* gst_rtsp_thread_stop() call, the mainloop will be quit and the thread will
|
||||
* stop.
|
||||
*
|
||||
* To configure the threads, a subclass of this object should be made and the
|
||||
* virtual methods should be overriden to implement the desired functionality.
|
||||
*
|
||||
* Last reviewed on 2013-07-11 (1.0.0)
|
||||
*/
|
||||
|
||||
|
|
|
@ -132,8 +132,10 @@ struct _GstRTSPThreadPool {
|
|||
/**
|
||||
* GstRTSPThreadPoolClass:
|
||||
* @pool: a #GThreadPool used internally
|
||||
* @get_thread: get or reuse a thread object
|
||||
* @configure_thread: configure a thread object
|
||||
* @get_thread: this function should make or reuse an existing thread that runs
|
||||
* a mainloop.
|
||||
* @configure_thread: configure a thread object. this vmethod is called when
|
||||
* a new thread has been created and should be configured.
|
||||
* @thread_enter: called from the thread when it is entered
|
||||
* @thread_leave: called from the thread when it is left
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue