X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess%2Fmms%2Fmms.c;h=5e77503cadac623cc19476796edf92f63e5b54e0;hb=f98ea9538b7ac1c8e2518f24c60d7ddd4d8431d7;hp=8abf8be73877523da6a4de72064a1274c4f61f67;hpb=85b29bdc288a1573d43bd524908be5748a9b3640;p=vlc diff --git a/modules/access/mms/mms.c b/modules/access/mms/mms.c index 8abf8be738..5e77503cad 100644 --- a/modules/access/mms/mms.c +++ b/modules/access/mms/mms.c @@ -1,7 +1,7 @@ /***************************************************************************** * mms.c: MMS over tcp, udp and http access plug-in ***************************************************************************** - * Copyright (C) 2002-2004 VideoLAN (Centrale Réseaux) and its contributors + * Copyright (C) 2002-2004 the VideoLAN team * $Id$ * * Authors: Laurent Aimar @@ -18,17 +18,19 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ - /***************************************************************************** * Preamble *****************************************************************************/ -#include + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include -#include +#include #include "mms.h" @@ -45,28 +47,45 @@ static void Close( vlc_object_t * ); #define CACHING_TEXT N_("Caching value in ms") #define CACHING_LONGTEXT N_( \ - "Allows you to modify the default caching value for MMS streams. This " \ - "value should be set in millisecond units." ) + "Caching value for MMS streams. This " \ + "value should be set in milliseconds." ) #define ALL_TEXT N_("Force selection of all streams") +#define ALL_LONGTEXT N_( \ + "MMS streams can contain several elementary streams, with different " \ + "bitrates. You can choose to select all of them." ) -#define BITRATE_TEXT N_("Select maximum bitrate stream") +#define BITRATE_TEXT N_( "Maximum bitrate" ) #define BITRATE_LONGTEXT N_( \ - "Always select the stream with the maximum bitrate." ) + "Select the stream with the maximum bitrate under that limit." ) + +#define PROXY_TEXT N_("HTTP proxy") +#define PROXY_LONGTEXT N_( \ + "HTTP proxy to be used It must be of the form " \ + "http://[user[:pass]@]myproxy.mydomain:myport/ ; " \ + "if empty, the http_proxy environment variable will be tried." ) + +#define TIMEOUT_TEXT N_("TCP/UDP timeout (ms)") +#define TIMEOUT_LONGTEXT N_("Amount of time (in ms) to wait before aborting network reception of data. Note that there will be 10 retries before completely giving up.") vlc_module_begin(); - set_shortname( _("MMS") ); + set_shortname( "MMS" ); set_description( _("Microsoft Media Server (MMS) input") ); - set_capability( "access2", -1 ); + set_capability( "access", -1 ); set_category( CAT_INPUT ); set_subcategory( SUBCAT_INPUT_ACCESS ); - add_integer( "mms-caching", 12 * DEFAULT_PTS_DELAY / 1000, NULL, - CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE ); + add_integer( "mms-caching", 19 * DEFAULT_PTS_DELAY / 1000, NULL, + CACHING_TEXT, CACHING_LONGTEXT, true ); + + add_integer( "mms-timeout", 5000, NULL, TIMEOUT_TEXT, TIMEOUT_LONGTEXT, + true ); - add_bool( "mms-all", 0, NULL, ALL_TEXT, "", VLC_TRUE ); + add_bool( "mms-all", 0, NULL, ALL_TEXT, ALL_LONGTEXT, true ); add_integer( "mms-maxbitrate", 0, NULL, BITRATE_TEXT, BITRATE_LONGTEXT , - VLC_FALSE ); + false ); + add_string( "mmsh-proxy", NULL, NULL, PROXY_TEXT, PROXY_LONGTEXT, + false ); add_shortcut( "mms" ); add_shortcut( "mmsu" ); @@ -84,7 +103,6 @@ struct access_sys_t int i_proto; }; - /***************************************************************************** * Open: *****************************************************************************/ @@ -133,7 +151,8 @@ static void Close( vlc_object_t *p_this ) access_t *p_access = (access_t*)p_this; access_sys_t *p_sys = p_access->p_sys; - if( p_sys->i_proto == MMS_PROTO_TCP || p_sys->i_proto == MMS_PROTO_UDP ) + if( ( p_sys->i_proto == MMS_PROTO_TCP ) || + ( p_sys->i_proto == MMS_PROTO_UDP ) ) { E_( MMSTUClose )( p_access ); }