NVIDIA DeepStream SDK API Reference

6.2 Release
gstnvvideotestsrc.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2021-2022 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 
24 #ifndef _GST_NV_VIDEO_TEST_SRC_H_
25 #define _GST_NV_VIDEO_TEST_SRC_H_
26 
27 #include <gst/gst.h>
28 #include <gst/base/base.h>
29 #include <gst/video/video.h>
30 
31 #include <nvbufsurface.h>
32 
33 G_BEGIN_DECLS
34 
35 #define GST_TYPE_NV_VIDEO_TEST_SRC (gst_nv_video_test_src_get_type())
36 #define GST_NV_VIDEO_TEST_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_NV_VIDEO_TEST_SRC, GstNvVideoTestSrc))
37 #define GST_NV_VIDEO_TEST_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_NV_VIDEO_TEST_SRC, GstNvVideoTestSrcClass))
38 #define GST_IS_NV_VIDEO_TEST_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_NV_VIDEO_TEST_SRC))
39 #define GST_IS_NV_VIDEO_TEST_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_NV_VIDEO_TEST_SRC))
40 
41 typedef enum {
46 
47 typedef enum {
52 
55 
57  GstPushSrc parent;
58 
59  // Plugin parameters.
62  guint gpu_id;
64  gboolean enable_rdma;
65 
66  // Stream details set during caps negotiation.
67  GstCaps *caps;
68  GstVideoInfo info;
69 
70  // Runtime state.
71  GstClockTime running_time;
73 
75  unsigned int cuda_block_size;
76  unsigned int cuda_num_blocks;
78 };
79 
81  GstPushSrcClass parent_class;
82 };
83 
85 
86 G_END_DECLS
87 
88 #endif
_GstNvVideoTestSrc::pattern
GstNvVideoTestSrcPattern pattern
Definition: gstnvvideotestsrc.h:60
GST_NV_VIDEO_TEST_SRC_GRADIENT
@ GST_NV_VIDEO_TEST_SRC_GRADIENT
Definition: gstnvvideotestsrc.h:44
_GstNvVideoTestSrc::cuda_surf
NvBufSurfaceParams * cuda_surf
Definition: gstnvvideotestsrc.h:74
GstNvVideoTestSrcAnimationMode
GstNvVideoTestSrcAnimationMode
Definition: gstnvvideotestsrc.h:47
GstNvVideoTestSrcPattern
GstNvVideoTestSrcPattern
Definition: gstnvvideotestsrc.h:41
_GstNvVideoTestSrc::parent
GstPushSrc parent
Definition: gstnvvideotestsrc.h:57
_GstNvVideoTestSrc
Definition: gstnvvideotestsrc.h:56
GST_NV_VIDEO_TEST_SRC_WALL_TIME
@ GST_NV_VIDEO_TEST_SRC_WALL_TIME
Definition: gstnvvideotestsrc.h:49
_GstNvVideoTestSrc::info
GstVideoInfo info
Definition: gstnvvideotestsrc.h:68
GST_NV_VIDEO_TEST_SRC_RUNNING_TIME
@ GST_NV_VIDEO_TEST_SRC_RUNNING_TIME
Definition: gstnvvideotestsrc.h:50
_GstNvVideoTestSrc::cuda_fill_image
void(* cuda_fill_image)(GstNvVideoTestSrc *src)
Definition: gstnvvideotestsrc.h:77
GST_NV_VIDEO_TEST_SRC_MANDELBROT
@ GST_NV_VIDEO_TEST_SRC_MANDELBROT
Definition: gstnvvideotestsrc.h:43
GST_NV_VIDEO_TEST_SRC_SMPTE
@ GST_NV_VIDEO_TEST_SRC_SMPTE
Definition: gstnvvideotestsrc.h:42
_GstNvVideoTestSrc::filled_frames
guint filled_frames
Definition: gstnvvideotestsrc.h:72
NvBufSurfaceParams
Hold the information of single buffer in the batch.
Definition: nvbufsurface.h:427
_GstNvVideoTestSrc::cuda_block_size
unsigned int cuda_block_size
Definition: gstnvvideotestsrc.h:75
_GstNvVideoTestSrc::animation_mode
GstNvVideoTestSrcAnimationMode animation_mode
Definition: gstnvvideotestsrc.h:61
_GstNvVideoTestSrc::gpu_id
guint gpu_id
Definition: gstnvvideotestsrc.h:62
_GstNvVideoTestSrcClass
Definition: gstnvvideotestsrc.h:80
NvBufSurfaceMemType
NvBufSurfaceMemType
Specifies memory types for NvBufSurface.
Definition: nvbufsurface.h:265
_GstNvVideoTestSrc::running_time
GstClockTime running_time
Definition: gstnvvideotestsrc.h:71
gst_nv_video_test_src_get_type
GType gst_nv_video_test_src_get_type(void)
_GstNvVideoTestSrcClass::parent_class
GstPushSrcClass parent_class
Definition: gstnvvideotestsrc.h:81
_GstNvVideoTestSrc::cuda_num_blocks
unsigned int cuda_num_blocks
Definition: gstnvvideotestsrc.h:76
_GstNvVideoTestSrc::enable_rdma
gboolean enable_rdma
Definition: gstnvvideotestsrc.h:64
_GstNvVideoTestSrc::caps
GstCaps * caps
Definition: gstnvvideotestsrc.h:67
_GstNvVideoTestSrc::memtype
NvBufSurfaceMemType memtype
Definition: gstnvvideotestsrc.h:63
GST_NV_VIDEO_TEST_SRC_FRAMES
@ GST_NV_VIDEO_TEST_SRC_FRAMES
Definition: gstnvvideotestsrc.h:48
nvbufsurface.h