meson: Fix build error caused by missing rtp dep

Missing RTP dep causes build error on Windows
webrtc-sendrecv.c.obj : error LNK2019: unresolved external symbol
  __imp_gst_rtp_header_extension_set_id referenced in function start_pipeline
webrtc-sendrecv.c.obj : error LNK2019: unresolved external symbol
  __imp_gst_rtp_header_extension_create_from_uri referenced in function start_pipeline

... and match required GStreamer to gst-example project version

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/40>
This commit is contained in:
Seungha Yang 2021-05-25 00:32:24 +09:00
parent a028a4cb84
commit a3c662b2e3
2 changed files with 17 additions and 7 deletions

View file

@ -9,6 +9,14 @@ if cc.get_id() == 'msvc'
language : 'c')
endif
gst_version = meson.project_version()
version_arr = gst_version.split('.')
gst_version_major = version_arr[0].to_int()
gst_version_minor = version_arr[1].to_int()
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
glib_dep = dependency('glib-2.0', version: '>= 2.38',
fallback: ['glib', 'libglib_dep'])
gio_dep = dependency('gio-2.0',
@ -18,16 +26,18 @@ gobject_dep = dependency('gobject-2.0', version: '>= 2.38',
gmodule_dep = dependency('gmodule-2.0',
fallback: ['glib', 'libgmodule_dep'])
gst_dep = dependency('gstreamer-1.0',
gst_dep = dependency('gstreamer-1.0', version: gst_req,
fallback : ['gstreamer', 'gst_dep'])
gstplay_dep = dependency('gstreamer-play-1.0', version: '>= 1.19.0.1',
gstplay_dep = dependency('gstreamer-play-1.0', version: gst_req,
fallback: ['gst-plugins-bad', 'gstplay_dep'])
gsttag_dep = dependency('gstreamer-tag-1.0',
gsttag_dep = dependency('gstreamer-tag-1.0', version: gst_req,
fallback: ['gst-plugins-base', 'tag_dep'])
gstwebrtc_dep = dependency('gstreamer-webrtc-1.0', version: '>= 1.14.0',
gstwebrtc_dep = dependency('gstreamer-webrtc-1.0', version: gst_req,
fallback: ['gst-plugins-bad', 'gstwebrtc_dep'])
gstsdp_dep = dependency('gstreamer-webrtc-1.0',
fallback : ['gst-plugins-bad', 'gstwebrtc_dep'])
gstsdp_dep = dependency('gstreamer-sdp-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'sdp_dep'])
gstrtp_dep = dependency('gstreamer-rtp-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'rtp_dep'])
subdir('playback')
subdir('network')

View file

@ -1,5 +1,5 @@
executable('webrtc-sendrecv',
'webrtc-sendrecv.c',
dependencies : [gst_dep, gstsdp_dep, gstwebrtc_dep, libsoup_dep, json_glib_dep ])
dependencies : [gst_dep, gstsdp_dep, gstwebrtc_dep, gstrtp_dep, libsoup_dep, json_glib_dep])
webrtc_py = files('webrtc_sendrecv.py')