summaryrefslogtreecommitdiff
path: root/gst/realmedia
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-03-25 16:39:06 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2009-03-25 16:39:06 +0100
commit1731c58b9b7d021683bfc18a8dfbcc10b152e5e7 (patch)
tree8c46511fea3d955837d39560facda97661a1af93 /gst/realmedia
parent73eb3377d3d0ac7c369e74668d939e7dfe8cae9c (diff)
realrtsp: add more headers
Parse the ETag from the describe method and pass the sessionid as the value for the If-Match header is subsequent setup calls. Fixes support for more RealMedia RTSP streams.
Diffstat (limited to 'gst/realmedia')
-rw-r--r--gst/realmedia/rtspreal.c16
-rw-r--r--gst/realmedia/rtspreal.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/gst/realmedia/rtspreal.c b/gst/realmedia/rtspreal.c
index 9de00a90..9b5228fe 100644
--- a/gst/realmedia/rtspreal.c
+++ b/gst/realmedia/rtspreal.c
@@ -127,6 +127,8 @@ rtsp_ext_real_before_send (GstRTSPExtension * ext, GstRTSPMessage * request)
"Linux_2.4_6.0.9.1235_play32_RN01_EN_586");
gst_rtsp_message_add_header (request, GST_RTSP_HDR_MAX_ASM_WIDTH, "1");
gst_rtsp_message_add_header (request, GST_RTSP_HDR_LANGUAGE, "en-US");
+ gst_rtsp_message_add_header (request, GST_RTSP_HDR_REQUIRE,
+ "com.real.retain-entity-for-setup");
break;
}
case GST_RTSP_SETUP:
@@ -136,6 +138,7 @@ rtsp_ext_real_before_send (GstRTSPExtension * ext, GstRTSPMessage * request)
g_strdup_printf ("%s, sd=%s", ctx->challenge2, ctx->checksum);
gst_rtsp_message_add_header (request, GST_RTSP_HDR_REAL_CHALLENGE2,
value);
+ gst_rtsp_message_add_header (request, GST_RTSP_HDR_IF_MATCH, ctx->etag);
g_free (value);
}
break;
@@ -169,6 +172,19 @@ rtsp_ext_real_after_send (GstRTSPExtension * ext, GstRTSPMessage * req,
ctx->checksum, challenge1);
break;
}
+ case GST_RTSP_DESCRIBE:
+ {
+ gchar *etag = NULL;
+ guint len;
+
+ gst_rtsp_message_get_header (resp, GST_RTSP_HDR_ETAG, &etag, 0);
+ if (etag) {
+ len = sizeof (ctx->etag);
+ strncpy (ctx->etag, etag, len);
+ ctx->etag[len - 1] = '\0';
+ }
+ break;
+ }
default:
break;
}
diff --git a/gst/realmedia/rtspreal.h b/gst/realmedia/rtspreal.h
index 9f7dc423..6605f143 100644
--- a/gst/realmedia/rtspreal.h
+++ b/gst/realmedia/rtspreal.h
@@ -64,6 +64,7 @@ struct _GstRTSPReal {
gchar checksum[34];
gchar challenge2[64];
+ gchar etag[64];
gboolean isreal;
guint n_streams;