031c9f1954f4074228f480e6f6db867acd9d264a
[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/OpenWebRTCUtilities.cpp
18         platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp
19     )
20 endif ()
21
22 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
23     list(APPEND WebCore_INCLUDE_DIRECTORIES
24         "${WEBCORE_DIR}/platform/graphics/gstreamer"
25     )
26
27     list(APPEND WebCore_SOURCES
28         platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp
29         platform/graphics/gstreamer/GRefPtrGStreamer.cpp
30         platform/graphics/gstreamer/GStreamerUtilities.cpp
31         platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
32         platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
33         platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
34         platform/graphics/gstreamer/MediaSourceGStreamer.cpp
35         platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp
36         platform/graphics/gstreamer/TextCombinerGStreamer.cpp
37         platform/graphics/gstreamer/TextSinkGStreamer.cpp
38         platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
39         platform/graphics/gstreamer/VideoSinkGStreamer.cpp
40         platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp
41         platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp
42         platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
43     )
44
45     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
46         ${GSTREAMER_INCLUDE_DIRS}
47         ${GSTREAMER_BASE_INCLUDE_DIRS}
48         ${GSTREAMER_APP_INCLUDE_DIRS}
49         ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
50     )
51
52     list(APPEND WebCore_LIBRARIES
53         ${GSTREAMER_APP_LIBRARIES}
54         ${GSTREAMER_BASE_LIBRARIES}
55         ${GSTREAMER_LIBRARIES}
56         ${GSTREAMER_PBUTILS_LIBRARIES}
57         ${GSTREAMER_AUDIO_LIBRARIES}
58     )
59
60     # Avoiding a GLib deprecation warning due to GStreamer API using deprecated classes.
61     set_source_files_properties(platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp PROPERTIES COMPILE_DEFINITIONS "GLIB_DISABLE_DEPRECATION_WARNINGS=1")
62 endif ()
63
64 if (ENABLE_VIDEO)
65     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
66         ${GSTREAMER_TAG_INCLUDE_DIRS}
67         ${GSTREAMER_VIDEO_INCLUDE_DIRS}
68     )
69
70     list(APPEND WebCore_LIBRARIES
71         ${GSTREAMER_TAG_LIBRARIES}
72         ${GSTREAMER_VIDEO_LIBRARIES}
73     )
74
75     if (USE_GSTREAMER_MPEGTS)
76         list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
77             ${GSTREAMER_MPEGTS_INCLUDE_DIRS}
78         )
79         list(APPEND WebCore_LIBRARIES
80             ${GSTREAMER_MPEGTS_LIBRARIES}
81         )
82     endif ()
83
84     if (USE_GSTREAMER_GL)
85         list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
86             ${GSTREAMER_GL_INCLUDE_DIRS}
87         )
88         list(APPEND WebCore_LIBRARIES
89             ${GSTREAMER_GL_LIBRARIES}
90         )
91         list(APPEND WebCore_SOURCES
92             platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp
93         )
94     endif ()
95 endif ()
96
97 if (ENABLE_WEB_AUDIO)
98     list(APPEND WebCore_INCLUDE_DIRECTORIES
99         "${WEBCORE_DIR}/platform/audio/gstreamer"
100     )
101
102     list(APPEND WebCore_SOURCES
103         platform/audio/gstreamer/AudioDestinationGStreamer.cpp
104         platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
105         platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp
106         platform/audio/gstreamer/FFTFrameGStreamer.cpp
107         platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
108     )
109
110     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
111         ${GSTREAMER_AUDIO_INCLUDE_DIRS}
112         ${GSTREAMER_FFT_INCLUDE_DIRS}
113     )
114
115     list(APPEND WebCore_LIBRARIES
116         ${GSTREAMER_FFT_LIBRARIES}
117     )
118 endif ()