blob: 6d1e774e5b3354f7bada39e0351e53ef01df60e4 [file] [log] [blame]
if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
if (PORT STREQUAL "WPE")
find_package(WPEBackend_fdo 1.9.0)
if ((NOT WPEBACKEND_FDO_FOUND) OR WPEBACKEND_FDO_AUDIO_EXTENSION STREQUAL "WPEBACKEND_FDO_AUDIO_EXTENSION-NOTFOUND")
message(WARNING "WPEBackend-fdo audio extension not found. Disabling external audio rendering support")
SET_AND_EXPOSE_TO_BUILD(USE_WPEBACKEND_FDO_AUDIO_EXTENSION FALSE)
else ()
SET_AND_EXPOSE_TO_BUILD(USE_WPEBACKEND_FDO_AUDIO_EXTENSION TRUE)
endif ()
endif ()
SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER TRUE)
if (USE_GSTREAMER_FULL)
find_package(GStreamer 1.20.0 REQUIRED COMPONENTS full)
if (NOT PC_GSTREAMER_FULL_FOUND)
message(FATAL_ERROR "GStreamer static library libgstreamer-full-1.0 not found")
else ()
SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER_FULL TRUE)
endif ()
else ()
set(GSTREAMER_COMPONENTS app pbutils)
if (ENABLE_VIDEO)
list(APPEND GSTREAMER_COMPONENTS video mpegts tag gl)
endif ()
if (ENABLE_WEB_AUDIO)
list(APPEND GSTREAMER_COMPONENTS audio fft)
endif ()
if (ENABLE_MEDIA_RECORDER)
list(APPEND GSTREAMER_COMPONENTS transcoder)
endif ()
if (USE_GSTREAMER_WEB_RTC)
list(APPEND GSTREAMER_COMPONENTS webrtc)
endif ()
find_package(GStreamer 1.14.0 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
if (ENABLE_WEB_AUDIO)
if (NOT PC_GSTREAMER_AUDIO_FOUND OR NOT PC_GSTREAMER_FFT_FOUND)
message(FATAL_ERROR "WebAudio requires the audio and fft GStreamer libraries. Please check your gst-plugins-base installation.")
endif ()
endif ()
if (ENABLE_VIDEO)
if (NOT PC_GSTREAMER_APP_FOUND OR NOT PC_GSTREAMER_PBUTILS_FOUND OR NOT PC_GSTREAMER_TAG_FOUND OR NOT PC_GSTREAMER_VIDEO_FOUND)
message(FATAL_ERROR "Video playback requires the following GStreamer libraries: app, pbutils, tag, video. Please check your gst-plugins-base installation.")
endif ()
endif ()
if (USE_GSTREAMER_MPEGTS AND NOT PC_GSTREAMER_MPEGTS_FOUND)
message(FATAL_ERROR "GStreamer MPEG-TS is needed for USE_GSTREAMER_MPEGTS.")
endif ()
if (USE_GSTREAMER_GL AND NOT PC_GSTREAMER_GL_FOUND)
message(FATAL_ERROR "GStreamerGL is needed for USE_GSTREAMER_GL.")
endif ()
if (ENABLE_MEDIA_RECORDER AND USE_GSTREAMER_TRANSCODER AND (NOT PC_GSTREAMER_TRANSCODER_FOUND OR PC_GSTREAMER_TRANSCODER_VERSION VERSION_LESS "1.20"))
message(FATAL_ERROR "GStreamerTranscoder >= 1.20 is needed for USE_GSTREAMER_TRANSCODER.")
endif ()
if (USE_GSTREAMER_WEBRTC AND (PC_GSTREAMER_VERSION VERSION_LESS "1.20" OR NOT PC_GSTREAMER_WEBRTC_FOUND))
message(FATAL_ERROR "GStreamerWebRTC >= 1.20 is needed for USE_GSTREAMER_WEBRTC.")
endif ()
endif ()
endif ()
if (ENABLE_MEDIA_STREAM AND ENABLE_WEB_RTC)
if (USE_GSTREAMER_WEBRTC)
SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC FALSE)
find_package(OpenSSL)
if (NOT OPENSSL_FOUND)
message(FATAL_ERROR "OpenSSL is needed for USE_GSTREAMER_WEBRTC.")
endif ()
else ()
SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC TRUE)
endif ()
else ()
SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC FALSE)
endif ()