Commit 103dfbe2 authored by Luca Abeni's avatar Luca Abeni

Add some "#if"s to avoid compiling the RTSP code when the RTSP demuxer

is disabled, and remove a useless "#if CONFIG_SDP_DEMUXER"

Originally committed as revision 20530 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 1d8041b3
...@@ -43,11 +43,13 @@ ...@@ -43,11 +43,13 @@
//#define DEBUG //#define DEBUG
//#define DEBUG_RTP_TCP //#define DEBUG_RTP_TCP
#if CONFIG_RTSP_DEMUXER
static int tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st, static int tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
uint8_t *buf, int buf_size); uint8_t *buf, int buf_size);
static int rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply, static int rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply,
unsigned char **content_ptr, unsigned char **content_ptr,
int return_on_interleaved_data); int return_on_interleaved_data);
#endif
#if LIBAVFORMAT_VERSION_INT < (53 << 16) #if LIBAVFORMAT_VERSION_INT < (53 << 16)
int rtsp_default_protocols = (1 << RTSP_LOWER_TRANSPORT_UDP); int rtsp_default_protocols = (1 << RTSP_LOWER_TRANSPORT_UDP);
...@@ -599,6 +601,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st, ...@@ -599,6 +601,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
} }
} }
} }
#if CONFIG_RTSP_DEMUXER
if (FD_ISSET(tcp_fd, &rfds)) { if (FD_ISSET(tcp_fd, &rfds)) {
RTSPMessageHeader reply; RTSPMessageHeader reply;
...@@ -607,6 +610,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st, ...@@ -607,6 +610,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
if (rt->state != RTSP_STATE_PLAYING) if (rt->state != RTSP_STATE_PLAYING)
return 0; return 0;
} }
#endif
} }
} }
} }
...@@ -731,6 +735,7 @@ rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st) ...@@ -731,6 +735,7 @@ rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
return 0; return 0;
} }
#if CONFIG_RTSP_DEMUXER
static int rtsp_probe(AVProbeData *p) static int rtsp_probe(AVProbeData *p)
{ {
if (av_strstart(p->filename, "rtsp:", NULL)) if (av_strstart(p->filename, "rtsp:", NULL))
...@@ -1714,7 +1719,6 @@ static int rtsp_read_close(AVFormatContext *s) ...@@ -1714,7 +1719,6 @@ static int rtsp_read_close(AVFormatContext *s)
return 0; return 0;
} }
#if CONFIG_RTSP_DEMUXER
AVInputFormat rtsp_demuxer = { AVInputFormat rtsp_demuxer = {
"rtsp", "rtsp",
NULL_IF_CONFIG_SMALL("RTSP input format"), NULL_IF_CONFIG_SMALL("RTSP input format"),
...@@ -1801,7 +1805,6 @@ static int sdp_read_close(AVFormatContext *s) ...@@ -1801,7 +1805,6 @@ static int sdp_read_close(AVFormatContext *s)
return 0; return 0;
} }
#if CONFIG_SDP_DEMUXER
AVInputFormat sdp_demuxer = { AVInputFormat sdp_demuxer = {
"sdp", "sdp",
NULL_IF_CONFIG_SMALL("SDP"), NULL_IF_CONFIG_SMALL("SDP"),
...@@ -1811,4 +1814,3 @@ AVInputFormat sdp_demuxer = { ...@@ -1811,4 +1814,3 @@ AVInputFormat sdp_demuxer = {
sdp_read_packet, sdp_read_packet,
sdp_read_close, sdp_read_close,
}; };
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment