gstreamer_analytics_sys/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
// DO NOT EDIT

#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
#![allow(
    clippy::approx_constant,
    clippy::type_complexity,
    clippy::unreadable_literal,
    clippy::upper_case_acronyms
)]
#![cfg_attr(docsrs, feature(doc_cfg))]

use glib_sys as glib;
use gstreamer_sys as gst;

mod manual;

pub use manual::*;

#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
#[allow(unused_imports)]
use std::ffi::{
    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
};

#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

// Aliases
pub type GstAnalyticsMtdType = uintptr_t;

// Enums
pub type GstSegmentationType = c_int;
pub const GST_SEGMENTATION_TYPE_SEMANTIC: GstSegmentationType = 0;
pub const GST_SEGMENTATION_TYPE_INSTANCE: GstSegmentationType = 1;

pub type GstTensorDataType = c_int;
pub const GST_TENSOR_DATA_TYPE_INT4: GstTensorDataType = 0;
pub const GST_TENSOR_DATA_TYPE_INT8: GstTensorDataType = 1;
pub const GST_TENSOR_DATA_TYPE_INT16: GstTensorDataType = 2;
pub const GST_TENSOR_DATA_TYPE_INT32: GstTensorDataType = 3;
pub const GST_TENSOR_DATA_TYPE_INT64: GstTensorDataType = 4;
pub const GST_TENSOR_DATA_TYPE_UINT4: GstTensorDataType = 5;
pub const GST_TENSOR_DATA_TYPE_UINT8: GstTensorDataType = 6;
pub const GST_TENSOR_DATA_TYPE_UINT16: GstTensorDataType = 7;
pub const GST_TENSOR_DATA_TYPE_UINT32: GstTensorDataType = 8;
pub const GST_TENSOR_DATA_TYPE_UINT64: GstTensorDataType = 9;
pub const GST_TENSOR_DATA_TYPE_FLOAT16: GstTensorDataType = 10;
pub const GST_TENSOR_DATA_TYPE_FLOAT32: GstTensorDataType = 11;
pub const GST_TENSOR_DATA_TYPE_FLOAT64: GstTensorDataType = 12;
pub const GST_TENSOR_DATA_TYPE_BFLOAT16: GstTensorDataType = 13;

pub type GstTensorDimOrder = c_int;
pub const GST_TENSOR_DIM_ORDER_ROW_MAJOR: GstTensorDimOrder = 0;
pub const GST_TENSOR_DIM_ORDER_COL_MAJOR: GstTensorDimOrder = 1;
pub const GST_TENSOR_DIM_ORDER_INDEXED: GstTensorDimOrder = 2;

pub type GstTensorLayout = c_int;
pub const GST_TENSOR_LAYOUT_STRIDED: GstTensorLayout = 0;

// Constants
pub const GST_INF_RELATION_SPAN: c_int = -1;
pub const GST_ANALYTICS_MTD_TYPE_ANY: c_int = 0;

// Flags
pub type GstAnalyticsRelTypes = c_uint;
pub const GST_ANALYTICS_REL_TYPE_NONE: GstAnalyticsRelTypes = 0;
pub const GST_ANALYTICS_REL_TYPE_IS_PART_OF: GstAnalyticsRelTypes = 2;
pub const GST_ANALYTICS_REL_TYPE_CONTAIN: GstAnalyticsRelTypes = 4;
pub const GST_ANALYTICS_REL_TYPE_RELATE_TO: GstAnalyticsRelTypes = 8;
pub const GST_ANALYTICS_REL_TYPE_LAST: GstAnalyticsRelTypes = 16;
pub const GST_ANALYTICS_REL_TYPE_ANY: GstAnalyticsRelTypes = 2147483647;

// Records
#[derive(Copy, Clone)]
#[repr(C)]
pub struct GstAnalyticsClsMtd {
    pub id: c_uint,
    pub meta: *mut GstAnalyticsRelationMeta,
}

