diff options
author | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2017-10-04 16:02:53 -0300 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2017-10-11 18:27:53 +0200 |
commit | 288b061843101f7eb63980d76ec567cc80dfe89e (patch) | |
tree | 5de9ea5c19ec92ad8c63f0f7342a428bf033f4bd | |
parent | e591823df705581b0a4661a50dfd4d02013454b6 (diff) |
Add ABI tests and fix related issues
-rwxr-xr-x | Tests/test_abi.py | 28 | ||||
-rw-r--r-- | generate_code.py | 9 | ||||
-rw-r--r-- | ges/generated/meson.build | 17 | ||||
-rw-r--r-- | ges/gst-editing-services.metadata | 11 | ||||
-rw-r--r-- | ges/meson.build | 16 | ||||
-rw-r--r-- | meson.build | 1 | ||||
-rw-r--r-- | samples/PlaybackTutorial3.cs | 2 | ||||
-rw-r--r-- | sources/generated/meson.build | 17 | ||||
-rw-r--r-- | sources/gstreamer-sharp.metadata | 53 | ||||
-rw-r--r-- | sources/meson.build | 17 |
10 files changed, 134 insertions, 37 deletions
diff --git a/Tests/test_abi.py b/Tests/test_abi.py new file mode 100755 index 0000000..838801c --- /dev/null +++ b/Tests/test_abi.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 + +import difflib +import sys +import shutil +import subprocess + +reference_abi = subprocess.check_output(sys.argv[1]).decode().split("\n") +launcher = [] +if shutil.which("mono"): + launcher = ["mono", "--debug"] +csharp_abi = subprocess.check_output(launcher + [sys.argv[2]]).decode().split("\n") +print("Comparing output of %s and %s" % (sys.argv[1], sys.argv[2])) + +res = 0 +for line in difflib.unified_diff(reference_abi, csharp_abi): + res = 1 + print(line) + +if res: + files = [(sys.argv[1] + ".res", reference_abi), + (sys.argv[2] + 'res', csharp_abi)] + + for f, vals in files: + with open(f, "w") as _f: + print("Outputing results in " + f) + _f.write("\n".join(vals)) +sys.exit(res) diff --git a/generate_code.py b/generate_code.py index 8a3bc10..fa8b9da 100644 --- a/generate_code.py +++ b/generate_code.py @@ -16,6 +16,7 @@ if __name__ == "__main__": parser.add_argument("--gapi-codegen") parser.add_argument("--glue-file", default="") parser.add_argument("--glue-includes", default="") + parser.add_argument("--abi-cs-usings", default="") parser.add_argument("--glue-libname", default="") parser.add_argument("--assembly-name") parser.add_argument("--extra-includes", action='append', default=[]) @@ -38,7 +39,7 @@ if __name__ == "__main__": shutil.copyfile(opts.api_raw, api_xml) if shutil.which('mono'): - launcher = ['mono'] + launcher = ['mono', '--debug'] else: launcher = [] @@ -56,12 +57,16 @@ if __name__ == "__main__": '--gluelib-name=' + opts.glue_libname, '--glue-includes=' + opts.glue_includes, '--assembly-name=' + opts.assembly_name, - '--all-opaque', + '--abi-c-filename=' + os.path.join(opts.out, opts.assembly_name + "-abi.c"), + '--abi-cs-filename=' + os.path.join(opts.out, opts.assembly_name + "-abi.cs"), ] if opts.schema: cmd += ['--schema=' + opts.schema] + if opts.abi_cs_usings: + cmd += ['--abi-cs-usings=' + opts.abi_cs_usings] + cmd += ['-I' + i for i in opts.extra_includes] subprocess.check_call(launcher + cmd) diff --git a/ges/generated/meson.build b/ges/generated/meson.build index a05d4ff..0e33643 100644 --- a/ges/generated/meson.build +++ b/ges/generated/meson.build @@ -118,7 +118,7 @@ source_gen = custom_target(pkg + '_codegen', generate_api, '--api-raw', '@INPUT@', '--gapi-fixup', gapi_fixup, - '--metadata', metadata_fname, + '--metadata', metadata, '--gapi-codegen', gapi_codegen, '--extra-includes=' + glib_api_includes, '--extra-includes=' + gio_api_includes, @@ -126,9 +126,24 @@ source_gen = custom_target(pkg + '_codegen', '--out', meson.current_build_dir(), '--files', ';'.join(generated_sources), '--assembly-name', pkg, + '--glue-includes', 'ges/ges.h', + '--abi-cs-usings', 'Gst,Gst.Video,Gst.Sdp,Gst.Tags,Gst.Rtsp,Gst.PbUtils,Gst.Net,Gst.FFT,Gst.Controller,Gst.Base,Gst.Audio,Gst.App,GES', ], depend_files: [raw_api_fname], depends: codegen_dependencies + [gst_source_gen]) +c_abi = custom_target(pkg + '_c_abi', + input: raw_api_fname, + output: pkg + '-abi.c', + command: [generate_api, '--fakeglue'], + depends: [source_gen]) + +cs_abi = custom_target(pkg + '_cs_abi', + input: raw_api_fname, + output: pkg + '-abi.cs', + command: [generate_api, '--fakeglue'], + depends: [source_gen]) + + gapis += [join_paths(meson.current_build_dir(), pkg + '-api.xml')] gapis_deps = [source_gen] diff --git a/ges/gst-editing-services.metadata b/ges/gst-editing-services.metadata index a594d19..1c45cab 100644 --- a/ges/gst-editing-services.metadata +++ b/ges/gst-editing-services.metadata @@ -32,4 +32,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA <attr path="/api/namespace/object[@name='TimelineElement']/field[@cname='parent_instance']" name="access">private</attr> <attr path="/api/namespace/object[@name='Layer']/field[@cname='parent']" name="access">private</attr> <attr path="/api/namespace/object[@name='Formatter']/field[@cname='parent']" name="access">private</attr> + <attr path="/api/namespace/object/class_struct[@cname='GESBaseXmlFormatterClass']/field[@cname='content_parser']" name="type">GMarkupParser</attr> + + <attr path="/api/namespace/object/class_struct[@cname='GESEffectAssetClass']" name="private">true</attr> + <add-node path="/api/namespace/object/class_struct[@cname='GESVideoSourceClass']"> + <union name="ABI" cname="ABI"> + <struct name="abi" cname="abi" opaque="false" hidden="false"> + <field cname="disable_scale_in_compositor" access="public" writeable="true" readable="true" name="DisableScaleInCompositor" type="gint64"/> + </struct> + <field cname="_gst_reserved" access="private" writeable="false" readable="false" name="_gstGstReserved" type="gpointer" array="true" array_len="4"/> + </union> + </add-node> </metadata> diff --git a/ges/meson.build b/ges/meson.build index 3429b7b..2193df0 100644 --- a/ges/meson.build +++ b/ges/meson.build @@ -1,6 +1,6 @@ pkg = 'gst-editing-services' raw_api_fname = join_paths(meson.current_source_dir(), pkg + '-api.raw') -metadata_fname = join_paths(meson.current_source_dir(), pkg + '.metadata') +metadata = files(pkg + '.metadata') subdir('generated') @@ -9,12 +9,22 @@ ges_sharp = library(pkg + '-sharp', source_gen, link_with: gst_sharp, dependencies: [glib_sharp_dep, gio_sharp_dep]) -ges_sharp_dep = declare_dependency(dependencies: [glib_sharp_dep, gio_sharp_dep, gst_sharp_dep, - ges_dep], link_with: ges_sharp) +ges_sharp_dep = declare_dependency(dependencies: [glib_sharp_dep, gio_sharp_dep, gst_sharp_dep], link_with: ges_sharp) configure_file( input: pkg + '-sharp.dll.config', output: pkg + '-sharp.dll.config', configuration: configuration_data()) +if add_languages('c', required: false) + c_abi_exe = executable(pkg + '_c_abi', c_abi, + c_args: ['-Wno-deprecated', '-Wno-deprecated-declarations'], + dependencies: [gst_deps, ges_dep]) + + cs_abi_exe = executable(pkg + '_cs_abi', cs_abi, + cs_args: ['-nowarn:169', '-nowarn:108', '-nowarn:114', '-nowarn:0618', '-unsafe'], + dependencies: [ges_sharp_dep]) + + test(pkg + 'abi', diff, args: [c_abi_exe.full_path(), cs_abi_exe.full_path()]) +endif diff --git a/meson.build b/meson.build index e3cf478..639401b 100644 --- a/meson.build +++ b/meson.build @@ -47,6 +47,7 @@ gapi_codegen = gapi_codegen.full_path() gacutil = find_program('gacutil') generate_api = find_program('generate_code.py') nuget = find_program('nuget.py') +diff = find_program('Tests/test_abi.py') # TODO Handle monodoc diff --git a/samples/PlaybackTutorial3.cs b/samples/PlaybackTutorial3.cs index 47ecef5..dc725b0 100644 --- a/samples/PlaybackTutorial3.cs +++ b/samples/PlaybackTutorial3.cs @@ -93,7 +93,7 @@ namespace GstreamerSharp // This function is called when playbin has created the appsrc element, so we have a chance to configure it. static void SourceSetup (object sender, GLib.SignalArgs args) { - var info = new Gst.Audio.AudioInfo(); + var info = new Gst.Audio.AudioInfo (); var source = new Gst.App.AppSrc(((Element)args.Args [0]).Handle); Console.WriteLine ("Source has been created. Configuring."); AppSource = source; diff --git a/sources/generated/meson.build b/sources/generated/meson.build index 2a64c84..200edd1 100644 --- a/sources/generated/meson.build +++ b/sources/generated/meson.build @@ -688,7 +688,6 @@ generated_sources = [ 'Gst.Net_PtpClock.cs', 'Gst.Net_Gst.NetSharp.PtpStatisticsCallbackNative.cs', 'Gst.Net_NetControlMessageMeta.cs', - 'Gst.Net_NtpClock.cs', 'Gst.Net_NetAddressMeta.cs', 'Gst.Net_NetTimePacket.cs', 'Gst.Net_Constants.cs', @@ -719,17 +718,31 @@ gst_source_gen = custom_target('gst_codegen', generate_api, '--api-raw', '@INPUT@', '--gapi-fixup', gapi_fixup, - '--metadata', metadata_fname, + '--metadata', metadata, '--gapi-codegen', gapi_codegen, '--extra-includes=' + glib_api_includes, '--extra-includes=' + gio_api_includes, '--out', meson.current_build_dir(), '--files', ';'.join(generated_sources), '--assembly-name', meson.project_name(), + '--glue-includes', glueincludes, + '--abi-cs-usings', 'Gst,Gst.Video,Gst.Sdp,Gst.Tags,Gst.Rtsp,Gst.PbUtils,Gst.Net,Gst.FFT,Gst.Controller,Gst.Base,Gst.Audio,Gst.App', ], depend_files: [raw_api_fname], depends: codegen_dependencies) +c_abi = custom_target('gst_sharp_c_abi', + input: raw_api_fname, + output: 'gstreamer-sharp-abi.c', + command: [generate_api, '--fakeglue'], + depends: [gst_source_gen]) + +cs_abi = custom_target('gst_sharp_cs_abi', + input: raw_api_fname, + output: 'gstreamer-sharp-abi.cs', + command: [generate_api, '--fakeglue'], + depends: [gst_source_gen]) + gst_api_includes = join_paths(meson.current_build_dir(), 'gstreamer-sharp-api.xml') gapis = [gst_api_includes] gapis_deps = [gst_source_gen] diff --git a/sources/gstreamer-sharp.metadata b/sources/gstreamer-sharp.metadata index 8249af9..3e447b8 100644 --- a/sources/gstreamer-sharp.metadata +++ b/sources/gstreamer-sharp.metadata @@ -67,17 +67,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA <attr path="/api/namespace/struct[@cname='GstRTSPMessage']" name="opaque">true</attr> <attr path="/api/namespace/struct[@cname='GstTypeFind']" name="opaque">true</attr> - <!-- Add callback nodes that are not handled in structures (remove the data which is in the middle) --> - <remove-node path="/api/namespace/struct[@cname='GstTypeFind']/field[@cname='data']"/> - <remove-node path="/api/namespace/struct[@cname='GstTypeFind']/field[@cname='_gst_reserved']"/> - <add-node path="/api/namespace/struct[@cname='GstTypeFind']"> - <field cname="peek" access="private" writeable="false" readable="false" name="Peek" type="gpointer" hidden="true"/> - <field cname="suggest" access="private" writeable="false" readable="false" name="Suggest" type="gpointer" hidden="true"/> - <field cname="data" access="public" writeable="true" readable="true" name="Data" type="gpointer" /> - <field cname="get_length" access="private" writeable="false" readable="false" name="GetLengtk" type="gpointer" hidden="true"/> - <field cname="_gst_reserved" access="private" writeable="false" readable="false" name="_gstGstReserved" type="gpointer" array="true" array_len="4" is-padding="true" /> - </add-node> - <attr path="/api/namespace/boxed[@cname='GstIterator']" name="opaque">true</attr> <!-- acknowledge that we GstIterator implements the IEnumerator interface --> <add-node path="/api/namespace/boxed[@cname='GstIterator']"> @@ -87,11 +76,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA </add-node> <attr path="/api/namespace/boxed[@cname='GstIterator']/method[@cname='gst_iterator_next']" name="hidden">true</attr> <attr path="/api/namespace/boxed[@cname='GstIterator']/field[@cname='master_cookie']" name="type">guint32*</attr> - <attr path="/api/namespace/boxed[@cname='GstStructure']/field[@cname='name']" name="hidden">true</attr> <!-- Fix for GstChildProxy --> <attr path="/api/namespace/interface[@cname='GstChildProxy']/method[@cname='gst_child_proxy_get_property']" name="hidden">1</attr> <attr path="/api/namespace/interface[@cname='GstChildProxy']/method[@cname='gst_child_proxy_set_property']" name="hidden">1</attr> - <!-- FIXME: array handling --> <attr path="/api/namespace/struct[@cname='GstRTCPPacket']/method[@cname='gst_rtcp_packet_sdes_copy_entry']" name="hidden">true</attr> <attr path="/api/namespace/struct[@cname='GstRTCPPacket']/method[@cname='gst_rtcp_packet_sdes_get_entry']" name="hidden">true</attr> @@ -117,16 +104,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA </parameters> </method> </add-node> - <!-- Some glue problems --> <attr path="/api/namespace/object[@cname='GstObject']/field[@cname='object']" name="hidden">true</attr> <attr path="/api/namespace/struct[@cname='GstClockEntry']/field[@cname='func']" name="hidden">true</attr> <attr path="/api/namespace/struct[@cname='GstClockEntry']/field[@cname='destroy_data']" name="hidden">true</attr> <attr path="/api/namespace/object[@cname='GstTask']/field[@cname='notify']" name="hidden">true</attr> - <!-- Hide structure callbacks --> - <attr path="/api/namespace/struct[@cname='GstDataQueueItem']/field[@cname='destroy']" name="hidden">true</attr> - <!-- hide user data; FIXME: already removed in 1.2 GIR file, remove when we update to this version --> <attr path="/api/namespace/object[@cname='GstBus']/method[@cname='gst_bus_sync_signal_handler']/parameters/parameter[@name='data']" name="hidden">1</attr> @@ -190,6 +173,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA <attr path="/api/namespace/object[@cname='GstVideoDecoder']/class_struct/field[@cname='padding']" name="type">gpointer</attr> <attr path="/api/namespace/object[@cname='GstVideoEncoder']/field[@cname='padding']" name="type">gpointer</attr> <attr path="/api/namespace/struct[@cname='GstByteReader']" name="opaque">1</attr> + <attr path="/api/namespace/struct[@cname='GstAudioRingBufferSpec']" name="opaque">true</attr> <remove-node path="/api/namespace//struct[@cname='GstByteReader']//method"/> <attr path="//struct[@name='VideoGLTextureUploadMeta']//field[@cname='user_data_copy' or @cname='user_data_free']" name="hidden">true</attr> <attr path="//interface[@cname='GstVideoOverlay']//parameter[@type='guintptr']" name="type">gpointer</attr> @@ -203,6 +187,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA <attr path="/api/namespace/object[@cname='GstAudioClock']/field[@cname='destroy_notify']" name="hidden">1</attr> <attr path="/api/namespace/interface[@cname='GstStreamVolume']/property[@cname='volume']" name="hidden">1</attr> <attr path="//method[@cname='gst_audio_filter_class_add_pad_templates']" name="name">AddAudioPadTemplate</attr> <!-- FIXME This should probably be usable --> + <attr path="/api/namespace//struct[@cname='GstAudioDownmixMeta']" name="parent">GstMeta</attr> + <attr path="/api/namespace//struct[@cname='GstAudioDownmixMeta']/field[@cname='from_position']" name="type">GstAudioChannelPosition*</attr> + <attr path="/api/namespace//struct[@cname='GstAudioDownmixMeta']/field[@cname='to_position']" name="type">GstAudioChannelPosition*</attr> <!-- Name clashes --> <attr path="//method[@cname='gst_buffer_foreach_meta']" name="hidden">true</attr> <!-- FIXME This should probably be usable --> @@ -271,7 +258,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA <attr path="//struct[@cname='GstVideoGLTextureUploadMeta']" name="noequals">true</attr> <attr path="//object[@cname='GstPad']//union" name="hidden">true</attr> <attr path="//struct[@cname='GstControlPoint']" name="hidden">true</attr> - <move-node path="//boxed[@cname='GstVideoCodecFrame']/union/field">//boxed[@cname='GstVideoCodecFrame']</move-node> <attr path="//boxed[@cname='GstVideoCodecFrame']/union" name="hidden">true</attr> <attr path="//boxed[@cname='GstVideoCodecFrame']/union/field[@cname='padding']" name="type">gpointer</attr> <attr path="//*[@type='const GList*']" name="type">GList*</attr> @@ -281,7 +267,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA <attr path="//constant[@name='SECOND']" name="ctype">gint64</attr> <attr path="//constant[@name='MSECOND']" name="ctype">gint64</attr> <attr path="//method[parameters/parameter[contains(@type, 'Class*')]]" name="hidden">true</attr> - <attr path="//struct[@cname='GstMapInfo']/field[@name='Data']" name="hidden">true</attr> + <attr path="//struct[@cname='GstMapInfo']/field[@name='Data']" name="type">gpointer</attr> + <attr path="//struct[@cname='GstMapInfo']/field[@name='Data']" name="array">false</attr> <attr path="//method[@cname='gst_tag_list_copy_value']/parameters/parameter[@name='dest']" name="pass_as">ref</attr> <attr path="//object/field[@cname='parent']" name="hidden">true</attr> <!-- buffer fixes --> @@ -323,19 +310,35 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA <attr path="//callback[@cname='GstAudioFormatUnpack']/parameters/parameter[@name='dest']" name="type">guint8*</attr> <attr path="//callback[@cname='GstAudioFormatUnpack']/parameters/parameter[@name='length']" name="name">n_length</attr> <attr path="/api/namespace/object[@cname='GstObject']/field[@cname='flags']" name="writeable">true</attr> + <attr path="/api/namespace/object[@cname='GstAudioRingBuffer']/field[@cname='empty_seg']" name="type">guint8*</attr> + <attr path="/api/namespace/struct[@cname='GstRTSPMessage']/field[@cname='body']" name="type">guint8*</attr> + <attr path="/api/namespace/struct[@cname='GstMIKEYPayloadKeyData']/field[@cname='key_data']" name="type">guint8*</attr> + <attr path="/api/namespace/struct[@cname='GstMIKEYPayloadKeyData']/field[@cname='salt_data']" name="type">guint8*</attr> + <attr path="/api/namespace/struct[@cname='GstMIKEYPayloadKeyData']/field[@cname='kv_data']" name="type">guint8*</attr> + <attr path="/api/namespace/struct[@cname='GstMIKEYPayloadSPParam']/field[@cname='val']" name="type">guint8*</attr> + <attr path="/api/namespace/struct[@cname='GstMIKEYPayloadPKE']/field[@cname='data']" name="type">guint8*</attr> + <attr path="/api/namespace/struct[@cname='GstMIKEYPayloadRAND']/field[@cname='rand']" name="type">guint8*</attr> + <attr path="/api/namespace/struct[@cname='GstMIKEYPayloadT']/field[@cname='ts_value']" name="type">guint8*</attr> + <attr path="/api/namespace/struct[@cname='GstVideoResampler']/field[@cname='phase']" name="type">guint32*</attr> + <attr path="/api/namespace/struct[@cname='GstVideoResampler']/field[@cname='n_taps']" name="type">guint32*</attr> + <attr path="/api/namespace/struct[@cname='GstVideoResampler']/field[@cname='taps']" name="type">gdouble*</attr> + <!-- No way to correctly generate these without the element type --> <attr path="//boxed[@cname='GstMpegtsDescriptor']//method[parameters/parameter[@type='GArray***']]" name="hidden">true</attr> + <!-- Hide because it is basically an alias to NetClock --> + <attr path="/api/namespace/object[@cname='GstNtpClock']" name="hidden">true</attr> + <!-- Fixed in 1.4.1 --> <attr path="//callback[@cname='GstPadEventFunction']/parameters/parameter[@name='event']" name="owned">true</attr> <attr path="//callback[@cname='GstPadChainListFunction']/parameters/parameter[@name='list']" name="owned">true</attr> <attr path="//callback[@cname='GstPadChainFunction']/parameters/parameter[@name='buffer']" name="owned">true</attr> <!-- Mark reserved fields as padding --> - <attr path="/api/namespace/struct/field[contains(@cname, 'gst_reserved')]" name="is-padding">true</attr> - <attr path="/api/namespace/struct/field[contains(@cname, 'gst_reserved2')]" name="is-padding">true</attr> - <attr path="/api/namespace/boxed/field[contains(@cname, 'gst_reserved')]" name="is-padding">true</attr> - <attr path="/api/namespace/boxed/field[contains(@cname, 'gst_reserved_p')]" name="is-padding">true</attr> - <attr path="/api/namespace/boxed/field[contains(@cname, 'gst_reserved_i')]" name="is-padding">true</attr> - <attr path="/api/namespace/object/field[contains(@cname, 'gst_reserved')]" name="is-padding">true</attr> + <attr path="//*[contains(@cname, 'gst_reserved')]" name="is-padding">true</attr> + <attr path="//*[contains(@cname, 'gst_reserved2')]" name="is-padding">true</attr> + <attr path="//*[contains(@cname, 'gst_reserved')]" name="is-padding">true</attr> + <attr path="//*[contains(@cname, 'gst_reserved_p')]" name="is-padding">true</attr> + <attr path="//*[contains(@cname, 'gst_reserved_i')]" name="is-padding">true</attr> + <attr path="//*[contains(@cname, 'gst_reserved')]" name="is-padding">true</attr> </metadata> diff --git a/sources/meson.build b/sources/meson.build index 748d9d5..2cea504 100644 --- a/sources/meson.build +++ b/sources/meson.build @@ -1,8 +1,7 @@ raw_api_fname = join_paths(meson.current_source_dir(), meson.project_name() + '-api.raw') -metadata_fname = join_paths(meson.current_source_dir(), meson.project_name() + '.metadata') +metadata = files(meson.project_name() + '.metadata') -glueincludes = 'gst/gst.h,gst/app/app.h,gst/audio/audio.h,gst/base/base.h,gst/controller/controller.h,gst/fft/fft.h,gst/net/net.h,gst/pbutils/gstaudiovisualizer.h,gst/pbutils/pbutils.h,gst/rtp/rtp.h,gst/rtsp/rtsp.h,gst/sdp/sdp.h,gst/tag/tag.h,gst/video/video.h' -gluefile = join_paths(meson.current_build_dir(), 'generate.c') +glueincludes = 'glib.h,gst/gst.h,gst/video/video.h,gst/audio/audio.h,gst/rtsp/rtsp.h,gst/app/app.h,gst/audio/audio.h,gst/base/base.h,gst/controller/controller.h,gst/fft/fft.h,gst/net/net.h,gst/pbutils/gstaudiovisualizer.h,gst/pbutils/pbutils.h,gst/rtp/rtp.h,gst/rtsp/rtsp.h,gst/sdp/sdp.h,gst/tag/tag.h,gst/video/video.h,gst/video/gstvideoaffinetransformationmeta.h,gst/net/gstnetcontrolmessagemeta.h' sources = [ 'custom/Adapter.cs', @@ -42,6 +41,18 @@ gst_sharp = library('gstreamer-sharp', gst_source_gen, sources, gst_sharp_dep = declare_dependency(dependencies: [glib_sharp_dep, gio_sharp_dep], link_with: gst_sharp) +if add_languages('c', required: false) + c_abi_exe = executable('gst_sharp_c_abi', c_abi, + cs_args: ['-nowarn:169', '-nowarn:108', '-nowarn:114', '-unsafe'], + dependencies: [gst_deps]) + + cs_abi_exe = executable('gst_sharp_cs_abi', cs_abi, + cs_args: ['-nowarn:169', '-nowarn:108', '-nowarn:114', '-unsafe'], + dependencies: [gst_sharp_dep]) + + test('gstreamer_sharp_abi', diff, args: [c_abi_exe.full_path(), cs_abi_exe.full_path()]) +endif + configure_file( input: '../out/gstreamer-sharp.dll.config', output: 'gstreamer-sharp.dll.config', |