NVIDIA DeepStream SDK API Reference

7.0 Release
gst_nvdsaudio.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef __GSTNVDSAUDIO_H__
14 #define __GSTNVDSAUDIO_H__
15 
16 #include <gst/gst.h>
17 #include <vector>
18 #include "nvbufaudio.h"
19 #include "NvDsMemoryAllocator.h"
20 
29 #if defined(__cplusplus)
30 extern "C" {
31 #endif
32 
36 typedef struct
37 {
41 
43 {
45  uint32_t batchSize;
48 
51  uint32_t bpf;
53  uint32_t channels;
54  uint32_t rate;
56  uint32_t bufferLength;
58  guint gpuId;
61 
71 
80 
81 #if defined(__cplusplus)
82 }
83 #endif
84 
85 #endif
gst_nvdsaudio_buffer_get_memory
GstNvDsAudioMemory * gst_nvdsaudio_buffer_get_memory(GstBuffer *buffer)
Get GstNvDsAudioMemory structure associated with buffer allocated using GstNvDsAudioAllocator.
_GstNvDsAudioAllocatorParams::gpuId
guint gpuId
Definition: gst_nvdsaudio.h:58
_GstNvDsAudioAllocatorParams::layout
NvBufAudioLayout layout
Definition: gst_nvdsaudio.h:49
_GstNvDsAudioAllocatorParams::bufferLength
uint32_t bufferLength
The number of audio samples in each buffer of the batch.
Definition: gst_nvdsaudio.h:56
_GstNvDsAudioAllocatorParams::bpf
uint32_t bpf
Bytes per frame; the size of a frame; size of one sample * @channels.
Definition: gst_nvdsaudio.h:51
_GstNvDsAudioAllocatorParams
Definition: gst_nvdsaudio.h:42
_GstNvDsAudioAllocatorParams::batchSize
uint32_t batchSize
Max size of audio batch.
Definition: gst_nvdsaudio.h:45
NvBufAudio
Definition: nvbufaudio.h:109
_GstNvDsAudioAllocatorParams::channels
uint32_t channels
Number of audio channels.
Definition: gst_nvdsaudio.h:53
_GstNvDsAudioAllocatorParams::format
NvBufAudioFormat format
Definition: gst_nvdsaudio.h:50
nvbufaudio.h
GstNvDsAudioMemory
This file describes the custom memory allocator for any Gstreamer plugins wishing to create a pool of...
Definition: gst_nvdsaudio.h:36
NvBufAudioFormat
NvBufAudioFormat
Specifies audio formats.
Definition: nvbufaudio.h:39
NvDsMemoryAllocator.h
NvDsMemType
NvDsMemType
Specifies memory types for NvDsMemory.
Definition: NvDsMemoryAllocator.h:21
_GstNvDsAudioAllocatorParams::memType
NvDsMemType memType
Definition: gst_nvdsaudio.h:59
GstBuffer
struct _GstBuffer GstBuffer
Definition: idatatype.h:19
NvBufAudioLayout
NvBufAudioLayout
Specifies audio data layout in memory.
Definition: nvbufaudio.h:75
gst_nvdsaudio_allocator_new
GstAllocator * gst_nvdsaudio_allocator_new(GstNvDsAudioAllocatorParams *params)
Create a new GstNvDsAudioAllocator with the given parameters.
GstNvDsAudioAllocatorParams
struct _GstNvDsAudioAllocatorParams GstNvDsAudioAllocatorParams
_GstNvDsAudioAllocatorParams::isContiguous
bool isContiguous
If the memory within a batch is contiguos or not.
Definition: gst_nvdsaudio.h:47
GstNvDsAudioMemory::batch
NvBufAudio * batch
The audio batch buffer.
Definition: gst_nvdsaudio.h:39
_GstNvDsAudioAllocatorParams::rate
uint32_t rate
audio sample rate in samples per second
Definition: gst_nvdsaudio.h:54