]> git.sesse.net Git - vlc/blob - mozilla/vlcplugin.h
* mozilla plugin on MacOSX. Not fully implemented yet.
[vlc] / mozilla / vlcplugin.h
1 /*****************************************************************************
2  * vlcplugin.h: a VLC plugin for Mozilla
3  *****************************************************************************
4  * Copyright (C) 2002 VideoLAN
5  * $Id: vlcplugin.h,v 1.12 2003/08/14 12:38:03 garf Exp $
6  *
7  * Authors: Samuel Hocevar <sam@zoy.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 /*******************************************************************************
25  * Instance state information about the plugin.
26  ******************************************************************************/
27
28 /* No, I really don't want to use XP_UNIX stuff on MacOSX */
29 #ifdef XP_MACOSX
30 #undef XP_UNIX
31 #endif
32
33 class VlcPlugin
34 {
35 public:
36              VlcPlugin( NPP ); 
37     virtual ~VlcPlugin();
38
39     void     SetInstance( NPP );
40     NPP      GetInstance();
41     VlcIntf* GetPeer();
42
43     void     SetFileName( const char* );
44
45     /* Window settings */
46     NPWindow* p_npwin;
47     uint16    i_npmode;
48     uint32    i_width, i_height;
49
50 #ifdef XP_WIN
51     /* Windows data members */
52     HWND     p_hwnd;
53     WNDPROC  pf_wndproc;
54 #endif
55
56 #ifdef XP_UNIX
57     /* UNIX data members */
58     Window   window;
59     Display *p_display;
60 #endif
61
62 #ifdef XP_MACOSX
63     /* MACOS data members */
64     NPWindow *window;
65 #endif
66
67
68     /* vlc data members */
69     int      i_vlc;
70     int      b_stream;
71     int      b_autoplay;
72     char *   psz_target;
73
74 private:
75     NPP      p_instance;
76     VlcPeer* p_peer;
77 };
78
79 /*******************************************************************************
80  * Plugin properties.
81  ******************************************************************************/
82 #define PLUGIN_NAME         "VLC multimedia plugin"
83 #define PLUGIN_DESCRIPTION \
84     "VLC multimedia plugin <br>" \
85     " <br>" \
86     "version %s <br>" \
87     "VideoLAN WWW: <a href=\"http://www.videolan.org/\">http://www.videolan.org/</a>"
88
89 #define PLUGIN_MIMETYPES \
90     /* MPEG-1 and MPEG-2 */ \
91     "audio/mpeg:mp2,mp3,mpga,mpega:MPEG audio;" \
92     "audio/x-mpeg:mp2,mp3,mpga,mpega:MPEG audio;" \
93     "video/mpeg:mpg,mpeg,mpe:MPEG video;" \
94     "video/x-mpeg:mpg,mpeg,mpe:MPEG video;" \
95     "video/mpeg-system:mpg,mpeg,mpe,vob:MPEG video;" \
96     "video/x-mpeg-system:mpg,mpeg,mpe,vob:MPEG video;" \
97     /* MPEG-4 */ \
98     "video/mpeg4:mp4,mpg4:MPEG-4 video;" \
99     "audio/mpeg4:mp4,mpg4:MPEG-4 audio;" \
100     "application/mpeg4-iod:mp4,mpg4:MPEG-4 video;" \
101     "application/mpeg4-muxcodetable:mp4,mpg4:MPEG-4 video;" \
102     /* AVI */ \
103     "video/x-msvideo:avi:AVI video;" \
104     /* QuickTime */ \
105     "video/quicktime:mov,qt:QuickTime video;" \
106     /* Ogg */ \
107     "application/x-ogg:ogg:Ogg stream;" \
108     /* explicit plugin call */ \
109     "application/x-vlc-plugin::VLC plugin;" \
110     /* windows media */ \
111     "video/x-ms-asf-plugin:asf,asx:Windows Media Video;" \
112     "application/x-mplayer2::Windows Media;" \
113     "video/x-ms-wmv:wmv:Windows Media" \
114