GstRtspServer.RTSPThreadPool

g GObject.Object GObject.Object GstRtspServer.RTSPThreadPool GstRtspServer.RTSPThreadPool GObject.Object->GstRtspServer.RTSPThreadPool

Subclasses:None

Methods

Inherited:GObject.Object (37)
Structs:GObject.ObjectClass (5)
class cleanup ()
class new ()
  get_max_threads ()
  get_thread (type, ctx)
  set_max_threads (max_threads)

Virtual Methods

Inherited:GObject.Object (7)
  do_configure_thread (thread, ctx)
  do_get_thread (type, ctx)
  do_thread_enter (thread)
  do_thread_leave (thread)

Properties

Name Type Flags Short Description
max-threads int r/w The maximum amount of threads to use for client connections (0 = only mainloop, -1 = unlimited)

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent GObject.Object r  

Class Details

class GstRtspServer.RTSPThreadPool(**kwargs)
Bases:GObject.Object
Abstract:No
Structure:GstRtspServer.RTSPThreadPoolClass

The thread pool structure.

classmethod cleanup()[source]

Wait for all tasks to be stopped and free all allocated resources. This is mainly used in test suites to ensure proper cleanup of internal GstRtsp.data structures.

classmethod new()[source]
Returns:a new GstRtspServer.RTSPThreadPool
Return type:GstRtspServer.RTSPThreadPool

Create a new GstRtspServer.RTSPThreadPool instance.

get_max_threads()[source]
Returns:the maximum number of threads.
Return type:int

Get the maximum number of threads used for client connections. See GstRtspServer.RTSPThreadPool.set_max_threads().

get_thread(type, ctx)[source]
Parameters:
Returns:

a new GstRtspServer.RTSPThread, GstRtspServer.RTSPThread.stop() after usage

Return type:

GstRtspServer.RTSPThread or None

Get a new GstRtspServer.RTSPThread for type and ctx.

set_max_threads(max_threads)[source]
Parameters:max_threads (int) – maximum threads

Set the maximum threads used by the pool to handle client requests. A value of 0 will use the pool mainloop, a value of -1 will use an unlimited number of threads.

do_configure_thread(thread, ctx) virtual
Parameters:
do_get_thread(type, ctx) virtual
Parameters:
Returns:

a new GstRtspServer.RTSPThread, GstRtspServer.RTSPThread.stop() after usage

Return type:

GstRtspServer.RTSPThread or None

Get a new GstRtspServer.RTSPThread for type and ctx.

do_thread_enter(thread) virtual
Parameters:thread (GstRtspServer.RTSPThread) –
do_thread_leave(thread) virtual
Parameters:thread (GstRtspServer.RTSPThread) –

Property Details

GstRtspServer.RTSPThreadPool.props.max_threads
Name:max-threads
Type:int
Default Value:1
Flags:READABLE, WRITABLE

The maximum amount of threads to use for client connections (0 = only mainloop, -1 = unlimited)