NVIDIA DeepStream SDK API Reference

6.4 Release
gstnvbufaudio.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: MIT
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  * DEALINGS IN THE SOFTWARE.
22  */
23 
33 #ifndef _GST_NVSTREAMMUX_AUDIO_H_
34 #define _GST_NVSTREAMMUX_AUDIO_H_
35 
36 
37 #include <gst/gst.h>
38 #include <gst/audio/audio.h>
39 #include "gstnvstreammuxdebug.h"
40 #include "nvbufaudio.h"
41 
43 {
44  public:
45  GstNvBufAudioCaps(GstCaps* aCaps);
48  uint32_t GetAudioRate();
49  uint32_t GetAudioChannels();
50  bool GetAudioParams(NvBufAudioParams& aAudioParams);
51 
52  private:
53  gchar const * GetFieldStringValue(gchar const * fieldName);
54  uint32_t const GetFieldIntValue(gchar const * fieldName);
55 
56  GstCaps* caps;
57  GstStructure* capsStruct;
58  GstAudioInfo audioInfo;
59  NvBufAudioParams audioParams;
60 
70  gchar const * format;
71  gchar const * rate;
72  gchar const * channels;
73  gchar const * layout;
74 };
75 
76 #endif
GstNvBufAudioCaps
Definition: gstnvbufaudio.h:42
GstNvBufAudioCaps::GetAudioRate
uint32_t GetAudioRate()
NvBufAudioParams
Definition: nvbufaudio.h:80
GstNvBufAudioCaps::GetAudioParams
bool GetAudioParams(NvBufAudioParams &aAudioParams)
gstnvstreammuxdebug.h
GstNvBufAudioCaps::GetAudioFormat
NvBufAudioFormat GetAudioFormat()
GstNvBufAudioCaps::GstNvBufAudioCaps
GstNvBufAudioCaps(GstCaps *aCaps)
nvbufaudio.h
NvBufAudioFormat
NvBufAudioFormat
Specifies audio formats.
Definition: nvbufaudio.h:37
GstNvBufAudioCaps::GetAudioLayout
NvBufAudioLayout GetAudioLayout()
NvBufAudioLayout
NvBufAudioLayout
Specifies audio data layout in memory.
Definition: nvbufaudio.h:73
GstNvBufAudioCaps::GetAudioChannels
uint32_t GetAudioChannels()