totem r5118 - in trunk: . browser-plugin browser-plugin/idl
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem r5118 - in trunk: . browser-plugin browser-plugin/idl
- Date: Wed, 13 Feb 2008 19:18:57 +0000 (GMT)
Author: hadess
Date: Wed Feb 13 19:18:57 2008
New Revision: 5118
URL: http://svn.gnome.org/viewvc/totem?rev=5118&view=rev
Log:
2008-02-13 Bastien Nocera <hadess hadess net>
* browser-plugin/idl/Makefile.am:
* browser-plugin/idl/totemIConeAudio.idl:
* browser-plugin/idl/totemIConeInput.idl:
* browser-plugin/idl/totemIConePlaylist.idl:
* browser-plugin/idl/totemIConePlaylistItems.idl:
* browser-plugin/idl/totemIConeVideo.idl:
Update the IDL for VLC 0.8.6 and above
* browser-plugin/totem-plugin-viewer.c: (totem_embedded_open_uri),
(totem_embedded_open_stream), (totem_embedded_update_menu):
Add more debug for some remote functions, and try to use
the stream_uri when it's available
* browser-plugin/totemConePlugin.cpp:
* browser-plugin/totemConePlugin.h: Implement stubs for
Playlist and PlaylistItems objects
Added:
trunk/browser-plugin/idl/totemIConePlaylistItems.idl
Modified:
trunk/ChangeLog
trunk/browser-plugin/idl/Makefile.am
trunk/browser-plugin/idl/totemIConeAudio.idl
trunk/browser-plugin/idl/totemIConeInput.idl
trunk/browser-plugin/idl/totemIConePlaylist.idl
trunk/browser-plugin/idl/totemIConeVideo.idl
trunk/browser-plugin/totem-plugin-viewer.c
trunk/browser-plugin/totemConePlugin.cpp
trunk/browser-plugin/totemConePlugin.h
Modified: trunk/browser-plugin/idl/Makefile.am
==============================================================================
--- trunk/browser-plugin/idl/Makefile.am (original)
+++ trunk/browser-plugin/idl/Makefile.am Wed Feb 13 19:18:57 2008
@@ -35,6 +35,7 @@
totemIConeAudio.idl \
totemIConeInput.idl \
totemIConePlaylist.idl \
+ totemIConePlaylistItems.idl \
totemIConeVideo.idl
xptdir = $(MOZILLA_PLUGINDIR)
Modified: trunk/browser-plugin/idl/totemIConeAudio.idl
==============================================================================
--- trunk/browser-plugin/idl/totemIConeAudio.idl (original)
+++ trunk/browser-plugin/idl/totemIConeAudio.idl Wed Feb 13 19:18:57 2008
@@ -1,5 +1,5 @@
/*
- * Copyright  2006-2007, Bastien Nocera <hadess hadess net
+ * Copyright  2006-2008, Bastien Nocera <hadess hadess net
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -20,13 +20,15 @@
#include "nsISupports.idl"
/* Documentation at
- * http://www.videolan.org/doc/play-howto/en/ch04.html#id294468 */
+ * http://wiki.videolan.org/Documentation:Play_HowTo/Advanced_Use_of_VLC#Building_HTML_pages_for_Mozilla.2FFirefox.2FInternet_Explorere.2FSafari_.28VLC_version_0.8.6_and_above.29 */
[scriptable, uuid(d31bc3e4-00d8-46f2-a841-990d63b16347)]
interface totemIConeAudio : nsISupports
{
attribute boolean mute;
attribute long volume;
+ attribute long track;
+ attribute long channel;
void toggleMute ();
};
Modified: trunk/browser-plugin/idl/totemIConeInput.idl
==============================================================================
--- trunk/browser-plugin/idl/totemIConeInput.idl (original)
+++ trunk/browser-plugin/idl/totemIConeInput.idl Wed Feb 13 19:18:57 2008
@@ -1,5 +1,5 @@
/*
- * Copyright  2006-2007, Bastien Nocera <hadess hadess net
+ * Copyright  2006-2008, Bastien Nocera <hadess hadess net
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -20,7 +20,7 @@
#include "nsISupports.idl"
/* Documentation at
- * http://www.videolan.org/doc/play-howto/en/ch04.html#id294468 */
+ * http://wiki.videolan.org/Documentation:Play_HowTo/Advanced_Use_of_VLC#Building_HTML_pages_for_Mozilla.2FFirefox.2FInternet_Explorere.2FSafari_.28VLC_version_0.8.6_and_above.29 */
[scriptable, uuid(b819de3d-92c9-4e85-8059-d42bc005013f)]
interface totemIConeInput : nsISupports
Modified: trunk/browser-plugin/idl/totemIConePlaylist.idl
==============================================================================
--- trunk/browser-plugin/idl/totemIConePlaylist.idl (original)
+++ trunk/browser-plugin/idl/totemIConePlaylist.idl Wed Feb 13 19:18:57 2008
@@ -1,5 +1,5 @@
/*
- * Copyright  2006-2007, Bastien Nocera <hadess hadess net
+ * Copyright  2006-2008, Bastien Nocera <hadess hadess net
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -19,27 +19,32 @@
#include "nsISupports.idl"
+interface totemIConePlaylistItems;
+
/* Documentation at
- * http://www.videolan.org/doc/play-howto/en/ch04.html#id294468 */
+ * http://wiki.videolan.org/Documentation:Play_HowTo/Advanced_Use_of_VLC#Building_HTML_pages_for_Mozilla.2FFirefox.2FInternet_Explorere.2FSafari_.28VLC_version_0.8.6_and_above.29 */
[scriptable, uuid(3c499730-9aa3-4c87-b752-05ae90116fa8)]
interface totemIConePlaylist : nsISupports
{
- readonly attribute long itemCount;
+ /* readonly attribute long itemCount; deprecated */
readonly attribute boolean isPlaying;
+ readonly attribute totemIConePlaylistItems items;
+
+ void add (in AUTF8String MRL, in AUTF8String name, in AUTF8String options);
- void add (in AUTF8String MRL);
/*
* We don't seem to be able to have 2 functions with the same name
- * void add (in AUTF8String MRL, in AUTF8String name, in AUTF8String options);
+ * void add (in AUTF8String MRL);
*/
void play ();
+ void playItem (in long number);
void togglePause ();
void stop ();
void next ();
void prev ();
- void clear ();
+ /* void clear (); deprecated */
void removeItem (in long number);
};
Added: trunk/browser-plugin/idl/totemIConePlaylistItems.idl
==============================================================================
--- (empty file)
+++ trunk/browser-plugin/idl/totemIConePlaylistItems.idl Wed Feb 13 19:18:57 2008
@@ -0,0 +1,32 @@
+/*
+ * Copyright  2008, Bastien Nocera <hadess hadess net
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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.
+ */
+
+#include "nsISupports.idl"
+
+/* Documentation at
+ * http://wiki.videolan.org/Documentation:Play_HowTo/Advanced_Use_of_VLC#Building_HTML_pages_for_Mozilla.2FFirefox.2FInternet_Explorere.2FSafari_.28VLC_version_0.8.6_and_above.29 */
+
+[scriptable, uuid(7dd0f2d4-97a1-42f8-a3d2-756db0f1df6c)]
+interface totemIConePlaylistItems : nsISupports
+{
+ readonly attribute long count;
+
+ void clear ();
+};
+
Modified: trunk/browser-plugin/idl/totemIConeVideo.idl
==============================================================================
--- trunk/browser-plugin/idl/totemIConeVideo.idl (original)
+++ trunk/browser-plugin/idl/totemIConeVideo.idl Wed Feb 13 19:18:57 2008
@@ -1,5 +1,5 @@
/*
- * Copyright  2006-2007, Bastien Nocera <hadess hadess net
+ * Copyright  2006-2008, Bastien Nocera <hadess hadess net
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -20,7 +20,7 @@
#include "nsISupports.idl"
/* Documentation at
- * http://www.videolan.org/doc/play-howto/en/ch04.html#id294468 */
+ * http://wiki.videolan.org/Documentation:Play_HowTo/Advanced_Use_of_VLC#Building_HTML_pages_for_Mozilla.2FFirefox.2FInternet_Explorere.2FSafari_.28VLC_version_0.8.6_and_above.29 */
[scriptable, uuid(221cc95e-bdc1-4205-9bd9-79ab124b179c)]
interface totemIConeVideo : nsISupports
@@ -30,7 +30,10 @@
attribute boolean fullscreen;
attribute AUTF8String aspectRatio;
+ attribute long subtitle;
+ attribute long teletext;
void toggleFullscreen ();
+ void toggleTeletext ();
};
Modified: trunk/browser-plugin/totem-plugin-viewer.c
==============================================================================
--- trunk/browser-plugin/totem-plugin-viewer.c (original)
+++ trunk/browser-plugin/totem-plugin-viewer.c Wed Feb 13 19:18:57 2008
@@ -949,6 +949,8 @@
const char *base_uri,
GError **error)
{
+ g_message ("totem_embedded_open_uri: uri %s base_uri: %s", uri, base_uri);
+
totem_embedded_clear_playlist (emb);
bacon_video_widget_close (emb->bvw);
@@ -964,6 +966,8 @@
const char *base_uri,
GError **error)
{
+ g_message ("totem_embedded_open_stream called: uri %s, base_uri: %s", uri, base_uri);
+
totem_embedded_clear_playlist (emb);
bacon_video_widget_close (emb->bvw);
@@ -1129,21 +1133,27 @@
emb->app = NULL;
}
- if (emb->mimetype) {
+ if (emb->mimetype && strcmp (emb->mimetype, "application/octet-stream") != 0) {
emb->app = gnome_vfs_mime_get_default_application_for_uri
(emb->current_uri, emb->mimetype);
} else {
+ const char *uri;
+
+ /* If we're reading a local file, that's not a playlist,
+ * we need to use that to get its proper mime-type */
+ if (emb->stream_uri != NULL)
+ uri = emb->stream_uri;
+ else
+ uri = emb->current_uri;
emb->app = gnome_vfs_mime_get_default_application_for_uri
- (emb->current_uri,
- gnome_vfs_get_mime_type_for_name (emb->current_uri));
+ (uri, gnome_vfs_get_mime_type_for_name (uri));
}
if (emb->app == NULL) {
-
if (emb->mimetype != NULL) {
- g_warning ("Mimetype '%s' doesn't have a handler", emb->mimetype);
+ g_message ("Mimetype '%s' doesn't have a handler", emb->mimetype);
} else {
- g_warning ("No handler for URI '%s' (guessed mime-type '%s')",
+ g_message ("No handler for URI '%s' (guessed mime-type '%s')",
emb->current_uri,
gnome_vfs_get_mime_type_for_name (emb->current_uri));
}
Modified: trunk/browser-plugin/totemConePlugin.cpp
==============================================================================
--- trunk/browser-plugin/totemConePlugin.cpp (original)
+++ trunk/browser-plugin/totemConePlugin.cpp Wed Feb 13 19:18:57 2008
@@ -89,17 +89,23 @@
/* Interface implementations */
-NS_IMPL_ISUPPORTS2 (totemScriptablePlugin,
+NS_IMPL_ISUPPORTS5 (totemScriptablePlugin,
totemICone,
+ totemIConePlaylist,
+ totemIConePlaylistItems,
+ totemIConeInput,
nsIClassInfo)
/* nsIClassInfo */
TOTEM_CLASSINFO_BEGIN (totemScriptablePlugin,
- 1,
+ 4,
kClassID,
kClassDescription)
TOTEM_CLASSINFO_ENTRY (0, totemICone)
+ TOTEM_CLASSINFO_ENTRY (1, totemIConePlaylist)
+ TOTEM_CLASSINFO_ENTRY (2, totemIConePlaylistItems)
+ TOTEM_CLASSINFO_ENTRY (3, totemIConeInput)
TOTEM_CLASSINFO_END
/* totemICone */
@@ -127,18 +133,14 @@
NS_IMETHODIMP
totemScriptablePlugin::GetInput(totemIConeInput * *aInput)
{
- TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
-
- return NS_ERROR_NOT_IMPLEMENTED;
+ return CallQueryInterface (this, aInput);
}
/* attribute totemIConePlaylist playlist; */
NS_IMETHODIMP
totemScriptablePlugin::GetPlaylist(totemIConePlaylist * *aPlaylist)
{
- TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
-
- return NS_ERROR_NOT_IMPLEMENTED;
+ return CallQueryInterface (this, aPlaylist);
}
/* attribute totemIConeVideo video; */
@@ -150,3 +152,219 @@
return NS_ERROR_NOT_IMPLEMENTED;
}
+/* totemIConePlaylist */
+#undef TOTEM_SCRIPTABLE_INTERFACE
+#define TOTEM_SCRIPTABLE_INTERFACE "totemIConePlaylist"
+
+/* attribute totemIConePlaylistItems items; */
+NS_IMETHODIMP
+totemScriptablePlugin::GetItems(totemIConePlaylistItems * *aItems)
+{
+ return CallQueryInterface (this, aItems);
+}
+
+/* readonly attribute boolean isPlaying */
+NS_IMETHODIMP
+totemScriptablePlugin::GetIsPlaying(PRBool *aIsPlaying)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void add (in AUTF8String MRL) */
+NS_IMETHODIMP
+totemScriptablePlugin::Add(const nsACString & aURL, const nsACString & aName, const nsACString & aOptions)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void play () */
+NS_IMETHODIMP
+totemScriptablePlugin::Play()
+{
+ TOTEM_SCRIPTABLE_LOG_ACCESS ();
+
+ NS_ENSURE_STATE (IsValid ());
+
+ return mPlugin->DoCommand (TOTEM_COMMAND_PLAY);
+}
+
+/* void playItem (in long number) */
+NS_IMETHODIMP
+totemScriptablePlugin::PlayItem(PRInt32 aNumber)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void togglePause () */
+NS_IMETHODIMP
+totemScriptablePlugin::TogglePause()
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+/* void stop () */
+NS_IMETHODIMP
+totemScriptablePlugin::Stop()
+{
+ TOTEM_SCRIPTABLE_LOG_ACCESS ();
+
+ NS_ENSURE_STATE (IsValid ());
+
+ return mPlugin->DoCommand (TOTEM_COMMAND_STOP);
+}
+
+/* void next () */
+NS_IMETHODIMP
+totemScriptablePlugin::Next()
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void prev () */
+NS_IMETHODIMP
+totemScriptablePlugin::Prev()
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void removeItem (in long number) */
+NS_IMETHODIMP
+totemScriptablePlugin::RemoveItem(PRInt32 aNumber)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* totemIConePlaylistItems */
+#undef TOTEM_SCRIPTABLE_INTERFACE
+#define TOTEM_SCRIPTABLE_INTERFACE "totemIConePlaylistItems"
+
+/* readonly attribute long count */
+NS_IMETHODIMP
+totemScriptablePlugin::GetCount (PRInt32 *aCount)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void clear () */
+NS_IMETHODIMP
+totemScriptablePlugin::Clear()
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* totemIConeInput */
+#undef TOTEM_SCRIPTABLE_INTERFACE
+#define TOTEM_SCRIPTABLE_INTERFACE "totemIConeInput"
+
+/* readonly attribute long length */
+NS_IMETHODIMP
+totemScriptablePlugin::GetLength (PRInt32 *aLength)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute long fps */
+NS_IMETHODIMP
+totemScriptablePlugin::GetFps (PRInt32 *aFps)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute boolean hasVout */
+NS_IMETHODIMP
+totemScriptablePlugin::GetHasVout (PRBool *aItemCount)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute double position */
+NS_IMETHODIMP
+totemScriptablePlugin::GetPosition(double *aPosition)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+totemScriptablePlugin::SetPosition(double aPosition)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_OK;
+}
+
+/* attribute long time */
+NS_IMETHODIMP
+totemScriptablePlugin::GetTime(PRInt32 *aPosition)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+totemScriptablePlugin::SetTime(PRInt32 aPosition)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_OK;
+}
+
+/* attribute long state */
+NS_IMETHODIMP
+totemScriptablePlugin::GetState(PRInt32 *aState)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+totemScriptablePlugin::SetState(PRInt32 aState)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_OK;
+}
+
+/* attribute double rate */
+NS_IMETHODIMP
+totemScriptablePlugin::GetRate(double *aRate)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+totemScriptablePlugin::SetRate(double aRate)
+{
+ TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+ return NS_OK;
+}
+
Modified: trunk/browser-plugin/totemConePlugin.h
==============================================================================
--- trunk/browser-plugin/totemConePlugin.h (original)
+++ trunk/browser-plugin/totemConePlugin.h Wed Feb 13 19:18:57 2008
@@ -27,14 +27,23 @@
#include <nsIClassInfo.h>
#include "totemICone.h"
+#include "totemIConePlaylist.h"
+#include "totemIConePlaylistItems.h"
+#include "totemIConeInput.h"
#include "totemPlugin.h"
class totemScriptablePlugin : public totemICone,
+ public totemIConePlaylist,
+ public totemIConePlaylistItems,
+ public totemIConeInput,
public nsIClassInfo
{
public:
NS_DECL_ISUPPORTS
NS_DECL_TOTEMICONE
+ NS_DECL_TOTEMICONEPLAYLIST
+ NS_DECL_TOTEMICONEPLAYLISTITEMS
+ NS_DECL_TOTEMICONEINPUT
NS_DECL_NSICLASSINFO
totemScriptablePlugin (totemPlugin *aPlugin);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]