summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2015-11-17 01:12:28 +1100
committerJan Schmidt <jan@centricular.com>2015-11-17 01:12:28 +1100
commit9e92a0307c92e57732a4790669d927563c8e622e (patch)
tree4a647d5c85ec1edadcb0fb68698976d1179d3b3f
parentb90d4ba917dc3a1ad4a080b229a55931bc8e828d (diff)
rtsp-client: Report RECORD and ANNOUNCE as supported in the OPTIONS
-rw-r--r--gst/rtsp-server/rtsp-client.c1
-rw-r--r--tests/check/gst/client.c13
2 files changed, 8 insertions, 6 deletions
diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c
index 55f6259..65b0433 100644
--- a/gst/rtsp-server/rtsp-client.c
+++ b/gst/rtsp-server/rtsp-client.c
@@ -2557,6 +2557,7 @@ handle_options_request (GstRTSPClient * client, GstRTSPContext * ctx)
GST_RTSP_OPTIONS |
GST_RTSP_PAUSE |
GST_RTSP_PLAY |
+ GST_RTSP_RECORD | GST_RTSP_ANNOUNCE |
GST_RTSP_SETUP |
GST_RTSP_GET_PARAMETER | GST_RTSP_SET_PARAMETER | GST_RTSP_TEARDOWN;
diff --git a/tests/check/gst/client.c b/tests/check/gst/client.c
index 57d80e4..3f172d1 100644
--- a/tests/check/gst/client.c
+++ b/tests/check/gst/client.c
@@ -21,7 +21,7 @@
#include <rtsp-client.h>
-static gchar * session_id;
+static gchar *session_id;
static gint cseq;
static guint expected_session_timeout = 60;
static const gchar *expected_unsupported_header;
@@ -128,7 +128,7 @@ test_response_551 (GstRTSPClient * client, GstRTSPMessage * response,
fail_unless (code == GST_RTSP_STS_OPTION_NOT_SUPPORTED);
fail_unless (g_str_equal (reason, "Option not supported"));
fail_unless (gst_rtsp_message_get_header (response, GST_RTSP_HDR_UNSUPPORTED,
- &options, 0) == GST_RTSP_OK);
+ &options, 0) == GST_RTSP_OK);
fail_unless (!g_strcmp0 (expected_unsupported_header, options));
fail_unless (version == GST_RTSP_VERSION_1_0);
@@ -177,7 +177,7 @@ teardown_client (GstRTSPClient * client)
g_object_unref (client);
}
-static gchar*
+static gchar *
check_requirements_cb (GstRTSPClient * client, GstRTSPContext * ctx,
gchar ** req, gpointer user_data)
{
@@ -193,7 +193,7 @@ check_requirements_cb (GstRTSPClient * client, GstRTSPContext * ctx,
index++;
}
- return g_string_free (result, FALSE);
+ return g_string_free (result, FALSE);
}
GST_START_TEST (test_require)
@@ -393,9 +393,11 @@ test_option_response_200 (GstRTSPClient * client, GstRTSPMessage * response,
methods = gst_rtsp_options_from_text (str);
fail_if (methods == 0);
fail_unless (methods == (GST_RTSP_DESCRIBE |
+ GST_RTSP_ANNOUNCE |
GST_RTSP_OPTIONS |
GST_RTSP_PAUSE |
GST_RTSP_PLAY |
+ GST_RTSP_RECORD |
GST_RTSP_SETUP |
GST_RTSP_GET_PARAMETER | GST_RTSP_SET_PARAMETER | GST_RTSP_TEARDOWN));
@@ -572,8 +574,7 @@ send_teardown (GstRTSPClient * client)
"rtsp://localhost/test") == GST_RTSP_OK);
str = g_strdup_printf ("%d", cseq);
gst_rtsp_message_take_header (&request, GST_RTSP_HDR_CSEQ, str);
- gst_rtsp_message_add_header (&request, GST_RTSP_HDR_SESSION,
- session_id);
+ gst_rtsp_message_add_header (&request, GST_RTSP_HDR_SESSION, session_id);
gst_rtsp_client_set_send_func (client, test_teardown_response_200,
NULL, NULL);
fail_unless (gst_rtsp_client_handle_message (client,