X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=mozilla%2Fvlcplugin.h;h=c2523bebd95112395f6ff769d510efb0228222e1;hb=6ee1e193fd896ab9a4729fde14f009d9ce629815;hp=0e7673361d46354698751de12e0472a7cc4ea044;hpb=d5fe6ade47b577f068abf8eb51bfac15a8e980df;p=vlc diff --git a/mozilla/vlcplugin.h b/mozilla/vlcplugin.h index 0e7673361d..c2523bebd9 100644 --- a/mozilla/vlcplugin.h +++ b/mozilla/vlcplugin.h @@ -1,10 +1,11 @@ /***************************************************************************** * vlcplugin.h: a VLC plugin for Mozilla ***************************************************************************** - * Copyright (C) 2002 VideoLAN - * $Id: vlcplugin.h,v 1.10 2003/02/18 13:13:12 sam Exp $ + * Copyright (C) 2002-2006 the VideoLAN team + * $Id$ * * Authors: Samuel Hocevar + Damien Fouilleul * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,61 +19,110 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ /******************************************************************************* * Instance state information about the plugin. ******************************************************************************/ +#ifndef __VLCPLUGIN_H__ +#define __VLCPLUGIN_H__ + +#include +#include +#include "control/nporuntime.h" + +#if !defined(XP_MACOSX) && !defined(XP_UNIX) && !defined(XP_WIN) +#define XP_UNIX 1 +#elif defined(XP_MACOSX) +#undef XP_UNIX +#endif + +#ifdef XP_WIN + /* Windows stuff */ +#endif + +#ifdef XP_MACOSX + /* Mac OS X stuff */ +# include +#endif + +#ifdef XP_UNIX + /* X11 stuff */ +# include +# include +# include +#endif + class VlcPlugin { public: - VlcPlugin( NPP ); + VlcPlugin( NPP, uint16 ); virtual ~VlcPlugin(); - void SetInstance( NPP ); - NPP GetInstance(); - VlcIntf* GetPeer(); - - void SetFileName( const char* ); + NPError init(int argc, char* const argn[], char* const argv[]); + libvlc_instance_t* getVLC() + { return libvlc_instance; }; + NPP getBrowser() + { return p_browser; }; + char* getAbsoluteURL(const char *url); + NPWindow& getWindow() + { return npwindow; }; + void setWindow(const NPWindow &window) + { npwindow = window; }; - /* Window settings */ - NPWindow* p_npwin; - uint16 i_npmode; - uint32 i_width, i_height; + NPClass* getScriptClass() + { return p_scriptClass; }; -#ifdef XP_WIN - /* Windows data members */ - HWND p_hwnd; - WNDPROC pf_wndproc; + void setLog(libvlc_log_t *log) + { libvlc_log = log; }; + libvlc_log_t* getLog() + { return libvlc_log; }; +#if XP_WIN + WNDPROC getWindowProc() + { return pf_wndproc; }; + void setWindowProc(WNDPROC wndproc) + { pf_wndproc = wndproc; }; #endif -#ifdef XP_UNIX - /* UNIX data members */ - Window window; - Display *p_display; +#if XP_UNIX + int setSize(unsigned width, unsigned height); #endif - /* vlc data members */ - int i_vlc; + uint16 i_npmode; /* either NP_EMBED or NP_FULL */ + + /* plugin properties */ int b_stream; int b_autoplay; char * psz_target; private: - NPP p_instance; - VlcPeer* p_peer; + /* VLC reference */ + libvlc_instance_t *libvlc_instance; + libvlc_log_t *libvlc_log; + NPClass *p_scriptClass; + + /* browser reference */ + NPP p_browser; + char* psz_baseURL; + + /* display settings */ + NPWindow npwindow; +#if XP_WIN + WNDPROC pf_wndproc; +#endif +#if XP_UNIX + unsigned int i_width, i_height; +#endif }; /******************************************************************************* * Plugin properties. ******************************************************************************/ -#define PLUGIN_NAME "VLC multimedia plugin" +#define PLUGIN_NAME "VLC Multimedia Plugin" #define PLUGIN_DESCRIPTION \ - "VLC multimedia plugin
" \ - "
" \ - "version %s
" \ - "VideoLAN WWW: http://www.videolan.org/" + "Version %s, copyright 1996-2007 The VideoLAN Team" \ + "
http://www.videolan.org/" #define PLUGIN_MIMETYPES \ /* MPEG-1 and MPEG-2 */ \ @@ -91,10 +141,26 @@ private: "video/x-msvideo:avi:AVI video;" \ /* QuickTime */ \ "video/quicktime:mov,qt:QuickTime video;" \ - /* Ogg */ \ + /* OGG */ \ "application/x-ogg:ogg:Ogg stream;" \ - /* explicit plugin call */ \ - "application/x-vlc-plugin::VLC plugin;" \ + "application/ogg:ogg:Ogg stream;" \ + /* VLC */ \ + "application/x-vlc-plugin:vlc:VLC plugin;" \ + /* Windows Media */ \ "video/x-ms-asf-plugin:asf,asx:Windows Media Video;" \ - "application/x-mplayer2::Windows Media" + "video/x-ms-asf:asf,asx:Windows Media Video;" \ + "application/x-mplayer2::Windows Media;" \ + "video/x-ms-wmv:wmv:Windows Media;" \ + /* Google VLC */ \ + "application/x-google-vlc-plugin::Google VLC plugin;" \ + /* WAV audio */ \ + "audio/wav:wav:WAV audio;" \ + "audio/x-wav:wav:WAV audio;" \ + /* 3GPP */ \ + "audio/3gpp:3gp,3gpp:3GPP audio;" \ + "video/3gpp:3gp,3gpp:3GPP video;" \ + /* 3GPP2 */ \ + "audio/3gpp2:3g2,3gpp2:3GPP2 audio;" \ + "video/3gpp2:3g2,3gpp2:3GPP2 video;" \ +#endif