[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[439] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-11-23 10:26:27
|
Revision: 439 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=439&view=rev Author: nickols_k Date: 2012-11-23 10:26:17 +0000 (Fri, 23 Nov 2012) Log Message: ----------- disable streaming by default + fix problem: libmpconf/libmpconf.a(m_option.o): In function `parse_custom_url(m_option const*, char const*, char*, void*, int)': m_option.cpp:(.text+0x23e8): undefined reference to `mpxp::url2string(char*, char const*)' collect2: ld returned 1 exit status P.S.: In addition to [438] comments i need to say that illegal patch violates GPL because doesn't exists in form of source code available for receiving and modifications. Preamble ( GPLv2 ): When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. TERMS AND CONDITIONS (GPLv3) : 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. Modified Paths: -------------- mplayerxp/configure mplayerxp/libmpconf/m_option.cpp mplayerxp/libmpconf/m_option.h mplayerxp/libmpstream/Makefile mplayerxp/libmpstream/asf_mmst_streaming.cpp mplayerxp/libmpstream/s_cdd.cpp mplayerxp/libmpstream/url.cpp mplayerxp/libmpstream/url.h mplayerxp/xmpcore/xmp_adecoder.cpp mplayerxp/xmpcore/xmp_aplayer.cpp Modified: mplayerxp/configure =================================================================== --- mplayerxp/configure 2012-11-23 09:18:26 UTC (rev 438) +++ mplayerxp/configure 2012-11-23 10:26:17 UTC (rev 439) @@ -92,7 +92,8 @@ "static|build static libraries", "dbg23|allow additional level of debug messages", "win32loader|build support for Win32 codecs", - "random_name|generates pseudo random suffix of target" + "random_name|generates pseudo random suffix of target", + "im_sure_that_must_have_streaming| the key to unlock streaming" ) AUTOCONF_LIST=( @@ -407,6 +408,7 @@ check_func2 execinfo.h backtrace print_config HAVE_ mp_config.h mp_config.mak backtrace +disabled im_sure_that_must_have_streaming && disable streaming disable inet_pton if enabled streaming ; then disable socklib @@ -431,6 +433,7 @@ disabled inet_pton && disable streaming print_config HAVE_ mp_config.h mp_config.mak streaming +enabled streaming && inputmodules="streaming $inputmodules" || noinputmodules="streaming $noinputmodules" disabled streaming && disable af_inet6 Modified: mplayerxp/libmpconf/m_option.cpp =================================================================== --- mplayerxp/libmpconf/m_option.cpp 2012-11-23 09:18:26 UTC (rev 438) +++ mplayerxp/libmpconf/m_option.cpp 2012-11-23 10:26:17 UTC (rev 439) @@ -1785,6 +1785,7 @@ NULL }; +#ifdef HAVE_STREAMING static int parse_custom_url(const m_option_t* opt,const char *name, char *url, any_t* dst, int src) { int pos1, pos2, r, v6addr = 0; @@ -1965,7 +1966,7 @@ char* fname = ptr2+1; if(l > 1) { fname = new char [l]; - url_unescape_string(fname,ptr2+1); + url2string(fname,ptr2+1); } r = m_struct_set(desc,dst,"filename",fname); if(fname != ptr2+1) @@ -1994,3 +1995,4 @@ NULL, NULL }; +#endif Modified: mplayerxp/libmpconf/m_option.h =================================================================== --- mplayerxp/libmpconf/m_option.h 2012-11-23 09:18:26 UTC (rev 438) +++ mplayerxp/libmpconf/m_option.h 2012-11-23 10:26:17 UTC (rev 439) @@ -89,12 +89,13 @@ */ extern const m_option_type_t m_option_type_obj_presets; +#ifdef HAVE_STREAMING /// Parse an URL into a struct. /** The option priv field (\ref m_option::priv) must point to a * \ref m_struct_st describing which fields of the URL must be used. */ extern const m_option_type_t m_option_type_custom_url; - +#endif /// Extra definition needed for \ref m_option_type_obj_params options. typedef struct { const struct m_struct_st* desc; /// Field descriptions. @@ -130,7 +131,9 @@ #define MCONF_TYPE_SPAN (&m_option_type_span) #define MCONF_TYPE_OBJ_SETTINGS_LIST (&m_option_type_obj_settings_list) #define MCONF_TYPE_OBJ_PRESETS (&m_option_type_obj_presets) +#ifdef HAVE_STREAMING #define MCONF_TYPE_CUSTOM_URL (&m_option_type_custom_url) +#endif #define MCONF_TYPE_OBJ_PARAMS (&m_option_type_obj_params) #define MCONF_TYPE_TIME (&m_option_type_time) #define MCONF_TYPE_TIME_SIZE (&m_option_type_time_size) Modified: mplayerxp/libmpstream/Makefile =================================================================== --- mplayerxp/libmpstream/Makefile 2012-11-23 09:18:26 UTC (rev 438) +++ mplayerxp/libmpstream/Makefile 2012-11-23 10:26:17 UTC (rev 439) @@ -6,8 +6,8 @@ DO_MAKE = @ for i in $(SUBDIRS); do $(MAKE) -C $$i $@ || exit; done DO_ALL = @ for i in $(SUBDIRS); do $(MAKE) -C $$i all || exit; done -CXXSRCS=s_tv.cpp -CXXSRCS+= s_file.cpp s_ffmpeg.cpp s_null.cpp +CXXSRCS= s_ffmpeg.cpp s_file.cpp s_null.cpp s_tv.cpp +CXXSRCS+= cache2.cpp mrl.cpp stream.cpp url.cpp ifeq ($(HAVE_LIBCDIO_CDDA),yes) CXXSRCS += s_cdd.cpp CXXSRCS += cdda.cpp @@ -21,24 +21,31 @@ ifeq ($(USE_DVDREAD),yes) CXXSRCS += s_dvdread.cpp endif -CXXSRCS += url.cpp ifeq ($(USE_OSS_AUDIO),yes) CXXSRCS += s_oss.cpp endif ifeq ($(USE_LIBVCD),yes) CXXSRCS += s_vcdnav.cpp endif -CXXSRCS += mrl.cpp SUBDIRS = tvi ifeq ($(HAVE_STREAMING),yes) SUBDIRS += freesdp librtsp realrtsp -CXXSRCS += asf_streaming.cpp asf_mmst_streaming.cpp s_ftp.cpp s_udp.cpp s_network.cpp -CXXSRCS+=s_rtsp.cpp network.cpp http.cpp cookies.cpp rtp.cpp pnm.cpp tcp.cpp udp.cpp +CXXSRCS += asf_streaming.cpp \ + asf_mmst_streaming.cpp \ + cookies.cpp \ + http.cpp \ + network.cpp \ + pnm.cpp \ + rtp.cpp \ + tcp.cpp \ + udp.cpp +CXXSRCS += s_ftp.cpp \ + s_network.cpp \ + s_rtsp.cpp \ + s_udp.cpp endif -CXXSRCS+= stream.cpp cache2.cpp - OBJS = $(SRCS:.c=.o) CXXOBJS = $(CXXSRCS:.cpp=.o) INCLUDE = -I../ @@ -61,9 +68,10 @@ $(LIBNAME): $(SUBDIRS) $(OBJS) $(CXXOBJS) $(AR) r $(LIBNAME) $(OBJS) $(CXXOBJS) + $(AR) r $(LIBNAME) \ + $(wildcard tvi/*.o) ifeq ($(HAVE_STREAMING),yes) $(AR) r $(LIBNAME) \ - $(wildcard tvi/*.o) \ $(wildcard freesdp/*.o) \ $(wildcard librtsp/*.o) \ $(wildcard realrtsp/*.o) Modified: mplayerxp/libmpstream/asf_mmst_streaming.cpp =================================================================== --- mplayerxp/libmpstream/asf_mmst_streaming.cpp 2012-11-23 09:18:26 UTC (rev 438) +++ mplayerxp/libmpstream/asf_mmst_streaming.cpp 2012-11-23 10:26:17 UTC (rev 439) @@ -520,7 +520,7 @@ MSG_FATAL("Memory allocation failed!\n"); return -1; } - url_unescape_string(unescpath,path); + url2string(unescpath,path); path=unescpath; if( url1->port==0 ) { Modified: mplayerxp/libmpstream/s_cdd.cpp =================================================================== --- mplayerxp/libmpstream/s_cdd.cpp 2012-11-23 09:18:26 UTC (rev 438) +++ mplayerxp/libmpstream/s_cdd.cpp 2012-11-23 10:26:17 UTC (rev 439) @@ -40,6 +40,7 @@ static MPXP_Rc __FASTCALL__ _cddb_open(any_t*libinput,stream_t *stream,const char *filename,unsigned flags) { +#ifdef HAVE_STREAMING const char *param; char *device; MPXP_Rc retval; @@ -55,6 +56,9 @@ if(device) delete device; check_pin("stream",stream->pin,STREAM_PIN); return retval; +#else + return MPXP_False; +#endif } static int __FASTCALL__ cdd_read(stream_t*stream,stream_packet_t*sp) Modified: mplayerxp/libmpstream/url.cpp =================================================================== --- mplayerxp/libmpstream/url.cpp 2012-11-23 09:18:26 UTC (rev 438) +++ mplayerxp/libmpstream/url.cpp 2012-11-23 10:26:17 UTC (rev 439) @@ -4,6 +4,7 @@ * (C) 2001, MPlayer team. * */ +#include <limits> #include <string.h> #include <stdlib.h> @@ -19,10 +20,7 @@ using namespace mpxp; -#ifndef SIZE_MAX -#define SIZE_MAX ((size_t)-1) -#endif - +namespace mpxp { URL_t *url_redirect(URL_t **url, const char *redir) { URL_t *u = *url; URL_t *res; @@ -57,7 +55,7 @@ if( url==NULL ) return NULL; - if (strlen(url) > (SIZE_MAX / 3 - 1)) { + if (strlen(url) > (std::numeric_limits<size_t>::max() / 3 - 1)) { MSG_FATAL("MemAllocFailed\n"); goto err_out; } @@ -77,7 +75,7 @@ // Initialisation of the URL container members memset( Curl, 0, sizeof(URL_t) ); - url_escape_string(escfilename,url); + string2url(escfilename,url); // Copy the url in the URL container Curl->url = mp_strdup(escfilename); @@ -243,7 +241,7 @@ /* Replace escape sequences in an URL (or a part of an URL) */ /* works like strcpy(), but without return argument */ void -url_unescape_string(char *outbuf, const char *inbuf) +url2string(char *outbuf, const char *inbuf) { unsigned char c,c1,c2; int i,len=strlen(inbuf); @@ -313,7 +311,7 @@ /* Replace specific characters in the URL string by an escape sequence */ /* works like strcpy(), but without return argument */ void -url_escape_string(char *outbuf, const char *_inbuf) { +string2url(char *outbuf, const char *_inbuf) { char* inbuf=mp_strdup(_inbuf); int i = 0,j,len = strlen(inbuf); char* tmp,*in; @@ -361,7 +359,7 @@ if(!unesc) unesc = new char [len+1]; // unescape first to avoid escaping escape - url_unescape_string(unesc,in); + url2string(unesc,in); // then escape, including mark and other reserved chars // that can come from escape sequences url_escape_string_part(outbuf,unesc); @@ -402,3 +400,4 @@ } } #endif //__URL_DEBUG +} // namespace mpxp Modified: mplayerxp/libmpstream/url.h =================================================================== --- mplayerxp/libmpstream/url.h 2012-11-23 09:18:26 UTC (rev 438) +++ mplayerxp/libmpstream/url.h 2012-11-23 10:26:17 UTC (rev 439) @@ -9,7 +9,8 @@ //#define __URL_DEBUG -typedef struct { +namespace mpxp { + typedef struct { char *url; char *protocol; char *hostname; @@ -17,17 +18,17 @@ unsigned int port; char *username; char *password; -} URL_t; + } URL_t; -URL_t* url_new(const char* url); -void url_free(URL_t* url); + URL_t* url_new(const char* url); + void url_free(URL_t* url); -URL_t *url_redirect(URL_t **url, const char *redir); -void url_unescape_string(char *outbuf, const char *inbuf); -void url_escape_string(char *outbuf, const char *inbuf); + URL_t *url_redirect(URL_t **url, const char *redir); + void url2string(char *outbuf, const char *inbuf); + void string2url(char *outbuf, const char *inbuf); #ifdef __URL_DEBUG -void url_debug(URL_t* url); + void url_debug(URL_t* url); #endif // __URL_DEBUG - +} // namespace #endif // __URL_H Modified: mplayerxp/xmpcore/xmp_adecoder.cpp =================================================================== --- mplayerxp/xmpcore/xmp_adecoder.cpp 2012-11-23 09:18:26 UTC (rev 438) +++ mplayerxp/xmpcore/xmp_adecoder.cpp 2012-11-23 10:26:17 UTC (rev 439) @@ -4,6 +4,7 @@ #include <stdio.h> #include <unistd.h> // for usleep() #include <math.h> +#include <sys/time.h> #include "mplayerxp.h" #include "mp_msg.h" Modified: mplayerxp/xmpcore/xmp_aplayer.cpp =================================================================== --- mplayerxp/xmpcore/xmp_aplayer.cpp 2012-11-23 09:18:26 UTC (rev 438) +++ mplayerxp/xmpcore/xmp_aplayer.cpp 2012-11-23 10:26:17 UTC (rev 439) @@ -4,6 +4,7 @@ #include <unistd.h> // for usleep() #include <pthread.h> #include <math.h> +#include <sys/time.h> #include "mplayerxp.h" #include "mp_msg.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |