Mercurial > libavformat.hg
changeset 3923:83e51bcb03c2 libavformat
Rename RTSP_SERVER_RDT to RTSP_SERVER_REAL, because RDT (the transport
protocol) is not strictly related to the server type (Real servers can
stream both RDT and RTP).
author | rbultje |
---|---|
date | Sun, 14 Sep 2008 13:55:21 +0000 |
parents | 56dc585dcda4 |
children | 0b02fd518909 |
files | rtsp.c |
diffstat | 1 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/rtsp.c Fri Sep 12 00:06:06 2008 +0000 +++ b/rtsp.c Sun Sep 14 13:55:21 2008 +0000 @@ -45,7 +45,7 @@ enum RTSPServerType { RTSP_SERVER_RTP, /*< Standard-compliant RTP-server */ - RTSP_SERVER_RDT, /*< Realmedia-style server */ + RTSP_SERVER_REAL, /*< Realmedia-style server */ RTSP_SERVER_LAST }; @@ -906,7 +906,7 @@ char cmd[2048]; const char *trans_pref; - if (rt->server_type == RTSP_SERVER_RDT) + if (rt->server_type == RTSP_SERVER_REAL) trans_pref = "x-pn-tng"; else trans_pref = "RTP/AVP"; @@ -961,13 +961,13 @@ snprintf(transport, sizeof(transport) - 1, "%s/UDP;multicast", trans_pref); } - if (rt->server_type == RTSP_SERVER_RDT) + if (rt->server_type == RTSP_SERVER_REAL) av_strlcat(transport, ";mode=play", sizeof(transport)); snprintf(cmd, sizeof(cmd), "SETUP %s RTSP/1.0\r\n" "Transport: %s\r\n", rtsp_st->control_url, transport); - if (i == 0 && rt->server_type == RTSP_SERVER_RDT) { + if (i == 0 && rt->server_type == RTSP_SERVER_REAL) { char real_res[41], real_csum[9]; ff_rdt_calc_response_and_checksum(real_res, real_csum, real_challenge); @@ -1044,7 +1044,7 @@ goto fail; } - if (rt->server_type == RTSP_SERVER_RDT) + if (rt->server_type == RTSP_SERVER_REAL) rt->need_subscription = 1; return 0; @@ -1112,7 +1112,7 @@ 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) + if (rt->server_type == RTSP_SERVER_REAL) av_strlcat(cmd, /** * The following entries are required for proper @@ -1135,10 +1135,10 @@ } /* 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; + if (rt->server_type != RTSP_SERVER_REAL && reply->real_challenge[0]) { + rt->server_type = RTSP_SERVER_REAL; continue; - } else if (rt->server_type == RTSP_SERVER_RDT) { + } else if (rt->server_type == RTSP_SERVER_REAL) { strcpy(real_challenge, reply->real_challenge); } break; @@ -1149,7 +1149,7 @@ "DESCRIBE %s RTSP/1.0\r\n" "Accept: application/sdp\r\n", s->filename); - if (rt->server_type == RTSP_SERVER_RDT) { + if (rt->server_type == RTSP_SERVER_REAL) { /** * The Require: attribute is needed for proper streaming from * Realmedia servers. @@ -1180,7 +1180,7 @@ int protocol = ff_log2_tab[protocol_mask & ~(protocol_mask - 1)]; err = make_setup_request(s, host, port, protocol, - rt->server_type == RTSP_SERVER_RDT ? + rt->server_type == RTSP_SERVER_REAL ? real_challenge : NULL); if (err < 0) goto fail; @@ -1308,7 +1308,7 @@ int ret, len; uint8_t buf[RTP_MAX_PACKET_LENGTH]; - if (rt->server_type == RTSP_SERVER_RDT && rt->need_subscription) { + if (rt->server_type == RTSP_SERVER_REAL && rt->need_subscription) { int i; RTSPHeader reply1, *reply = &reply1; char cmd[1024]; @@ -1335,7 +1335,7 @@ /* get next frames from the same RTP packet */ if (rt->cur_rtp) { - if (rt->server_type == RTSP_SERVER_RDT) + if (rt->server_type == RTSP_SERVER_REAL) ret = ff_rdt_parse_packet(rt->cur_rtp, pkt, NULL, 0); else ret = rtp_parse_packet(rt->cur_rtp, pkt, NULL, 0); @@ -1365,7 +1365,7 @@ } if (len < 0) return len; - if (rt->server_type == RTSP_SERVER_RDT) + if (rt->server_type == RTSP_SERVER_REAL) ret = ff_rdt_parse_packet(rtsp_st->rtp_ctx, pkt, buf, len); else ret = rtp_parse_packet(rtsp_st->rtp_ctx, pkt, buf, len); @@ -1386,7 +1386,7 @@ av_log(s, AV_LOG_DEBUG, "hello state=%d\n", rt->state); - if (!(rt->server_type == RTSP_SERVER_RDT && rt->need_subscription)) { + if (!(rt->server_type == RTSP_SERVER_REAL && rt->need_subscription)) { if (rt->state == RTSP_STATE_PAUSED) { snprintf(cmd, sizeof(cmd), "PLAY %s RTSP/1.0\r\n", @@ -1418,7 +1418,7 @@ if (rt->state != RTSP_STATE_PLAYING) return 0; - else if (!(rt->server_type == RTSP_SERVER_RDT && rt->need_subscription)) { + else if (!(rt->server_type == RTSP_SERVER_REAL && rt->need_subscription)) { snprintf(cmd, sizeof(cmd), "PAUSE %s RTSP/1.0\r\n", s->filename);