rtspsrc: Prefer an empty SET_PARAMETER call for keep-alive

In RTSP 2.0, they started recommending that clients use an
empty SET_PARAMETER request as the preferred keep-alive mechanism
as all cameras must support that method. It also works
for RTSP 1.0, so use it as the preferred method unconditionally.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9577>
This commit is contained in:
Jan Schmidt 2025-08-27 21:56:41 +10:00 committed by GStreamer Marge Bot
parent 492a420fa9
commit c086c83ac4

View File

@ -6028,7 +6028,9 @@ gst_rtspsrc_send_keep_alive (GstRTSPSrc * src)
GST_DEBUG_OBJECT (src, "creating server keep-alive");
/* find a method to use for keep-alive */
if (src->methods & GST_RTSP_GET_PARAMETER)
if (src->methods & GST_RTSP_SET_PARAMETER)
method = GST_RTSP_SET_PARAMETER;
else if (src->methods & GST_RTSP_GET_PARAMETER)
method = GST_RTSP_GET_PARAMETER;
else
method = GST_RTSP_OPTIONS;