/*****************************************************************************
- * videolan.c: a VideoLAN plugin for Mozilla
+ * vlcplugin.h: a VLC plugin for Mozilla
*****************************************************************************
- * Copyright (C) 2002 VideoLAN
- * $Id: vlcplugin.h,v 1.2 2002/07/23 20:12:55 sam Exp $
+ * Copyright (C) 2002-2005 the VideoLAN team
+ * $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/*******************************************************************************
* Instance state information about the plugin.
******************************************************************************/
-typedef struct _PluginInstance
+
+class VlcPlugin
{
- NPWindow* fWindow;
- uint16 fMode;
+public:
+ VlcPlugin( NPP );
+ virtual ~VlcPlugin();
+
+ void SetInstance( NPP );
+ NPP GetInstance();
+ VlcIntf* GetPeer();
+
+ void SetFileName( const char* );
+
+ /* Window settings */
+ NPWindow* p_npwin;
+ uint16 i_npmode;
+ uint32 i_width, i_height;
+#ifdef XP_WIN
+ /* Windows data members */
+ HWND p_hwnd;
+ WNDPROC pf_wndproc;
+#endif
+
+#ifdef XP_UNIX
/* UNIX data members */
- Window window;
- Display *display;
- uint32 x, y;
- uint32 width, height;
+ Window window;
+ Display *p_display;
+#endif
+
+#ifdef XP_MACOSX
+ /* MACOS data members */
+ NPWindow *window;
+#endif
+
/* vlc data members */
- vlc_t *p_vlc;
- int b_stream;
- char *psz_target;
+ int i_vlc;
+ int b_stream;
+ int b_autoplay;
+ char * psz_target;
-} PluginInstance;
+private:
+ NPP p_instance;
+ VlcPeer* p_peer;
+};
/*******************************************************************************
* Plugin properties.
******************************************************************************/
-#define PLUGIN_NAME "VideoLAN Client Plug-in"
+#define PLUGIN_NAME "VLC multimedia plugin"
#define PLUGIN_DESCRIPTION \
- "VideoLAN Client Multimedia Player Plugin <br>" \
+ "VLC multimedia plugin <br>" \
" <br>" \
- COPYRIGHT_MESSAGE " <br>" \
+ "version %s <br>" \
"VideoLAN WWW: <a href=\"http://www.videolan.org/\">http://www.videolan.org/</a>"
#define PLUGIN_MIMETYPES \
"video/x-msvideo:avi:AVI video;" \
/* QuickTime */ \
"video/quicktime:mov,qt:QuickTime video;" \
+ /* Ogg */ \
+ "application/x-ogg:ogg:Ogg stream;" \
/* explicit plugin call */ \
- "application/x-vlc-plugin::VLC plugin"
+ "application/x-vlc-plugin::VLC plugin;" \
+ /* windows media */ \
+ "video/x-ms-asf-plugin:asf,asx:Windows Media Video;" \
+ "video/x-ms-asf:asf,asx:Windows Media Video;" \
+ "application/x-mplayer2::Windows Media;" \
+ "video/x-ms-wmv:wmv:Windows Media;" \
+ /* Google VLC mime */ \
+ "application/x-google-vlc-plugin::Google VLC plugin" \