summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/input/input_mms.c30
2 files changed, 27 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 1758aa594..58fdb863f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,6 +33,7 @@ xine-lib (1-rc4)
* add iso-8859-9 and iso-8859-15 codepages into xine fonts
* work around freezing with arts on BSD
* documentation about xine fonts
+ * make the protocol in MMS configurable - TCP, HTTP or autoprobe
xine-lib (1-rc3a)
* new subtitle formats: jacobsub, subviewer 2.0, subrip 0.9
diff --git a/src/input/input_mms.c b/src/input/input_mms.c
index 2d2958bac..8c4718ac3 100644
--- a/src/input/input_mms.c
+++ b/src/input/input_mms.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: input_mms.c,v 1.45 2003/12/14 22:13:23 siggi Exp $
+ * $Id: input_mms.c,v 1.46 2004/02/17 13:40:57 valtri Exp $
*
* mms input plugin based on work from major mms
*/
@@ -70,6 +70,9 @@ const char * mms_bandwidth_strs[]={"14.4 Kbps (Modem)", "19.2 Kbps (Modem)",
"393.2 Kbps (Cable/DSL)","524.3 Kbps (Cable/DSL)",
"1.5 Mbps (T1)", "10.5 Mbps (LAN)", NULL};
+/* connection methods */
+const char *mms_protocol_strs[]={"auto", "TCP", "HTTP", NULL};
+
typedef struct {
input_plugin_t input_plugin;
@@ -95,6 +98,7 @@ typedef struct {
input_class_t input_class;
mms_input_plugin_t *ip;
+ int protocol; /* autoprobe, mmst or mmsh */
xine_t *xine;
} mms_input_class_t;
@@ -309,6 +313,15 @@ static void bandwidth_changed_cb (void *this_gen, xine_cfg_entry_t *entry) {
}
}
+static void protocol_changed_cb (void *this_gen, xine_cfg_entry_t *entry) {
+ mms_input_class_t *class = (mms_input_class_t*) this_gen;
+
+ lprintf ("protocol_changed_cb %d\n", entry->num_value);
+
+ if (!class) return;
+ class->protocol = entry->num_value;
+}
+
static int mms_plugin_open (input_plugin_t *this_gen) {
mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen;
mms_t *mms = NULL;
@@ -355,7 +368,7 @@ static input_plugin_t *mms_class_get_instance (input_class_t *cls_gen, xine_stre
lprintf ("trying to open '%s'\n", mrl);
if (!strncasecmp (mrl, "mms://", 6)) {
- protocol = PROTOCOL_UNDEFINED;
+ protocol = cls->protocol;
} else if (!strncasecmp (mrl, "mmst://", 7)) {
protocol = PROTOCOL_MMST;
} else if (!strncasecmp (mrl, "mmsh://", 7)) {
@@ -434,9 +447,18 @@ static void *init_class (xine_t *xine, void *data) {
xine->config->register_enum(xine->config, "input.mms_network_bandwidth", 10,
(char **)mms_bandwidth_strs,
- "Network bandwidth",
+ _("Network bandwidth"),
NULL, 0, bandwidth_changed_cb, (void*) this);
-
+
+ this->protocol = xine->config->register_enum(xine->config,
+ "input.mms_protocol",
+ 0,
+ (char **)mms_protocol_strs,
+ _("MMS protocol"),
+ _("Select the protocol above MMS. TCP is better but you may need HTTP behind the firewall."),
+ 20,
+ protocol_changed_cb, (void*)this);
+
return this;
}