GstRTSPThreadPool: GStreamer RTSP Server Reference Manual

## GstRTSPThreadPool GstRTSPThreadPool |

## Functions

GstRTSPThread * | gst_rtsp_thread_new ()
GstRTSPThread * | gst_rtsp_thread_ref ()
void | gst_rtsp_thread_unref ()
gboolean | gst_rtsp_thread_reuse ()
void | gst_rtsp_thread_stop ()
GstRTSPThreadPool * | gst_rtsp_thread_pool_new ()
gint | gst_rtsp_thread_pool_get_max_threads ()
void | gst_rtsp_thread_pool_set_max_threads ()
GstRTSPThread * | gst_rtsp_thread_pool_get_thread ()
void | gst_rtsp_thread_pool_cleanup ()

## Properties

gint | max-threads | Read / Write

## Types and Values

enum | GstRTSPThreadType
struct | GstRTSPThread
struct | GstRTSPThreadPool
struct | GstRTSPThreadPoolClass

## Object Hierarchy

        GObject
        ╰── GstRTSPThreadPool

## Description

## Functions

### gst_rtsp_thread_new ()

    GstRTSPThread *
    gst_rtsp_thread_new (GstRTSPThreadType type);

### gst_rtsp_thread_ref ()

    GstRTSPThread *
    gst_rtsp_thread_ref (GstRTSPThread *thread);

### gst_rtsp_thread_unref ()

    void
    gst_rtsp_thread_unref (GstRTSPThread *thread);

### gst_rtsp_thread_reuse ()

    gboolean
    gst_rtsp_thread_reuse (GstRTSPThread *thread);

### gst_rtsp_thread_stop ()

    void
    gst_rtsp_thread_stop (GstRTSPThread *thread);

### gst_rtsp_thread_pool_new ()

    GstRTSPThreadPool *
    gst_rtsp_thread_pool_new (void);

### gst_rtsp_thread_pool_get_max_threads ()

    gint
    gst_rtsp_thread_pool_get_max_threads (GstRTSPThreadPool *pool);

### gst_rtsp_thread_pool_set_max_threads ()

    void
    gst_rtsp_thread_pool_set_max_threads (GstRTSPThreadPool *pool,
                                          gint max_threads);

### gst_rtsp_thread_pool_get_thread ()

    GstRTSPThread *
    gst_rtsp_thread_pool_get_thread (GstRTSPThreadPool *pool,
                                     GstRTSPThreadType type,
                                     GstRTSPContext *ctx);

### gst_rtsp_thread_pool_cleanup ()

    void
    gst_rtsp_thread_pool_cleanup (void);

## Types and Values

### enum GstRTSPThreadType

#### Members

GST_RTSP_THREAD_TYPE_CLIENT |  |
GST_RTSP_THREAD_TYPE_MEDIA |  |

### struct GstRTSPThread

    struct GstRTSPThread {
      GstMiniObject mini_object;

      GstRTSPThreadType type;
      GMainContext *context;
      GMainLoop *loop;
    };

### struct GstRTSPThreadPool

    struct GstRTSPThreadPool;

### struct GstRTSPThreadPoolClass

    struct GstRTSPThreadPoolClass {
      GObjectClass  parent_class;

      GThreadPool *pool;

      GstRTSPThread * (*get_thread)        (GstRTSPThreadPool *pool,
                                            GstRTSPThreadType type,
                                            GstRTSPContext *ctx);
      void            (*configure_thread)  (GstRTSPThreadPool *pool,
                                            GstRTSPThread * thread,
                                            GstRTSPContext *ctx);

      void            (*thread_enter)      (GstRTSPThreadPool *pool,
                                            GstRTSPThread *thread);
      void            (*thread_leave)      (GstRTSPThreadPool *pool,
                                            GstRTSPThread *thread);
    };

## Property Details

### The `“max-threads”` property

      “max-threads”              gint

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

Flags: Read / Write

Allowed values: >= -1

Default value: 1