[FFmpeg-cvslog] r10474 - in trunk: ffplay.c ffserver.c libavformat/allformats.h libavformat/rtp.h libavformat/rtsp.h

aurel subversion
Tue Sep 11 00:48:42 CEST 2007


Author: aurel
Date: Tue Sep 11 00:48:42 2007
New Revision: 10474

Log:
rtp and rtsp demuxer declarations are not part of public API

Modified:
   trunk/ffplay.c
   trunk/ffserver.c
   trunk/libavformat/allformats.h
   trunk/libavformat/rtp.h
   trunk/libavformat/rtsp.h

Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c	(original)
+++ trunk/ffplay.c	Tue Sep 11 00:48:42 2007
@@ -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);

Modified: trunk/ffserver.c
==============================================================================
--- trunk/ffserver.c	(original)
+++ trunk/ffserver.c	Tue Sep 11 00:48:42 2007
@@ -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(HTTPContex
         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 *
 
     /* 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
     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;

Modified: trunk/libavformat/allformats.h
==============================================================================
--- trunk/libavformat/allformats.h	(original)
+++ trunk/libavformat/allformats.h	Tue Sep 11 00:48:42 2007
@@ -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;

Modified: trunk/libavformat/rtp.h
==============================================================================
--- trunk/libavformat/rtp.h	(original)
+++ trunk/libavformat/rtp.h	Tue Sep 11 00:48:42 2007
@@ -40,9 +40,6 @@ int rtp_parse_packet(RTPDemuxContext *s,
                      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);

Modified: trunk/libavformat/rtsp.h
==============================================================================
--- trunk/libavformat/rtsp.h	(original)
+++ trunk/libavformat/rtsp.h	Tue Sep 11 00:48:42 2007
@@ -84,7 +84,6 @@ void rtsp_parse_line(RTSPHeader *reply, 
 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);




More information about the ffmpeg-cvslog mailing list