gstreamer/subprojects/gst-plugins-bad/gst-libs/gst/analytics/meson.build
Daniel Morin d23a90cb16 analytics: base class for analytics meta
- GstAnalyticRelationMeta is a base class for analytics
  meta. It's able to store analytics results (GstAnalyticRelatableMtd)
  and describe the relation between each analysis results.
- GstAnalysisRelationMeta also contain an algorithm able to explore
  analysis results relation using a bfs.
- Relation(edge) between analysis results (vertice) are stored in an adjacency-matrix
  that allow to quickly identify if two analysis results are related and by
  which relation they related. It also work for indirect relation
  and can provide the path of analysis results by which two
  analysis results are related.
- One allocation per buffer to store analysis results. Here we rely on
  the application to guess how much space will be required to store all
  analysis results. This is something that could be improved
  significantly but it's a starting point.
- Define common analysis results, classification, object-detection,
  tracking that are subclass of GstAnalyticRelatableMtd. The also
  provide exemple of how to extend GstAnalyticRelatableMtd to have them
  benefit for the mechanim to express relation with other analysis
  results.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4962>
2023-11-21 18:04:53 +00:00

64 lines
2.3 KiB
Meson

analytics_sources = files( 'gstanalyticsmeta.c',
'gstanalyticsclassificationmtd.c',
'gstanalyticsobjectdetectionmtd.c',
'gstanalyticsobjecttrackingmtd.c')
analytics_headers = files( 'analytics.h',
'gstanalyticsmeta.h',
'analytics-meta-prelude.h',
'gstanalyticsclassificationmtd.h',
'gstanalyticsobjectdetectionmtd.h',
'gstanalyticsobjecttrackingmtd.h')
install_headers(analytics_headers, subdir : 'gstreamer-1.0/gst/analytics')
pkg_name = 'gstreamer-analytics-1.0'
gstanalytics = library('gstanalytics-' + api_version,
analytics_sources,
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_ANALYTIC_META', '-DG_LOG_DOMAIN="Gstreamer-Analytic"'],
include_directories : [configinc, libsinc],
version : libversion,
soversion : soversion,
darwin_versions : osxversion,
install : true,
dependencies : [gstbase_dep])
gst_libraries += [[pkg_name, {'lib': gstanalytics}]]
pkgconfig.generate(gstanalytics,
libraries : [gst_dep, gstbase_dep],
variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs,
name : pkg_name,
description : 'GStreamer analytics metadata library',
)
gen_sources = []
if build_gir
gir = {
'sources' : analytics_sources + analytics_headers,
'namespace' : 'GstAnalytics',
'nsversion' : api_version,
'identifier_prefix' : ['GstAnalytics', 'Gst'],
'symbol_prefix' : ['gst_analytics', 'gst'],
'export_packages' : pkg_name,
'includes' : ['Gst-1.0', 'GstBase-1.0'],
'install' : true,
'extra_args' : gir_init_section + ['-DGST_USE_UNSTABLE_API'],
'dependencies' : [gstbase_dep]
}
library_def += {'gir': [gir]}
if not static_build
analyticsmeta_gir = gnome.generate_gir(gstanalytics, kwargs: gir)
library_def += {'gir_targets': library_def.get('gir_targets', []) + [analyticsmeta_gir]}
gen_sources += analyticsmeta_gir
endif
endif
gst_libraries += [[pkg_name, library_def]]
gstanalytics_dep = declare_dependency(link_with : gstanalytics,
include_directories : [libsinc],
sources: gen_sources,
dependencies : [gstbase_dep])
meson.override_dependency(pkg_name, gstanalytics_dep)