~ubuntu-branches/ubuntu/saucy/parole/saucy-proposed

« back to all changes in this revision

Viewing changes to browser-plugin/plugin_types.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Yves-Alexis Perez, Lionel Le Folgoc, Yves-Alexis Perez
  • Date: 2011-04-24 16:09:19 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110424160919-rpjwaicrdb8f7un2
Tags: 0.2.0.6-1
[ Lionel Le Folgoc ]
* debian/control:
  - drop unneeded build-dep on xulrunner-dev.   closes: #594073
  - suggests a few useful gstreamer0.10 plugins.
  - build-depends on quilt.
* debian/patches:
  - 01_fix-implicit-dso-linking.patch: added, fixes FTBFS with binutils-gold.
  - series: added.                                            closes: #615760
* debian/rules: pass --with quilt to dh.

[ Yves-Alexis Perez ]
* New upstream release.
* Switch to 3.0 (quilt) source format.
* debian/control:
  - update standards version to 3.9.2.
  - drop browser-plugin-parole package.
  - drop quilt build-dep.
  - add build-dep on hardening-includes
  - bump xfce build-deps to 4.8.
* debian/parole.install updated.
* debian/rules:
  - use --fail-missing and manually remove spurious files.
  - drop quilt addon
  - pick build flags from dpkg-buildflags.
  - add -O1, -z,defs and --as-needed to LDFLAGS.
  - add hardening flags to build flags.
  - stop harcoding the shell to bash, it works fine now.      closes: #623830

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
 
/* ***** BEGIN LICENSE BLOCK *****
3
 
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
 
 *
5
 
 * The contents of this file are subject to the Mozilla Public License Version
6
 
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 
 * the License. You may obtain a copy of the License at
8
 
 * http://www.mozilla.org/MPL/
9
 
 *
10
 
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 
 * for the specific language governing rights and limitations under the
13
 
 * License.
14
 
 *
15
 
 * The Original Code is mozilla.org code.
16
 
 *
17
 
 * The Initial Developer of the Original Code is
18
 
 * Netscape Communications Corporation.
19
 
 * Portions created by the Initial Developer are Copyright (C) 1998
20
 
 * the Initial Developer. All Rights Reserved.
21
 
 *
22
 
 * Contributor(s):
23
 
 *
24
 
 * Alternatively, the contents of this file may be used under the terms of
25
 
 * either the GNU General Public License Version 2 or later (the "GPL"), or
26
 
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27
 
 * in which case the provisions of the GPL or the LGPL are applicable instead
28
 
 * of those above. If you wish to allow use of your version of this file only
29
 
 * under the terms of either the GPL or the LGPL, and not to allow others to
30
 
 * use your version of this file under the terms of the MPL, indicate your
31
 
 * decision by deleting the provisions above and replace them with the notice
32
 
 * and other provisions required by the GPL or the LGPL. If you do not delete
33
 
 * the provisions above, a recipient may use your version of this file under
34
 
 * the terms of any one of the MPL, the GPL or the LGPL.
35
 
 *
36
 
 * ***** END LICENSE BLOCK ***** */
37
 
 
38
 
#include "plugin_types.h"
39
 
 
40
 
gchar *GetMIMEDescription()
41
 
