From 578ad534b3d57eac33573e5bf576a819e2ba2303 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 17 Jul 2010 13:14:53 +0000 Subject: [PATCH] configure: Rename "network" variable and option to "networking" This avoids conflicts with the FFmpeg variable of the same name. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31749 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Makefile | 2 +- cfg-common.h | 12 ++++++------ configure | 38 ++++++++++++++++++++------------------ libmpdemux/asfheader.c | 2 +- stream/stream.c | 8 ++++---- stream/stream.h | 4 ++-- 6 files changed, 34 insertions(+), 32 deletions(-) diff --git a/Makefile b/Makefile index 060bb5d3ab..dd94f6db11 100644 --- a/Makefile +++ b/Makefile @@ -212,7 +212,7 @@ SRCS_COMMON-$(NEED_SHMEM) += osdep/shmem.c SRCS_COMMON-$(NEED_STRSEP) += osdep/strsep.c SRCS_COMMON-$(NEED_SWAB) += osdep/swab.c SRCS_COMMON-$(NEED_VSSCANF) += osdep/vsscanf.c -SRCS_COMMON-$(NETWORK) += stream/stream_netstream.c \ +SRCS_COMMON-$(NETWORKING) += stream/stream_netstream.c \ stream/asf_mmst_streaming.c \ stream/asf_streaming.c \ stream/cookies.c \ diff --git a/cfg-common.h b/cfg-common.h index 65eccd9cae..38bb3e1724 100644 --- a/cfg-common.h +++ b/cfg-common.h @@ -426,7 +426,7 @@ const m_option_t common_opts[] = { {"dvdkey", "libcss is obsolete. Try libdvdread instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, {"csslib", "libcss is obsolete. Try libdvdread instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#ifdef CONFIG_NETWORK +#ifdef CONFIG_NETWORKING {"user", &network_username, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"passwd", &network_password, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"bandwidth", &network_bandwidth, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, @@ -450,7 +450,7 @@ const m_option_t common_opts[] = { {"passwd", "MPlayer was compiled without streaming (network) support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, {"bandwidth", "MPlayer was compiled without streaming (network) support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, {"user-agent", "MPlayer was compiled without streaming (network) support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* CONFIG_NETWORK */ +#endif /* CONFIG_NETWORKING */ #ifdef CONFIG_LIVE555 {"sdp", "-sdp has been removed, use sdp://file instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, @@ -469,13 +469,13 @@ const m_option_t common_opts[] = { #else {"rtsp-stream-over-sctp", "-rtsp-stream-over-sctp requires the \"libnemesi\" library\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, #endif /* CONFIG_LIBNEMESI */ -#ifdef CONFIG_NETWORK +#ifdef CONFIG_NETWORKING {"rtsp-port", &rtsp_port, CONF_TYPE_INT, CONF_RANGE, -1, 65535, NULL}, {"rtsp-destination", &rtsp_destination, CONF_TYPE_STRING, CONF_MIN, 0, 0, NULL}, #else - {"rtsp-port", "MPlayer was compiled without network support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, - {"rtsp-destination", "MPlayer was compiled without network support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* CONFIG_NETWORK */ + {"rtsp-port", "MPlayer was compiled without networking support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, + {"rtsp-destination", "MPlayer was compiled without networking support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, +#endif /* CONFIG_NETWORKING */ // ------------------------- demuxer options -------------------- diff --git a/configure b/configure index 144eb4f6f0..0dec63967a 100755 --- a/configure +++ b/configure @@ -273,7 +273,7 @@ Optional features: --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect] --disable-pvr disable Video4Linux2 MPEG PVR [autodetect] --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect] - --disable-network disable networking [enable] + --disable-networking disable networking [enable] --enable-winsock2_h enable winsock2_h [autodetect] --enable-smb enable Samba (SMB) input [autodetect] --enable-live enable LIVE555 Streaming Media [autodetect] @@ -653,7 +653,7 @@ _tv_v4l2=auto _tv_bsdbt848=auto _tv_dshow=auto _pvr=auto -_network=yes +networking=yes _winsock2_h=auto _smb=auto _vidix=auto @@ -1077,8 +1077,8 @@ for ac_option do --disable-pvr) _pvr=no ;; --enable-fastmemcpy) _fastmemcpy=yes ;; --disable-fastmemcpy) _fastmemcpy=no ;; - --enable-network) _network=yes ;; - --disable-network) _network=no ;; + --enable-networking) networking=yes ;; + --disable-networking) networking=no ;; --enable-winsock2_h) _winsock2_h=yes ;; --disable-winsock2_h) _winsock2_h=no ;; --enable-smb) _smb=yes ;; @@ -3119,19 +3119,21 @@ fi echores "$_closesocket" -echocheck "network" +echocheck "networking" test $_winsock2_h = no && test $inet_pton = no && - test $inet_aton = no && _network=no -if test "$_network" = yes ; then + test $inet_aton = no && networking=no +if test "$networking" = yes ; then def_network='#define CONFIG_NETWORK 1' + def_networking='#define CONFIG_NETWORKING 1' extra_ldflags="$extra_ldflags $_ld_sock" - inputmodules="network $inputmodules" + inputmodules="networking $inputmodules" else - noinputmodules="network $noinputmodules" + noinputmodules="networking $noinputmodules" def_network='#undef CONFIG_NETWORK' + def_networking='#undef CONFIG_NETWORKING' _ftp=no fi -echores "$_network" +echores "$networking" echocheck "inet6" @@ -5961,7 +5963,7 @@ fi echores "$_libcdio" if test "$_cdda" = yes ; then - test $_cddb = auto && test $_network = yes && _cddb=yes + test $_cddb = auto && test $networking = yes && _cddb=yes def_cdparanoia='#define CONFIG_CDDA 1' inputmodules="cdda $inputmodules" else @@ -6770,7 +6772,7 @@ fi echores "$_qtx" echocheck "Nemesi Streaming Media libraries" -if test "$_nemesi" = auto && test "$_network" = yes ; then +if test "$_nemesi" = auto && test "$networking" = yes ; then _nemesi=no if $_pkg_config libnemesi --atleast-version=0.6.3 ; then extra_cflags="$extra_cflags $($_pkg_config --cflags libnemesi)" @@ -6783,7 +6785,7 @@ if test "$_nemesi" = yes; then def_nemesi='#define CONFIG_LIBNEMESI 1' inputmodules="nemesi $inputmodules" else - _native_rtsp="$_network" + _native_rtsp="$networking" _nemesi=no def_nemesi='#undef CONFIG_LIBNEMESI' noinputmodules="nemesi $noinputmodules" @@ -6791,7 +6793,7 @@ fi echores "$_nemesi" echocheck "LIVE555 Streaming Media libraries" -if test "$_live" = auto && test "$_network" = yes ; then +if test "$_live" = auto && test "$networking" = yes ; then cat > $TMPCPP << EOF #include #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600) @@ -6822,11 +6824,11 @@ EOF fi fi fi -if test "$_live" = yes && test "$_network" = yes; then +if test "$_live" = yes && test "$networking" = yes; then test $_livelibdir && res_comment="using $_livelibdir" def_live='#define CONFIG_LIVE555 1' inputmodules="live555 $inputmodules" -elif test "$_live_dist" = yes && test "$_network" = yes; then +elif test "$_live_dist" = yes && test "$networking" = yes; then res_comment="using distribution version" _live="yes" def_live='#define CONFIG_LIVE555 1' @@ -7876,7 +7878,7 @@ MPG123 = $_mpg123 MUSEPACK = $_musepack NAS = $_nas NATIVE_RTSP = $_native_rtsp -NETWORK = $_network +NETWORKING = $networking OPENAL = $_openal OSS = $_ossaudio PE_EXECUTABLE = $_pe_executable @@ -8286,7 +8288,7 @@ $def_inet_aton $def_inet_pton $def_live $def_nemesi -$def_network +$def_networking $def_smb $def_socklen_t $def_vstream diff --git a/libmpdemux/asfheader.c b/libmpdemux/asfheader.c index 50a83b75d9..b1058ae011 100644 --- a/libmpdemux/asfheader.c +++ b/libmpdemux/asfheader.c @@ -661,7 +661,7 @@ if(streams) { // as the servers often do not care about what we requested. #if 0 uint32_t vr = 0, ar = 0,i; -#ifdef CONFIG_NETWORK +#ifdef CONFIG_NETWORKING if( demuxer->stream->streaming_ctrl!=NULL ) { if( demuxer->stream->streaming_ctrl->bandwidth!=0 && demuxer->stream->streaming_ctrl->data!=NULL ) { best_audio = ((asf_http_streaming_ctrl_t*)demuxer->stream->streaming_ctrl->data)->audio_id; diff --git a/stream/stream.c b/stream/stream.c index d520760867..b562c56cfe 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -91,7 +91,7 @@ static const stream_info_t* const auto_open_streams[] = { #ifdef CONFIG_CDDA &stream_info_cdda, #endif -#ifdef CONFIG_NETWORK +#ifdef CONFIG_NETWORKING &stream_info_netstream, &stream_info_http1, &stream_info_asf, @@ -176,7 +176,7 @@ static stream_t *open_stream_plugin(const stream_info_t *sinfo, s->flags |= mode; *ret = sinfo->open(s,mode,arg,file_format); if((*ret) != STREAM_OK) { -#ifdef CONFIG_NETWORK +#ifdef CONFIG_NETWORKING if (*ret == STREAM_REDIRECTED && redirected_url) { if (s->streaming_ctrl && s->streaming_ctrl->url && s->streaming_ctrl->url->url) @@ -270,7 +270,7 @@ int stream_fill_buffer(stream_t *s){ // we will retry even if we already reached EOF previously. switch(s->type){ case STREAMTYPE_STREAM: -#ifdef CONFIG_NETWORK +#ifdef CONFIG_NETWORKING if( s->streaming_ctrl!=NULL && s->streaming_ctrl->streaming_read ) { len=s->streaming_ctrl->streaming_read(s->fd,s->buffer,STREAM_BUFFER_SIZE, s->streaming_ctrl); } else @@ -341,7 +341,7 @@ if(newpos==0 || newpos!=s->pos){ // Some streaming protocol allow to seek backward and forward // A function call that return -1 can tell that the protocol // doesn't support seeking. -#ifdef CONFIG_NETWORK +#ifdef CONFIG_NETWORKING if(s->seek) { // new stream seek is much cleaner than streaming_ctrl one if(!s->seek(s,newpos)) { mp_msg(MSGT_STREAM,MSGL_ERR, "Seek failed\n"); diff --git a/stream/stream.h b/stream/stream.h index 7380b59bb3..ee78e1c196 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -163,13 +163,13 @@ typedef struct stream { char* url; // strdup() of filename/url char *lavf_type; // name of expected demuxer type for lavf struct MPOpts *opts; -#ifdef CONFIG_NETWORK +#ifdef CONFIG_NETWORKING streaming_ctrl_t *streaming_ctrl; #endif unsigned char buffer[STREAM_BUFFER_SIZE>VCD_SECTOR_SIZE?STREAM_BUFFER_SIZE:VCD_SECTOR_SIZE]; } stream_t; -#ifdef CONFIG_NETWORK +#ifdef CONFIG_NETWORKING #include "network.h" #endif