? patch-rtsp-port Index: cfg-mplayer.h =================================================================== RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v retrieving revision 1.256 diff -u -r1.256 cfg-mplayer.h --- cfg-mplayer.h 11 Dec 2005 18:05:23 -0000 1.256 +++ cfg-mplayer.h 13 Feb 2006 16:49:24 -0000 @@ -86,6 +86,7 @@ #ifdef STREAMING_LIVE555 extern int isSDPFile; extern int rtspStreamOverTCP; +extern int rtsp_port; #endif #ifdef HAVE_NEW_GUI @@ -296,8 +297,10 @@ {"sdp", "-sdp is obsolete, use sdp://file instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, // -rtsp-stream-over-tcp option, specifying TCP streaming of RTP/RTCP {"rtsp-stream-over-tcp", &rtspStreamOverTCP, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + {"rtsp-port", &rtsp_port, CONF_TYPE_INT, CONF_RANGE, -1, 65535, NULL}, #else {"rtsp-stream-over-tcp", "RTSP support requires the \"LIVE555 Streaming Media\" libraries.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, + {"rtsp-port", "RTSP support requires the \"LIVE555 Streaming Media\" libraries.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, #endif //---------------------- mplayer-only options ------------------------ Index: DOCS/man/en/mplayer.1 =================================================================== RCS file: /cvsroot/mplayer/main/DOCS/man/en/mplayer.1,v retrieving revision 1.1177 diff -u -r1.1177 mplayer.1 --- DOCS/man/en/mplayer.1 11 Dec 2005 22:09:54 -0000 1.1177 +++ DOCS/man/en/mplayer.1 13 Feb 2006 16:49:55 -0000 @@ -1273,6 +1273,12 @@ not pass incoming UDP packets (see http://www.live555.com/\:mplayer/). . .TP +.B \-rtsp-port (LIVE555 only) +Used with 'rtsp://' URLs to forces the client's port number. +This option may be useful if you're behind a router and want to forward the +RTSP stream from the server to a specific client. +. +.TP .B \-saveidx Force index rebuilding and dump the index to . Currently this only works with AVI files. Index: DOCS/man/fr/mplayer.1 =================================================================== RCS file: /cvsroot/mplayer/main/DOCS/man/fr/mplayer.1,v retrieving revision 1.368 diff -u -r1.368 mplayer.1 --- DOCS/man/fr/mplayer.1 11 Dec 2005 22:09:55 -0000 1.368 +++ DOCS/man/fr/mplayer.1 13 Feb 2006 16:50:15 -0000 @@ -1351,6 +1351,13 @@ qui bloque les paquets UDP entrants (voir http://www.live.com/\:mplayer/). . .TP +.B \-rtsp-port (LIVE555 uniquement) +Utilisé avec 'rtsp://', URLs pour forcer l'utilisation d'un port particulier +au niveau du client. +Cette option peut être utile si vous êtes derrière un routeur et souhaitez +redistribuer le flux RTSP du serveur vers un client spécifique. +. +.TP .B \-saveidx Force la reconstruction de l'index et le sauvegarde dans . Pour l'instant cela ne fonctionne qu'avec les fichiers AVI. Index: libmpdemux/demux_rtp.cpp =================================================================== RCS file: /cvsroot/mplayer/main/libmpdemux/demux_rtp.cpp,v retrieving revision 1.29 diff -u -r1.29 demux_rtp.cpp --- libmpdemux/demux_rtp.cpp 23 Sep 2005 22:35:03 -0000 1.29 +++ libmpdemux/demux_rtp.cpp 13 Feb 2006 16:50:20 -0000 @@ -90,6 +90,7 @@ } int rtspStreamOverTCP = 0; +int rtsp_port = 0; extern "C" int audio_id, video_id, dvdsub_id; extern "C" demuxer_t* demux_open_rtp(demuxer_t* demuxer) { @@ -174,10 +175,13 @@ continue; } + if (rtsp_port) + subsession->setClientPortNum (rtsp_port); + if (!subsession->initiate()) { fprintf(stderr, "Failed to initiate \"%s/%s\" RTP subsession: %s\n", subsession->mediumName(), subsession->codecName(), env->getResultMsg()); } else { - fprintf(stderr, "Initiated \"%s/%s\" RTP subsession\n", subsession->mediumName(), subsession->codecName()); + fprintf(stderr, "Initiated \"%s/%s\" RTP subsession on port %d\n", subsession->mediumName(), subsession->codecName(), subsession->clientPortNum()); // Set the OS's socket receive buffer sufficiently large to avoid // incoming packets getting dropped between successive reads from this