Commit 08504d7f authored by Christian Persch's avatar Christian Persch Committed by Christian Persch

A browser-plugin/org_gnome_totem_PluginViewer.xml: A

2006-11-15  Christian Persch  <chpe@cvs.gnome.org>

	* Makefile.am:
	* browser-plugin/Makefile.am:
	* browser-plugin/README:
	* browser-plugin/TODO:
	A browser-plugin/org_gnome_totem_PluginViewer.xml:
	A browser-plugin/totem-plugin-viewer-commands.h:
	A browser-plugin/totem-plugin-viewer-options.h:
	A browser-plugin/totem-plugin-viewer.c:
	* browser-plugin/totemBasicPlugin.cpp:
	* browser-plugin/totemBasicPlugin.h:
	* browser-plugin/totemComplexPlugin.cpp:
	* browser-plugin/totemComplexPlugin.h:
	* browser-plugin/totemGMPPlugin.cpp:
	* browser-plugin/totemGMPPlugin.h:
	* browser-plugin/totemMullYPlugin.cpp:
	* browser-plugin/totemMullYPlugin.h:
	* browser-plugin/totemNarrowSpacePlugin.cpp:
	* browser-plugin/totemNarrowSpacePlugin.h:
	* browser-plugin/totemPlugin.cpp:
	* browser-plugin/totemPlugin.h:
	* browser-plugin/totemPluginGlue.cpp:
	* configure.in:
	* data/mozilla-viewer.glade:
	* po/POTFILES.in:
	* src/Makefile.am:
	* src/backend/bvw-test.c: (on_redirect), (main):
	* src/plparse/totem-pl-parser.c:
	(totem_pl_parser_can_parse_from_data):
	R src/totem-mozilla-interface.xml:
	R src/totem-mozilla-options.h:
	R src/totem-mozilla-viewer.c:

	Make plugin / viewer interaction completely async. Bug #350297.
	Move plugin viewer from src/ to browser-plugin/.
