2023-06-26 14:55:53 +00:00
|
|
|
/*
|
|
|
|
* GStreamer gstreamer-tensormeta
|
|
|
|
* Copyright (C) 2023 Collabora Ltd
|
|
|
|
*
|
|
|
|
* gsttensormeta.h
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
2024-01-25 02:12:17 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2023-06-26 14:55:53 +00:00
|
|
|
#ifndef __GST_TENSOR_META_H__
|
|
|
|
#define __GST_TENSOR_META_H__
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2024-01-25 02:12:17 +00:00
|
|
|
#include <gst/analytics/analytics-meta-prelude.h>
|
2024-10-17 21:27:37 +00:00
|
|
|
#include <gst/analytics/gsttensor.h>
|
2023-06-26 14:55:53 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstTensorMeta:
|
2024-10-31 20:03:31 +00:00
|
|
|
* @meta: parent
|
|
|
|
* @num_tensors: number of tensors
|
|
|
|
* @tensor: (array length=num_tensors): a #GstTensor for each tensor
|
2023-06-26 14:55:53 +00:00
|
|
|
*
|
2024-10-17 21:27:37 +00:00
|
|
|
* Since: 1.26
|
2023-06-26 14:55:53 +00:00
|
|
|
*/
|
|
|
|
typedef struct _GstTensorMeta
|
|
|
|
{
|
|
|
|
GstMeta meta;
|
|
|
|
|
2024-10-17 21:27:37 +00:00
|
|
|
gsize num_tensors;
|
2024-10-17 21:28:24 +00:00
|
|
|
GstTensor **tensors;
|
2023-06-26 14:55:53 +00:00
|
|
|
} GstTensorMeta;
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2024-01-25 02:22:47 +00:00
|
|
|
#define GST_TENSOR_META_API_TYPE \
|
|
|
|
(gst_tensor_meta_api_get_type())
|
|
|
|
|
|
|
|
#define GST_TENSOR_META_INFO \
|
|
|
|
(gst_tensor_meta_get_info())
|
|
|
|
|
2024-01-25 02:12:17 +00:00
|
|
|
GST_ANALYTICS_META_API
|
2023-06-26 14:55:53 +00:00
|
|
|
GType gst_tensor_meta_api_get_type (void);
|
2024-01-25 02:12:17 +00:00
|
|
|
|
|
|
|
GST_ANALYTICS_META_API
|
2023-06-26 14:55:53 +00:00
|
|
|
const GstMetaInfo *gst_tensor_meta_get_info (void);
|
2024-01-25 02:12:17 +00:00
|
|
|
|
|
|
|
GST_ANALYTICS_META_API
|
2023-06-26 14:55:53 +00:00
|
|
|
gint gst_tensor_meta_get_index_from_id(GstTensorMeta *meta, GQuark id);
|
|
|
|
|
2024-10-31 20:03:31 +00:00
|
|
|
GST_ANALYTICS_META_API
|
|
|
|
GstTensorMeta *
|
|
|
|
gst_buffer_add_tensor_meta (GstBuffer * buffer);
|
|
|
|
|
|
|
|
GST_ANALYTICS_META_API
|
|
|
|
GstTensorMeta *
|
|
|
|
gst_buffer_get_tensor_meta (GstBuffer * buffer);
|
|
|
|
|
2023-06-26 14:55:53 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif
|