Mixing these with the rtp depacketizer functions in rtpdec.h is
no good.
---
 avserver.c             |    1 +
 libavformat/rtpdec.h   |    4 ----
 libavformat/rtpproto.c |    3 ++-
 libavformat/rtpproto.h |   32 ++++++++++++++++++++++++++++++++
 libavformat/rtsp.c     |    1 +
 libavformat/rtspdec.c  |    1 +
 6 files changed, 37 insertions(+), 5 deletions(-)
 create mode 100644 libavformat/rtpproto.h

diff --git a/avserver.c b/avserver.c
index 976c895..560eda1 100644
--- a/avserver.c
+++ b/avserver.c
@@ -32,6 +32,7 @@
 #include "libavformat/network.h"
 #include "libavformat/os_support.h"
 #include "libavformat/rtpdec.h"
+#include "libavformat/rtpproto.h"
 #include "libavformat/rtsp.h"
 #include "libavformat/avio_internal.h"
 #include "libavformat/internal.h"
diff --git a/libavformat/rtpdec.h b/libavformat/rtpdec.h
index 6e923d9..5539936 100644
--- a/libavformat/rtpdec.h
+++ b/libavformat/rtpdec.h
@@ -51,10 +51,6 @@ int ff_rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
 void ff_rtp_parse_close(RTPDemuxContext *s);
 int64_t ff_rtp_queued_packet_time(RTPDemuxContext *s);
 void ff_rtp_reset_packet_queue(RTPDemuxContext *s);
-int ff_rtp_get_local_rtp_port(URLContext *h);
-int ff_rtp_get_local_rtcp_port(URLContext *h);
-
-int ff_rtp_set_remote_url(URLContext *h, const char *uri);
 
 /**
  * Send a dummy packet on both port pairs to set up the connection
diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c
index 9b82ce9..b4475ae 100644
--- a/libavformat/rtpproto.c
+++ b/libavformat/rtpproto.c
@@ -28,7 +28,8 @@
 #include "libavutil/avstring.h"
 #include "avformat.h"
 #include "avio_internal.h"
-#include "rtpdec.h"
+#include "rtp.h"
+#include "rtpproto.h"
 #include "url.h"
 
 #include <stdarg.h>
diff --git a/libavformat/rtpproto.h b/libavformat/rtpproto.h
new file mode 100644
index 0000000..0bb8430
--- /dev/null
+++ b/libavformat/rtpproto.h
@@ -0,0 +1,32 @@
+/*
+ * RTP network protocol
+ * Copyright (c) 2002 Fabrice Bellard
+ *
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVFORMAT_RTPPROTO_H
+#define AVFORMAT_RTPPROTO_H
+
+#include "url.h"
+
+int ff_rtp_set_remote_url(URLContext *h, const char *uri);
+
+int ff_rtp_get_local_rtp_port(URLContext *h);
+int ff_rtp_get_local_rtcp_port(URLContext *h);
+
+#endif /* AVFORMAT_RTPPROTO_H */
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index f0d2514..db96bc6 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -41,6 +41,7 @@
 #include "rtsp.h"
 
 #include "rtpdec.h"
+#include "rtpproto.h"
 #include "rdt.h"
 #include "rtpdec_formats.h"
 #include "rtpenc_chain.h"
diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index 7e7fb2d..43dcb47 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -29,6 +29,7 @@
 #include "internal.h"
 #include "network.h"
 #include "os_support.h"
+#include "rtpproto.h"
 #include "rtsp.h"
 #include "rdt.h"
 #include "url.h"
-- 
1.7.9.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to