vlcshell.h 5.29 KB
Newer Older
1
/*****************************************************************************
Jean-Paul Saman's avatar
Jean-Paul Saman committed
2
 * vlcshell.h:
3
 *****************************************************************************
Jean-Paul Saman's avatar
Jean-Paul Saman committed
4
 * Copyright (C) 2009-2010 the VideoLAN team
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
 * $Id$
 *
 * Authors: Jean-Paul Saman <jpsaman@videolan.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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

#ifndef __VLCSHELL_H__
#define __VLCSHELL_H__

27
const char * NPP_GetMIMEDescription( void );
28 29

NPError NPP_Initialize( void );
30

31
#ifdef OJI
32
jref NPP_GetJavaClass( void );
33
#endif
34 35
void NPP_Shutdown( void );

36
#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
37 38
NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
                 char* argn[], char* argv[], NPSavedData* saved );
39 40 41 42 43
#else
NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc,
                 char* argn[], char* argv[], NPSavedData* saved );
#endif

44 45 46 47 48 49 50 51
NPError NPP_Destroy( NPP instance, NPSavedData** save );

NPError NPP_GetValue( NPP instance, NPPVariable variable, void *value );
NPError NPP_SetValue( NPP instance, NPNVariable variable, void *value );

NPError NPP_SetWindow( NPP instance, NPWindow* window );

NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream *stream,
52
#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
53
                       NPBool seekable, uint16 *stype );
54 55 56
#else
                       NPBool seekable, uint16_t *stype );
#endif
57 58 59
NPError NPP_DestroyStream( NPP instance, NPStream *stream, NPError reason );
void NPP_StreamAsFile( NPP instance, NPStream *stream, const char* fname );

60
#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
61 62 63
int32 NPP_WriteReady( NPP instance, NPStream *stream );
int32 NPP_Write( NPP instance, NPStream *stream, int32 offset,
                 int32 len, void *buffer );
64 65 66 67 68
#else
int32_t NPP_WriteReady( NPP instance, NPStream *stream );
int32_t NPP_Write( NPP instance, NPStream *stream, int32_t offset,
                 int32_t len, void *buffer );
#endif
69 70 71 72 73 74

void NPP_URLNotify( NPP instance, const char* url,
                    NPReason reason, void* notifyData );
void NPP_Print( NPP instance, NPPrint* printInfo );

#ifdef XP_MACOSX
75
#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
76
int16 NPP_HandleEvent( NPP instance, void * event );
77 78 79
#else
int16_t NPP_HandleEvent( NPP instance, void * event );
#endif
80 81
#endif

82 83 84 85 86 87 88 89 90
static char mimetype[] =
    /* 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 */
91
    "audio/mp4:aac,mp4,mpg4:MPEG-4 audio;"
92
    "audio/x-m4a:m4a:MPEG-4 audio;"
93 94
    /* MPEG-4 ASP */
    "video/mp4:mp4,mpg4:MPEG-4 video;"
95 96
    "application/mpeg4-iod:mp4,mpg4:MPEG-4 video;"
    "application/mpeg4-muxcodetable:mp4,mpg4:MPEG-4 video;"
97
    "video/x-m4v:m4v:MPEG-4 video;"
98 99 100
    /* AVI */
    "video/x-msvideo:avi:AVI video;"
    /* QuickTime */
101
    /* "video/quicktime:mov,qt:QuickTime video;" */
102 103
    /* OGG */
    "application/ogg:ogg:Ogg stream;"
104 105
    "video/ogg:ogv:Ogg video;"
    "application/x-ogg:ogg:Ogg stream;"
106
    /* VLC */
107
    "application/x-vlc-plugin::VLC plug-in;"
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
    /* 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;"
    "video/x-ms-wvx:wvx:Windows Media Video;"
    "audio/x-ms-wma:wma:Windows Media Audio;"
    /* Google VLC */
    "application/x-google-vlc-plugin::Google VLC plug-in;"
    /* 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;"
    /* DIVX */
    "video/divx:divx:DivX video;"
    /* FLV */
    "video/flv:flv:FLV video;"
    "video/x-flv:flv:FLV video;"
    /* Matroska */
132
    "application/x-matroska:mkv:Matroska video;"
133 134 135 136
    "video/x-matroska:mkv:Matroska video;"
    "audio/x-matroska:mka:Matroska audio;"
    /* XSPF */
    "application/xspf+xml:xspf:Playlist xspf;"
137 138
    /* M3U */
    "audio/x-mpegurl:m3u:MPEG audio;"
139 140 141 142 143
    /* Webm */
    "video/webm:webm:WebM video;"
    "audio/webm:webm:WebM audio;"
    /* Real Media */
    "application/vnd.rn-realmedia:rm:Real Media File;"
144 145 146
    "audio/x-realaudio:ra:Real Media Audio;"
    /* AMR */
    "audio/amr:amr:AMR audio;"
147 148
    /* FLAC */
    "audio/x-flac:flac:FLAC audio;"
149
    ;
150 151


152
#endif