Merge remote-tracking branch 'gst-plugins-good/tizen_gst_1.19.2' into tizen_gst_1...
[platform/upstream/gstreamer.git] / meson.build
index 8b57ea5..e99bec1 100644 (file)
@@ -1,5 +1,5 @@
 project('gst-plugins-good', 'c',
-  version : '1.19.0.1',
+  version : '1.19.2',
   meson_version : '>= 0.54',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
@@ -18,7 +18,7 @@ gst_version_is_dev = gst_version_minor % 2 == 1 and gst_version_micro < 90
 
 have_cxx = add_languages('cpp', native: false, required: false)
 
-glib_req = '>= 2.44.0'
+glib_req = '>= 2.56.0'
 orc_req = '>= 0.4.17'
 gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
 
@@ -31,17 +31,27 @@ cc = meson.get_compiler('c')
 host_system = host_machine.system()
 
 if cc.get_id() == 'msvc'
-  # Ignore several spurious warnings for things gstreamer does very commonly
-  # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
-  # If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once
-  # NOTE: Only add warnings here if you are sure they're spurious
-  add_project_arguments(
+  msvc_args = [
+      # Ignore several spurious warnings for things gstreamer does very commonly
+      # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
+      # If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once
+      # NOTE: Only add warnings here if you are sure they're spurious
       '/wd4018', # implicit signed/unsigned conversion
       '/wd4146', # unary minus on unsigned (beware INT_MIN)
       '/wd4244', # lossy type conversion (e.g. double -> int)
       '/wd4305', # truncating type conversion (e.g. double -> float)
       cc.get_supported_arguments(['/utf-8']), # set the input encoding to utf-8
-      language : 'c')
+
+      # Enable some warnings on MSVC to match GCC/Clang behaviour
+      '/w14062', # enumerator 'identifier' in switch of enum 'enumeration' is not handled
+      '/w14101', # 'identifier' : unreferenced local variable
+      '/w14189', # 'identifier' : local variable is initialized but not referenced
+  ]
+  if have_cxx
+    add_project_arguments(msvc_args, language: ['c', 'cpp'])
+  else
+    add_project_arguments(msvc_args, language: 'c')
+  endif
   # Disable SAFESEH with MSVC for plugins and libs that use external deps that
   # are built with MinGW
   noseh_link_args = ['/SAFESEH:NO']
@@ -363,9 +373,7 @@ have_nasm = false
 # FIXME: nasm path needs testing on non-Linux, esp. Windows
 host_cpu = host_machine.cpu_family()
 if host_cpu == 'x86_64'
-  if cc.get_id() == 'msvc'
-    message('Nasm disabled on MSVC')
-  elif cc.get_define('__ILP32__') == '1'
+  if cc.get_define('__ILP32__') == '1'
     message('Nasm disabled on x32')
   else
     asm_option = get_option('asm')
@@ -401,6 +409,34 @@ if host_cpu == 'x86_64'
   endif
 endif
 
+# TIZEN_BUILD_OPTION
+
+tbm_dep = dependency('libtbm', required : get_option('tbm'))
+if tbm_dep.found()
+  cdata.set('TIZEN_FEATURE_V4L2_TBM_SUPPORT', 1)
+endif
+
+gio_dep = dependency('gio-2.0')
+
+cdata.set('TIZEN_FEATURE_V4L2SRC_AUTO_SCAN_DEVICE_NODE', true)
+cdata.set('TIZEN_FEATURE_V4L2SRC_SUPPORT_CAMERA_ID', true)
+cdata.set('TIZEN_FEATURE_V4L2VIDEO_ADJ_RANK', true)
+cdata.set('TIZEN_FEATURE_WAVPARSE_MODIFICATION', true)
+cdata.set('TIZEN_FEATURE_MP3PARSE_MODIFICATION', true)
+cdata.set('TIZEN_FEATURE_AACPARSE_MODIFICATION', true)
+cdata.set('TIZEN_FEATURE_QTDEMUX_MODIFICATION', true)
+cdata.set('TIZEN_FEATURE_QTDEMUX_DURATION', true)
+cdata.set('TIZEN_FEATURE_FLVDEMUX_MODIFICATION', true)
+cdata.set('TIZEN_FEATURE_RTSP_MODIFICATION', true)
+cdata.set('TIZEN_FEATURE_SOUP_MODIFICATION', true)
+cdata.set('TIZEN_FEATURE_RGVOLUME_MODIFICATION', true)
+cdata.set('TIZEN_FEATURE_DISABLE_V4L2_DEPENDENCY', true)
+cdata.set('TIZEN_FEATURE_AVIDEMUX_MODIFICATION', true)
+cdata.set('TIZEN_FEATURE_USE_LIBV4L2', true)
+cdata.set('TIZEN_FEATURE_V4L2_ADDITIONAL_CID_SUPPORT', true)
+
+# TIZEN_BUILD_OPTION end
+
 # Disable compiler warnings for unused variables and args if gst debug system is disabled
 if gst_dep.type_name() == 'internal'
   gst_debug_disabled = not subproject('gstreamer').get_variable('gst_debug')
@@ -483,6 +519,10 @@ if gst_version_nano == 0
   endif
 endif
 
+if gio_dep.version().version_compare('< 2.67.4')
+  cdata.set('g_memdup2(ptr,sz)', '(G_LIKELY(((guint64)(sz)) < G_MAXUINT)) ? g_memdup(ptr,sz) : (g_abort(),NULL)')
+endif
+
 configure_file(output : 'config.h', configuration : cdata)
 
 run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')