NVIDIA DeepStream SDK API Reference

7.0 Release
gstaudio2video.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2023 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 __GST_AUDIO2VIDEO_H__
14 #define __GST_AUDIO2VIDEO_H__
15 
16 #include <gst/gst.h>
17 #include <gst/base/gstbasetransform.h>
18 
19 #include <gst/video/video.h>
20 #include <gst/audio/audio.h>
21 #include <gst/base/gstadapter.h>
22 #include <gst/pbutils/pbutils-prelude.h>
23 
24 G_BEGIN_DECLS
25 #define GST_TYPE_AUDIO2VIDEO (gst_audio2video_get_type())
26 #define GST_AUDIO2VIDEO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO2VIDEO,GstAudio2Video))
27 #define GST_AUDIO2VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO2VIDEO,GstAudio2VideoClass))
28 #define GST_AUDIO2VIDEO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_AUDIO2VIDEO,GstAudio2VideoClass))
31 typedef struct _GstAudio2VideoPrivate GstAudio2VideoPrivate;
32 
34 {
35  GstElement parent;
36 
37  guint req_spf; /* min samples per frame wanted by the subclass */
38 
39  /* video state */
40  GstVideoInfo vinfo;
41 
42  /* audio state */
43  GstAudioInfo ainfo;
44 
45  /*< private >*/
47 };
48 
50 {
51  /*< private >*/
52  GstElementClass parent_class;
53 
54  /*< public >*/
55  /* virtual function, called whenever the format changes */
56  gboolean (*setup) (GstAudio2Video * scope);
57 
58  /* virtual function for rendering a frame */
59  gboolean (*render) (GstAudio2Video * scope, GstBuffer * audio, GstVideoFrame * video);
60 
61  gboolean (*decide_allocation) (GstAudio2Video * scope, GstQuery *query);
62 };
63 
64 GST_PBUTILS_API
65 GType gst_audio2video_get_type (void);
66 
67 G_DEFINE_AUTOPTR_CLEANUP_FUNC (GstAudio2Video, gst_object_unref)
68 
69 G_END_DECLS
70 #endif /* __GST_AUDIO2VIDEO_H__ */
GstAudio2VideoPrivate
struct _GstAudio2VideoPrivate GstAudio2VideoPrivate
Definition: gstaudio2video.h:31
_GstAudio2Video::parent
GstElement parent
Definition: gstaudio2video.h:35
_GstAudio2Video::vinfo
GstVideoInfo vinfo
Definition: gstaudio2video.h:40
_GstAudio2VideoClass::setup
gboolean(* setup)(GstAudio2Video *scope)
Definition: gstaudio2video.h:56
_GstAudio2VideoClass::parent_class
GstElementClass parent_class
Definition: gstaudio2video.h:52
_GstAudio2VideoClass
Definition: gstaudio2video.h:49
_GstAudio2VideoClass::render
gboolean(* render)(GstAudio2Video *scope, GstBuffer *audio, GstVideoFrame *video)
Definition: gstaudio2video.h:59
_GstAudio2Video::priv
GstAudio2VideoPrivate * priv
Definition: gstaudio2video.h:46
_GstAudio2Video::req_spf
guint req_spf
Definition: gstaudio2video.h:37
_GstAudio2VideoClass::decide_allocation
gboolean(* decide_allocation)(GstAudio2Video *scope, GstQuery *query)
Definition: gstaudio2video.h:61
GstBuffer
struct _GstBuffer GstBuffer
Definition: idatatype.h:19
gst_audio2video_get_type
GST_PBUTILS_API GType gst_audio2video_get_type(void)
_GstAudio2Video
Definition: gstaudio2video.h:33
_GstAudio2Video::ainfo
GstAudioInfo ainfo
Definition: gstaudio2video.h:43