forked from videolan/vlc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvlcplugin.h
112 lines (98 loc) · 3.6 KB
/
vlcplugin.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*****************************************************************************
* vlcplugin.h: a VLC plugin for Mozilla
*****************************************************************************
* Copyright (C) 2002-2005 VideoLAN (Centrale Réseaux) and its contributors
* $Id$
*
* Authors: Samuel Hocevar <[email protected]>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* 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.
*****************************************************************************/
/*******************************************************************************
* Instance state information about the plugin.
******************************************************************************/
class VlcPlugin
{
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 *p_display;
#endif
#ifdef XP_MACOSX
/* MACOS data members */
NPWindow *window;
#endif
/* vlc data members */
int i_vlc;
int b_stream;
int b_autoplay;
char * psz_target;
private:
NPP p_instance;
VlcPeer* p_peer;
};
/*******************************************************************************
* Plugin properties.
******************************************************************************/
#define PLUGIN_NAME "VLC multimedia plugin"
#define PLUGIN_DESCRIPTION \
"VLC multimedia plugin <br>" \
" <br>" \
"version %s <br>" \
"VideoLAN WWW: <a href=\"http://www.videolan.org/\">http://www.videolan.org/</a>"
#define PLUGIN_MIMETYPES \
/* MPEG-1 and MPEG-2 */ \
"audio/mpeg:mp2,mp3,mpga,mpega:MPEG audio;" \
"audio/x-mpeg:mp2,mp3,mpga,mpega:MPEG audio;" \
"video/mpeg:mpg,mpeg,mpe:MPEG video;" \
"video/x-mpeg:mpg,mpeg,mpe:MPEG video;" \
"video/mpeg-system:mpg,mpeg,mpe,vob:MPEG video;" \
"video/x-mpeg-system:mpg,mpeg,mpe,vob:MPEG video;" \
/* MPEG-4 */ \
"video/mpeg4:mp4,mpg4:MPEG-4 video;" \
"audio/mpeg4:mp4,mpg4:MPEG-4 audio;" \
"application/mpeg4-iod:mp4,mpg4:MPEG-4 video;" \
"application/mpeg4-muxcodetable:mp4,mpg4:MPEG-4 video;" \
/* AVI */ \
"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;" \
/* 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" \