[cmake][GStreamer][MSE][EME] Build MSE and EME code after refactoring
[WebKit.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/RealtimeMediaSourceCenterOwr.cpp
20     )
21 endif ()
22
23 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
24     list(APPEND WebCore_INCLUDE_DIRECTORIES
25         "${WEBCORE_DIR}/platform/graphics/gstreamer"
26         "${WEBCORE_DIR}/platform/graphics/gstreamer/mse"
27         "${WEBCORE_DIR}/platform/graphics/gstreamer/eme"
28     )
29
30     list(APPEND WebCore_SOURCES
31         platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp
32         platform/graphics/gstreamer/GRefPtrGStreamer.cpp
33         platform/graphics/gstreamer/GStreamerUtilities.cpp
34         platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
35         platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
36         platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
37         platform/graphics/gstreamer/TextCombinerGStreamer.cpp
38         platform/graphics/gstreamer/TextSinkGStreamer.cpp
39         platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
40         platform/graphics/gstreamer/VideoSinkGStreamer.cpp
41         platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp
42         platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
43
44         platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp
45         platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp
46
47         platform/graphics/gstreamer/mse/AppendPipeline.cpp
48         platform/graphics/gstreamer/mse/GStreamerMediaDescription.cpp
49         platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp
50         platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
51         platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp
52         platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp
53         platform/graphics/gstreamer/mse/PlaybackPipeline.cpp
54         platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp
55         platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp
56     )
57
58     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
59         ${GSTREAMER_INCLUDE_DIRS}
60         ${GSTREAMER_BASE_INCLUDE_DIRS}
61         ${GSTREAMER_APP_INCLUDE_DIRS}
62         ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
63     )
64
65     list(APPEND WebCore_LIBRARIES
66         ${GSTREAMER_APP_LIBRARIES}
67         ${GSTREAMER_BASE_LIBRARIES}
68         ${GSTREAMER_LIBRARIES}
69         ${GSTREAMER_PBUTILS_LIBRARIES}
70         ${GSTREAMER_AUDIO_LIBRARIES}
71     )
72
73     # Avoiding a GLib deprecation warning due to GStreamer API using deprecated classes.
74     set_source_files_properties(platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp PROPERTIES COMPILE_DEFINITIONS "GLIB_DISABLE_DEPRECATION_WARNINGS=1")
75 endif ()
76
77 if (ENABLE_VIDEO)
78     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
79         ${GSTREAMER_TAG_INCLUDE_DIRS}
80         ${GSTREAMER_VIDEO_INCLUDE_DIRS}
81     )
82
83     list(APPEND WebCore_LIBRARIES
84         ${GSTREAMER_TAG_LIBRARIES}
85         ${GSTREAMER_VIDEO_LIBRARIES}
86     )
87
88     if (USE_GSTREAMER_MPEGTS)
89         list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
90             ${GSTREAMER_MPEGTS_INCLUDE_DIRS}
91         )
92         list(APPEND WebCore_LIBRARIES
93             ${GSTREAMER_MPEGTS_LIBRARIES}
94         )
95     endif ()
96
97     if (USE_GSTREAMER_GL)
98         list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
99             ${GSTREAMER_GL_INCLUDE_DIRS}
100         )
101         list(APPEND WebCore_LIBRARIES
102             ${GSTREAMER_GL_LIBRARIES}
103         )
104         list(APPEND WebCore_SOURCES
105             platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp
106         )
107     endif ()
108 endif ()
109
110 if (ENABLE_WEB_AUDIO)
111     list(APPEND WebCore_INCLUDE_DIRECTORIES
112         "${WEBCORE_DIR}/platform/audio/gstreamer"
113     )
114
115     list(APPEND WebCore_SOURCES
116         platform/audio/gstreamer/AudioDestinationGStreamer.cpp
117         platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
118         platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp
119         platform/audio/gstreamer/FFTFrameGStreamer.cpp
120         platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
121     )
122
123     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
124         ${GSTREAMER_AUDIO_INCLUDE_DIRS}
125         ${GSTREAMER_FFT_INCLUDE_DIRS}
126     )
127
128     list(APPEND WebCore_LIBRARIES
129         ${GSTREAMER_FFT_LIBRARIES}
130     )
131 endif ()
132
133 if (ENABLE_LEGACY_ENCRYPTED_MEDIA)
134     list(APPEND WebCore_INCLUDE_DIRECTORIES
135         ${LIBGCRYPT_INCLUDE_DIRS}
136     )
137     list(APPEND WebCore_LIBRARIES
138         ${LIBGCRYPT_LIBRARIES} -lgpg-error
139     )
140 endif ()