impl ::std::fmt::Debug for GstAnalyticsClsMtd {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GstAnalyticsClsMtd @ {self:p}"))
            .field("id", &self.id)
            .field("meta", &self.meta)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GstAnalyticsMtd {
    pub id: c_uint,
    pub meta: *mut GstAnalyticsRelationMeta,
}

impl ::std::fmt::Debug for GstAnalyticsMtd {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GstAnalyticsMtd @ {self:p}"))
            .field("id", &self.id)
            .field("meta", &self.meta)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GstAnalyticsMtdImpl {
    pub name: *const c_char,
    pub mtd_meta_transform: Option<
        unsafe extern "C" fn(
            *mut gst::GstBuffer,
            *mut GstAnalyticsMtd,
            *mut gst::GstBuffer,
            glib::GQuark,
            gpointer,
        ) -> gboolean,
    >,
    pub mtd_meta_clear: Option<unsafe extern "C" fn(*mut gst::GstBuffer, *mut GstAnalyticsMtd)>,
    pub _reserved: [gpointer; 19],
}

impl ::std::fmt::Debug for GstAnalyticsMtdImpl {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GstAnalyticsMtdImpl @ {self:p}"))
            .field("name", &self.name)
            .field("mtd_meta_transform", &self.mtd_meta_transform)
            .field("mtd_meta_clear", &self.mtd_meta_clear)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GstAnalyticsODMtd {
    pub id: c_uint,
    pub meta: *mut GstAnalyticsRelationMeta,
}

impl ::std::fmt::Debug for GstAnalyticsODMtd {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GstAnalyticsODMtd @ {self:p}"))
            .field("id", &self.id)
            .field("meta", &self.meta)
            .finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct _GstAnalyticsRelationMeta {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

pub type GstAnalyticsRelationMeta = _GstAnalyticsRelationMeta;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GstAnalyticsRelationMetaInitParams {
    pub initial_relation_order: size_t,
    pub initial_buf_size: size_t,
}

impl ::std::fmt::Debug for GstAnalyticsRelationMetaInitParams {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GstAnalyticsRelationMetaInitParams @ {self:p}"))
            .field("initial_relation_order", &self.initial_relation_order)
            .field("initial_buf_size", &self.initial_buf_size)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GstAnalyticsSegmentationMtd {
    pub id: c_uint,
    pub meta: *mut GstAnalyticsRelationMeta,
}

impl ::std::fmt::Debug for GstAnalyticsSegmentationMtd {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GstAnalyticsSegmentationMtd @ {self:p}"))
            .field("id", &self.id)
            .field("meta", &self.meta)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GstAnalyticsTrackingMtd {
    pub id: c_uint,
    pub meta: *mut GstAnalyticsRelationMeta,
}

impl ::std::fmt::Debug for GstAnalyticsTrackingMtd {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GstAnalyticsTrackingMtd @ {self:p}"))
            .field("id", &self.id)
            .field("meta", &self.meta)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GstTensorDim {
    pub size: size_t,
    pub order_index: size_t,
}

impl ::std::fmt::Debug for GstTensorDim {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GstTensorDim @ {self:p}"))
            .field("size", &self.size)
            .field("order_index", &self.order_index)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GstTensorMeta {
    pub meta: gst::GstMeta,
    pub num_tensors: size_t,
    pub tensors: *mut *mut GstTensor,
}

impl ::std::fmt::Debug for GstTensorMeta {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GstTensorMeta @ {self:p}"))
            .field("meta", &self.meta)
            .field("num_tensors", &self.num_tensors)
            .field("tensors", &self.tensors)
            .finish()
    }
}

extern "C" {

    //=========================================================================
    // GstAnalyticsClsMtd
    //=========================================================================
    pub fn gst_analytics_cls_mtd_get_index_by_quark(
        handle: *const GstAnalyticsClsMtd,
        quark: glib::GQuark,
    ) -> c_int;
    pub fn gst_analytics_cls_mtd_get_length(handle: *const GstAnalyticsClsMtd) -> size_t;
    pub fn gst_analytics_cls_mtd_get_level(
        handle: *const GstAnalyticsClsMtd,
        index: size_t,
    ) -> c_float;
    pub fn gst_analytics_cls_mtd_get_quark(
        handle: *const GstAnalyticsClsMtd,
        index: size_t,
    ) -> glib::GQuark;
    pub fn gst_analytics_cls_mtd_get_mtd_type() -> GstAnalyticsMtdType;

    //=========================================================================
    // GstAnalyticsMtd
    //=========================================================================
    pub fn gst_analytics_mtd_get_id(instance: *const GstAnalyticsMtd) -> c_uint;
    pub fn gst_analytics_mtd_get_mtd_type(instance: *const GstAnalyticsMtd) -> GstAnalyticsMtdType;
    pub fn gst_analytics_mtd_get_size(instance: *const GstAnalyticsMtd) -> size_t;
    pub fn gst_analytics_mtd_type_get_name(type_: GstAnalyticsMtdType) -> *const c_char;

    //=========================================================================
    // GstAnalyticsODMtd
    //=========================================================================
    pub fn gst_analytics_od_mtd_get_confidence_lvl(
        instance: *const GstAnalyticsODMtd,
        loc_conf_lvl: *mut c_float,
    ) -> gboolean;
    pub fn gst_analytics_od_mtd_get_location(
        instance: *const GstAnalyticsODMtd,
        x: *mut c_int,
        y: *mut c_int,
        w: *mut c_int,
        h: *mut c_int,
        loc_conf_lvl: *mut c_float,
    ) -> gboolean;
    pub fn gst_analytics_od_mtd_get_obj_type(handle: *const GstAnalyticsODMtd) -> glib::GQuark;
    pub fn gst_analytics_od_mtd_get_mtd_type() -> GstAnalyticsMtdType;

    //=========================================================================
    // GstAnalyticsRelationMeta
    //=========================================================================
    pub fn gst_analytics_relation_meta_add_cls_mtd(
        instance: *mut GstAnalyticsRelationMeta,
        length: size_t,
        confidence_levels: *mut c_float,
        class_quarks: *mut glib::GQuark,
        cls_mtd: *mut GstAnalyticsClsMtd,
    ) -> gboolean;
    pub fn gst_analytics_relation_meta_add_mtd(
        meta: *mut GstAnalyticsRelationMeta,
        impl_: *const GstAnalyticsMtdImpl,
        size: size_t,
        rlt_mtd: *mut GstAnalyticsMtd,
    ) -> gpointer;
    pub fn gst_analytics_relation_meta_add_od_mtd(
        instance: *mut GstAnalyticsRelationMeta,
        type_: glib::GQuark,
        x: c_int,
        y: c_int,
        w: c_int,
        h: c_int,
        loc_conf_lvl: c_float,
        od_mtd: *mut GstAnalyticsODMtd,
    ) -> gboolean;
    pub fn gst_analytics_relation_meta_add_one_cls_mtd(
        instance: *mut GstAnalyticsRelationMeta,
        confidence_level: c_float,
        class_quark: glib::GQuark,
        cls_mtd: *mut GstAnalyticsClsMtd,
    ) -> gboolean;
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_analytics_relation_meta_add_segmentation_mtd(
        instance: *mut GstAnalyticsRelationMeta,
        buffer: *mut gst::GstBuffer,
        segmentation_type: GstSegmentationType,
        region_count: size_t,
        region_ids: *mut c_uint,
        masks_loc_x: c_int,
        masks_loc_y: c_int,
        masks_loc_w: c_uint,
        masks_loc_h: c_uint,
        segmentation_mtd: *mut GstAnalyticsSegmentationMtd,
    ) -> gboolean;
    pub fn gst_analytics_relation_meta_add_tracking_mtd(
        instance: *mut GstAnalyticsRelationMeta,
        tracking_id: u64,
        tracking_first_seen: gst::GstClockTime,
        trk_mtd: *mut GstAnalyticsTrackingMtd,
    ) -> gboolean;
    pub fn gst_analytics_relation_meta_exist(
        rmeta: *const GstAnalyticsRelationMeta,
        an_meta_first_id: c_uint,
        an_meta_second_id: c_uint,
        max_relation_span: c_int,
        cond_types: GstAnalyticsRelTypes,
        relations_path: *mut *mut glib::GArray,
    ) -> gboolean;
    pub fn gst_analytics_relation_meta_get_cls_mtd(
        meta: *mut GstAnalyticsRelationMeta,
        an_meta_id: c_uint,
        rlt: *mut GstAnalyticsClsMtd,
    ) -> gboolean;
    pub fn gst_analytics_relation_meta_get_direct_related(
        meta: *mut GstAnalyticsRelationMeta,
        an_meta_id: c_uint,
        relation_type: GstAnalyticsRelTypes,
        type_: GstAnalyticsMtdType,
        state: *mut gpointer,
        rlt_mtd: *mut GstAnalyticsMtd,
    ) -> gboolean;
    pub fn gst_analytics_relation_meta_get_mtd(
        meta: *mut GstAnalyticsRelationMeta,
        an_meta_id: c_uint,
        type_: GstAnalyticsMtdType,
        rlt: *mut GstAnalyticsMtd,
    ) -> gboolean;
    pub fn gst_analytics_relation_meta_get_mtd_data(
        meta: *const GstAnalyticsRelationMeta,
        an_meta_id: c_uint,
    ) -> gpointer;
    pub fn gst_analytics_relation_meta_get_od_mtd(
        meta: *mut GstAnalyticsRelationMeta,
        an_meta_id: c_uint,
        rlt: *mut GstAnalyticsODMtd,
    ) -> gboolean;
    pub fn gst_analytics_relation_meta_get_relation(
        meta: *const GstAnalyticsRelationMeta,
        an_meta_first_id: c_uint,
        an_meta_second_id: c_uint,
    ) -> GstAnalyticsRelTypes;
    pub fn gst_analytics_relation_meta_get_tracking_mtd(
        meta: *mut GstAnalyticsRelationMeta,
        an_meta_id: c_uint,
        rlt: *mut GstAnalyticsTrackingMtd,
    ) -> gboolean;
    pub fn gst_analytics_relation_meta_iterate(
        meta: *mut GstAnalyticsRelationMeta,
        state: *mut gpointer,
        type_: GstAnalyticsMtdType,
        rlt_mtd: *mut GstAnalyticsMtd,
    ) -> gboolean;
    pub fn gst_analytics_relation_meta_set_relation(
        meta: *mut GstAnalyticsRelationMeta,
        type_: GstAnalyticsRelTypes,
        an_meta_first_id: c_uint,
        an_meta_second_id: c_uint,
    ) -> gboolean;
    pub fn gst_analytics_relation_meta_get_info() -> *const gst::GstMetaInfo;

    //=========================================================================
    // GstAnalyticsSegmentationMtd
    //=========================================================================
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_analytics_segmentation_mtd_get_mask(
        handle: *const GstAnalyticsSegmentationMtd,
        masks_loc_x: *mut c_int,
        masks_loc_y: *mut c_int,
        masks_loc_w: *mut c_uint,
        masks_loc_h: *mut c_uint,
    ) -> *mut gst::GstBuffer;
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_analytics_segmentation_mtd_get_region_count(
        handle: *const GstAnalyticsSegmentationMtd,
    ) -> size_t;
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_analytics_segmentation_mtd_get_region_id(
        handle: *const GstAnalyticsSegmentationMtd,
        index: size_t,
    ) -> c_uint;
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_analytics_segmentation_mtd_get_region_index(
        handle: *const GstAnalyticsSegmentationMtd,
        index: *mut size_t,
        id: c_uint,
    ) -> gboolean;
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_analytics_segmentation_mtd_get_mtd_type() -> GstAnalyticsMtdType;

    //=========================================================================
    // GstAnalyticsTrackingMtd
    //=========================================================================
    pub fn gst_analytics_tracking_mtd_get_info(
        instance: *const GstAnalyticsTrackingMtd,
        tracking_id: *mut u64,
        tracking_first_seen: *mut gst::GstClockTime,
        tracking_last_seen: *mut gst::GstClockTime,
        tracking_lost: *mut gboolean,
    ) -> gboolean;
    pub fn gst_analytics_tracking_mtd_set_lost(instance: *mut GstAnalyticsTrackingMtd) -> gboolean;
    pub fn gst_analytics_tracking_mtd_update_last_seen(
        instance: *mut GstAnalyticsTrackingMtd,
        last_seen: gst::GstClockTime,
    ) -> gboolean;
    pub fn gst_analytics_tracking_mtd_get_mtd_type() -> GstAnalyticsMtdType;

    //=========================================================================
    // GstTensor
    //=========================================================================
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_tensor_get_type() -> GType;
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_tensor_alloc(num_dims: size_t) -> *mut GstTensor;
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_tensor_new_simple(
        id: glib::GQuark,
        data_type: GstTensorDataType,
        batch_size: size_t,
        data: *mut gst::GstBuffer,
        dims_order: GstTensorDimOrder,
        num_dims: size_t,
        dims: *mut size_t,
    ) -> *mut GstTensor;
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_tensor_copy(tensor: *const GstTensor) -> *mut GstTensor;
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_tensor_free(tensor: *mut GstTensor);
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_tensor_get_dims(tensor: *mut GstTensor, num_dims: *mut size_t) -> *mut GstTensorDim;

    //=========================================================================
    // GstTensorMeta
    //=========================================================================
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_tensor_meta_get(tmeta: *mut GstTensorMeta, index: size_t) -> *const GstTensor;
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_tensor_meta_get_index_from_id(meta: *mut GstTensorMeta, id: glib::GQuark) -> c_int;
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_tensor_meta_set(
        tmeta: *mut GstTensorMeta,
        num_tensors: c_uint,
        tensors: *mut *mut GstTensor,
    );
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_tensor_meta_get_info() -> *const gst::GstMetaInfo;

    //=========================================================================
    // Other functions
    //=========================================================================
    pub fn gst_buffer_add_analytics_relation_meta(
        buffer: *mut gst::GstBuffer,
    ) -> *mut GstAnalyticsRelationMeta;
    pub fn gst_buffer_add_analytics_relation_meta_full(
        buffer: *mut gst::GstBuffer,
        init_params: *mut GstAnalyticsRelationMetaInitParams,
    ) -> *mut GstAnalyticsRelationMeta;
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_buffer_add_tensor_meta(buffer: *mut gst::GstBuffer) -> *mut GstTensorMeta;
    pub fn gst_buffer_get_analytics_relation_meta(
        buffer: *mut gst::GstBuffer,
    ) -> *mut GstAnalyticsRelationMeta;
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_buffer_get_tensor_meta(buffer: *mut gst::GstBuffer) -> *mut GstTensorMeta;
    pub fn gst_analytics_relation_get_length(instance: *const GstAnalyticsRelationMeta) -> size_t;
    pub fn gst_analytics_relation_meta_api_get_type() -> GType;
    #[cfg(feature = "v1_26")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
    pub fn gst_tensor_meta_api_get_type() -> GType;

}