]> git.sesse.net Git - vlc/commitdiff
made the vlc mozilla plugin a drop-in replacement for wmp in most embedded
authorSigmund Augdal Helberg <sigmunau@videolan.org>
Thu, 28 Nov 2002 23:53:03 +0000 (23:53 +0000)
committerSigmund Augdal Helberg <sigmunau@videolan.org>
Thu, 28 Nov 2002 23:53:03 +0000 (23:53 +0000)
wmp sites I could find, by adding som mimetypes and parsing some more
parameters passed by mozilla. Also disabled the StreamAsFile function since
mozilla tend to pass it non-exsisting files.

mozilla/vlcplugin.h
mozilla/vlcshell.cpp

index c5c35ed380c6bd779357aa4d10cc4cac04f86dcd..6611e5f12e5b6c3e9e08ba739f28e38fa0595f50 100644 (file)
@@ -2,7 +2,7 @@
  * vlcplugin.h: a VideoLAN plugin for Mozilla
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: vlcplugin.h,v 1.8 2002/11/04 15:04:44 sam Exp $
+ * $Id: vlcplugin.h,v 1.9 2002/11/28 23:53:03 sigmunau Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -94,5 +94,7 @@ private:
     /* Ogg */ \
     "application/x-ogg:ogg:Ogg stream;" \
     /* explicit plugin call */ \
-    "application/x-vlc-plugin::VLC plugin"
+    "application/x-vlc-plugin::VLC plugin;" \
+    "video/x-ms-asf-plugin:asf,asx:Windows Media Video;" \
+    "application/x-mplayer2::Windows Media"
 
index e14f97efe4d0536d96a2d5d5da94f3453633d8be..18a5299aab482fb85455f7c250d4531cb65ce971 100644 (file)
@@ -2,7 +2,7 @@
  * vlcshell.c: a VideoLAN Client plugin for Mozilla
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: vlcshell.cpp,v 1.6 2002/10/25 18:17:59 sam Exp $
+ * $Id: vlcshell.cpp,v 1.7 2002/11/28 23:53:03 sigmunau Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -61,7 +61,7 @@
 ******************************************************************************/
 #ifdef XP_UNIX
 #   define VOUT_PLUGINS "xvideo,x11,dummy"
-#   define AOUT_PLUGINS "dsp,dummy"
+#   define AOUT_PLUGINS "oss,dummy"
 
 static void Redraw( Widget w, XtPointer closure, XEvent *event );
 #endif
@@ -274,6 +274,22 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
                 p_plugin->b_autoplay = 1;
             }
         }
+        else if( !strcmp( argn[i], "autostart" ) )
+        {
+            if( !strcmp( argv[i], "1" ) || !strcmp( argv[i], "true" ) )
+            {
+                p_plugin->b_autoplay = 1;
+            }
+        }
+        else if( !strcmp( argn[i], "filename" ) )
+        {
+            p_plugin->psz_target = argv[i];
+        }
+        else if( !strcmp( argn[i], "src" ) )
+        {
+            p_plugin->psz_target = argv[i];
+        }
+        
 #if USE_LIBVLC
         else if( !strcmp( argn[i], "loop" ) )
         {
@@ -532,8 +548,8 @@ void NPP_StreamAsFile( NPP instance, NPStream *stream, const char* fname )
 #if USE_LIBVLC
     VlcPlugin* p_plugin = (VlcPlugin*)instance->pdata;
 
-    VLC_AddTarget( p_plugin->i_vlc, fname,
-                   PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
+/*    VLC_AddTarget( p_plugin->i_vlc, fname,
+      PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );*/
 #endif
 }