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