vlcplugin.h 3.47 KB
Newer Older
1
/*****************************************************************************
2
 * vlcplugin.h: a VLC plugin for Mozilla
3 4
 *****************************************************************************
 * Copyright (C) 2002 VideoLAN
Sam Hocevar's avatar
Sam Hocevar committed
5
 * $Id: vlcplugin.h,v 1.13 2003/10/23 17:04:40 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

28
class VlcPlugin
29
{
30 31 32 33 34 35
public:
             VlcPlugin( NPP ); 
    virtual ~VlcPlugin();

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

    void     SetFileName( const char* );

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

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

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

57 58 59 60 61 62
#ifdef XP_MACOSX
    /* MACOS data members */
    NPWindow *window;
#endif


63
    /* vlc data members */
Sam Hocevar's avatar
Sam Hocevar committed
64
    int      i_vlc;
65
    int      b_stream;
66
    int      b_autoplay;
67
    char *   psz_target;
68

69 70 71 72
private:
    NPP      p_instance;
    VlcPeer* p_peer;
};
73 74 75 76

/*******************************************************************************
 * Plugin properties.
 ******************************************************************************/
77
#define PLUGIN_NAME         "VLC multimedia plugin"
78
#define PLUGIN_DESCRIPTION \
79
    "VLC multimedia plugin <br>" \
80
    " <br>" \
Sam Hocevar's avatar
Sam Hocevar committed
81
    "version %s <br>" \
82
    "VideoLAN WWW: <a href=\"http://www.videolan.org/\">http://www.videolan.org/</a>"
83 84

#define PLUGIN_MIMETYPES \
85 86 87 88 89 90 91 92 93 94 95 96 97
    /* 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 */ \
98
    "video/x-msvideo:avi:AVI video;" \
99 100
    /* QuickTime */ \
    "video/quicktime:mov,qt:QuickTime video;" \
101 102
    /* Ogg */ \
    "application/x-ogg:ogg:Ogg stream;" \
103
    /* explicit plugin call */ \
104
    "application/x-vlc-plugin::VLC plugin;" \
105
    /* windows media */ \
106
    "video/x-ms-asf-plugin:asf,asx:Windows Media Video;" \
107 108
    "application/x-mplayer2::Windows Media;" \
    "video/x-ms-wmv:wmv:Windows Media" \
109