[EME] Push CDMFactory into the platform layer
[WebKit-https.git] / Source / WebCore / platform / GStreamer.cmake
1 list(APPEND WebCore_INCLUDE_DIRECTORIES
2     "${WEBCORE_DIR}/platform/mediastream/openwebrtc"
3 )
4
5 if (ENABLE_MEDIA_STREAM)
6     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
7         ${OPENWEBRTC_INCLUDE_DIRS}
8     )
9
10     list(APPEND WebCore_LIBRARIES
11         ${OPENWEBRTC_LIBRARIES}
12     )
13
14     list(APPEND WebCore_SOURCES
15         platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp
16
17         platform/mediastream/openwebrtc/MediaEndpointOwr.cpp
18         platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp
19         platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp
20         platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp
21     )
22 endif ()
23
24 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
25     list(APPEND WebCore_INCLUDE_DIRECTORIES
26         "${WEBCORE_DIR}/platform/graphics/gstreamer"
27         "${WEBCORE_DIR}/platform/graphics/gstreamer/mse"
28         "${WEBCORE_DIR}/platform/graphics/gstreamer/eme"
29     )
30
31     list(APPEND WebCore_SOURCES
32         platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp
33         platform/graphics/gstreamer/GRefPtrGStreamer.cpp
34         platform/graphics/gstreamer/GStreamerUtilities.cpp
35         platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
36         platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
37         platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
38         platform/graphics/gstreamer/TextCombinerGStreamer.cpp
39         platform/graphics/gstreamer/TextSinkGStreamer.cpp
40         platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
41         platform/graphics/gstreamer/VideoSinkGStreamer.cpp
42         platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp
43         platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
44
45         platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp
46         platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp
47
48         platform/graphics/gstreamer/mse/AppendPipeline.cpp
49         platform/graphics/gstreamer/mse/GStreamerMediaDescription.cpp
50         platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp
51         platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
52         platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp
53         platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp
54         platform/graphics/gstreamer/mse/PlaybackPipeline.cpp
55         platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp
56         platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp
57     )
58
59     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
60         ${GSTREAMER_INCLUDE_DIRS}
61         ${GSTREAMER_BASE_INCLUDE_DIRS}
62         ${GSTREAMER_APP_INCLUDE_DIRS}
63         ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
64     )
65
66     list(APPEND WebCore_LIBRARIES
67         ${GSTREAMER_APP_LIBRARIES}
68         ${GSTREAMER_BASE_LIBRARIES}
69         ${GSTREAMER_LIBRARIES}
70         ${GSTREAMER_PBUTILS_LIBRARIES}
71         ${GSTREAMER_AUDIO_LIBRARIES}
72     )
73
74     # Avoiding a GLib deprecation warning due to GStreamer API using deprecated classes.
75     set_source_files_properties(platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp PROPERTIES COMPILE_DEFINITIONS "GLIB_DISABLE_DEPRECATION_WARNINGS=1")
76 endif ()
77
78 if (ENABLE_VIDEO)
79     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
80         ${GSTREAMER_TAG_INCLUDE_DIRS}
81         ${GSTREAMER_VIDEO_INCLUDE_DIRS}
82     )
83
84     list(APPEND WebCore_LIBRARIES
85         ${GSTREAMER_TAG_LIBRARIES}
86         ${GSTREAMER_VIDEO_LIBRARIES}
87     )
88
89     if (USE_GSTREAMER_MPEGTS)
90         list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
91             ${GSTREAMER_MPEGTS_INCLUDE_DIRS}
92         )
93         list(APPEND WebCore_LIBRARIES
94             ${GSTREAMER_MPEGTS_LIBRARIES}
95         )
96     endif ()
97
98     if (USE_GSTREAMER_GL)
99         list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
100             ${GSTREAMER_GL_INCLUDE_DIRS}
101         )
102         list(APPEND WebCore_LIBRARIES
103             ${GSTREAMER_GL_LIBRARIES}
104         )
105         list(APPEND WebCore_SOURCES
106             platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp
107         )
108     endif ()
109 endif ()
110
111 if (ENABLE_WEB_AUDIO)
112     list(APPEND WebCore_INCLUDE_DIRECTORIES
113         "${WEBCORE_DIR}/platform/audio/gstreamer"
114     )
115
116     list(APPEND WebCore_SOURCES
117         platform/audio/gstreamer/AudioDestinationGStreamer.cpp
118         platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
119         platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp
120         platform/audio/gstreamer/FFTFrameGStreamer.cpp
121         platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
122     )
123
124     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
125         ${GSTREAMER_AUDIO_INCLUDE_DIRS}
126         ${GSTREAMER_FFT_INCLUDE_DIRS}
127     )
128
129     list(APPEND WebCore_LIBRARIES
130         ${GSTREAMER_FFT_LIBRARIES}
131     )
132 endif ()
133
134 if (ENABLE_ENCRYPTED_MEDIA)
135     list(APPEND WebCore_INCLUDE_DIRECTORIES
136         "${WEBCORE_DIR}/platform/encryptedmedia/clearkey"
137         ${LIBGCRYPT_INCLUDE_DIRS}
138     )
139     list(APPEND WebCore_SOURCES
140         platform/encryptedmedia/clearkey/CDMClearKey.cpp
141
142         platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp
143     )
144     list(APPEND WebCore_LIBRARIES
145         ${LIBGCRYPT_LIBRARIES} -lgpg-error
146     )
147 endif ()
148
149 if (USE_CAIRO)
150     list(APPEND WebCore_SOURCES
151         platform/graphics/gstreamer/ImageGStreamerCairo.cpp
152     )
153 endif ()