Looks like rtmps doesn't tunnel by default, so add rtmpts
authorhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Sun, 2 May 2010 15:43:03 +0000 (15:43 +0000)
committerhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Sun, 2 May 2010 15:43:03 +0000 (15:43 +0000)
git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@465 400ebc74-4327-4243-bc38-086b20814532

librtmp/parseurl.c
librtmp/rtmp.c
librtmp/rtmp.h
rtmpdump.1
rtmpdump.c
rtmpgw.8
rtmpgw.c

index f8edeb3..24f04ba 100644 (file)
@@ -66,6 +66,8 @@ bool RTMP_ParseURL(const char *url, int *protocol, AVal *host, unsigned int *por
                *protocol = RTMP_PROTOCOL_RTMFP;
        else if(len == 6 && strncasecmp(url, "rtmpte", 6)==0)
                *protocol = RTMP_PROTOCOL_RTMPTE;
+       else if(len == 6 && strncasecmp(url, "rtmpts", 6)==0)
+               *protocol = RTMP_PROTOCOL_RTMPTS;
        else {
                RTMP_Log(RTMP_LOGWARNING, "Unknown protocol!\n");
                goto parsehost;
index 2958754..76b36f1 100644 (file)
@@ -54,8 +54,8 @@ const char RTMPProtocolStrings[][7] = {
   "RTMPT",
   "RTMPE",
   "RTMPTE",
-  "",
   "RTMPS",
+  "RTMPTS",
   "",
   "",
   "RTMFP"
@@ -66,8 +66,8 @@ const char RTMPProtocolStringsLower[][7] = {
   "rtmpt",
   "rtmpe",
   "rtmpte",
-  "",
   "rtmps",
+  "rtmpts",
   "",
   "",
   "rtmfp"
index 5ec8916..38ebea3 100644 (file)
@@ -52,8 +52,9 @@ extern "C"
 #define RTMP_PROTOCOL_RTMP      0
 #define RTMP_PROTOCOL_RTMPE     RTMP_FEATURE_ENC
 #define RTMP_PROTOCOL_RTMPT     RTMP_FEATURE_HTTP
-#define RTMP_PROTOCOL_RTMPS     (RTMP_FEATURE_HTTP|RTMP_FEATURE_SSL)
+#define RTMP_PROTOCOL_RTMPS     RTMP_FEATURE_SSL
 #define RTMP_PROTOCOL_RTMPTE    (RTMP_FEATURE_HTTP|RTMP_FEATURE_ENC)
+#define RTMP_PROTOCOL_RTMPTS    (RTMP_FEATURE_HTTP|RTMP_FEATURE_SSL)
 #define RTMP_PROTOCOL_RTMFP     RTMP_FEATURE_MFP
 
 #define RTMP_DEFAULT_CHUNKSIZE 128
index a49f679..20b5182 100644 (file)
@@ -104,7 +104,8 @@ Overrides the protocol in the RTMP URL.
   1 = rtmpt
   2 = rtmpe
   3 = rtmpte
-  5 = rtmps
+  4 = rtmps
+  5 = rtmpts
 .fi
 .TP
 \fB\-\-socks           \-S\fP\ \fIhost:port\fP
index 5e9972d..5b0dd48 100644 (file)
@@ -939,7 +939,7 @@ main(int argc, char **argv)
          break;
        case 'l':
          protocol = atoi(optarg);
-         if (protocol < RTMP_PROTOCOL_RTMP || protocol > RTMP_PROTOCOL_RTMPS)
+         if (protocol < RTMP_PROTOCOL_RTMP || protocol > RTMP_PROTOCOL_RTMPTS)
            {
              RTMP_Log(RTMP_LOGERROR, "Unknown protocol specified: %d", protocol);
              return RD_FAILED;
index 580bf8c..dbb036e 100644 (file)
--- a/rtmpgw.8
+++ b/rtmpgw.8
@@ -100,7 +100,8 @@ Overrides the protocol in the RTMP URL.
   1 = rtmpt
   2 = rtmpe
   3 = rtmpte
-  5 = rtmps
+  4 = rtmps
+  5 = rtmpts
 .fi
 .TP
 \fB\-\-socks           \-S\fP\ \fIhost:port\fP
index a26224b..c5af5d3 100644 (file)
--- a/rtmpgw.c
+++ b/rtmpgw.c
@@ -858,7 +858,7 @@ ParseOption(char opt, char *arg, RTMP_REQUEST * req)
     case 'l':
       {
        int protocol = atoi(arg);
-       if (protocol != RTMP_PROTOCOL_RTMP && protocol != RTMP_PROTOCOL_RTMPE)
+       if (protocol < RTMP_PROTOCOL_RTMP || protocol > RTMP_PROTOCOL_RTMPTS)
          {
            RTMP_Log(RTMP_LOGERROR, "Unknown protocol specified: %d, using default",
                protocol);