vlcplugin.h 3.32 KB
Newer Older
1
/*****************************************************************************
2
 * vlcplugin.h: a VLC plugin for Mozilla
3 4
 *****************************************************************************
 * Copyright (C) 2002 VideoLAN
5
 * $Id: vlcplugin.h,v 1.10 2003/02/18 13:13:12 sam Exp $
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
 *
 * Authors: Samuel Hocevar <sam@zoy.org>
 *
 * 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.
 ******************************************************************************/
27
class VlcPlugin
28
{
29 30 31 32 33 34
public:
             VlcPlugin( NPP ); 
    virtual ~VlcPlugin();

    void     SetInstance( NPP );
    NPP      GetInstance();
35
    VlcIntf* GetPeer();
36 37 38 39

    void     SetFileName( const char* );

    /* Window settings */
40 41 42
    NPWindow* p_npwin;
    uint16    i_npmode;
    uint32    i_width, i_height;
43

44 45 46 47 48
#ifdef XP_WIN
    /* Windows data members */
    HWND     p_hwnd;
    WNDPROC  pf_wndproc;
#endif
49

50
#ifdef XP_UNIX
51
    /* UNIX data members */
52 53
    Window   window;
    Display *p_display;
54
#endif
55 56

    /* vlc data members */
Sam Hocevar's avatar
Sam Hocevar committed
57
    int      i_vlc;
58
    int      b_stream;
59
    int      b_autoplay;
60
    char *   psz_target;
61

62 63 64 65
private:
    NPP      p_instance;
    VlcPeer* p_peer;
};
66 67 68 69

/*******************************************************************************
 * Plugin properties.
 ******************************************************************************/
70
#define PLUGIN_NAME         "VLC multimedia plugin"
71
#define PLUGIN_DESCRIPTION \
72
    "VLC multimedia plugin <br>" \
73
    " <br>" \
Sam Hocevar's avatar
Sam Hocevar committed
74
    "version %s <br>" \
75
    "VideoLAN WWW: <a href=\"http://www.videolan.org/\">http://www.videolan.org/</a>"
76 77

#define PLUGIN_MIMETYPES \
78 79 80 81 82 83 84 85 86 87 88 89 90
    /* 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 */ \
91
    "video/x-msvideo:avi:AVI video;" \
92 93
    /* QuickTime */ \
    "video/quicktime:mov,qt:QuickTime video;" \
94 95
    /* Ogg */ \
    "application/x-ogg:ogg:Ogg stream;" \
96
    /* explicit plugin call */ \
97 98 99
    "application/x-vlc-plugin::VLC plugin;" \
    "video/x-ms-asf-plugin:asf,asx:Windows Media Video;" \
    "application/x-mplayer2::Windows Media"
100