From b156b88c13ddc9b6bbd5d60f85328fea5a7fd9cf Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Mon, 10 Sep 2007 22:48:42 +0000 Subject: [PATCH] rtp and rtsp demuxer declarations are not part of public API Originally committed as revision 10474 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffplay.c | 2 +- ffserver.c | 10 +++++----- libavformat/allformats.h | 3 +++ libavformat/rtp.h | 3 --- libavformat/rtsp.h | 1 - 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ffplay.c b/ffplay.c index f39fdb1343..bf109ad1e9 100644 --- a/ffplay.c +++ b/ffplay.c @@ -1974,7 +1974,7 @@ static int decode_thread(void *arg) av_read_play(ic); } #ifdef CONFIG_RTSP_DEMUXER - if (is->paused && ic->iformat == &rtsp_demuxer) { + if (is->paused && !strcmp(ic->iformat->name, "rtsp")) { /* wait 10 ms to avoid trying to get another packet */ /* XXX: horrible */ SDL_Delay(10); diff --git a/ffserver.c b/ffserver.c index dce934e82e..0b21cc41a4 100644 --- a/ffserver.c +++ b/ffserver.c @@ -1627,7 +1627,7 @@ static void compute_stats(HTTPContext *c) strcpy(eosf - 4, ".asx"); else if (strcmp(eosf - 3, ".rm") == 0) strcpy(eosf - 3, ".ram"); - else if (stream->fmt == &rtp_muxer) { + else if (!strcmp(stream->fmt->name, "rtp")) { /* generate a sample RTSP director if unicast. Generate an SDP redirector if multicast */ @@ -2683,7 +2683,7 @@ static void rtsp_cmd_describe(HTTPContext *c, const char *url) path++; for(stream = first_stream; stream != NULL; stream = stream->next) { - if (!stream->is_feed && stream->fmt == &rtp_muxer && + if (!stream->is_feed && !strcmp(stream->fmt->name, "rtp") && !strcmp(path, stream->filename)) { goto found; } @@ -2758,7 +2758,7 @@ static void rtsp_cmd_setup(HTTPContext *c, const char *url, /* now check each stream */ for(stream = first_stream; stream != NULL; stream = stream->next) { - if (!stream->is_feed && stream->fmt == &rtp_muxer) { + if (!stream->is_feed && !strcmp(stream->fmt->name, "rtp")) { /* accept aggregate filenames only if single stream */ if (!strcmp(path, stream->filename)) { if (stream->nb_streams != 1) { @@ -3076,7 +3076,7 @@ static int rtp_new_av_stream(HTTPContext *c, ctx = av_alloc_format_context(); if (!ctx) return -1; - ctx->oformat = &rtp_muxer; + ctx->oformat = guess_format("rtp", NULL, NULL); st = av_mallocz(sizeof(AVStream)); if (!st) @@ -3295,7 +3295,7 @@ static void build_file_streams(void) /* try to open the file */ /* open stream */ stream->ap_in = av_mallocz(sizeof(AVFormatParameters)); - if (stream->fmt == &rtp_muxer) { + if (!strcmp(stream->fmt->name, "rtp")) { /* specific case : if transport stream output to RTP, we use a raw transport stream reader */ stream->ap_in->mpeg2ts_raw = 1; diff --git a/libavformat/allformats.h b/libavformat/allformats.h index 3cbea4e11b..88da77bf34 100644 --- a/libavformat/allformats.h +++ b/libavformat/allformats.h @@ -95,6 +95,8 @@ extern AVInputFormat rawvideo_demuxer; extern AVInputFormat redir_demuxer; extern AVInputFormat rm_demuxer; extern AVInputFormat roq_demuxer; +extern AVInputFormat rtp_demuxer; +extern AVInputFormat rtsp_demuxer; extern AVInputFormat sdp_demuxer; extern AVInputFormat segafilm_demuxer; extern AVInputFormat shorten_demuxer; @@ -176,6 +178,7 @@ extern AVOutputFormat pcm_u16le_muxer; extern AVOutputFormat pcm_u8_muxer; extern AVOutputFormat psp_muxer; extern AVOutputFormat rawvideo_muxer; +extern AVOutputFormat rtp_muxer; extern AVOutputFormat rm_muxer; extern AVOutputFormat roq_muxer; extern AVOutputFormat swf_muxer; diff --git a/libavformat/rtp.h b/libavformat/rtp.h index 685af99aff..bcdb769102 100644 --- a/libavformat/rtp.h +++ b/libavformat/rtp.h @@ -40,9 +40,6 @@ int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, const uint8_t *buf, int len); void rtp_parse_close(RTPDemuxContext *s); -extern AVOutputFormat rtp_muxer; -extern AVInputFormat rtp_demuxer; - int rtp_get_local_port(URLContext *h); int rtp_set_remote_url(URLContext *h, const char *uri); void rtp_get_file_handles(URLContext *h, int *prtp_fd, int *prtcp_fd); diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h index 3321440add..a41032ddc3 100644 --- a/libavformat/rtsp.h +++ b/libavformat/rtsp.h @@ -84,7 +84,6 @@ void rtsp_parse_line(RTSPHeader *reply, const char *buf); extern int rtsp_default_protocols; extern int rtsp_rtp_port_min; extern int rtsp_rtp_port_max; -extern AVInputFormat rtsp_demuxer; int rtsp_pause(AVFormatContext *s); int rtsp_resume(AVFormatContext *s);