[MPlayer-cvslog] r36399 - in trunk: libmpdemux/demux_lavf.c stream/stream.c stream/stream_ffmpeg.c

reimar subversion at mplayerhq.hu
Sun Aug 4 15:30:42 CEST 2013


Author: reimar
Date: Sun Aug  4 15:30:42 2013
New Revision: 36399

Log:
Add support for rtsp:// falling back to support via FFmpeg.

Modified:
   trunk/libmpdemux/demux_lavf.c
   trunk/stream/stream.c
   trunk/stream/stream_ffmpeg.c

Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c	Sun Aug  4 15:30:41 2013	(r36398)
+++ trunk/libmpdemux/demux_lavf.c	Sun Aug  4 15:30:42 2013	(r36399)
@@ -545,6 +545,8 @@ static demuxer_t* demux_open_lavf(demuxe
     if(demuxer->stream->url) {
         if (!strncmp(demuxer->stream->url, "ffmpeg://", 9))
             av_strlcpy(mp_filename, demuxer->stream->url + 9, sizeof(mp_filename));
+        else if (!strncmp(demuxer->stream->url, "rtsp://", 7))
+            av_strlcpy(mp_filename, demuxer->stream->url, sizeof(mp_filename));
         else
             av_strlcat(mp_filename, demuxer->stream->url, sizeof(mp_filename));
     } else

Modified: trunk/stream/stream.c
==============================================================================
--- trunk/stream/stream.c	Sun Aug  4 15:30:41 2013	(r36398)
+++ trunk/stream/stream.c	Sun Aug  4 15:30:42 2013	(r36399)
@@ -105,6 +105,9 @@ static const stream_info_t* const auto_o
 #endif
   &stream_info_rtp,
   &stream_info_udp,
+#ifdef CONFIG_FFMPEG
+  &stream_info_ffmpeg,
+#endif
   &stream_info_http2,
 #endif
 #ifdef CONFIG_DVBIN
@@ -139,9 +142,6 @@ static const stream_info_t* const auto_o
 #ifdef CONFIG_LIBBLURAY
   &stream_info_bluray,
 #endif
-#ifdef CONFIG_FFMPEG
-  &stream_info_ffmpeg,
-#endif
 
   &stream_info_null,
   &stream_info_mf,

Modified: trunk/stream/stream_ffmpeg.c
==============================================================================
--- trunk/stream/stream_ffmpeg.c	Sun Aug  4 15:30:41 2013	(r36398)
+++ trunk/stream/stream_ffmpeg.c	Sun Aug  4 15:30:42 2013	(r36399)
@@ -25,6 +25,7 @@
 #include "m_option.h"
 #include "m_struct.h"
 #include "av_helpers.h"
+#include "libmpdemux/demuxer.h"
 
 static int fill_buffer(stream_t *s, char *buffer, int max_len)
 {
@@ -136,7 +137,9 @@ static int open_f(stream_t *stream, int 
         stream->type = STREAMTYPE_STREAM;
         stream->seek = NULL;
     }
-    if (!dummy) {
+    if (dummy) {
+        *file_format = DEMUXER_TYPE_LAVF;
+    } else {
         stream->fill_buffer = fill_buffer;
         stream->write_buffer = write_buffer;
         stream->control = control;
@@ -154,7 +157,7 @@ const stream_info_t stream_info_ffmpeg =
   "",
   "",
   open_f,
-  { "ffmpeg", "rtmp", NULL },
+  { "ffmpeg", "rtmp", "rtsp", NULL },
   NULL,
   1 // Urls are an option string
 };


More information about the MPlayer-cvslog mailing list