tagging audio streams and changing audio sink to pulseaudio
[profile/ivi/webkit-efl.git] / Source / WebCore / platform / graphics / gstreamer / SharedVideoPlaformSurfaceTizen.h
1 /*
2     Copyright (C) 2012 Samsung Electronics.
3
4     This library is free software; you can redistribute it and/or
5     modify it under the terms of the GNU Library General Public
6     License as published by the Free Software Foundation; either
7     version 2.1 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     Library General Public License for more details.
13
14     You should have received a copy of the GNU Library General Public License
15     along with this library; see the file COPYING.LIB.  If not, write to
16     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17     Boston, MA 02110-1301, USA.
18 */
19
20 #ifndef SharedVideoPlatformSurfaceTizen_h
21 #define SharedVideoPlatformSurfaceTizen_h
22
23 #if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
24
25 #include "IntSize.h"
26 #include <Ecore.h>
27 #include <Ecore_X.h>
28 #include <wtf/OwnPtr.h>
29 #include <wtf/PassOwnPtr.h>
30
31 namespace WebCore {
32
33 class GraphicsContext;
34 class IntRect;
35 class VideoPlatformSurface;
36
37 class VideoPlatformSurfaceUpdateListener {
38 public:
39     virtual void platformSurfaceUpdated() = 0;
40 };
41
42 class SharedVideoPlatformSurfaceTizen {
43 public:
44     static PassOwnPtr<SharedVideoPlatformSurfaceTizen> create(IntSize size);
45     ~SharedVideoPlatformSurfaceTizen();
46
47     int id() const;
48     void platformSurfaceUpdated();
49     void setVideoPlatformSurfaceUpdateListener(VideoPlatformSurfaceUpdateListener* listener);
50     void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
51
52 private:
53     SharedVideoPlatformSurfaceTizen(IntSize size);
54
55     void registerDamageHandler();
56     void unregisterDamageHandler();
57
58     Ecore_X_Damage m_damage;
59     Ecore_Event_Handler* m_damageHandler;
60     VideoPlatformSurfaceUpdateListener* m_listener;
61     OwnPtr<VideoPlatformSurface> m_platformSurface;
62 };
63
64 } // WebCore
65
66 #endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
67
68 #endif // SharedVideoPlatformSurfaceTizen_h