NVIDIA DeepStream SDK API Reference

9.2 Release
9.2/sources/gst-plugins/gst-nvvideoconvert/nvc_helper.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2025-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 __NVC_HELPER_H__
19 #define __NVC_HELPER_H__
20 
21 #include <gst/gst.h>
22 #include <gst/base/gstbasetransform.h>
23 
24 G_BEGIN_DECLS
25 
26 /* Debug category declaration for the helper functions */
27 GST_DEBUG_CATEGORY_EXTERN (gst_nvvideoconvert_debug);
28 
39 GstElement* find_peer_element(GstPad *pad, GstElement **caps_filter);
40 
51 gboolean get_format_from_peer_srcpad(GstPad *pad, gchar **format);
52 
63 gboolean check_capsfilter_has_format_field(GstElement *capsfilter, gchar **format);
64 
75 GstCaps *remove_format_from_caps(GstBaseTransform *btrans, GstCaps *caps, const gchar *format_to_remove);
76 
85 gboolean is_format_bgra64_or_uyvp(const gchar *format);
86 
95 gboolean
96 is_format_bgra64(const gchar *format);
97 
106 gchar *
107 get_format_from_src_pad_capsfilter(GstBaseTransform *btrans);
108 
119 GstCaps *inspect_caps(GstBaseTransform *btrans, GstPadDirection direction, GstCaps *caps);
120 
121 G_END_DECLS
122 
123 #endif /* __NVC_HELPER_H__ */
get_format_from_src_pad_capsfilter
gchar * get_format_from_src_pad_capsfilter(GstBaseTransform *btrans)
get_format_from_src_pad_caps: @btrans: The GstBaseTransform element
is_format_bgra64_or_uyvp
gboolean is_format_bgra64_or_uyvp(const gchar *format)
is_format_bgra64_or_uyvp: @format: The format string to check
get_format_from_peer_srcpad
gboolean get_format_from_peer_srcpad(GstPad *pad, gchar **format)
get_format_from_peer_srcpad: @pad: The pad whose peer element's source pad format to check @format: P...
GST_DEBUG_CATEGORY_EXTERN
G_BEGIN_DECLS GST_DEBUG_CATEGORY_EXTERN(gst_nvvideoconvert_debug)
inspect_caps
GstCaps * inspect_caps(GstBaseTransform *btrans, GstPadDirection direction, GstCaps *caps)
inspect_caps: @btrans: The GstBaseTransform element @direction: The pad direction (sink or src) @caps...
remove_format_from_caps
GstCaps * remove_format_from_caps(GstBaseTransform *btrans, GstCaps *caps, const gchar *format_to_remove)
remove_format_from_caps: @btrans: The GstBaseTransform element @caps: The caps to modify @format_to_r...
is_format_bgra64
gboolean is_format_bgra64(const gchar *format)
is_format_bgra64: @format: The format string to check
check_capsfilter_has_format_field
gboolean check_capsfilter_has_format_field(GstElement *capsfilter, gchar **format)
check_capsfilter_has_format_field: @capsfilter: The capsfilter element to check @format: Pointer to a...
ds3d::v2xinfer::format
static std::string format(const char *fmt,...)
Definition: sources/libs/ds3d/inference_custom_lib/ds3d_v2x_infer_custom_preprocess/tensor.hpp:31
find_peer_element
GstElement * find_peer_element(GstPad *pad, GstElement **caps_filter)
find_peer_element: @pad: The pad to find the peer element for @caps_filter: Pointer to store a capsfi...