[SCM] libav/experimental: RTSP "OPTIONS" command patch by (Andriy Rysin <arysin at bcsii dot net>)

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:35:49 UTC 2013


The following commit has been merged in the experimental branch:
commit 0df65975baf9090b4d9e6eced343c50e5ccd1689
Author: Andriy Rysin <arysin at bcsii.net>
Date:   Fri Apr 4 13:29:58 2003 +0000

    RTSP "OPTIONS" command patch by (Andriy Rysin <arysin at bcsii dot net>)
    
    Originally committed as revision 1728 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/ffserver.c b/ffserver.c
index 173ae84..e55169e 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -245,6 +245,7 @@ static int compute_send_delay(HTTPContext *c);
 /* RTSP handling */
 static int rtsp_parse_request(HTTPContext *c);
 static void rtsp_cmd_describe(HTTPContext *c, const char *url);
+static void rtsp_cmd_options(HTTPContext *c, const char *url);
 static void rtsp_cmd_setup(HTTPContext *c, const char *url, RTSPHeader *h);
 static void rtsp_cmd_play(HTTPContext *c, const char *url, RTSPHeader *h);
 static void rtsp_cmd_pause(HTTPContext *c, const char *url, RTSPHeader *h);
@@ -2613,6 +2614,8 @@ static int rtsp_parse_request(HTTPContext *c)
 
     if (!strcmp(cmd, "DESCRIBE")) {
         rtsp_cmd_describe(c, url);
+    } else if (!strcmp(cmd, "OPTIONS")) {
+        rtsp_cmd_options(c, url);
     } else if (!strcmp(cmd, "SETUP")) {
         rtsp_cmd_setup(c, url, header);
     } else if (!strcmp(cmd, "PLAY")) {
@@ -2724,6 +2727,15 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
     return -1;
 }
 
+static void rtsp_cmd_options(HTTPContext *c, const char *url)
+{
+//    rtsp_reply_header(c, RTSP_STATUS_OK);
+    url_fprintf(c->pb, "RTSP/1.0 %d %s\r\n", RTSP_STATUS_OK, "OK");
+    url_fprintf(c->pb, "CSeq: %d\r\n", c->seq);
+    url_fprintf(c->pb, "Public: %s\r\n", "OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE");
+    url_fprintf(c->pb, "\r\n");
+}
+
 static void rtsp_cmd_describe(HTTPContext *c, const char *url)
 {
     FFStream *stream;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list