comparison rtsp.c @ 5572:820f0889bc45 libavformat

Remove reply and content_ptr arguments from rtsp_send_cmd_async(), since they are unused.
author rbultje
date Thu, 21 Jan 2010 20:04:17 +0000
parents 3fd13093ca7c
children 016f3d4fe56d
comparison
equal deleted inserted replaced
5571:3fd13093ca7c 5572:820f0889bc45
927 return AVERROR(EPERM); 927 return AVERROR(EPERM);
928 928
929 return 0; 929 return 0;
930 } 930 }
931 931
932 static void rtsp_send_cmd_async(AVFormatContext *s, 932 static void rtsp_send_cmd_async(AVFormatContext *s, const char *cmd)
933 const char *cmd, RTSPMessageHeader *reply,
934 unsigned char **content_ptr)
935 { 933 {
936 RTSPState *rt = s->priv_data; 934 RTSPState *rt = s->priv_data;
937 char buf[4096], buf1[1024]; 935 char buf[4096], buf1[1024];
938 936
939 rt->seq++; 937 rt->seq++;
958 956
959 static void rtsp_send_cmd(AVFormatContext *s, 957 static void rtsp_send_cmd(AVFormatContext *s,
960 const char *cmd, RTSPMessageHeader *reply, 958 const char *cmd, RTSPMessageHeader *reply,
961 unsigned char **content_ptr) 959 unsigned char **content_ptr)
962 { 960 {
963 rtsp_send_cmd_async(s, cmd, reply, content_ptr); 961 rtsp_send_cmd_async(s, cmd);
964 962
965 rtsp_read_reply(s, reply, content_ptr, 0); 963 rtsp_read_reply(s, reply, content_ptr, 0);
966 } 964 }
967 965
968 /** 966 /**
1649 (av_gettime() - rt->last_cmd_time) / 1000000 >= rt->timeout / 2) { 1647 (av_gettime() - rt->last_cmd_time) / 1000000 >= rt->timeout / 2) {
1650 if (rt->server_type == RTSP_SERVER_WMS) { 1648 if (rt->server_type == RTSP_SERVER_WMS) {
1651 snprintf(cmd, sizeof(cmd) - 1, 1649 snprintf(cmd, sizeof(cmd) - 1,
1652 "GET_PARAMETER %s RTSP/1.0\r\n", 1650 "GET_PARAMETER %s RTSP/1.0\r\n",
1653 s->filename); 1651 s->filename);
1654 rtsp_send_cmd_async(s, cmd, reply, NULL); 1652 rtsp_send_cmd_async(s, cmd);
1655 } else { 1653 } else {
1656 rtsp_send_cmd_async(s, "OPTIONS * RTSP/1.0\r\n", 1654 rtsp_send_cmd_async(s, "OPTIONS * RTSP/1.0\r\n");
1657 reply, NULL);
1658 } 1655 }
1659 } 1656 }
1660 1657
1661 return 0; 1658 return 0;
1662 } 1659 }
1712 } 1709 }
1713 1710
1714 static int rtsp_read_close(AVFormatContext *s) 1711 static int rtsp_read_close(AVFormatContext *s)
1715 { 1712 {
1716 RTSPState *rt = s->priv_data; 1713 RTSPState *rt = s->priv_data;
1717 RTSPMessageHeader reply1, *reply = &reply1;
1718 char cmd[1024]; 1714 char cmd[1024];
1719 1715
1720 #if 0 1716 #if 0
1721 /* NOTE: it is valid to flush the buffer here */ 1717 /* NOTE: it is valid to flush the buffer here */
1722 if (rt->lower_transport == RTSP_LOWER_TRANSPORT_TCP) { 1718 if (rt->lower_transport == RTSP_LOWER_TRANSPORT_TCP) {
1724 } 1720 }
1725 #endif 1721 #endif
1726 snprintf(cmd, sizeof(cmd), 1722 snprintf(cmd, sizeof(cmd),
1727 "TEARDOWN %s RTSP/1.0\r\n", 1723 "TEARDOWN %s RTSP/1.0\r\n",
1728 s->filename); 1724 s->filename);
1729 rtsp_send_cmd_async(s, cmd, reply, NULL); 1725 rtsp_send_cmd_async(s, cmd);
1730 1726
1731 rtsp_close_streams(rt); 1727 rtsp_close_streams(rt);
1732 url_close(rt->rtsp_hd); 1728 url_close(rt->rtsp_hd);
1733 return 0; 1729 return 0;
1734 } 1730 }