mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 07:38:16 +00:00
mpeg2enc: fix werror build with clang
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass1.hh:1:9: error: '_ONTHEFLYRATECTLPASS1_HH' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard] #ifndef _ONTHEFLYRATECTLPASS1_HH ^~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass1.hh:2:9: note: '_ONTHELFYRATECTLPASS1_HH' is defined here; did you mean '_ONTHEFLYRATECTLPASS1_HH'? #define _ONTHELFYRATECTLPASS1_HH ^~~~~~~~~~~~~~~~~~~~~~~~ _ONTHEFLYRATECTLPASS1_HH In file included from ../subprojects/gst-plugins-bad/ext/mpeg2enc/gstmpeg2encoder.cc:31: /usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass2.hh:1:9: error: '_ONTHEFLYRATECTLPASS2_HH' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard] #ifndef _ONTHEFLYRATECTLPASS2_HH ^~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass2.hh:2:9: note: '_ONTHELFYRATECTLPASS2_HH' is defined here; did you mean '_ONTHEFLYRATECTLPASS2_HH'? #define _ONTHELFYRATECTLPASS2_HH ^~~~~~~~~~~~~~~~~~~~~~~~ _ONTHEFLYRATECTLPASS2_HH /usr/include/mjpegtools/mpeg2enc/encoderparams.hh:82:1: error: struct 'RateCtl' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags] struct RateCtl; ^ /usr/include/mjpegtools/mpeg2enc/ratectl.hh:50:7: note: previous use is here class RateCtl ^ /usr/include/mjpegtools/mpeg2enc/encoderparams.hh:82:1: note: did you mean class here? struct RateCtl; ^~~~~~ class
This commit is contained in:
parent
6e9d0ac61b
commit
278039be06
1 changed files with 12 additions and 1 deletions
|
@ -4,6 +4,17 @@
|
||||||
# if someone complains.
|
# if someone complains.
|
||||||
mjpegtools_dep = dependency('mjpegtools', version : '>=2.0.0', required : get_option('mpeg2enc'))
|
mjpegtools_dep = dependency('mjpegtools', version : '>=2.0.0', required : get_option('mpeg2enc'))
|
||||||
mpeg2enc_dep = cxx.find_library('mpeg2encpp', required : get_option('mpeg2enc'))
|
mpeg2enc_dep = cxx.find_library('mpeg2encpp', required : get_option('mpeg2enc'))
|
||||||
|
|
||||||
|
no_warn_args = []
|
||||||
|
foreach arg : [
|
||||||
|
'-Wno-mismatched-tags', # mjpeg headers get class/struct mixed up
|
||||||
|
'-Wno-header-guard',
|
||||||
|
]
|
||||||
|
if cxx.has_argument(arg)
|
||||||
|
no_warn_args += [arg]
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
|
||||||
if mjpegtools_dep.found() and mpeg2enc_dep.found()
|
if mjpegtools_dep.found() and mpeg2enc_dep.found()
|
||||||
gstmpeg2enc = library('gstmpeg2enc',
|
gstmpeg2enc = library('gstmpeg2enc',
|
||||||
'gstmpeg2enc.cc',
|
'gstmpeg2enc.cc',
|
||||||
|
@ -11,7 +22,7 @@ if mjpegtools_dep.found() and mpeg2enc_dep.found()
|
||||||
'gstmpeg2encoder.cc',
|
'gstmpeg2encoder.cc',
|
||||||
'gstmpeg2encstreamwriter.cc',
|
'gstmpeg2encstreamwriter.cc',
|
||||||
'gstmpeg2encpicturereader.cc',
|
'gstmpeg2encpicturereader.cc',
|
||||||
cpp_args : gst_plugins_bad_args + ['-DGST_MJPEGTOOLS_API=20000'],
|
cpp_args : gst_plugins_bad_args + ['-DGST_MJPEGTOOLS_API=20000'] + no_warn_args,
|
||||||
link_args : noseh_link_args,
|
link_args : noseh_link_args,
|
||||||
include_directories : [configinc, libsinc],
|
include_directories : [configinc, libsinc],
|
||||||
dependencies : [gstvideo_dep, mjpegtools_dep, mpeg2enc_dep],
|
dependencies : [gstvideo_dep, mjpegtools_dep, mpeg2enc_dep],
|
||||||
|
|
Loading…
Reference in a new issue