summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2005-03-20 18:12:18 +0000
committerBastien Nocera <hadess@src.gnome.org>2005-03-20 18:12:18 +0000
commitc8f730b3c975b764587897c173abc6011940eedd (patch)
tree37e00c3081715058b9f840deea43c92dc487ccc5
parentd016564947ef6ebbedb752a8cb3c4f2fbb418d37 (diff)
downloadtotem-c8f730b3c975b764587897c173abc6011940eedd.tar.gz
don't crash when we haven't forked the viewer, tell the browser we don't
2005-03-20 Bastien Nocera <hadess@hadess.net> * src/totem-mozilla-plugin.c: (totem_plugin_destroy_instance), (totem_plugin_get_value): don't crash when we haven't forked the viewer, tell the browser we don't have a scriptable interface yet, starts of RealAudio support
-rw-r--r--ChangeLog7
-rw-r--r--src/totem-mozilla-plugin.c15
-rw-r--r--src/totem-mozilla-plugin.cpp15
3 files changed, 29 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 268979599..586464a21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2005-03-20 Bastien Nocera <hadess@hadess.net>
+ * src/totem-mozilla-plugin.c: (totem_plugin_destroy_instance),
+ (totem_plugin_get_value): don't crash when we haven't forked the
+ viewer, tell the browser we don't have a scriptable interface yet,
+ starts of RealAudio support
+
+2005-03-20 Bastien Nocera <hadess@hadess.net>
+
* src/totem-mozilla-viewer.c: (on_video_button_press_event): Haha!
QuickTime actually shows the controls after the initial no controls
diff --git a/src/totem-mozilla-plugin.c b/src/totem-mozilla-plugin.c
index a689a4830..fb808789d 100644
--- a/src/totem-mozilla-plugin.c
+++ b/src/totem-mozilla-plugin.c
@@ -217,8 +217,10 @@ static NPError totem_plugin_destroy_instance (NPP instance, NPSavedData **save)
if (plugin->send_fd >= 0)
close(plugin->send_fd);
- kill (plugin->player_pid, SIGKILL);
- waitpid (plugin->player_pid, NULL, 0);
+ if (plugin->player_pid) {
+ kill (plugin->player_pid, SIGKILL);
+ waitpid (plugin->player_pid, NULL, 0);
+ }
mozilla_functions.memfree (instance->pdata);
instance->pdata = NULL;
@@ -388,6 +390,10 @@ totem_plugin_get_value (NPP instance, NPPVariable variable,
case NPPVpluginNeedsXEmbed:
*((PRBool *)value) = PR_TRUE;
break;
+ case NPPVpluginScriptableIID:
+ g_message ("we're not scriptable yet: NPPVpluginScriptableIID");
+ *((PRBool *)value) = PR_FALSE;
+ break;
default:
g_message ("unhandled variable %d", variable);
err = NPERR_INVALID_PARAM;
@@ -411,7 +417,7 @@ NP_GetValue(void *future, NPPVariable variable, void *value)
return totem_plugin_get_value (NULL, variable, value);
}
-#define NUM_MIME_TYPES 3
+#define NUM_MIME_TYPES 3 //FIXME no realaudio just yet
static struct {
const char *mime_type;
const char *extensions;
@@ -419,7 +425,8 @@ static struct {
} mime_types[] = {
{ "video/quicktime", "mov" },
{ "application/x-mplayer2", "avi, wma, wmv", "video/x-msvideo" },
- { "video/mpeg", "mpg, mpeg, mpe" }
+ { "video/mpeg", "mpg, mpeg, mpe" },
+ { "audio/x-pn-realaudio-plugin", "rpm", "audio/x-pn-realaudio" }
};
char *NP_GetMIMEDescription(void)
diff --git a/src/totem-mozilla-plugin.cpp b/src/totem-mozilla-plugin.cpp
index a689a4830..fb808789d 100644
--- a/src/totem-mozilla-plugin.cpp
+++ b/src/totem-mozilla-plugin.cpp
@@ -217,8 +217,10 @@ static NPError totem_plugin_destroy_instance (NPP instance, NPSavedData **save)
if (plugin->send_fd >= 0)
close(plugin->send_fd);
- kill (plugin->player_pid, SIGKILL);
- waitpid (plugin->player_pid, NULL, 0);
+ if (plugin->player_pid) {
+ kill (plugin->player_pid, SIGKILL);
+ waitpid (plugin->player_pid, NULL, 0);
+ }
mozilla_functions.memfree (instance->pdata);
instance->pdata = NULL;
@@ -388,6 +390,10 @@ totem_plugin_get_value (NPP instance, NPPVariable variable,
case NPPVpluginNeedsXEmbed:
*((PRBool *)value) = PR_TRUE;
break;
+ case NPPVpluginScriptableIID:
+ g_message ("we're not scriptable yet: NPPVpluginScriptableIID");
+ *((PRBool *)value) = PR_FALSE;
+ break;
default:
g_message ("unhandled variable %d", variable);
err = NPERR_INVALID_PARAM;
@@ -411,7 +417,7 @@ NP_GetValue(void *future, NPPVariable variable, void *value)
return totem_plugin_get_value (NULL, variable, value);
}
-#define NUM_MIME_TYPES 3
+#define NUM_MIME_TYPES 3 //FIXME no realaudio just yet
static struct {
const char *mime_type;
const char *extensions;
@@ -419,7 +425,8 @@ static struct {
} mime_types[] = {
{ "video/quicktime", "mov" },
{ "application/x-mplayer2", "avi, wma, wmv", "video/x-msvideo" },
- { "video/mpeg", "mpg, mpeg, mpe" }
+ { "video/mpeg", "mpg, mpeg, mpe" },
+ { "audio/x-pn-realaudio-plugin", "rpm", "audio/x-pn-realaudio" }
};
char *NP_GetMIMEDescription(void)