summaryrefslogtreecommitdiff
path: root/src/input/input_mms.c
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2002-03-18 23:28:49 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2002-03-18 23:28:49 +0000
commit31bb532cd84320a72f10e72cc6ca9c062ecfc948 (patch)
tree2ab6fda70a3f217d6d59bf79c37c21601794532a /src/input/input_mms.c
parent96d4ac01bc64b3c5f725d553387eb622da64a171 (diff)
downloadxine-lib-31bb532cd84320a72f10e72cc6ca9c062ecfc948.tar.gz
xine-lib-31bb532cd84320a72f10e72cc6ca9c062ecfc948.tar.bz2
mms patches contributed by Andrei Lahun
CVS patchset: 1590 CVS date: 2002/03/18 23:28:49
Diffstat (limited to 'src/input/input_mms.c')
-rw-r--r--src/input/input_mms.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/src/input/input_mms.c b/src/input/input_mms.c
index 421508906..04c477f8f 100644
--- a/src/input/input_mms.c
+++ b/src/input/input_mms.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000-2002 major mms
+ * Copyright (C) 2000-2001 major mms
*
* This file is part of xine-mms
*
@@ -43,9 +43,6 @@
#include "mms.h"
#include "strict_scr.h"
-/*
-#define LOG
-*/
extern int errno;
@@ -74,37 +71,49 @@ typedef struct {
} mms_input_plugin_t;
+extern char *mms_url_s[];
+extern char *mms_url_e[];
static int mms_plugin_open (input_plugin_t *this_gen, char *mrl) {
char* nmrl=NULL;
+ char* uptr;
+ int error_id;
mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen;
-
- asx_parse(mrl,&nmrl);
+ error_id=asx_parse(mrl,&nmrl);
+
+ if(error_id)
+ return 0;
if(!nmrl)
nmrl=mrl;
printf("mms_plugin_open: using mrl <%s> \n", nmrl);
- if (strncasecmp (nmrl, "mms://",6))
+
+ uptr=strdup(nmrl);
+ if (!mms_url_is(nmrl,mms_url_s)){
+
return 0;
-
+ }
+
+
this->mrl = strdup(nmrl); /* FIXME: small memory leak */
this->mms = mms_connect (nmrl);
- if (!this->mms)
+ if (!this->mms){
+
return 0;
-
+ }
+
this->curpos = 0;
this->buffering = 0;
+
/* register our scr plugin */
-
- this->scr->scr.start (&this->scr->scr, this->xine->metronom->get_current_time (this->xine->metronom));
- this->xine->metronom->register_scr (this->xine->metronom, &this->scr->scr);
-
+ this->scr->scr.start (&this->scr->scr, this->xine->metronom->get_current_time (this->xine->metronom));
+ this->xine->metronom->register_scr (this->xine->metronom, &this->scr->scr);
return 1;
}
@@ -124,6 +133,7 @@ static off_t mms_plugin_read (input_plugin_t *this_gen,
fifo_fill = this->xine->video_fifo->size(this->xine->video_fifo);
+
if (fifo_fill<LOW_WATER_MARK) {
this->xine->metronom->set_speed (this->xine->metronom, SPEED_PAUSE);