parent 9a634aa3
2006-11-15 Christian Persch <chpe@cvs.gnome.org>
* Makefile.am:
* browser-plugin/Makefile.am:
* browser-plugin/README:
* browser-plugin/TODO:
A browser-plugin/org_gnome_totem_PluginViewer.xml:
A browser-plugin/totem-plugin-viewer-commands.h:
A browser-plugin/totem-plugin-viewer-options.h:
A browser-plugin/totem-plugin-viewer.c:
* browser-plugin/totemBasicPlugin.cpp:
* browser-plugin/totemBasicPlugin.h:
* browser-plugin/totemComplexPlugin.cpp:
* browser-plugin/totemComplexPlugin.h:
* browser-plugin/totemGMPPlugin.cpp:
* browser-plugin/totemGMPPlugin.h:
* browser-plugin/totemMullYPlugin.cpp:
* browser-plugin/totemMullYPlugin.h:
* browser-plugin/totemNarrowSpacePlugin.cpp:
* browser-plugin/totemNarrowSpacePlugin.h:
* browser-plugin/totemPlugin.cpp:
* browser-plugin/totemPlugin.h:
* browser-plugin/totemPluginGlue.cpp:
* configure.in:
* data/mozilla-viewer.glade:
* po/POTFILES.in:
* src/Makefile.am:
* src/backend/bvw-test.c: (on_redirect), (main):
* src/plparse/totem-pl-parser.c:
(totem_pl_parser_can_parse_from_data):
R src/totem-mozilla-interface.xml:
R src/totem-mozilla-options.h:
R src/totem-mozilla-viewer.c:
Make plugin / viewer interaction completely async. Bug #350297.
Move plugin viewer from src/ to browser-plugin/.
============ Version 2.17.3
2006-11-15 Bastien Nocera <hadess@hadess.net>
......
SUBDIRS = po data src browser-plugin help
SUBDIRS = po data src help
install-data-local:
@$(NORMAL_INSTALL)
if ENABLE_BROWSER_PLUGINS
SUBDIRS += browser-plugin
endif
EXTRA_DIST = \
COPYING.LIB \
......@@ -25,4 +26,4 @@ DISTCLEANFILES = intltool-extract intltool-merge intltool-update \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = totem-plparser.pc
DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper
\ No newline at end of file
DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper
......@@ -3,6 +3,8 @@ SUBDIRS = idl
plugindir = $(libdir)/mozilla/plugins
plugin_LTLIBRARIES =
BUILT_SOURCES =
EXTRA_DIST = \
plugin.symbols \
TODO
......@@ -11,7 +13,65 @@ gecko_include_subdirs = \
. \
docshell \
dom \
necko
necko \
xpcom
# Totem Plugin Viewer
libexec_PROGRAMS = totem-plugin-viewer
totem_plugin_viewer_SOURCES = \
totem-plugin-viewer.c \
totem-plugin-viewer-interface.h \
totem-plugin-viewer-commands.h \
totem-plugin-viewer-options.h
totem_plugin_viewer_CPPFLAGS = \
-D_REENTRANT \
-DDBUS_API_SUBJECT_TO_CHANGE \
-I$(top_srcdir) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/plparse \
-I$(top_srcdir)/src/backend \
-I$(top_builddir)/src \
-I$(top_builddir)/src/plparse \
-I$(top_builddir)/src/backend \
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
-DGCONF_PREFIX="\"/apps/totem\"" \
-DDATADIR="\"$(datadir)\"" \
-DLIBEXECDIR="\"$(libexecdir)\"" \
-DBINDIR="\"$(bindir)\"" \
-DSHAREDIR="\"$(pkgdatadir)\"" \
-DLOGO_NAME="\"totem_logo.png\"" \
$(AM_CPPFLAGS)
totem_plugin_viewer_CFLAGS = \
$(EXTRA_GNOME_CFLAGS) \
$(WARN_CFLAGS) \
$(DBUS_CFLAGS) \
$(NVTV_CFLAGS) \
$(AM_CFLAGS)
totem_plugin_viewer_LDADD = \
$(top_builddir)/src/backend/libbaconvideowidget.la \
$(top_builddir)/src/libbaconpropertiespage.la \
$(top_builddir)/src/libtotem_player.la \
$(top_builddir)/src/plparse/libtotem-plparser.la \
$(EXTRA_GNOME_LIBS) \
$(XVIDMODE_LIBS) \
$(DBUS_LIBS) \
$(NVTV_LIBS) \
$(XTEST_LIBS) \
$(X_LIBS)
BUILT_SOURCES += \
totem-plugin-viewer-interface.h
totem-plugin-viewer-interface.h: org_gnome_totem_PluginViewer.xml
$(DBUS_BIND) --prefix=totem_embedded --mode=glib-server $< > $@
EXTRA_DIST += \
org_gnome_totem_PluginViewer.xml
# Totem Basic Plugin
......@@ -25,7 +85,8 @@ libtotem_basic_plugin_la_SOURCES = \
totemPlugin.cpp \
totemPlugin.h \
totemBasicPlugin.cpp \
totemBasicPlugin.h
totemBasicPlugin.h \
totem-plugin-viewer-commands.h
libtotem_basic_plugin_la_CPPFLAGS = \
-I$(top_srcdir)/src \
......@@ -40,11 +101,11 @@ libtotem_basic_plugin_la_CPPFLAGS = \
-DTOTEM_PL_PARSER_MINI \
-D_REENTRANT \
-DDBUS_API_SUBJECT_TO_CHANGE \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DGCONF_PREFIX=\""/apps/totem"\" \
-DDATADIR=\""$(pkgdatadir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DBINDIR=\""$(bindir)"\" \
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
-DGCONF_PREFIX="\"/apps/totem\"" \
-DDATADIR="\"$(pkgdatadir)\"" \
-DLIBEXECDIR="\"$(libexecdir)\"" \
-DBINDIR="\"$(bindir)\"" \
$(AM_CPPFLAGS)
libtotem_basic_plugin_la_CFLAGS = \
......@@ -65,7 +126,8 @@ libtotem_basic_plugin_la_CXXFLAGS = \
libtotem_basic_plugin_la_LIBADD = \
$(top_builddir)/src/plparse/libtotem-plparser-mini.la \
$(DBUS_LIBS) \
$(MOZILLA_LIBS)
$(MOZILLA_LIBS) \
$(LIBXPCOMGLUE_S)
libtotem_basic_plugin_la_LDFLAGS = \
-avoid-version \
......@@ -87,7 +149,8 @@ libtotem_gmp_plugin_la_SOURCES = \
totemPlugin.cpp \
totemPlugin.h \
totemGMPPlugin.cpp \
totemGMPPlugin.h
totemGMPPlugin.h \
totem-plugin-viewer-commands.h
libtotem_gmp_plugin_la_CPPFLAGS = \
-I$(top_srcdir)/src \
......@@ -102,11 +165,11 @@ libtotem_gmp_plugin_la_CPPFLAGS = \
-DTOTEM_PL_PARSER_MINI \
-D_REENTRANT \
-DDBUS_API_SUBJECT_TO_CHANGE \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DGCONF_PREFIX=\""/apps/totem"\" \
-DDATADIR=\""$(pkgdatadir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DBINDIR=\""$(bindir)"\" \
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
-DGCONF_PREFIX="\"/apps/totem\"" \
-DDATADIR="\"$(pkgdatadir)\"" \
-DLIBEXECDIR="\"$(libexecdir)\"" \
-DBINDIR="\"$(bindir)\"" \
$(AM_CPPFLAGS)
libtotem_gmp_plugin_la_CFLAGS = \
......@@ -127,7 +190,8 @@ libtotem_gmp_plugin_la_CXXFLAGS = \
libtotem_gmp_plugin_la_LIBADD = \
$(top_builddir)/src/plparse/libtotem-plparser-mini.la \
$(DBUS_LIBS) \
$(MOZILLA_LIBS)
$(MOZILLA_LIBS) \
$(LIBXPCOMGLUE_S)
libtotem_gmp_plugin_la_LDFLAGS = \
-avoid-version \
......@@ -149,7 +213,8 @@ libtotem_complex_plugin_la_SOURCES = \
totemPlugin.cpp \
totemPlugin.h \
totemComplexPlugin.cpp \
totemComplexPlugin.h
totemComplexPlugin.h \
totem-plugin-viewer-commands.h
libtotem_complex_plugin_la_CPPFLAGS = \
-I$(top_srcdir)/src \
......@@ -164,11 +229,11 @@ libtotem_complex_plugin_la_CPPFLAGS = \
-DTOTEM_PL_PARSER_MINI \
-D_REENTRANT \
-DDBUS_API_SUBJECT_TO_CHANGE \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DGCONF_PREFIX=\""/apps/totem"\" \
-DDATADIR=\""$(pkgdatadir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DBINDIR=\""$(bindir)"\" \
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
-DGCONF_PREFIX="\"/apps/totem\"" \
-DDATADIR="\"$(pkgdatadir)\"" \
-DLIBEXECDIR="\"$(libexecdir)\"" \
-DBINDIR="\"$(bindir)\"" \
$(AM_CPPFLAGS)
libtotem_complex_plugin_la_CFLAGS = \
......@@ -189,7 +254,8 @@ libtotem_complex_plugin_la_CXXFLAGS = \
libtotem_complex_plugin_la_LIBADD = \
$(top_builddir)/src/plparse/libtotem-plparser-mini.la \
$(DBUS_LIBS) \
$(MOZILLA_LIBS)
$(MOZILLA_LIBS) \
$(LIBXPCOMGLUE_S)
libtotem_complex_plugin_la_LDFLAGS = \
-avoid-version \
......@@ -211,7 +277,8 @@ libtotem_narrowspace_plugin_la_SOURCES = \
totemPlugin.cpp \
totemPlugin.h \
totemNarrowSpacePlugin.cpp \
totemNarrowSpacePlugin.h
totemNarrowSpacePlugin.h \
totem-plugin-viewer-commands.h
libtotem_narrowspace_plugin_la_CPPFLAGS = \
-I$(top_srcdir)/src \
......@@ -226,11 +293,11 @@ libtotem_narrowspace_plugin_la_CPPFLAGS = \
-DTOTEM_PL_PARSER_MINI \
-D_REENTRANT \
-DDBUS_API_SUBJECT_TO_CHANGE \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DGCONF_PREFIX=\""/apps/totem"\" \
-DDATADIR=\""$(pkgdatadir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DBINDIR=\""$(bindir)"\" \
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
-DGCONF_PREFIX="\"/apps/totem\"" \
-DDATADIR="\"$(pkgdatadir)\"" \
-DLIBEXECDIR="\"$(libexecdir)\"" \
-DBINDIR="\"$(bindir)\"" \
$(AM_CPPFLAGS)
libtotem_narrowspace_plugin_la_CFLAGS = \
......@@ -251,7 +318,8 @@ libtotem_narrowspace_plugin_la_CXXFLAGS = \
libtotem_narrowspace_plugin_la_LIBADD = \
$(top_builddir)/src/plparse/libtotem-plparser-mini.la \
$(DBUS_LIBS) \
$(MOZILLA_LIBS)
$(MOZILLA_LIBS) \
$(LIBXPCOMGLUE_S)
libtotem_narrowspace_plugin_la_LDFLAGS = \
-avoid-version \
......@@ -273,7 +341,8 @@ libtotem_mully_plugin_la_SOURCES = \
totemPlugin.cpp \
totemPlugin.h \
totemMullYPlugin.cpp \
totemMullYPlugin.h
totemMullYPlugin.h \
totem-plugin-viewer-commands.h
libtotem_mully_plugin_la_CPPFLAGS = \
-I$(top_srcdir)/src \
......@@ -288,11 +357,11 @@ libtotem_mully_plugin_la_CPPFLAGS = \
-DTOTEM_PL_PARSER_MINI \
-D_REENTRANT \
-DDBUS_API_SUBJECT_TO_CHANGE \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DGCONF_PREFIX=\""/apps/totem"\" \
-DDATADIR=\""$(pkgdatadir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DBINDIR=\""$(bindir)"\" \
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
-DGCONF_PREFIX="\"/apps/totem\"" \
-DDATADIR="\"$(pkgdatadir)\"" \
-DLIBEXECDIR="\"$(libexecdir)\"" \
-DBINDIR="\"$(bindir)\"" \
$(AM_CPPFLAGS)
libtotem_mully_plugin_la_CFLAGS = \
......@@ -313,7 +382,8 @@ libtotem_mully_plugin_la_CXXFLAGS = \
libtotem_mully_plugin_la_LIBADD = \
$(top_builddir)/src/plparse/libtotem-plparser-mini.la \
$(DBUS_LIBS) \
$(MOZILLA_LIBS)
$(MOZILLA_LIBS) \
$(LIBXPCOMGLUE_S)
libtotem_mully_plugin_la_LDFLAGS = \
-avoid-version \
......
Notes on the plugin's internas
==============================
Special topics: Complex plugin
==============================
The complex plugin supports multiple plugins working together, see
[http://service.real.com/help/library/guides/realone/ProductionGuide/HTML/realpgd.htm?page=htmfiles/embed.htm].
To implement this, we maintain a list of totem complex plugins.
The plugins are partitioned into classes by their 'console' name; and a
random plugin (well, the first one instantiated) is chosen as representant.
This one owns the plugin viewer and all viewer interaction of the linked plugins
are done trough it. When this plugin is destroyed, we search for a new
representant, transfer the viewer ownership to it and update the representant
pointer in all of the classes' plugins.
......@@ -2,6 +2,18 @@ Plugin:
- get info about play state, URL etc back from viewer to the plugin
- support all <embed> and <object> attributes that the legacy plugins support
- there still seem to be some unnecessary symbols exported in the plugin .so's
- use peer-2-peer DBUS instead of session bus
- (maybe) use libdbus directly instead of dbus-glib
- unify playlist handling into the viewer (is it possible to write a gstreamer element
that handles the playlist internally?)
- make StreamAsFile use async calls; need to keep a link to the file around!!
- put back narrowspace URL extension parsing
- use nsCOMPtr<> once the linking has been figured out (libxpcomglue_s)
- invert DBUS-OpenStream/NPN_GetURL order: this is necessary so we can push the real stream URI
to the viewer (for use as base uri for redirects)
Viewer:
- show totem logo image when waiting for click to start?
GMP plugin:
- write IDL files (where [_not_ MSDN !] to find documentation?)
......@@ -9,6 +21,8 @@ GMP plugin:
Complex plugin:
- write IDL file (nsIHXPlayer.idl available, but incompatible with totem's
licence exception; is the exception needed for the *plugin* itself?)
- implement the various 'controls' types in the viewer
- in the viewer, cope with the 'main' window being removed? (maybe reparent to a hidden window)
NarrowSpace plugin:
- write IDL file (where to find documentation?)
<?xml version="1.0" encoding="UTF-8" ?>
<node name="/org/gnome/totem/PluginViewer">
<interface name="org.gnome.totem.PluginViewer">
<method name="DoCommand">
<arg type="s" name="Command" direction="in" />
</method>
<method name="SetWindow">
<arg type="s" name="Controls" direction="in" />
<arg type="u" name="XID" direction="in" />
<arg type="i" name="Width" direction="in" />
<arg type="i" name="Height" direction="in" />
</method>
<method name="UnsetWindow">
<arg type="u" name="XID" direction="in" />
</method>
<method name="OpenStream">
<arg type="s" name="URI" direction="in" />
<arg type="s" name="BaseURI" direction="in" />
</method>
<method name="CloseStream" />
<method name="OpenURI">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="totem_embedded_open_uri" />
<arg type="s" name="URI" direction="in" />
<arg type="s" name="BaseURI" direction="in" />
</method>
<method name="SetPlaylist">
<arg type="s" name="Path" direction="in" />
<arg type="s" name="URI" direction="in" />
<arg type="s" name="BaseURI" direction="in" />
</method>
<method name="SetLocalFile">
<arg type="s" name="Path" direction="in" />
<arg type="s" name="URI" direction="in" />
<arg type="s" name="BaseURI" direction="in" />
</method>
<signal name="ButtonPress" />
<signal name="StartStream" />
<signal name="StopStream" />
</interface>
</node>
/* Totem Plugin Viewer commands
*
* Copyright © 2006 Christian Persch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __TOTEM_PLUGIN_VIEWER_COMMANDS__
#define __TOTEM_PLUGIN_VIEWER_COMMANDS__
#define TOTEM_COMMAND_PLAY "Play"
#define TOTEM_COMMAND_PAUSE "Pause"
#define TOTEM_COMMAND_STOP "Stop"
#endif /* !__TOTEM_PLUGIN_VIEWER_COMMANDS__ */
/* Totem Mozilla plugin
/* Totem Plugin Viewer options
*
* Copyright (C) <2005> Bastien Nocera <hadess@hadess.net>
* Copyright © 2005 Bastien Nocera <hadess@hadess.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -18,16 +18,22 @@
* Boston, MA 02111-1307, USA.
*/
#define TOTEM_OPTION_XID "xid"
#define TOTEM_OPTION_WIDTH "width"
#define TOTEM_OPTION_HEIGHT "height"
#define TOTEM_OPTION_URL "url"
#define TOTEM_OPTION_CONTROLS_HIDDEN "nocontrols"
#define TOTEM_OPTION_STATUSBAR "statusbar"
#define TOTEM_OPTION_HREF "href"
#define TOTEM_OPTION_TARGET "target"
#ifndef __TOTEM_PLUGIN_VIEWER_OPTIONS_H__
#define __TOTEM_PLUGIN_VIEWER_OPTIONS_H__
#define TOTEM_PLUGIN_VIEWER_INTERFACE_NAME "org.gnome.totem.PluginViewer"
#define TOTEM_PLUGIN_VIEWER_NAME_TEMPLATE "org.gnome.totem.PluginViewer_%d"
#define TOTEM_PLUGIN_VIEWER_DBUS_PATH "/org/gnome/totem/PluginViewer"
#define TOTEM_OPTION_BASE_URI "base-uri"
#define TOTEM_OPTION_CONTROLS_HIDDEN "no-controls"
#define TOTEM_OPTION_HIDDEN "hidden"
#define TOTEM_OPTION_MIMETYPE "mimetype"
#define TOTEM_OPTION_NOAUTOSTART "no-autostart"
#define TOTEM_OPTION_PLAYLIST "playlist"
#define TOTEM_OPTION_PLUGIN_TYPE "plugin-type"
#define TOTEM_OPTION_REPEAT "repeat"
#define TOTEM_OPTION_NOAUTOSTART "noautostart"
#define TOTEM_OPTION_USER_AGENT "user-agent"
#define TOTEM_OPTION_STATUSBAR "statusbar"
#endif /* !__TOTEM_PLUGIN_VIEWER_OPTIONS_H__ */
......@@ -183,7 +183,7 @@ totemScriptablePlugin::Play ()
{
NS_ENSURE_STATE (IsValid ());
return mPlugin->Play ();
return mPlugin->DoCommand (TOTEM_COMMAND_PLAY);
}
NS_IMETHODIMP
......@@ -191,7 +191,7 @@ totemScriptablePlugin::Rewind ()
{
NS_ENSURE_STATE (IsValid ());
return mPlugin->Pause ();
return mPlugin->DoCommand (TOTEM_COMMAND_PAUSE);
}
NS_IMETHODIMP
......@@ -199,5 +199,5 @@ totemScriptablePlugin::Stop ()
{
NS_ENSURE_STATE (IsValid ());
return mPlugin->Stop ();
return mPlugin->DoCommand (TOTEM_COMMAND_STOP);
}
......@@ -40,7 +40,7 @@ class totemScriptablePlugin : public totemIBasicPlayer,
totemScriptablePlugin (totemPlugin *aPlugin);
PRBool IsValid () { return mPlugin != nsnull; }
void UnsetPlugin () { mPlugin = nsnull; }
void SetPlugin (totemPlugin *aPlugin) { mPlugin = aPlugin; }
static char *PluginDescription ();
static void PluginMimeTypes (const totemPluginMimeEntry **, PRUint32 *);
......
......@@ -181,7 +181,7 @@ totemScriptablePlugin::DoPause (PRBool *_retval)
{
NS_ENSURE_STATE (IsValid ());
nsresult rv = mPlugin->Pause ();
nsresult rv = mPlugin->DoCommand (TOTEM_COMMAND_PAUSE);
*_retval = PR_TRUE;
return rv;
......@@ -192,7 +192,7 @@ totemScriptablePlugin::DoPlay (PRBool *_retval)
{
NS_ENSURE_STATE (IsValid ());
nsresult rv = mPlugin->Play ();
nsresult rv = mPlugin->DoCommand (TOTEM_COMMAND_PLAY);
*_retval = PR_TRUE;
return rv;
......@@ -203,7 +203,7 @@ totemScriptablePlugin::DoStop (PRBool *_retval)
{
NS_ENSURE_STATE (IsValid ());
nsresult rv = mPlugin->Stop ();
nsresult rv = mPlugin->DoCommand (TOTEM_COMMAND_STOP);
*_retval = PR_TRUE;
return rv;
......
......@@ -40,7 +40,7 @@ class totemScriptablePlugin : public totemIComplexPlayer,
totemScriptablePlugin (totemPlugin *aPlugin);
PRBool IsValid () { return mPlugin != nsnull; }
void UnsetPlugin () { mPlugin = nsnull; }
void SetPlugin (totemPlugin *aPlugin) { mPlugin = aPlugin; }
static char *PluginDescription ();
static void PluginMimeTypes (const totemPluginMimeEntry **, PRUint32 *);
......
......@@ -208,7 +208,7 @@ totemScriptablePlugin::Pause ()
{
NS_ENSURE_STATE (IsValid ());
return mPlugin->Pause ();
return mPlugin->DoCommand (TOTEM_COMMAND_PAUSE);
}
NS_IMETHODIMP
......@@ -216,7 +216,7 @@ totemScriptablePlugin::Play ()
{
NS_ENSURE_STATE (IsValid ());
return mPlugin->Play ();
return mPlugin->DoCommand (TOTEM_COMMAND_PLAY);
}
NS_IMETHODIMP
......@@ -224,5 +224,5 @@ totemScriptablePlugin::Stop ()
{
NS_ENSURE_STATE (IsValid ());
return mPlugin->Stop ();
return mPlugin->DoCommand (TOTEM_COMMAND_STOP);
}
......@@ -44,7 +44,7 @@ class totemScriptablePlugin : public totemIGMPPlayer,
totemScriptablePlugin (totemPlugin *aPlugin);
PRBool IsValid () { return mPlugin != nsnull; }
void UnsetPlugin () { mPlugin = nsnull; }
void SetPlugin (totemPlugin *aPlugin) { mPlugin = aPlugin; }
static char *PluginDescription ();
static void PluginMimeTypes (const totemPluginMimeEntry **, PRUint32 *);
......
......@@ -179,7 +179,7 @@ totemScriptablePlugin::Rewind ()
{
NS_ENSURE_STATE (IsValid ());
return mPlugin->Pause ();
return mPlugin->DoCommand (TOTEM_COMMAND_PAUSE);
}
NS_IMETHODIMP
......@@ -187,7 +187,7 @@ totemScriptablePlugin::Play ()
{
NS_ENSURE_STATE (IsValid ());
return mPlugin->Play ();
return mPlugin->DoCommand (TOTEM_COMMAND_PLAY);
}
NS_IMETHODIMP
......@@ -195,5 +195,5 @@ totemScriptablePlugin::Stop ()
{
NS_ENSURE_STATE (IsValid ());
return mPlugin->Stop ();
return mPlugin->DoCommand (TOTEM_COMMAND_STOP);
}
......@@ -41,7 +41,7 @@ class totemScriptablePlugin : public totemIMullYPlayer,
totemScriptablePlugin (totemPlugin *aPlugin);
PRBool IsValid () { return mPlugin != nsnull; }
void UnsetPlugin () { mPlugin = nsnull; }
void SetPlugin (totemPlugin *aPlugin) { mPlugin = aPlugin; }
static char *PluginDescription ();
static void PluginMimeTypes (const totemPluginMimeEntry **, PRUint32 *);
......
......@@ -181,7 +181,7 @@ totemScriptablePlugin::Play ()
{
NS_ENSURE_STATE (IsValid ());
return mPlugin->Play ();
return mPlugin->DoCommand (TOTEM_COMMAND_PLAY);
}
NS_IMETHODIMP
......@@ -189,7 +189,7 @@ totemScriptablePlugin::Rewind ()
{
NS_ENSURE_STATE (IsValid ());
return mPlugin->Pause ();
return mPlugin->DoCommand (TOTEM_COMMAND_PAUSE);
}
NS_IMETHODIMP
......@@ -197,5 +197,5 @@ totemScriptablePlugin::Stop ()
{
NS_ENSURE_STATE (IsValid ());
return mPlugin->Stop ();
return mPlugin->DoCommand (TOTEM_COMMAND_STOP);
}
......@@ -40,7 +40,7 @@ class totemScriptablePlugin : public totemINarrowSpacePlayer,
totemScriptablePlugin (totemPlugin *aPlugin);