From a98b6d88f53615e469503e8a78761cfee3d84e1b Mon Sep 17 00:00:00 2001 From: Sigmund Augdal Helberg Date: Thu, 28 Nov 2002 23:53:03 +0000 Subject: [PATCH] made the vlc mozilla plugin a drop-in replacement for wmp in most embedded 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 | 6 ++++-- mozilla/vlcshell.cpp | 24 ++++++++++++++++++++---- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/mozilla/vlcplugin.h b/mozilla/vlcplugin.h index c5c35ed380..6611e5f12e 100644 --- a/mozilla/vlcplugin.h +++ b/mozilla/vlcplugin.h @@ -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 * @@ -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" diff --git a/mozilla/vlcshell.cpp b/mozilla/vlcshell.cpp index e14f97efe4..18a5299aab 100644 --- a/mozilla/vlcshell.cpp +++ b/mozilla/vlcshell.cpp @@ -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 * @@ -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 } -- 2.39.2