File: GStreamerChecks.cmake

package info (click to toggle)
webkit2gtk 2.51.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 455,340 kB
  • sloc: cpp: 3,865,253; javascript: 197,710; ansic: 165,177; python: 49,241; asm: 21,868; ruby: 18,095; perl: 16,926; xml: 4,623; sh: 2,409; yacc: 2,356; java: 2,019; lex: 1,330; pascal: 372; makefile: 210
file content (77 lines) | stat: -rw-r--r-- 3,141 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO OR ENABLE_WEB_CODECS)
    SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER TRUE)
      if (USE_GSTREAMER_FULL)
          find_package(GStreamer 1.18.4 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_WEBRTC)
              list(APPEND GSTREAMER_COMPONENTS webrtc)
          endif ()

          find_package(GStreamer 1.18.4 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 PC_GSTREAMER_VERSION VERSION_LESS "1.20")
              message(FATAL_ERROR "GStreamer >= 1.20 is needed for ENABLE_MEDIA_RECORDER.")
          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)
        # OpenSSL is required for SFrame encryption support.
        find_package(OpenSSL)
        if (NOT OPENSSL_FOUND OR OPENSSL_VERSION VERSION_LESS "3.0.0")
            message(FATAL_ERROR "OpenSSL 3 is needed for ENABLE_WEB_RTC.")
        endif ()
    else ()
        SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC TRUE)
    endif ()
else ()
    SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC FALSE)
endif ()

if (NOT ENABLE_WPE_PLATFORM)
  SET_AND_EXPOSE_TO_BUILD(ENABLE_MEDIA_TELEMETRY OFF)
endif ()