Revision: 510
Author: kdekorte
Date: Sat Aug 4 10:19:43 2012
Log: Add ASX to the list of types that should be streamed, and fix the
code so that it is case insensitive
http://code.google.com/p/gecko-mediaplayer/source/detail?r=510
Modified:
/trunk/ChangeLog
/trunk/src/plugin.cpp
=======================================
--- /trunk/ChangeLog Sat Aug 4 09:15:46 2012
+++ /trunk/ChangeLog Sat Aug 4 10:19:43 2012
@@ -1,4 +1,5 @@
Development
+ Add ASX to the list of types that should be streamed, and fix the code
so that it is case insensitive
Switch plugin to streaming mode with #EXTM3U is found in the file
Clean up some depreciated symbol warnings
Convert plugin_list to use gm_log
=======================================
--- /trunk/src/plugin.cpp Sat Aug 4 09:15:46 2012
+++ /trunk/src/plugin.cpp Sat Aug 4 10:19:43 2012
@@ -885,6 +885,7 @@
gboolean ready;
gboolean newwindow;
gboolean ok_to_play = FALSE;
+ gchar *upper = NULL;
gm_log(debug_level, G_LOG_LEVEL_DEBUG, "Write Called\n");
if (!acceptdata) {
@@ -908,10 +909,13 @@
return -1;
}
+ upper = g_ascii_strup((char *) buffer, len);
if (strstr((char *) buffer, "ICY 200 OK") != NULL
|| strstr((char *) buffer, "Content-length:") != NULL
- || strstr((char *) buffer, "<HTML>") != NULL || item->streaming ==
TRUE
- || strstr(item->src, "file://") != NULL || strstr((char *)
buffer, "#EXTM3U") != NULL) {
+ || (upper != NULL && strstr(upper, "<HTML>") != NULL) ||
item->streaming == TRUE
+ || strstr(item->src, "file://") != NULL
+ || (upper != NULL && strstr(upper, "#EXTM3U") != NULL)
+ || (upper != NULL && strstr(upper, "<ASX") != NULL)) {
// If item is a block of jpeg images, just stream it
// || stream->lastmodified == 0) { this is not valid for many
sites
@@ -934,6 +938,10 @@
NPN_DestroyStream(mInstance, stream, NPERR_NO_ERROR);
return -1;
}
+ if (upper != NULL) {
+ g_free(upper);
+ upper = NULL;
+ }
if ((!item->localfp) && (!item->retrieved)) {
gm_log(debug_level, G_LOG_LEVEL_DEBUG, "opening %s for
localcache\n", item->local);