diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2008-08-31 17:23:01 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2008-08-31 17:23:01 +0000 |
commit | 75128a2273821076cef78e7674df72ac8e66bc2c (patch) | |
tree | 982aa03ccf583ff91004a6785112b77c0b827f3d /libavformat | |
parent | 03f7e56896330f135c2a7f4b3e14dd66b09d9fad (diff) | |
download | ffmpeg-75128a2273821076cef78e7674df72ac8e66bc2c.tar.gz |
Revert back to old version (r15103).
Originally committed as revision 15122 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rtsp.c | 47 | ||||
-rw-r--r-- | libavformat/rtsp.h | 7 |
2 files changed, 3 insertions, 51 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index e5b0186df4..88d15c3f4e 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -42,12 +42,6 @@ enum RTSPClientState { RTSP_STATE_PAUSED, }; -enum RTSPServerType { - RTSP_SERVER_RTP, /*< Standard-compliant RTP-server */ - RTSP_SERVER_RDT, /*< Realmedia-style server */ - RTSP_SERVER_LAST -}; - typedef struct RTSPState { URLContext *rtsp_hd; /* RTSP TCP connexion handle */ int nb_rtsp_streams; @@ -61,7 +55,6 @@ typedef struct RTSPState { int seq; /* RTSP command sequence number */ char session_id[512]; enum RTSPProtocol protocol; - enum RTSPServerType server_type; char last_reply[2048]; /* XXX: allocate ? */ RTPDemuxContext *cur_rtp; } RTSPState; @@ -717,9 +710,6 @@ void rtsp_parse_line(RTSPHeader *reply, const char *buf) reply->seq = strtol(p, NULL, 10); } else if (av_stristart(p, "Range:", &p)) { rtsp_parse_range_npt(p, &reply->range_start, &reply->range_end); - } else if (av_stristart(p, "RealChallenge1:", &p)) { - skip_spaces(&p); - av_strlcpy(reply->real_challenge, p, sizeof(reply->real_challenge)); } } @@ -1045,7 +1035,6 @@ static int rtsp_read_header(AVFormatContext *s, RTSPHeader reply1, *reply = &reply1; unsigned char *content = NULL; int protocol_mask = 0; - char real_challenge[64]; /* extract hostname and port */ url_split(NULL, 0, NULL, 0, @@ -1084,42 +1073,6 @@ static int rtsp_read_header(AVFormatContext *s, rt->rtsp_hd = rtsp_hd; rt->seq = 0; - /* request options supported by the server; this also detects server type */ - for (rt->server_type = RTSP_SERVER_RTP;;) { - snprintf(cmd, sizeof(cmd), - "OPTIONS %s RTSP/1.0\r\n", s->filename); - if (rt->server_type == RTSP_SERVER_RDT) - av_strlcat(cmd, - /** - * The following entries are required for proper - * streaming from a Realmedia server. They are - * interdependent in some way although we currently - * don't quite understand how. Values were copied - * from mplayer SVN r23589. - * @param CompanyID is a 16-byte ID in base64 - * @param ClientChallenge is a 16-byte ID in hex - */ - "ClientChallenge: 9e26d33f2984236010ef6253fb1887f7\r\n" - "PlayerStarttime: [28/03/2003:22:50:23 00:00]\r\n" - "CompanyID: KnKV4M4I/B2FjJ1TToLycw==\r\n" - "GUID: 00000000-0000-0000-0000-000000000000\r\n", - sizeof(cmd)); - rtsp_send_cmd(s, cmd, reply, NULL); - if (reply->status_code != RTSP_STATUS_OK) { - err = AVERROR_INVALIDDATA; - goto fail; - } - - /* detect server type if not standard-compliant RTP */ - if (rt->server_type != RTSP_SERVER_RDT && reply->real_challenge[0]) { - rt->server_type = RTSP_SERVER_RDT; - continue; - } else if (rt->server_type == RTSP_SERVER_RDT) { - strcpy(real_challenge, reply->real_challenge); - } - break; - } - /* describe the stream */ snprintf(cmd, sizeof(cmd), "DESCRIBE %s RTSP/1.0\r\n" diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h index 537d4bf333..288f69776d 100644 --- a/libavformat/rtsp.h +++ b/libavformat/rtsp.h @@ -18,8 +18,8 @@ * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef AVFORMAT_RTSP_H -#define AVFORMAT_RTSP_H +#ifndef FFMPEG_RTSP_H +#define FFMPEG_RTSP_H #include <stdint.h> #include "avformat.h" @@ -62,7 +62,6 @@ typedef struct RTSPHeader { RTSPTransportField transports[RTSP_MAX_TRANSPORTS]; int seq; /**< sequence number */ char session_id[512]; - char real_challenge[64]; /**< the RealChallenge1 field from the server */ } RTSPHeader; /** the callback can be used to extend the connection setup/teardown step */ @@ -95,4 +94,4 @@ extern int rtsp_rtp_port_max; int rtsp_pause(AVFormatContext *s); int rtsp_resume(AVFormatContext *s); -#endif /* AVFORMAT_RTSP_H */ +#endif /* FFMPEG_RTSP_H */ |