Author: hadess
Date: Thu Feb 14 14:35:44 2008
New Revision: 5125
URL: http://svn.gnome.org/viewvc/totem?rev=5125&view=rev

Log:
2008-02-14  Bastien Nocera  <[EMAIL PROTECTED]>

        * browser-plugin/totemConePlugin.cpp:
        * browser-plugin/totemConePlugin.h:
        Implement stubs for the Audio and Video objects

        * src/backend/bacon-video-widget-gst-0.10.c:
        (bacon_video_widget_stop): Fix warning when _stop()
        is called in logo mode



Modified:
   trunk/ChangeLog
   trunk/browser-plugin/totemConePlugin.cpp
   trunk/browser-plugin/totemConePlugin.h
   trunk/src/backend/bacon-video-widget-gst-0.10.c

Modified: trunk/browser-plugin/totemConePlugin.cpp
==============================================================================
--- trunk/browser-plugin/totemConePlugin.cpp    (original)
+++ trunk/browser-plugin/totemConePlugin.cpp    Thu Feb 14 14:35:44 2008
@@ -89,23 +89,27 @@
 
 /* Interface implementations */
 
-NS_IMPL_ISUPPORTS5 (totemScriptablePlugin,
+NS_IMPL_ISUPPORTS7 (totemScriptablePlugin,
                    totemICone,
                    totemIConePlaylist,
                    totemIConePlaylistItems,
                    totemIConeInput,
+                   totemIConeAudio,
+                   totemIConeVideo,
                    nsIClassInfo)
 
 /* nsIClassInfo */
 
 TOTEM_CLASSINFO_BEGIN (totemScriptablePlugin,
-                      4,
+                      6,
                       kClassID,
                       kClassDescription)
   TOTEM_CLASSINFO_ENTRY (0, totemICone)
   TOTEM_CLASSINFO_ENTRY (1, totemIConePlaylist)
   TOTEM_CLASSINFO_ENTRY (2, totemIConePlaylistItems)
   TOTEM_CLASSINFO_ENTRY (3, totemIConeInput)
+  TOTEM_CLASSINFO_ENTRY (4, totemIConeAudio)
+  TOTEM_CLASSINFO_ENTRY (5, totemIConeVideo)
 TOTEM_CLASSINFO_END
 
 /* totemICone */
@@ -124,9 +128,7 @@
 NS_IMETHODIMP
 totemScriptablePlugin::GetAudio(totemIConeAudio * *aAudio)
 {
-  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
-
-  return NS_ERROR_NOT_IMPLEMENTED;
+  return CallQueryInterface (this, aAudio);
 }
 
 /* attribute totemIConeInput input; */
@@ -147,9 +149,7 @@
 NS_IMETHODIMP
 totemScriptablePlugin::GetVideo(totemIConeVideo * *aVideo)
 {
-  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
-
-  return NS_ERROR_NOT_IMPLEMENTED;
+  return CallQueryInterface (this, aVideo);
 }
 
 /* totemIConePlaylist */
@@ -172,7 +172,7 @@
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
-/* void add (in AUTF8String MRL) */
+/* long add (in AUTF8String MRL, in AUTF8String name, in AUTF8String options) 
*/
 NS_IMETHODIMP
 totemScriptablePlugin::Add(const nsACString & aURL, const nsACString & aName, 
const nsACString & aOptions, PRInt32 *aItemNumber)
 {
@@ -321,7 +321,7 @@
 {
   TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
 
-  return NS_OK;
+  return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 /* attribute long time */
@@ -338,7 +338,7 @@
 {
   TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
 
-  return NS_OK;
+  return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 /* attribute long state */
@@ -355,7 +355,7 @@
 {
   TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
 
-  return NS_OK;
+  return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 /* attribute double rate */
@@ -375,3 +375,204 @@
   return NS_OK;
 }
 
+/* totemIConeAudio */
+#undef TOTEM_SCRIPTABLE_INTERFACE
+#define TOTEM_SCRIPTABLE_INTERFACE "totemIConeAudio"
+
+/* attribute boolean mute */
+NS_IMETHODIMP
+totemScriptablePlugin::GetMute(PRBool *_retval)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
+
+//  *_retval = mMute;
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+totemScriptablePlugin::SetMute(PRBool enabled)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
+
+//  mMute = enabled != PR_FALSE;
+  return NS_OK;
+}
+
+/* attribute long volume */
+NS_IMETHODIMP
+totemScriptablePlugin::GetVolume(PRInt32 *_retval)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
+
+//  *_retval = mVolume;
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+totemScriptablePlugin::SetVolume(PRInt32 aVolume)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
+
+//  mVolume = aVolume;
+  return NS_OK;
+}
+
+/* attribute long track */
+NS_IMETHODIMP
+totemScriptablePlugin::GetTrack(PRInt32 *_retval)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+totemScriptablePlugin::SetTrack(PRInt32 aTrack)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute long channel */
+NS_IMETHODIMP
+totemScriptablePlugin::GetChannel(PRInt32 *_retval)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+totemScriptablePlugin::SetChannel(PRInt32 aChannel)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+/* void toggleMute () */
+NS_IMETHODIMP
+totemScriptablePlugin::ToggleMute()
+{
+  TOTEM_SCRIPTABLE_LOG_ACCESS ();
+
+  NS_ENSURE_STATE (IsValid ());
+
+  return PR_TRUE;
+//  return mPlugin->ClearPlaylist ();
+}
+
+/* totemIConeAudio */
+#undef TOTEM_SCRIPTABLE_INTERFACE
+#define TOTEM_SCRIPTABLE_INTERFACE "totemIConeVideo"
+
+/* readonly attribute long width */
+NS_IMETHODIMP
+totemScriptablePlugin::GetWidth (PRInt32 *aWidth)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute long height */
+NS_IMETHODIMP
+totemScriptablePlugin::GetHeight (PRInt32 *aHeight)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute boolean fullscreen */
+NS_IMETHODIMP
+totemScriptablePlugin::GetFullscreen(PRBool *_retval)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
+
+//  *_retval = mMute;
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+totemScriptablePlugin::SetFullscreen(PRBool enabled)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
+
+//  mMute = enabled != PR_FALSE;
+  return NS_OK;
+}
+
+/* attribute AUTF8String aspectRatio */
+NS_IMETHODIMP
+totemScriptablePlugin::GetAspectRatio(nsACString & aAspectRatio)
+{
+//  aVersionInfo.Assign (TOTEM_CONE_VERSION);
+//  return NS_OK;
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+totemScriptablePlugin::SetAspectRatio(const nsACString & aAspectRatio)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+/* attribute long subtitle */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetSubtitle(PRInt32 *aSubtitle)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP 
+totemScriptablePlugin::SetSubtitle(PRInt32 aSubtitle)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute long teletext */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetTeletext(PRInt32 *aTeletext)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP 
+totemScriptablePlugin::SetTeletext(PRInt32 aTeletext)
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void toggleFullscreen () */
+NS_IMETHODIMP
+totemScriptablePlugin::ToggleFullscreen()
+{
+  TOTEM_SCRIPTABLE_LOG_ACCESS ();
+
+  NS_ENSURE_STATE (IsValid ());
+
+  return PR_TRUE;
+//  return mPlugin->ClearPlaylist ();
+}
+
+/* void toggleTeletext () */
+NS_IMETHODIMP
+totemScriptablePlugin::ToggleTeletext()
+{
+  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+

Modified: trunk/browser-plugin/totemConePlugin.h
==============================================================================
--- trunk/browser-plugin/totemConePlugin.h      (original)
+++ trunk/browser-plugin/totemConePlugin.h      Thu Feb 14 14:35:44 2008
@@ -30,12 +30,16 @@
 #include "totemIConePlaylist.h"
 #include "totemIConePlaylistItems.h"
 #include "totemIConeInput.h"
+#include "totemIConeAudio.h"
+#include "totemIConeVideo.h"
 #include "totemPlugin.h"
 
 class totemScriptablePlugin : public totemICone,
                              public totemIConePlaylist,
                              public totemIConePlaylistItems,
                              public totemIConeInput,
+                             public totemIConeAudio,
+                             public totemIConeVideo,
                              public nsIClassInfo
 {
   public:
@@ -44,6 +48,8 @@
     NS_DECL_TOTEMICONEPLAYLIST
     NS_DECL_TOTEMICONEPLAYLISTITEMS
     NS_DECL_TOTEMICONEINPUT
+    NS_DECL_TOTEMICONEAUDIO
+    NS_DECL_TOTEMICONEVIDEO
     NS_DECL_NSICLASSINFO
 
     totemScriptablePlugin (totemPlugin *aPlugin);

Modified: trunk/src/backend/bacon-video-widget-gst-0.10.c
==============================================================================
--- trunk/src/backend/bacon-video-widget-gst-0.10.c     (original)
+++ trunk/src/backend/bacon-video-widget-gst-0.10.c     Thu Feb 14 14:35:44 2008
@@ -2932,7 +2932,10 @@
 
   GST_LOG ("Stopping");
   bvw_stop_play_pipeline (bvw);
-  
+
+  if (bvw->priv->logo_mode == FALSE)
+    return;
+
   /* Reset position to 0 when stopping */
   got_time_tick (GST_ELEMENT (bvw->priv->play), 0, bvw);
 }
_______________________________________________
SVN-commits-list mailing list (read only)
http://mail.gnome.org/mailman/listinfo/svn-commits-list

Want to limit the commits to a few modules? Go to above URL, log in to edit 
your options and select the modules ('topics') you want.
Module maintainer? It is possible to set the reply-to to your development 
mailing list. Email [EMAIL PROTECTED] if interested.

Reply via email to