diff rdt.c @ 3903:aeb79f68ba7e libavformat

Implement a RDT-specific SET_PARAMETER command that subscribes to the first stream in a RTSP/RDT session. See discussion in "Realmedia patch" thread on ML.
author rbultje
date Sun, 07 Sep 2008 01:22:18 +0000
parents 5f9bec099c69
children 91987686113d
line wrap: on
line diff
--- a/rdt.c	Sun Sep 07 01:21:24 2008 +0000
+++ b/rdt.c	Sun Sep 07 01:22:18 2008 +0000
@@ -134,6 +134,18 @@
     return 0;
 }
 
+void
+ff_rdt_subscribe_rule (RTPDemuxContext *s, char *cmd, int size,
+                       int stream_nr, int rule_nr)
+{
+    rdt_data *rdt = s->dynamic_protocol_context;
+
+    av_strlcatf(cmd, size, "stream=%d;rule=%d,stream=%d;rule=%d",
+                stream_nr, rule_nr, stream_nr, rule_nr + 1);
+
+    rdt_load_mdpr(rdt, s->st, 0);
+}
+
 static unsigned char *
 rdt_parse_b64buf (unsigned int *target_len, const char *p)
 {
@@ -157,7 +169,6 @@
 
     if (av_strstart(p, "OpaqueData:buffer;", &p)) {
         rdt->mlti_data = rdt_parse_b64buf(&rdt->mlti_data_size, p);
-        rdt_load_mdpr(rdt, stream, 0);
     } else if (av_strstart(p, "StartTime:integer;", &p))
         stream->first_dts = atoi(p);