Mixing these with the rtp depacketizer functions in rtpdec.h is no good.
Unified · Split
| @@ -32,6 +32,7 @@ · 31 unmodified lines | ||
| 32 | 32 | #include "libavformat/network.h" |
| 33 | 33 | #include "libavformat/os_support.h" |
| 34 | 34 | #include "libavformat/rtpdec.h" |
| 35 | +#include "libavformat/rtpproto.h" | |
| 35 | 36 | #include "libavformat/rtsp.h" |
| 36 | 37 | #include "libavformat/avio_internal.h" |
| 37 | 38 | #include "libavformat/internal.h" |
| @@ -51,10 +51,6 @@ int ff_rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, · 50 unmodified lines | ||
| 51 | 51 | void ff_rtp_parse_close(RTPDemuxContext *s); |
| 52 | 52 | int64_t ff_rtp_queued_packet_time(RTPDemuxContext *s); |
| 53 | 53 | void ff_rtp_reset_packet_queue(RTPDemuxContext *s); |
| 54 | −int ff_rtp_get_local_rtp_port(URLContext *h); | |
| 55 | −int ff_rtp_get_local_rtcp_port(URLContext *h); | |
| 56 | − | |
| 57 | −int ff_rtp_set_remote_url(URLContext *h, const char *uri); | |
| 58 | 54 | |
| 59 | 55 | /** |
| 60 | 56 | * Send a dummy packet on both port pairs to set up the connection |
| @@ -28,7 +28,8 @@ · 27 unmodified lines | ||
| 28 | 28 | #include "libavutil/avstring.h" |
| 29 | 29 | #include "avformat.h" |
| 30 | 30 | #include "avio_internal.h" |
| 31 | −#include "rtpdec.h" | |
| 31 | +#include "rtp.h" | |
| 32 | +#include "rtpproto.h" | |
| 32 | 33 | #include "url.h" |
| 33 | 34 | |
| 34 | 35 | #include <stdarg.h> |
| @@ -0,0 +1,31 @@ | ||
| 1 | +/* | |
| 2 | + * RTP network protocol | |
| 3 | + * | |
| 4 | + * This file is part of Libav. | |
| 5 | + * | |
| 6 | + * Libav is free software; you can redistribute it and/or | |
| 7 | + * modify it under the terms of the GNU Lesser General Public | |
| 8 | + * License as published by the Free Software Foundation; either | |
| 9 | + * version 2.1 of the License, or (at your option) any later version. | |
| 10 | + * | |
| 11 | + * Libav is distributed in the hope that it will be useful, | |
| 12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 14 | + * Lesser General Public License for more details. | |
| 15 | + * | |
| 16 | + * You should have received a copy of the GNU Lesser General Public | |
| 17 | + * License along with Libav; if not, write to the Free Software | |
| 18 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
| 19 | + */ | |
| 20 | + | |
| 21 | +#ifndef AVFORMAT_RTPPROTO_H | |
| 22 | +#define AVFORMAT_RTPPROTO_H | |
| 23 | + | |
| 24 | +#include "url.h" | |
| 25 | + | |
| 26 | +int ff_rtp_set_remote_url(URLContext *h, const char *uri); | |
| 27 | + | |
| 28 | +int ff_rtp_get_local_rtp_port(URLContext *h); | |
| 29 | +int ff_rtp_get_local_rtcp_port(URLContext *h); | |
| 30 | + | |
| 31 | +#endif /* AVFORMAT_RTPPROTO_H */ | |
| @@ -41,6 +41,7 @@ · 40 unmodified lines | ||
| 41 | 41 | #include "rtsp.h" |
| 42 | 42 | |
| 43 | 43 | #include "rtpdec.h" |
| 44 | +#include "rtpproto.h" | |
| 44 | 45 | #include "rdt.h" |
| 45 | 46 | #include "rtpdec_formats.h" |
| 46 | 47 | #include "rtpenc_chain.h" |
| @@ -29,6 +29,7 @@ · 28 unmodified lines | ||
| 29 | 29 | #include "internal.h" |
| 30 | 30 | #include "network.h" |
| 31 | 31 | #include "os_support.h" |
| 32 | +#include "rtpproto.h" | |
| 32 | 33 | #include "rtsp.h" |
| 33 | 34 | #include "rdt.h" |
| 34 | 35 | #include "url.h" |