changeset 29280:99063eff7512

Unify over rtsp_transport_tcp as var to hold the -rtsp-stream-over-tcp flag and make sure libnemesi only builds are fine
author lu_zero
date Mon, 25 May 2009 20:28:35 +0000
parents b4bbf02afc53
children 9a580cd61ba3
files cfg-common-opts.h libmpdemux/demux_rtp.cpp
diffstat 2 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-common-opts.h	Mon May 25 17:51:10 2009 +0000
+++ b/cfg-common-opts.h	Mon May 25 20:28:35 2009 +0000
@@ -85,7 +85,7 @@
 #endif /* CONFIG_LIVE555 */
 #ifdef CONFIG_LIBNEMESI || CONFIG_LIVE555
 	// -rtsp-stream-over-tcp option, specifying TCP streaming of RTP/RTCP
-        {"rtsp-stream-over-tcp", &rtspStreamOverTCP, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+        {"rtsp-stream-over-tcp", &rtsp_transport_tcp, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 #else
 	{"rtsp-stream-over-tcp", "-rtsp-stream-over-tcp requires the \"LIVE555 Streaming Media\" or \"libnemesi\" libraries.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_LIVE555 || CONFIG_LIBNEMESI */
--- a/libmpdemux/demux_rtp.cpp	Mon May 25 17:51:10 2009 +0000
+++ b/libmpdemux/demux_rtp.cpp	Mon May 25 20:28:35 2009 +0000
@@ -110,7 +110,12 @@
   }
 }
 
-int rtspStreamOverTCP = 0;
+#ifdef CONFIG_LIBNEMESI
+extern int rtsp_transport_tcp;
+#else
+int rtsp_transport_tcp = 0;
+#endif
+
 extern int rtsp_port;
 
 extern "C" int audio_id, video_id, dvdsub_id;
@@ -229,7 +234,7 @@
 	if (rtspClient != NULL) {
 	  // Issue a RTSP "SETUP" command on the chosen subsession:
 	  if (!rtspClient->setupMediaSubsession(*subsession, False,
-						rtspStreamOverTCP)) break;
+						rtsp_transport_tcp)) break;
 	  if (!strcmp(subsession->mediumName(), "audio"))
 	    audiofound = 1;
 	  if (!strcmp(subsession->mediumName(), "video"))
@@ -327,7 +332,7 @@
     const float ptsBehindLimit = 60.0; // seconds
     if (ptsBehind < ptsBehindThreshold ||
 	ptsBehind > ptsBehindLimit ||
-	rtspStreamOverTCP) { // packet's OK
+	rtsp_transport_tcp) { // packet's OK
       ds_add_packet(ds, dp);
       break;
     }