gstreamer/gst/rtsp-server
David Svensson Fors 12169f1e84 Limit queued TCP data messages to one per stream
Before, the watch backlog size in GstRTSPClient was changed
dynamically between unlimited and a fixed size, trying to avoid both
unlimited memory usage and deadlocks while waiting for place in the
queue. (Some of the deadlocks were described in a long comment in
handle_request().)

In the previous commit, we changed to a fixed backlog size of 100.
This is possible, because we now handle RTP/RTCP data messages differently
from RTSP request/response messages.

The data messages are messages tunneled over TCP. We allow at most one
queued data message per stream in GstRTSPClient at a time, and
successfully sent data messages are acked by sending a "message-sent"
callback from the GstStreamTransport. Until that ack comes, the
GstRTSPStream does not call pull_sample() on its appsink, and
therefore the streaming thread in the pipeline will not be blocked
inside GstRTSPClient, waiting for a place in the queue.

pull_sample() is called when we have both an ack and a "new-sample"
signal from the appsink. Then, we know there is a buffer to write.

RTSP request/response messages are not acked in the same way as data
messages. The rest of the 100 places in the queue are used for
them. If the queue becomes full of request/response messages, we
return an error and close the connection to the client.

Change-Id: I275310bc90a219ceb2473c098261acc78be84c97
2018-07-23 17:45:00 +03:00
..
.gitignore .gitignore: 0.10 => 0.11 2011-06-07 10:59:03 +02:00
Makefile.am Makefile: Don't hardcode libtool for g-i build 2018-05-18 14:54:46 +02:00
meson.build rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-address-pool.c Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 12:48:11 +02:00
rtsp-address-pool.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-auth.c Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 12:48:11 +02:00
rtsp-auth.h rtsp-auth: Add support for parsing .htdigest files 2018-06-21 15:47:39 +02:00
rtsp-client.c Limit queued TCP data messages to one per stream 2018-07-23 17:45:00 +03:00
rtsp-client.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-context.c gst_rtsp_context_get_current: add (skip) annotation 2018-02-06 18:06:14 +01:00
rtsp-context.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-media-factory-uri.c Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 12:48:11 +02:00
rtsp-media-factory-uri.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-media-factory.c media-factory: unref old clock when setting new clock 2018-07-12 19:02:40 +01:00
rtsp-media-factory.h rtsp-server: add API to enable retransmission requests 2018-03-30 17:55:32 +02:00
rtsp-media.c rtsp-media: unref clock (if set) when finalizing 2018-07-16 23:56:09 +01:00
rtsp-media.h rtsp-server: add API to enable retransmission requests 2018-03-30 17:55:32 +02:00
rtsp-mount-points.c Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 12:48:11 +02:00
rtsp-mount-points.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-onvif-client.c rtsp: Add support for ONVIF backchannel 2018-02-16 11:04:53 +02:00
rtsp-onvif-client.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-onvif-media-factory.c rtsp-onvif-media-factory: Document that backchannel pipelines must end with async=false sinks 2018-03-07 12:20:05 +02:00
rtsp-onvif-media-factory.h rtsp-onvif-media-factory: export gst_rtsp_onvif_media_factory_requires_backchannel 2018-05-18 08:57:28 +01:00
rtsp-onvif-media.c rtsp-onvif-media: fix g-ir-scanner warnings 2018-07-12 19:02:40 +01:00
rtsp-onvif-media.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-onvif-server.c rtsp: Add support for ONVIF backchannel 2018-02-16 11:04:53 +02:00
rtsp-onvif-server.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-params.c gobject-introspection: Add annotations to support language bindings 2014-03-24 00:36:42 +00:00
rtsp-params.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-permissions.c permissions: add Since tags and example for new API 2018-03-02 16:24:23 +01:00
rtsp-permissions.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-sdp.c Fix indentation 2018-06-24 12:45:49 +02:00
rtsp-sdp.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-server-prelude.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-server.c Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 12:48:11 +02:00
rtsp-server.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-session-media.c Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 12:48:11 +02:00
rtsp-session-media.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-session-pool.c Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 12:48:11 +02:00
rtsp-session-pool.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-session.c Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 12:48:11 +02:00
rtsp-session.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-stream-transport.c Limit queued TCP data messages to one per stream 2018-07-23 17:45:00 +03:00
rtsp-stream-transport.h Limit queued TCP data messages to one per stream 2018-07-23 17:45:00 +03:00
rtsp-stream.c Limit queued TCP data messages to one per stream 2018-07-23 17:45:00 +03:00
rtsp-stream.h Implement support for ULP Forward Error Correction 2018-04-19 18:25:31 +02:00
rtsp-thread-pool.c Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 12:48:11 +02:00
rtsp-thread-pool.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00
rtsp-token.c rtsp-token: annotate constructors for bindings 2018-01-18 22:37:57 +00:00
rtsp-token.h rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API 2018-03-13 13:37:13 +00:00