From 186f1ec5f442bd9c6ccefa1af0a2b2d1e0f8a057 Mon Sep 17 00:00:00 2001 From: Josh Allmann Date: Wed, 25 Aug 2010 17:32:59 +0000 Subject: [PATCH] Add rtp_get_rtcp_file_handle function Patch by Josh Allmann, joshua dot allmann at gmail Originally committed as revision 24929 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/rtpdec.h | 5 +++++ libavformat/rtpproto.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/libavformat/rtpdec.h b/libavformat/rtpdec.h index 5389bcc27a..8548459d85 100644 --- a/libavformat/rtpdec.h +++ b/libavformat/rtpdec.h @@ -72,6 +72,11 @@ void rtp_send_punch_packets(URLContext* rtp_handle); */ int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count); +/** + * Get the file handle for the RTCP socket. + */ +int rtp_get_rtcp_file_handle(URLContext *h); + // these statistics are used for rtcp receiver reports... typedef struct { uint16_t max_seq; ///< highest sequence number seen diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index 289a253f9e..ef4602dfeb 100644 --- a/libavformat/rtpproto.c +++ b/libavformat/rtpproto.c @@ -373,6 +373,11 @@ static int rtp_get_file_handle(URLContext *h) return s->rtp_fd; } +int rtp_get_rtcp_file_handle(URLContext *h) { + RTPContext *s = h->priv_data; + return s->rtcp_fd; +} + URLProtocol rtp_protocol = { "rtp", rtp_open,