Revision f87b1b37 libavformat/rtsp.c
libavformat/rtsp.c | ||
---|---|---|
1116 | 1116 |
"?localport=%d", j); |
1117 | 1117 |
/* we will use two ports per rtp stream (rtp and rtcp) */ |
1118 | 1118 |
j += 2; |
1119 |
if (ffurl_open(&rtsp_st->rtp_handle, buf, URL_RDWR) == 0)
|
|
1119 |
if (ffurl_open(&rtsp_st->rtp_handle, buf, AVIO_RDWR) == 0)
|
|
1120 | 1120 |
goto rtp_opened; |
1121 | 1121 |
} |
1122 | 1122 |
} |
1123 | 1123 |
|
1124 | 1124 |
#if 0 |
1125 | 1125 |
/* then try on any port */ |
1126 |
if (ffurl_open(&rtsp_st->rtp_handle, "rtp://", URL_RDONLY) < 0) {
|
|
1126 |
if (ffurl_open(&rtsp_st->rtp_handle, "rtp://", AVIO_RDONLY) < 0) {
|
|
1127 | 1127 |
err = AVERROR_INVALIDDATA; |
1128 | 1128 |
goto fail; |
1129 | 1129 |
} |
... | ... | |
1269 | 1269 |
namebuf, sizeof(namebuf), NULL, 0, NI_NUMERICHOST); |
1270 | 1270 |
ff_url_join(url, sizeof(url), "rtp", NULL, namebuf, |
1271 | 1271 |
port, "?ttl=%d", ttl); |
1272 |
if (ffurl_open(&rtsp_st->rtp_handle, url, URL_RDWR) < 0) {
|
|
1272 |
if (ffurl_open(&rtsp_st->rtp_handle, url, AVIO_RDWR) < 0) {
|
|
1273 | 1273 |
err = AVERROR_INVALIDDATA; |
1274 | 1274 |
goto fail; |
1275 | 1275 |
} |
... | ... | |
1396 | 1396 |
av_get_random_seed(), av_get_random_seed()); |
1397 | 1397 |
|
1398 | 1398 |
/* GET requests */ |
1399 |
if (ffurl_alloc(&rt->rtsp_hd, httpname, URL_RDONLY) < 0) {
|
|
1399 |
if (ffurl_alloc(&rt->rtsp_hd, httpname, AVIO_RDONLY) < 0) {
|
|
1400 | 1400 |
err = AVERROR(EIO); |
1401 | 1401 |
goto fail; |
1402 | 1402 |
} |
... | ... | |
1417 | 1417 |
} |
1418 | 1418 |
|
1419 | 1419 |
/* POST requests */ |
1420 |
if (ffurl_alloc(&rt->rtsp_hd_out, httpname, URL_WRONLY) < 0 ) {
|
|
1420 |
if (ffurl_alloc(&rt->rtsp_hd_out, httpname, AVIO_WRONLY) < 0 ) {
|
|
1421 | 1421 |
err = AVERROR(EIO); |
1422 | 1422 |
goto fail; |
1423 | 1423 |
} |
... | ... | |
1460 | 1460 |
} else { |
1461 | 1461 |
/* open the tcp connection */ |
1462 | 1462 |
ff_url_join(tcpname, sizeof(tcpname), "tcp", NULL, host, port, NULL); |
1463 |
if (ffurl_open(&rt->rtsp_hd, tcpname, URL_RDWR) < 0) {
|
|
1463 |
if (ffurl_open(&rt->rtsp_hd, tcpname, AVIO_RDWR) < 0) {
|
|
1464 | 1464 |
err = AVERROR(EIO); |
1465 | 1465 |
goto fail; |
1466 | 1466 |
} |
... | ... | |
1807 | 1807 |
namebuf, rtsp_st->sdp_port, |
1808 | 1808 |
"?localport=%d&ttl=%d", rtsp_st->sdp_port, |
1809 | 1809 |
rtsp_st->sdp_ttl); |
1810 |
if (ffurl_open(&rtsp_st->rtp_handle, url, URL_RDWR) < 0) {
|
|
1810 |
if (ffurl_open(&rtsp_st->rtp_handle, url, AVIO_RDWR) < 0) {
|
|
1811 | 1811 |
err = AVERROR_INVALIDDATA; |
1812 | 1812 |
goto fail; |
1813 | 1813 |
} |
... | ... | |
1863 | 1863 |
if (!ff_network_init()) |
1864 | 1864 |
return AVERROR(EIO); |
1865 | 1865 |
|
1866 |
ret = ffurl_open(&in, s->filename, URL_RDONLY);
|
|
1866 |
ret = ffurl_open(&in, s->filename, AVIO_RDONLY);
|
|
1867 | 1867 |
if (ret) |
1868 | 1868 |
goto fail; |
1869 | 1869 |
|
Also available in: Unified diff