NVIDIA DeepStream SDK API Reference
6.0.1 Release
Welcome
API Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
nvds_audio_meta.h
Go to the documentation of this file.
1
27
#ifndef _NVDS_AUDIO_META_H_
28
#define _NVDS_AUDIO_META_H_
29
30
#include "glib.h"
31
#include "gmodule.h"
32
33
#include <
nvdsmeta.h
>
34
#include <
nvbufaudio.h
>
35
36
#ifdef __cplusplus
37
extern
"C"
38
{
39
#endif
40
44
typedef
struct
_NvDsAudioFrameMeta
{
46
NvDsBaseMeta
base_meta
;
49
guint
pad_index
;
51
guint
batch_id
;
53
gint
frame_num
;
55
guint64
buf_pts
;
57
guint64
ntp_timestamp
;
60
guint
source_id
;
62
gint
num_samples_per_frame
;
63
/* Holds the sample rate for audio stream */
64
guint
sample_rate
;
65
/* Holds the number of channels in audio stream. */
66
guint
num_channels
;
67
/* Holds the audio format type. */
68
NvBufAudioFormat
format
;
69
/* Holds layout information indicating whether audio channels are interleaved
70
* or non-interleaved */
71
NvBufAudioLayout
layout
;
73
gboolean
bInferDone
;
76
gint
class_id
;
78
gfloat
confidence
;
80
gchar
class_label
[
MAX_LABEL_SIZE
];
83
NvDsClassifierMetaList
*
classifier_meta_list
;
86
NvDsUserMetaList
*
frame_user_meta_list
;
88
gint64
misc_frame_info
[
MAX_USER_FIELDS
];
90
gint64
reserved
[
MAX_RESERVED_FIELDS
];
91
}
NvDsAudioFrameMeta
;
92
99
NvDsBatchMeta
*
nvds_create_audio_batch_meta
(guint max_batch_size);
100
108
gboolean
nvds_destroy_audio_batch_meta
(
NvDsBatchMeta
*batch_meta);
109
120
NvDsAudioFrameMeta
*
nvds_acquire_audio_frame_meta_from_pool
(
NvDsBatchMeta
*batch_meta);
121
130
void
nvds_add_audio_frame_meta_to_audio_batch
(
NvDsBatchMeta
* batch_meta,
131
NvDsAudioFrameMeta
* frame_meta);
132
141
void
nvds_remove_audio_frame_meta_from_audio_batch
(
NvDsBatchMeta
*batch_meta,
142
NvDsAudioFrameMeta
* frame_meta);
143
156
void
nvds_add_classifier_meta_to_audio_frame
(
NvDsAudioFrameMeta
*frame_meta,
157
NvDsClassifierMeta
* classifier_meta);
158
167
void
nvds_remove_classifier_meta_from_audio_frame
(
NvDsAudioFrameMeta
* frame_meta,
168
NvDsClassifierMeta
*classifier_meta);
169
178
void
nvds_add_user_meta_to_audio_batch
(
NvDsBatchMeta
* batch_meta,
179
NvDsUserMeta
* user_meta);
180
189
void
nvds_add_user_meta_to_audio_frame
(
NvDsAudioFrameMeta
* frame_meta,
190
NvDsUserMeta
* user_meta);
191
202
void
nvds_remove_user_meta_from_audio_batch
(
NvDsBatchMeta
* batch_meta,
203
NvDsUserMeta
* user_meta);
204
213
void
nvds_remove_user_meta_from_audio_frame
(
NvDsAudioFrameMeta
* frame_meta,
214
NvDsUserMeta
* user_meta);
215
225
gpointer
nvds_audio_batch_meta_copy_func
(gpointer data, gpointer user_data);
226
234
void
nvds_audio_batch_meta_release_func
(gpointer data, gpointer user_data);
235
244
NvDsAudioFrameMeta
*
nvds_get_nth_audio_frame_meta
(
NvDsFrameMetaList
*frame_meta_list,
245
guint index);
246
254
void
nvds_clear_audio_frame_meta_list
(
NvDsBatchMeta
*batch_meta,
255
NvDsFrameMetaList
*meta_list);
256
265
void
nvds_clear_audio_classifier_meta_list
(
NvDsAudioFrameMeta
*frame_meta,
266
NvDsClassifierMetaList
*meta_list);
267
276
void
nvds_clear_audio_batch_user_meta_list
(
NvDsBatchMeta
*batch_meta,
277
NvDsUserMetaList
*meta_list);
278
286
void
nvds_clear_audio_frame_user_meta_list
(
NvDsAudioFrameMeta
*frame_meta,
287
NvDsUserMetaList
*meta_list);
288
296
void
nvds_copy_audio_batch_user_meta_list
(
NvDsUserMetaList
*src_user_meta_list,
297
NvDsBatchMeta
*dst_batch_meta);
298
305
void
nvds_copy_audio_frame_meta
(
NvDsAudioFrameMeta
*src_frame_meta,
306
NvDsAudioFrameMeta
*dst_frame_meta);
307
315
void
nvds_copy_audio_frame_user_meta_list
(
NvDsUserMetaList
*src_user_meta_list,
316
NvDsAudioFrameMeta
*dst_frame_meta);
317
325
void
nvds_copy_audio_frame_meta_list
(
NvDsFrameMetaList
*src_frame_meta_list,
326
NvDsBatchMeta
*dst_batch_meta);
327
337
void
nvds_copy_audio_classification_list
(
NvDsClassifierMetaList
*src_classifier_meta_list,
338
NvDsAudioFrameMeta
*dst_frame_meta);
339
340
#ifdef __cplusplus
341
}
342
#endif
343
#endif
344
_NvDsAudioFrameMeta::bInferDone
gboolean bInferDone
Holds a Boolean indicating whether inference is performed on the frame.
Definition:
nvds_audio_meta.h:73
nvds_add_user_meta_to_audio_frame
void nvds_add_user_meta_to_audio_frame(NvDsAudioFrameMeta *frame_meta, NvDsUserMeta *user_meta)
Add a user meta to a audio frame meta.
nvds_acquire_audio_frame_meta_from_pool
NvDsAudioFrameMeta * nvds_acquire_audio_frame_meta_from_pool(NvDsBatchMeta *batch_meta)
Acquires a audio frame meta from a batch's audio frame meta pool.
_NvDsBaseMeta
Holds information about base metadata of a given metadata type.
Definition:
nvdsmeta.h:195
_NvDsAudioFrameMeta
Holds metadata for a audio frame in a batch.
Definition:
nvds_audio_meta.h:44
nvds_remove_classifier_meta_from_audio_frame
void nvds_remove_classifier_meta_from_audio_frame(NvDsAudioFrameMeta *frame_meta, NvDsClassifierMeta *classifier_meta)
Removes a classifier meta from the audio frame meta to which it is attached.
nvds_copy_audio_classification_list
void nvds_copy_audio_classification_list(NvDsClassifierMetaList *src_classifier_meta_list, NvDsAudioFrameMeta *dst_frame_meta)
Makes a deep copy of a source classifier meta list to the classifier meta list in a specified object ...
nvds_clear_audio_batch_user_meta_list
void nvds_clear_audio_batch_user_meta_list(NvDsBatchMeta *batch_meta, NvDsUserMetaList *meta_list)
Removes all of the user metadata attached to the audio batch meta.
_NvDsAudioFrameMeta::source_id
guint source_id
Holds the source IDof the frame in the batch, e.g.
Definition:
nvds_audio_meta.h:60
nvds_remove_user_meta_from_audio_frame
void nvds_remove_user_meta_from_audio_frame(NvDsAudioFrameMeta *frame_meta, NvDsUserMeta *user_meta)
Removes a user meta from a audio frame meta to which it is attached.
_NvDsAudioFrameMeta::frame_num
gint frame_num
Holds the current frame number of the source.
Definition:
nvds_audio_meta.h:53
nvds_add_user_meta_to_audio_batch
void nvds_add_user_meta_to_audio_batch(NvDsBatchMeta *batch_meta, NvDsUserMeta *user_meta)
Add a user meta to a audio batch meta.
_NvDsUserMeta
Holds user metadata.
Definition:
nvdsmeta.h:452
nvds_remove_user_meta_from_audio_batch
void nvds_remove_user_meta_from_audio_batch(NvDsBatchMeta *batch_meta, NvDsUserMeta *user_meta)
Removes a user meta from a audio batch meta to which it is attached.
_NvDsAudioFrameMeta::layout
NvBufAudioLayout layout
Definition:
nvds_audio_meta.h:71
MAX_USER_FIELDS
#define MAX_USER_FIELDS
Defines the number of additional fields available to the user in the metadata structure.
Definition:
nvdsmeta.h:44
_NvDsAudioFrameMeta::reserved
gint64 reserved[MAX_RESERVED_FIELDS]
For internal use.
Definition:
nvds_audio_meta.h:90
_NvDsAudioFrameMeta::ntp_timestamp
guint64 ntp_timestamp
Holds the ntp timestamp.
Definition:
nvds_audio_meta.h:57
_NvDsBatchMeta
Holds information about a formed batch containing frames from different sources.
Definition:
nvdsmeta.h:221
NvBufAudioFormat
NvBufAudioFormat
Specifies audio formats.
Definition:
nvbufaudio.h:37
_NvDsAudioFrameMeta::num_samples_per_frame
gint num_samples_per_frame
Holds the number of samples in the frame.
Definition:
nvds_audio_meta.h:62
_NvDsAudioFrameMeta::buf_pts
guint64 buf_pts
Holds the presentation timestamp (PTS) of the frame.
Definition:
nvds_audio_meta.h:55
nvds_clear_audio_frame_meta_list
void nvds_clear_audio_frame_meta_list(NvDsBatchMeta *batch_meta, NvDsFrameMetaList *meta_list)
Removes all of the frame metadata attached to a batch meta.
NvBufAudioLayout
NvBufAudioLayout
Specifies audio data layout in memory.
Definition:
nvbufaudio.h:73
_NvDsAudioFrameMeta::class_label
gchar class_label[MAX_LABEL_SIZE]
Holds a string describing the class of the detected event.
Definition:
nvds_audio_meta.h:80
_NvDsAudioFrameMeta::frame_user_meta_list
NvDsUserMetaList * frame_user_meta_list
Holds a pointer to a list of pointers of type NvDsUserMeta in use for the frame.
Definition:
nvds_audio_meta.h:86
nvbufaudio.h
NvBufAudio Interface
_NvDsClassifierMeta
Holds classifier metadata for an object.
Definition:
nvdsmeta.h:381
nvds_get_nth_audio_frame_meta
NvDsAudioFrameMeta * nvds_get_nth_audio_frame_meta(NvDsFrameMetaList *frame_meta_list, guint index)
Returns a pointer to a specified frame meta in the frame meta list.
nvds_add_audio_frame_meta_to_audio_batch
void nvds_add_audio_frame_meta_to_audio_batch(NvDsBatchMeta *batch_meta, NvDsAudioFrameMeta *frame_meta)
Adds a audio frame meta to a batch meta.
_NvDsAudioFrameMeta::base_meta
NvDsBaseMeta base_meta
Holds the base metadata for the frame.
Definition:
nvds_audio_meta.h:46
_NvDsAudioFrameMeta::misc_frame_info
gint64 misc_frame_info[MAX_USER_FIELDS]
Holds additional user-defined frame information.
Definition:
nvds_audio_meta.h:88
nvds_copy_audio_batch_user_meta_list
void nvds_copy_audio_batch_user_meta_list(NvDsUserMetaList *src_user_meta_list, NvDsBatchMeta *dst_batch_meta)
Makes a deep copy of a user meta list to the user meta list in a specified audio batch meta...
NvDsFrameMetaList
GList NvDsFrameMetaList
Definition:
nvdsmeta.h:55
_NvDsAudioFrameMeta::classifier_meta_list
NvDsClassifierMetaList * classifier_meta_list
Holds a pointer to a list of pointers of type NvDsClassifierMeta in use for the frame.
Definition:
nvds_audio_meta.h:83
nvds_create_audio_batch_meta
NvDsBatchMeta * nvds_create_audio_batch_meta(guint max_batch_size)
Creates a batch metadata structure for a audio batch of specified size.
_NvDsAudioFrameMeta::confidence
gfloat confidence
Hold confidence for last event detected (last NvDsClassifierMeta)
Definition:
nvds_audio_meta.h:78
nvds_add_classifier_meta_to_audio_frame
void nvds_add_classifier_meta_to_audio_frame(NvDsAudioFrameMeta *frame_meta, NvDsClassifierMeta *classifier_meta)
Adds a classifier meta the audio frame meta.
nvds_clear_audio_classifier_meta_list
void nvds_clear_audio_classifier_meta_list(NvDsAudioFrameMeta *frame_meta, NvDsClassifierMetaList *meta_list)
Removes all of the classifier metadata attached to an audio frame meta.
nvds_destroy_audio_batch_meta
gboolean nvds_destroy_audio_batch_meta(NvDsBatchMeta *batch_meta)
Destroys a batch metadata structure.
nvdsmeta.h
Defines NVIDIA DeepStream Metadata Structures
nvds_audio_batch_meta_release_func
void nvds_audio_batch_meta_release_func(gpointer data, gpointer user_data)
Releases metadata from a batch meta.
_NvDsAudioFrameMeta::num_channels
guint num_channels
Definition:
nvds_audio_meta.h:66
nvds_copy_audio_frame_meta_list
void nvds_copy_audio_frame_meta_list(NvDsFrameMetaList *src_frame_meta_list, NvDsBatchMeta *dst_batch_meta)
Makes a deep copy of a source frame meta list to the frame meta list in a specified batch meta...
nvds_copy_audio_frame_meta
void nvds_copy_audio_frame_meta(NvDsAudioFrameMeta *src_frame_meta, NvDsAudioFrameMeta *dst_frame_meta)
Makes a deep copy of a frame meta to another frame meta.
_NvDsAudioFrameMeta::class_id
gint class_id
Holds the index of the last object class inferred by the primary detector/classifier.
Definition:
nvds_audio_meta.h:76
nvds_copy_audio_frame_user_meta_list
void nvds_copy_audio_frame_user_meta_list(NvDsUserMetaList *src_user_meta_list, NvDsAudioFrameMeta *dst_frame_meta)
Makes a deep copy of a source user meta list to the user meta list in a specified audio frame meta...
_NvDsAudioFrameMeta::format
NvBufAudioFormat format
Definition:
nvds_audio_meta.h:68
MAX_LABEL_SIZE
#define MAX_LABEL_SIZE
Defines the maximum size of an array for storing a text result.
Definition:
nvdsmeta.h:48
nvds_clear_audio_frame_user_meta_list
void nvds_clear_audio_frame_user_meta_list(NvDsAudioFrameMeta *frame_meta, NvDsUserMetaList *meta_list)
Removes all of the user metadata attached to the audio frame meta.
MAX_RESERVED_FIELDS
#define MAX_RESERVED_FIELDS
Definition:
nvdsmeta.h:46
nvds_remove_audio_frame_meta_from_audio_batch
void nvds_remove_audio_frame_meta_from_audio_batch(NvDsBatchMeta *batch_meta, NvDsAudioFrameMeta *frame_meta)
Removes a audio frame meta from a batch meta.
NvDsClassifierMetaList
GList NvDsClassifierMetaList
Definition:
nvds_roi_meta.h:49
NvDsUserMetaList
GList NvDsUserMetaList
Definition:
nvds_roi_meta.h:51
nvds_audio_batch_meta_copy_func
gpointer nvds_audio_batch_meta_copy_func(gpointer data, gpointer user_data)
Copies or transforms meta data from one buffer to another.
_NvDsAudioFrameMeta::batch_id
guint batch_id
Holds the location of the frame in the batch.
Definition:
nvds_audio_meta.h:51
_NvDsAudioFrameMeta::pad_index
guint pad_index
Holds the pad or port index of the Gst-streammux plugin for the frame in the batch.
Definition:
nvds_audio_meta.h:49
NvDsAudioFrameMeta
struct _NvDsAudioFrameMeta NvDsAudioFrameMeta
Holds metadata for a audio frame in a batch.
_NvDsAudioFrameMeta::sample_rate
guint sample_rate
Definition:
nvds_audio_meta.h:64
Advance Information | Subject to Change | Generated by NVIDIA | Thu Sep 23 2021 17:38:27 | PR-09318-R32