1 | /* |
2 | * Copyright (C) 2009,2010 Sebastian Dröge <sebastian.droege@collabora.co.uk> |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Lesser General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2 of the License, or (at your option) any later version. |
8 | * |
9 | * This library is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * Lesser General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Lesser General Public |
15 | * License along with this library; if not, write to the Free Software |
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
17 | */ |
18 | |
19 | #pragma once |
20 | |
21 | #if ENABLE(VIDEO) && USE(GSTREAMER) |
22 | |
23 | #include <gst/base/gstpushsrc.h> |
24 | #include <gst/gst.h> |
25 | |
26 | namespace WebCore { |
27 | class MediaPlayer; |
28 | class SecurityOrigin; |
29 | } |
30 | |
31 | G_BEGIN_DECLS |
32 | |
33 | #define WEBKIT_TYPE_WEB_SRC (webkit_web_src_get_type ()) |
34 | #define WEBKIT_WEB_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WEBKIT_TYPE_WEB_SRC, WebKitWebSrc)) |
35 | #define WEBKIT_WEB_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WEBKIT_TYPE_WEB_SRC, WebKitWebSrcClass)) |
36 | #define WEBKIT_IS_WEB_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WEBKIT_TYPE_WEB_SRC)) |
37 | #define WEBKIT_IS_WEB_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WEBKIT_TYPE_WEB_SRC)) |
38 | |
39 | #define WEBKIT_WEB_SRC_PLAYER_CONTEXT_TYPE_NAME "webkit.media-player" |
40 | |
41 | typedef struct _WebKitWebSrc WebKitWebSrc; |
42 | typedef struct _WebKitWebSrcClass WebKitWebSrcClass; |
43 | typedef struct _WebKitWebSrcPrivate WebKitWebSrcPrivate; |
44 | |
45 | struct _WebKitWebSrc { |
46 | GstPushSrc parent; |
47 | |
48 | WebKitWebSrcPrivate *priv; |
49 | }; |
50 | |
51 | struct _WebKitWebSrcClass { |
52 | GstPushSrcClass parentClass; |
53 | }; |
54 | |
55 | GType webkit_web_src_get_type(void); |
56 | void webKitWebSrcSetMediaPlayer(WebKitWebSrc*, WebCore::MediaPlayer*); |
57 | bool webKitSrcPassedCORSAccessCheck(WebKitWebSrc*); |
58 | bool webKitSrcWouldTaintOrigin(WebKitWebSrc*, const WebCore::SecurityOrigin&); |
59 | |
60 | G_END_DECLS |
61 | |
62 | #endif // ENABLE(VIDEO) && USE(GSTREAMER) |
63 | |