Optional/Additional NNStreamer APIs for sub-plugin writers. (Need Gst devel) More...
#include <glib.h>
#include <gst/gst.h>
#include <tensor_typedef.h>
#include <nnstreamer_version.h>
#include <nnstreamer_plugin_api_util.h>
Go to the source code of this file.
Functions | |
G_BEGIN_DECLS gboolean | gst_structure_is_tensor_stream (const GstStructure *structure) |
Check given mimetype is tensor stream. More... | |
media_type | gst_structure_get_media_type (const GstStructure *structure) |
Get media type from structure. More... | |
gboolean | gst_tensors_config_from_structure (GstTensorsConfig *config, const GstStructure *structure) |
Parse structure and set tensors config (for other/tensors) More... | |
gboolean | gst_tensors_config_from_peer (GstPad *pad, GstTensorsConfig *config, gboolean *is_fixed) |
Parse caps from peer pad and set tensors config. More... | |
GstCaps * | gst_tensor_caps_from_config (const GstTensorsConfig *config) |
Get tensor caps from tensors config (for other/tensor) More... | |
GstCaps * | gst_tensors_caps_from_config (const GstTensorsConfig *config) |
Get caps from tensors config (for other/tensors) More... | |
void | gst_tensor_alloc_init (gsize alignment) |
set alignment that default allocator would align to More... | |
gboolean | gst_tensor_meta_info_parse_memory (GstTensorMetaInfo *meta, GstMemory *mem) |
Parse memory and fill the tensor meta. More... | |
GstMemory * | gst_tensor_meta_info_append_header (GstTensorMetaInfo *meta, GstMemory *mem) |
Append header to memory. More... | |
void | gst_tensor_caps_update_dimension (GstCaps *caps, GstCaps *filter) |
Update caps dimension for negotiation. More... | |
gboolean | gst_tensor_caps_can_intersect (GstCaps *caps1, GstCaps *caps2) |
Try intersecting @caps1 and @caps2 for tensor stream. More... | |
GstMemory * | gst_tensor_buffer_get_nth_memory (GstBuffer *buffer, const guint index) |
Get the nth GstMemory from given buffer. More... | |
gboolean | gst_tensor_buffer_append_memory (GstBuffer *buffer, GstMemory *memory, const GstTensorInfo *info) |
Append memory to given buffer. More... | |
guint | gst_tensor_buffer_get_count (GstBuffer *buffer) |
Get the number of tensors in the buffer. More... | |
Optional/Additional NNStreamer APIs for sub-plugin writers. (Need Gst devel)
NNStreamer Common API Header for Plug-Ins Copyright (C) 2019 MyungJoo Ham myung Copyright (C) 2019 Wook Song joo. ham@s amsu ng.co mwook1 6.so ng@sa msun g.com
Definition in file nnstreamer_plugin_api.h.
media_type gst_structure_get_media_type | ( | const GstStructure * | structure | ) |
Get media type from structure.
structure | structure to be interpreted |
Definition at line 1001 of file nnstreamer_plugin_api_impl.c.
G_BEGIN_DECLS gboolean gst_structure_is_tensor_stream | ( | const GstStructure * | structure | ) |
Check given mimetype is tensor stream.
structure | structure to be interpreted |
Definition at line 984 of file nnstreamer_plugin_api_impl.c.
void gst_tensor_alloc_init | ( | gsize | alignment | ) |
set alignment that default allocator would align to
alignment | bytes of alignment |
Definition at line 109 of file tensor_allocator.c.
gboolean gst_tensor_buffer_append_memory | ( | GstBuffer * | buffer, |
GstMemory * | memory, | ||
const GstTensorInfo * | info | ||
) |
Append memory to given buffer.
[in/out] | buffer GstBuffer to be appended. | |
[in] | memory | GstMemory to append. This function takes ownership of this, even if it returns failure. |
[in] | info | GstTensorInfo of given memory. |
Free the name string, cause it does not freed by gstreamer.
Definition at line 1666 of file nnstreamer_plugin_api_impl.c.
guint gst_tensor_buffer_get_count | ( | GstBuffer * | buffer | ) |
Get the number of tensors in the buffer.
Definition at line 1813 of file nnstreamer_plugin_api_impl.c.
GstMemory* gst_tensor_buffer_get_nth_memory | ( | GstBuffer * | buffer, |
const guint | index | ||
) |
Get the nth GstMemory from given buffer.
[in] | buffer | GstBuffer to be parsed. |
[in] | index | Index of GstMemory to be returned. |
Definition at line 1586 of file nnstreamer_plugin_api_impl.c.
gboolean gst_tensor_caps_can_intersect | ( | GstCaps * | caps1, |
GstCaps * | caps2 | ||
) |
Try intersecting @caps1 and @caps2 for tensor stream.
caps1 | a GstCaps to intersect |
caps2 | a GstCaps to intersect |
Definition at line 1142 of file nnstreamer_plugin_api_impl.c.
GstCaps* gst_tensor_caps_from_config | ( | const GstTensorsConfig * | config | ) |
Get tensor caps from tensors config (for other/tensor)
config | tensors config info |
Get tensor caps from tensors config (for other/tensor)
config | tensors config info |
Definition at line 1395 of file nnstreamer_plugin_api_impl.c.
void gst_tensor_caps_update_dimension | ( | GstCaps * | caps, |
GstCaps * | filter | ||
) |
Update caps dimension for negotiation.
caps | caps to compare and update |
filter | caps to compare |
Update caps dimension for negotiation.
caps | caps to compare and update |
filter | caps to compare |
Definition at line 1093 of file nnstreamer_plugin_api_impl.c.
GstMemory* gst_tensor_meta_info_append_header | ( | GstTensorMetaInfo * | meta, |
GstMemory * | mem | ||
) |
Append header to memory.
[in] | meta | tensor meta structure |
[in] | mem | pointer to GstMemory |
Definition at line 1544 of file nnstreamer_plugin_api_impl.c.
gboolean gst_tensor_meta_info_parse_memory | ( | GstTensorMetaInfo * | meta, |
GstMemory * | mem | ||
) |
Parse memory and fill the tensor meta.
[out] | meta | tensor meta structure to be filled |
[in] | mem | pointer to GstMemory to be parsed |
Definition at line 1509 of file nnstreamer_plugin_api_impl.c.
GstCaps* gst_tensors_caps_from_config | ( | const GstTensorsConfig * | config | ) |
Get caps from tensors config (for other/tensors)
config | tensors config info |
Definition at line 1372 of file nnstreamer_plugin_api_impl.c.
gboolean gst_tensors_config_from_peer | ( | GstPad * | pad, |
GstTensorsConfig * | config, | ||
gboolean * | is_fixed | ||
) |
Parse caps from peer pad and set tensors config.
pad | GstPad to get the capabilities |
config | tensors config structure to be filled |
is_fixed | flag to be updated when peer caps is fixed (not mandatory, do nothing when the param is null) |
Definition at line 1041 of file nnstreamer_plugin_api_impl.c.
gboolean gst_tensors_config_from_structure | ( | GstTensorsConfig * | config, |
const GstStructure * | structure | ||
) |
Parse structure and set tensors config (for other/tensors)
config | tensors config structure to be filled |
structure | structure to be interpreted |
Definition at line 1413 of file nnstreamer_plugin_api_impl.c.