{
42
 
    const gchar *mime_types_list = /* Wmp mime types */
43
 
                              "application/asx:*:Media Files;"
44
 
                              "video/x-ms-asf-plugin:*:Media Files;"
45
 
                              "video/x-msvideo:avi,*:AVI;"
46
 
                              "video/msvideo:avi,*:AVI;"
47
 
                              "application/x-mplayer2:*:Media Files;"
48
 
                              "application/x-ms-wmv:wmv,*:Microsoft WMV video;"
49
 
                              "video/x-ms-asf:asf,asx,*:Media Files;"
50
 
                              "video/x-ms-wm:wm,*:Media Files;"
51
 
                              "video/x-ms-wmv:wmv,*:Microsoft WMV video;"
52
 
                              "audio/x-ms-wmv:wmv,*:Windows Media;"
53
 
                              "video/x-ms-wmp:wmp,*:Windows Media;"
54
 
                              "application/x-ms-wmp:wmp,*:Windows Media;"
55
 
                              "video/x-ms-wvx:wvx,*:Windows Media;"
56
 
                              "audio/x-ms-wax:wax,*:Windows Media;"
57
 
                              "audio/x-ms-wma:wma,*:Windows Media;"
58
 
                              "application/x-drm-v2:asx,*:Windows Media;"
59
 
                              "audio/wav:wav,*:Microsoft wave file;"
60
 
                              "audio/x-wav:wav,*:Microsoft wave file;"
61
 
                              /* Standard mime types */
62
 
                              "audio/x-mpegurl:m3u:MPEG Playlist;"
63
 
                              "video/mpeg:mpg,mpeg:MPEG;"
64
 
                              "audio/mpeg:mpg,mpeg:MPEG;"
65
 
                              "video/x-mpeg:mpg,mpeg:MPEG;"
66
 
                              "video/x-mpeg2:mpv2,mp2ve:MPEG2;"
67
 
                              "audio/mpeg:mpg,mpeg:MPEG;"
68
 
                              "audio/x-mpeg:mpg,mpeg:MPEG;"
69
 
                              "audio/mpeg2:mp2:MPEG audio;"
70
 
                              "audio/x-mpeg2:mp2:MPEG audio;"
71
 
                              "audio/mp4:mp4:MPEG 4 audio;"
72
 
                              "audio/x-mp4:mp4:MPEG 4 audio;"
73
 
                              "video/mp4:mp4:MPEG 4 Video;"
74
 
                              "video/x-m4v:m4v:MPEG 4 Video;"
75
 
                              "video/3gpp:mp4,3gp:MPEG 4 Video;"
76
 
                              "application/x-ogg:ogg:Ogg Vorbis Media;"
77
 
                              "audio/flac:ogg:FLAC Lossless Audio;"
78
 
                              "audio/x-flac:ogg:FLAC Lossless Audio;"
79
 
                              "audio/ogg:ogg:Ogg Vorbis Audio;"
80
 
                              "audio/ogg:x-ogg:Ogg Vorbis Audio;"
81
 
                              "application/ogg:ogg:Ogg Vorbis / Ogg Theora;"
82
 
                              "video/ogg:ogg:Ogg Vorbis Video;"
83
 
                              "video/ogg:x-ogg:Ogg Vorbis Video;"
84
 
                              /* Real audio */
85
 
                              "audio/x-pn-realaudio:ram,rm:RealAudio;"
86
 
                              "application/vnd.rn-realmedia:rm:RealMedia;"
87
 
                              "application/vnd.rn-realaudio:ra,ram:RealAudio;"
88
 
                              "video/vnd.rn-realvideo:rv:RealVideo;"
89
 
                              "audio/x-realaudio:ra:RealAudio;"
90
 
                              "audio/x-pn-realaudio-plugin:rpm:RealAudio;"
91
 
                              "application/smil:smil:SMIL;"
92
 
                              /* DivX Mime type */
93
 
                              "video/divx:divx:DivX Media Format;"
94
 
                              "video/vnd.divx:divx:DivX Media Format;"
95
 
                              /*Quick time */
96
 
                              "video/quicktime:mov:Quicktime;"
97
 
                              "video/x-quicktime:mov:Quicktime;"
98
 
                              "image/x-quicktime:mov:Quicktime;"
99
 
                              "video/quicktime:mp4:Quicktime;"
100
 
                              "video/quicktime:sdp:Quicktime - Session Description Protocol;"
101
 
                              "application/x-quicktimeplayer:mov:Quicktime;";
102
 
 
103
 
    //g_debug ("GetMimeDescription");
104
 
                             
105
 
    return g_strdup (mime_types_list);
106
 
}
107
 
 
108
 
NPError PluginGetValue(NPPVariable variable, void *value)
109
 
{
110
 
    NPError err = NPERR_NO_ERROR;
111
 
    
112
 
    // some sites use this description to figure out what formats can be played. So we have to make sure the 
113
 
    // description matches the features
114
 
 
115
 
    if (variable == NPPVpluginNameString) {
116
 
        *((const char **) value) = "Parole media player plugin-in";
117
 
    }
118
 
    if (variable == NPPVpluginDescriptionString) {
119
 
        *((const char **) value) =
120
 
            "Media player browser plugin for various media format version " VERSION;
121
 
 
122
 
    }
123
 
 
124
 
    if (variable == NPPVpluginNeedsXEmbed) {
125
 
        *((bool *) value) = TRUE;
126
 
    }
127
 
 
128
 
    if ((variable != NPPVpluginNameString)
129
 
        && (variable != NPPVpluginDescriptionString)
130
 
        && (variable != NPPVpluginNeedsXEmbed)) {
131
 
        err = NPERR_INVALID_PARAM;
132
 
    }
133
 
 
134
 
    return err;
135
 
}