NVIDIA DeepStream SDK API Reference

9.1 Release
sources/includes/gst_nvdsaudio.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef __GSTNVDSAUDIO_H__
19 #define __GSTNVDSAUDIO_H__
20 
21 #include <gst/gst.h>
22 #include <vector>
23 #include "nvbufaudio.h"
24 #include "NvDsMemoryAllocator.h"
25 
34 #if defined(__cplusplus)
35 extern "C" {
36 #endif
37 
41 typedef struct
42 {
46 
48 {
50  uint32_t batchSize;
53 
56  uint32_t bpf;
58  uint32_t channels;
59  uint32_t rate;
61  uint32_t bufferLength;
63  guint gpuId;
66 
76 
85 
86 #if defined(__cplusplus)
87 }
88 #endif
89 
90 #endif
_GstNvDsAudioAllocatorParams::gpuId
guint gpuId
Definition: sources/includes/gst_nvdsaudio.h:63
_GstNvDsAudioAllocatorParams::layout
NvBufAudioLayout layout
Definition: sources/includes/gst_nvdsaudio.h:54
NvDsMemType
NvDsMemType
Specifies memory types for NvDsMemory.
Definition: sources/includes/NvDsMemoryAllocator.h:26
GstNvDsAudioAllocatorParams
struct _GstNvDsAudioAllocatorParams GstNvDsAudioAllocatorParams
gst_nvdsaudio_allocator_new
GstAllocator * gst_nvdsaudio_allocator_new(GstNvDsAudioAllocatorParams *params)
Create a new GstNvDsAudioAllocator with the given parameters.
NvBufAudioFormat
NvBufAudioFormat
Specifies audio formats.
Definition: sources/includes/nvbufaudio.h:44
_GstNvDsAudioAllocatorParams::bufferLength
uint32_t bufferLength
The number of audio samples in each buffer of the batch.
Definition: sources/includes/gst_nvdsaudio.h:61
_GstNvDsAudioAllocatorParams::bpf
uint32_t bpf
Bytes per frame; the size of a frame; size of one sample * @channels.
Definition: sources/includes/gst_nvdsaudio.h:56
_GstNvDsAudioAllocatorParams
Definition: sources/includes/gst_nvdsaudio.h:47
_GstNvDsAudioAllocatorParams::batchSize
uint32_t batchSize
Max size of audio batch.
Definition: sources/includes/gst_nvdsaudio.h:50
NvBufAudio
Definition: sources/includes/nvbufaudio.h:114
_GstNvDsAudioAllocatorParams::channels
uint32_t channels
Number of audio channels.
Definition: sources/includes/gst_nvdsaudio.h:58
_GstNvDsAudioAllocatorParams::format
NvBufAudioFormat format
Definition: sources/includes/gst_nvdsaudio.h:55
gst_nvdsaudio_buffer_get_memory
GstNvDsAudioMemory * gst_nvdsaudio_buffer_get_memory(GstBuffer *buffer)
Get GstNvDsAudioMemory structure associated with buffer allocated using GstNvDsAudioAllocator.
GstNvDsAudioMemory
This file describes the custom memory allocator for any Gstreamer plugins wishing to create a pool of...
Definition: sources/includes/gst_nvdsaudio.h:41
nvbufaudio.h
NvDsMemoryAllocator.h
_GstNvDsAudioAllocatorParams::memType
NvDsMemType memType
Definition: sources/includes/gst_nvdsaudio.h:64
_GstNvDsAudioAllocatorParams::isContiguous
bool isContiguous
If the memory within a batch is contiguos or not.
Definition: sources/includes/gst_nvdsaudio.h:52
NvBufAudioLayout
NvBufAudioLayout
Specifies audio data layout in memory.
Definition: sources/includes/nvbufaudio.h:80
GstNvDsAudioMemory::batch
NvBufAudio * batch
The audio batch buffer.
Definition: sources/includes/gst_nvdsaudio.h:44
_GstNvDsAudioAllocatorParams::rate
uint32_t rate
audio sample rate in samples per second
Definition: sources/includes/gst_nvdsaudio.h:59
GstBuffer
struct _GstBuffer GstBuffer
Definition: sources/includes/ds3d/common/idatatype.h:24