rem: DEBUG("totem_plugin_new_instance");
add: D("totem_plugin_new_instance");
context: static NPError totem_plugin_new_instance (NPMIMEType mime_type, NPP instance,		uint16_t mode, int16_t argc, char *argn[], char *argv[],		NPSavedData *saved){	TotemPlugin *plugin;	GError *e = NULL;	int i;	DEBUG("totem_plugin_new_instance");	if (instance == NULL)		return NPERR_INVALID_INSTANCE_ERROR;	instance->pdata = mozilla_functions.memalloc(sizeof(TotemPlugin));	plugin = (TotemPlugin *) instance->pdata;	if (plugin == NULL)		return NPERR_OUT_OF_MEMORY_ERROR;	memset(plugin, 0, sizeof(TotemPlugin));	plugin->iface = new totemMozillaObject (plugin);	if (!plugin->iface) {		mozilla_functions.memfree (plugin);		return NPERR_OUT_OF_MEMORY_ERROR;	}	NS_ADDREF (plugin->iface);	if (!(plugin->conn = dbus_g_bus_get (DBUS_BUS_SESSION, &e))) {		printf ("Failed to open DBUS session: %s\n", e->message);		g_error_free (e);		NS_RELEASE (plugin->iface);		mozilla_functions.memfree (plugin);		return NPERR_OUT_OF_MEMORY_ERROR;	} else if (!(plugin->proxy = dbus_g_proxy_new_for_name (plugin->conn,					"org.freedesktop.DBus",					"/org/freedesktop/DBus",					"org.freedesktop.DBus"))) {		printf ("Failed to open DBUS proxy: %s\n", e->message);		g_error_free (e);		g_object_unref (G_OBJECT (plugin->conn));		NS_RELEASE (plugin->iface);		mozilla_functions.memfree (plugin);		return NPERR_OUT_OF_MEMORY_ERROR;	}	/* mode is NP_EMBED, NP_FULL, or NP_BACKGROUND (see npapi.h) */	printf("mode %d\n",mode);	//printf("mime type: %s\n",pluginType);	plugin->instance = instance;	plugin->send_fd = -1;	/* to resolve relative URLs */	nsCOMPtr<nsIDOMWindow> domWin;	mozilla_functions.getvalue (instance, NPNVDOMWindow, 				    NS_STATIC_CAST (nsIDOMWindow **, getter_AddRefs (domWin)));	nsCOMPtr<nsIWebNavigation> webNav (do_GetInterface (domWin));	nsCOMPtr<nsIURI> docURI;	if (webNav) {		webNav->GetCurrentURI (getter_AddRefs (docURI));	}	for (i=0; i<argc; i++) {		printf ("argv[%d] %s %s\n", i, argn[i], argv[i]);		if (g_ascii_strcasecmp (argn[i],"width") == 0) {			plugin->width = strtol (argv[i], NULL, 0);		}		if (g_ascii_strcasecmp (argn[i], "height") == 0) {			plugin->height = strtol (argv[i], NULL, 0);		}		if (g_ascii_strcasecmp (argn[i], "src") == 0) {			plugin->src = resolve_relative_uri (docURI, argv[i]);		}		if (g_ascii_strcasecmp (argn[i], "href") == 0) {			plugin->href = resolve_relative_uri (docURI, argv[i]);		}		if (g_ascii_strcasecmp (argn[i], "controller") == 0) {			if (g_ascii_strcasecmp (argv[i], "false") == 0) {				plugin->controller_hidden = TRUE;			}			//FIXME see http://www.htmlcodetutorial.com/embeddedobjects/_EMBED_CONTROLS.html		}		if (g_ascii_strcasecmp (argn[i], "hidden") == 0) {			//FIXME		}		if (g_ascii_strcasecmp (argn[i], "autostart") == 0				|| g_ascii_strcasecmp (argn[i], "autoplay") == 0) {			//FIXME		}		if (g_ascii_strcasecmp (argn[i], "loop") == 0 ||				g_ascii_strcasecmp (argn[i], "playcount") == 0) {			//FIXME see http://www.htmlcodetutorial.com/embeddedobjects/_EMBED_LOOP.html		}		if (g_ascii_strcasecmp (argn[i], "starttime") == 0) {			//FIXME see http://www.htmlcodetutorial.com/embeddedobjects/_EMBED_STARTTIME.html		}		if (g_ascii_strcasecmp (argn[i], "endtime") == 0) {			//FIXME see above		}	}	return NPERR_NO_ERROR;}