From: Thibaut M. <tma...@us...> - 2004-04-15 22:11:04
|
Update of /cvsroot/xine/xine-lib/src/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2494 Modified Files: input_mms.c mms.c Log Message: Big MMS over tcp protocol cleanup / rework. No new feature, just a cleanup, less headache to maitain. Might fix some issues. This stream works fine: mms://audio1.musicradio.com/Ad/BT.wma Index: input_mms.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/input/input_mms.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- input_mms.c 10 Apr 2004 15:45:11 -0000 1.49 +++ input_mms.c 15 Apr 2004 22:10:55 -0000 1.50 @@ -161,15 +161,15 @@ } switch (origin) { - case SEEK_SET: - dest = offset; - break; - case SEEK_CUR: - dest = curpos + offset; - break; - default: - printf ("input_mms: unknown origin in seek!\n"); - return curpos; + case SEEK_SET: + dest = offset; + break; + case SEEK_CUR: + dest = curpos + offset; + break; + default: + printf ("input_mms: unknown origin in seek!\n"); + return curpos; } if (curpos > dest) { @@ -228,7 +228,10 @@ } static uint32_t mms_plugin_get_capabilities (input_plugin_t *this_gen) { - return INPUT_CAP_PREVIEW; + mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; + uint32_t cap = INPUT_CAP_PREVIEW; + + return cap; } static uint32_t mms_plugin_get_blocksize (input_plugin_t *this_gen) { @@ -239,9 +242,6 @@ mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; off_t curpos = 0; - /* - printf ("current pos is %lld\n", this->curpos); - */ switch (this->protocol) { case PROTOCOL_MMST: curpos = mms_get_current_pos(this->mms); Index: mms.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/input/mms.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- mms.c 14 Apr 2004 01:42:55 -0000 1.47 +++ mms.c 15 Apr 2004 22:10:55 -0000 1.48 @@ -24,8 +24,7 @@ * utility functions to handle communication with an mms server * * TODO: - * general cleanup, error messages - * always check packet size + * error messages * enable seeking ! */ @@ -77,11 +76,37 @@ [...1009 lines suppressed...] if (this->asf_header_read < this->asf_header_len) { int n, bytes_left ; bytes_left = this->asf_header_len - this->asf_header_read ; - if ((len-total) < bytes_left) + if ((len - total) < bytes_left) n = len-total; else n = bytes_left; @@ -1221,7 +1271,7 @@ } uint32_t mms_get_length (mms_t *this) { - return this->file_length; + return this->file_len; } off_t mms_get_current_pos (mms_t *this) { |