diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | browser-plugin/totemBasicPlugin.cpp | 11 | ||||
-rw-r--r-- | browser-plugin/totemComplexPlugin.cpp | 5 | ||||
-rw-r--r-- | browser-plugin/totemGMPPlugin.cpp | 23 | ||||
-rw-r--r-- | browser-plugin/totemMullYPlugin.cpp | 3 | ||||
-rw-r--r-- | browser-plugin/totemNarrowSpacePlugin.cpp | 9 | ||||
-rw-r--r-- | browser-plugin/totemPlugin.cpp | 64 | ||||
-rw-r--r-- | browser-plugin/totemPlugin.h | 1 | ||||
-rw-r--r-- | browser-plugin/totemPluginGlue.cpp | 3 |
9 files changed, 32 insertions, 100 deletions
@@ -1,3 +1,16 @@ +2007-04-02 Bastien Nocera <hadess@hadess.net> + + * browser-plugin/totemBasicPlugin.cpp: + * browser-plugin/totemComplexPlugin.cpp: + * browser-plugin/totemGMPPlugin.cpp: + * browser-plugin/totemMullYPlugin.cpp: + * browser-plugin/totemNarrowSpacePlugin.cpp: + * browser-plugin/totemPlugin.cpp: + * browser-plugin/totemPlugin.h: + * browser-plugin/totemPluginGlue.cpp: Remove the rejection + of streams based on mime-type, too many false positives + (Closes: #418387) + 2007-04-01 Bastien Nocera <hadess@hadess.net> * src/backend/bacon-video-widget-xine.c: diff --git a/browser-plugin/totemBasicPlugin.cpp b/browser-plugin/totemBasicPlugin.cpp index 6b4091cc9..73281474b 100644 --- a/browser-plugin/totemBasicPlugin.cpp +++ b/browser-plugin/totemBasicPlugin.cpp @@ -49,12 +49,11 @@ static const char kClassDescription[] = "totemBasicPlugin"; static const char kPluginDescription[] = "Totem Web Browser Plugin " VERSION; static const totemPluginMimeEntry kMimeTypes[] = { - { "application/ogg", "ogg", NULL, FALSE }, - { "video/mpeg", "mpg, mpeg, mpe", NULL, FALSE }, - { "audio/wav", "wav", NULL, FALSE }, - { "audio/x-wav", "wav", NULL, TRUE }, - { "audio/mpeg", "mp3", NULL, FALSE }, - { "audio/x-mpeg", "mp3", NULL, TRUE } + { "application/ogg", "ogg", NULL }, + { "video/mpeg", "mpg, mpeg, mpe", NULL }, + { "audio/wav", "wav", NULL }, + { "audio/x-wav", "wav", NULL }, + { "audio/mpeg", "mp3", NULL }, }; totemScriptablePlugin::totemScriptablePlugin (totemPlugin *aPlugin) diff --git a/browser-plugin/totemComplexPlugin.cpp b/browser-plugin/totemComplexPlugin.cpp index 69d79994d..53f30ff14 100644 --- a/browser-plugin/totemComplexPlugin.cpp +++ b/browser-plugin/totemComplexPlugin.cpp @@ -50,10 +50,7 @@ static const char kClassDescription[] = "totemComplexPlugin"; static const char kPluginDescription[] = "Helix DNA Plugin: RealPlayer G2 Plug-In Compatible (compatible; Totem)"; static const totemPluginMimeEntry kMimeTypes[] = { - { "audio/x-pn-realaudio-plugin", "rpm", "audio/vnd.rn-realaudio", FALSE }, - { "audio/x-pn-realaudio", "rpm" , NULL, TRUE }, - { "application/vnd.rn-realmedia", "rpm", NULL, TRUE }, - { "application/smil", "smil", NULL, TRUE } + { "audio/x-pn-realaudio-plugin", "rpm", "audio/vnd.rn-realaudio" }, }; void* diff --git a/browser-plugin/totemGMPPlugin.cpp b/browser-plugin/totemGMPPlugin.cpp index 3461c124c..4deefdf17 100644 --- a/browser-plugin/totemGMPPlugin.cpp +++ b/browser-plugin/totemGMPPlugin.cpp @@ -60,21 +60,14 @@ static const char kClassDescription[] = "totemGMPPlugin"; static const char kPluginDescription[] = "Windows Media Player Plug-in 10 (compatible; Totem)"; static const totemPluginMimeEntry kMimeTypes[] = { - { "application/x-mplayer2", "avi, wma, wmv", "video/x-msvideo", FALSE }, - { "video/x-ms-asf-plugin", "asf, wmv", "video/x-ms-asf", FALSE }, - { "video/x-msvideo", "asf, wmv", NULL, FALSE }, - { "video/x-ms-asf", "asf", NULL, FALSE }, - { "video/x-ms-wmv", "wmv", "video/x-ms-wmv", FALSE }, - { "video/x-wmv", "wmv", "video/x-ms-wmv", FALSE }, - { "video/x-ms-wvx", "wmv", "video/x-ms-wmv", FALSE }, - { "video/x-ms-wm", "wmv", "video/x-ms-wmv", FALSE }, - { "video/x-ms-asx", "asx", NULL, TRUE }, - { "audio/x-ms-asx", "asx", NULL, TRUE }, - { "video/x-ms-wma", "wma", NULL, TRUE }, - { "audio/x-ms-wax", "wax", NULL, TRUE }, - { "video/mpeg", "mpg", NULL, TRUE }, - { "audio/mpeg", "mp3", NULL, TRUE }, - { "audio/x-mpegurl", "m3u", NULL, TRUE } + { "application/x-mplayer2", "avi, wma, wmv", "video/x-msvideo" }, + { "video/x-ms-asf-plugin", "asf, wmv", "video/x-ms-asf" }, + { "video/x-msvideo", "asf, wmv", NULL }, + { "video/x-ms-asf", "asf", NULL }, + { "video/x-ms-wmv", "wmv", "video/x-ms-wmv" }, + { "video/x-wmv", "wmv", "video/x-ms-wmv" }, + { "video/x-ms-wvx", "wmv", "video/x-ms-wmv" }, + { "video/x-ms-wm", "wmv", "video/x-ms-wmv" }, }; void* diff --git a/browser-plugin/totemMullYPlugin.cpp b/browser-plugin/totemMullYPlugin.cpp index 9c96a5626..2416d701f 100644 --- a/browser-plugin/totemMullYPlugin.cpp +++ b/browser-plugin/totemMullYPlugin.cpp @@ -51,8 +51,7 @@ static const char kClassDescription[] = "totemMullYPlugin"; static const char kPluginDescription[] = "DivX\xC2\xAE Web Player"; static const totemPluginMimeEntry kMimeTypes[] = { - { "video/divx", "divx", "video/x-msvideo", FALSE }, - { "video/x-msvideo", "avi", NULL, TRUE } + { "video/divx", "divx", "video/x-msvideo" }, }; totemScriptablePlugin::totemScriptablePlugin (totemPlugin *aPlugin) diff --git a/browser-plugin/totemNarrowSpacePlugin.cpp b/browser-plugin/totemNarrowSpacePlugin.cpp index e83832d27..fd673966f 100644 --- a/browser-plugin/totemNarrowSpacePlugin.cpp +++ b/browser-plugin/totemNarrowSpacePlugin.cpp @@ -50,11 +50,10 @@ static const char kClassDescription[] = "totemNarrowSpacePlugin"; static const char kPluginDescription[] = "QuickTime Plug-in 7.1.3"; static const totemPluginMimeEntry kMimeTypes[] = { - { "video/quicktime", "mov", NULL, FALSE }, - { "video/mp4", "mp4", NULL, FALSE }, - { "image/x-macpaint", "pntg", NULL, FALSE }, - { "image/x-quicktime", "pict, pict1, pict2", "image/x-pict", FALSE }, - { "application/x-quicktime-media-link", "qtl", NULL, TRUE } + { "video/quicktime", "mov", NULL }, + { "video/mp4", "mp4", NULL }, + { "image/x-macpaint", "pntg", NULL }, + { "image/x-quicktime", "pict, pict1, pict2", "image/x-pict" }, }; void* diff --git a/browser-plugin/totemPlugin.cpp b/browser-plugin/totemPlugin.cpp index 742fe35c2..de3fb8a1e 100644 --- a/browser-plugin/totemPlugin.cpp +++ b/browser-plugin/totemPlugin.cpp @@ -984,61 +984,6 @@ totemPlugin::GetRealMimeType (const char *mimetype, } PRBool -totemPlugin::IsMimeTypeSupported (const char *mimetype, - const char *url) -{ - NS_ENSURE_TRUE (mimetype, PR_FALSE); - -#if defined(TOTEM_NARROWSPACE_PLUGIN) || defined(TOTEM_GMP_PLUGIN) || defined(TOTEM_MULLY_PLUGIN) - /* We can always play those image types */ - if (strcmp (mimetype, "image/jpeg") == 0) - return PR_TRUE; - if (strcmp (mimetype, "image/gif") == 0) - return PR_TRUE; -#endif /* TOTEM_NARROWSPACE_PLUGIN || TOTEM_GMP_PLUGIN || TOTEM_MULLY_PLUGIN */ - - /* Stupid web servers will do that */ - if (strcmp (mimetype, GNOME_VFS_MIME_TYPE_UNKNOWN) == 0) - return PR_TRUE; - - const totemPluginMimeEntry *mimetypes; - PRUint32 count; - totemScriptablePlugin::PluginMimeTypes (&mimetypes, &count); - - for (PRUint32 i = 0; i < count; ++i) { - if (strcmp (mimetypes[i].mimetype, mimetype) == 0) - return PR_TRUE; - } - - /* Not supported? Probably a broken webserver */ - const char *guessed = gnome_vfs_get_mime_type_for_name (url); - - D ("Guessed mime-type '%s' for '%s'", guessed, url); - for (PRUint32 i = 0; i < count; ++i) { - if (strcmp (mimetypes[i].mimetype, guessed) == 0) - return PR_TRUE; - } - - /* Still unsupported? Try to get it without the arguments - * passed to the script */ - const char *s = strchr (url, '?'); - if (s == NULL) - return PR_FALSE; - - char *no_args = g_strndup (url, s - url); - guessed = gnome_vfs_get_mime_type_for_name (no_args); - D ("Guessed mime-type '%s' for '%s' without the arguments", guessed, url); - g_free (no_args); - - for (PRUint32 i = 0; i < count; ++i) { - if (strcmp (mimetypes[i].mimetype, guessed) == 0) - return PR_TRUE; - } - - return PR_FALSE; -} - -PRBool totemPlugin::IsSchemeSupported (nsIURI *aURI) { if (!aURI) @@ -1961,15 +1906,6 @@ totemPlugin::NewStream (NPMIMEType type, } #endif - if (!IsMimeTypeSupported (type, stream->url)) { - D ("Unsupported mimetype, aborting stream"); - - return CallNPN_DestroyStreamProc (sNPN.destroystream, - mInstance, - stream, - NPRES_DONE); - } - /* FIXME: assign the stream URL to mRequestURI ? */ if (g_str_has_prefix (stream->url, "file://")) { diff --git a/browser-plugin/totemPlugin.h b/browser-plugin/totemPlugin.h index 855062512..24667d757 100644 --- a/browser-plugin/totemPlugin.h +++ b/browser-plugin/totemPlugin.h @@ -279,7 +279,6 @@ typedef struct { const char *mimetype; const char *extensions; const char *mime_alias; - gboolean ignore; } totemPluginMimeEntry; #endif /* __TOTEM_PLUGIN_H__ */ diff --git a/browser-plugin/totemPluginGlue.cpp b/browser-plugin/totemPluginGlue.cpp index ce6698ecc..c70eaf744 100644 --- a/browser-plugin/totemPluginGlue.cpp +++ b/browser-plugin/totemPluginGlue.cpp @@ -308,9 +308,6 @@ NP_GetMIMEDescription (void) for (PRUint32 i = 0; i < count; ++i) { const char *desc; - if (mimetypes[i].ignore != FALSE) - continue; - desc = gnome_vfs_mime_get_description (mimetypes[i].mimetype); if (desc == NULL && mimetypes[i].mime_alias != NULL) { desc = gnome_vfs_mime_get_description |