mirror of
git://nv-tegra.nvidia.com/tegra/gst-src/gst-nvvideo4linux2.git
synced 2025-12-22 09:22:34 +03:00
44b0e909f18f7e2f457ba501fc47d80ecedd150b - nvbufsurface.h 2c5c20979e5fca5ed70b425187c3d09b39c03171 - v4l2_nv_extensions.h d27a433ddeaefb9f42d0312c23472514b0cd6a45 - gst-nvcustomevent.h e9519308cbf7b36481da7665e3b74d36569cc3d1 - gst-v4l2/gstv4l2.c ba87c2bc0bea986ef461e1bc2ab3ded89700a986 - gst-v4l2/gstv4l2h264enc.c 93eaaa0797c1f1dc21c20fbad1885dc109ccffd3 - gst-v4l2/gstv4l2bufferpool.c 9ff38f38c224577c4aaadc4ac4d808429f37ca69 - gst-v4l2/gstv4l2allocator.c 3d06f0b9ae8e465e8aecd7ef101e652ff62268c4 - gst-v4l2/Makefile 02d142337f4b96fcb0c9f2405a3cbe90c5917cca - gst-v4l2/gstv4l2vp9enc.c 34adbcb7d5cf5a360d28432429b735710bfe49c5 - gst-v4l2/wsl_utils.h afc982d855f80b1e21ce1831930a9f327c41832b - gst-v4l2/gstv4l2h265enc.c 55a2c81ab3ffd72e07fc680369683d9635a3665c - gst-v4l2/gstv4l2h265enc.h c81eacb7d88c4fb839506dd70055e30d7a9feeec - gst-v4l2/v4l2-utils.h b1cd923335aa60985ff9866fba91a2068e8671c7 - gst-v4l2/LICENSE.gst-nvvideo4linux2 aa816d369be13e7cb2f6f5283c74bb00f7f1c76e - gst-v4l2/v4l2_calls.c d89a680415f6ff5acec2571cde0fce9054d8e81f - gst-v4l2/gstv4l2vp9enc.h da6c40e84b3b99e443b76c72cbb433541bdc9bcf - gst-v4l2/gstv4l2videodec.c 0d69b17838c57184dace9bfa1d30bbe8f2f83848 - gst-v4l2/gstv4l2object.h c3ac3836a2d29d813c3c274cde82d2a59dd45a5a - gst-v4l2/gstv4l2videodec.h 4b70823ac5f9a70cce0c909e284c73aed4bccbd6 - gst-v4l2/gstv4l2h26xparser.c 39fcb2f599e6906ab0fd7ab9a46fef3ea58a8cab - gst-v4l2/gstv4l2vp8enc.h 08d68910b07d04e1429763ad1e6dbbeb41c5277d - gst-v4l2/gstv4l2av1enc.h a002edef13a3bbbdc41e42a7fca40e574ad1bb3e - gst-v4l2/v4l2-utils.c 870a72e5038dba9f4df37f900d53a059beee9bbc - gst-v4l2/gstv4l2h26xparser.h fac36b61500cf8d1b5f2513d6d2319ef73aa870e - gst-v4l2/sei_parse.c b827fd6cb1e3b8ecebd6a07f8556e846e26cba17 - gst-v4l2/gstv4l2allocator.h e18e54d84e643676bfc88fd559d834f26f5b4d4d - gst-v4l2/wsl_utils.c d0af17fd51ec44b79ef54c1279b631a46cf31f49 - gst-v4l2/gstv4l2videoenc.h 4e79cf75c4fa29791e1f5141318dc8aec13a7835 - gst-v4l2/nalutils.h add535643bbb5c58b7eb98b45496204e4d63ebb1 - gst-v4l2/gstv4l2bufferpool.h 5ecd059e5ef9be4014eface37e5e2f7598960f4e - gst-v4l2/nalutils.c 719c8569e894b0146a6e027550187df5aaf5adc1 - gst-v4l2/gstv4l2av1enc.c bb104683f5e4f7402e3f765a891e149edc794e02 - gst-v4l2/gstv4l2h264enc.h eb5134c907dd4b25097491e4273591db6ac386fc - gst-v4l2/gstv4l2videoenc.c 807bc9859585a540b0f85e98f147756aab24e1bd - gst-v4l2/gstv4l2vp8enc.c 9c3d135576125a6620cc8fa0b249ac73c070110b - gst-v4l2/gstv4l2object.c 20c4f7c0cb89c83256650bc3353ed82154cf3a9d - gst-v4l2/gst/gst-i18n-plugin.h e864ee6647f3572b144403d799f68152e9900da1 - gst-v4l2/gst/gettext.h 499a9feb17ceabf1f1443923dffa1e0180bf5972 - gst-v4l2/gst/glib-compat-private.h 72a34a694337f8f6da3bb94c9faced6730cbd2fc - gst-v4l2/ext/types-compat.h 583075e89482f1faa08be7f7b278336bf7756def - gst-v4l2/ext/v4l2-controls.h fe847595bb202501a56702a7c602f0514d23c328 - gst-v4l2/ext/v4l2-common.h 2253e5f55e37aace35af706d5662ef017f17e877 - gst-v4l2/ext/videodev2.h Change-Id: I434c689e81fa8bc261202840a7a285a3c08d4f94
236 lines
9.5 KiB
C
236 lines
9.5 KiB
C
/*
|
|
* SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
* to deal in the Software without restriction, including without limitation
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
* DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
* <b>NVIDIA GStreamer: Custom Events</b>
|
|
*
|
|
* @b Description: This file specifies the NVIDIA GStreamer custom
|
|
* event functions.
|
|
*
|
|
*/
|
|
|
|
/**
|
|
* @defgroup gstreamer_nvevent Events: Custom Events API
|
|
*
|
|
* Specifies GStreamer custom event functions.
|
|
*
|
|
* @ingroup gst_mess_evnt_qry
|
|
* @{
|
|
*/
|
|
|
|
#ifndef __GST_NVCUSTOMEVENT_H__
|
|
#define __GST_NVCUSTOMEVENT_H__
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define FLAG(name) GST_EVENT_TYPE_##name
|
|
|
|
/** Defines supported types of custom events. */
|
|
typedef enum {
|
|
/** Specifies a custom event to indicate decoder drop frame interval update
|
|
of a particular stream. */
|
|
GST_NVEVENT_DEC_DROP_FRAME_INTERVAL_UPDATE
|
|
= GST_EVENT_MAKE_TYPE (500, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
|
|
/** Specifies a custom event to indicate decoder skip frame update
|
|
of a particular stream. */
|
|
GST_NVEVENT_DEC_SKIP_FRAME_UPDATE
|
|
= GST_EVENT_MAKE_TYPE (501, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
|
|
/** Specifies a custom event to enable decoder low-latency-mode
|
|
of a particular stream. */
|
|
GST_NVEVENT_DEC_ENABLE_LOW_LATENCY_MODE
|
|
= GST_EVENT_MAKE_TYPE (502, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
|
|
|
|
/** Specifies a custom event to indicate encoder bitrate update
|
|
of a particular stream. */
|
|
GST_NVEVENT_ENC_BITRATE_UPDATE
|
|
= GST_EVENT_MAKE_TYPE (503, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
|
|
/** Specifies a custom event to indicate encoder force IDR frame
|
|
of a particular stream. */
|
|
GST_NVEVENT_ENC_FORCE_IDR
|
|
= GST_EVENT_MAKE_TYPE (504, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
|
|
/** Specifies a custom event to indicate encoder force Intra frame
|
|
of a particular stream. */
|
|
GST_NVEVENT_ENC_FORCE_INTRA
|
|
= GST_EVENT_MAKE_TYPE (505, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
|
|
/** Specifies a custom event to indicate iframe interval update
|
|
of a particular stream. */
|
|
GST_NVEVENT_ENC_IFRAME_INTERVAL_UPDATE
|
|
= GST_EVENT_MAKE_TYPE (506, FLAG(DOWNSTREAM) | FLAG(SERIALIZED))
|
|
} GstNvCustomEventType;
|
|
#undef FLAG
|
|
|
|
/**
|
|
* Creates a new "nv-dec-drop-frame-interval-update" event.
|
|
*
|
|
* @param[out] stream_id Stream ID of the stream for which decoder-drop-frame-interval is to be sent
|
|
* @param[out] interval The decoder drop-frame interval obtained corresponding to stream ID for the event.
|
|
*/
|
|
GstEvent * gst_nvevent_dec_drop_frame_interval_update (gchar* stream_id, guint interval);
|
|
|
|
/**
|
|
* Parses a "nv-dec-drop-frame-interval-update" event received on the sinkpad.
|
|
*
|
|
* @param[in] event The event received on the sinkpad
|
|
* when the stream ID sends a dec-drop-frame-interval-update event.
|
|
* @param[out] stream_id A pointer to the parsed stream ID for which
|
|
* the event is sent.
|
|
* @param[out] interval A pointer to the parsed interval
|
|
* corresponding to stream ID for the event.
|
|
*/
|
|
void gst_nvevent_parse_dec_drop_frame_interval_update (GstEvent * event, gchar** stream_id, guint *interval);
|
|
|
|
/**
|
|
* Creates a new "nv-dec-skip-frame-update" event.
|
|
*
|
|
* @param[out] stream_id Stream ID of the stream for which decoder-skip-frame-update is to be sent
|
|
* @param[out] frame_type The decoder frame-type to be skipped obtained corresponding to stream ID for the event.
|
|
*/
|
|
GstEvent * gst_nvevent_dec_skip_frame_update (gchar* stream_id, guint frame_type);
|
|
|
|
/**
|
|
* Parses a "nv-dec-skip-frame-update" event received on the sinkpad.
|
|
*
|
|
* @param[in] event The event received on the sinkpad
|
|
* when the stream ID sends a skip-frame-update event.
|
|
* @param[out] stream_id A pointer to the parsed stream ID for which
|
|
* the event is sent.
|
|
* @param[out] frame_type A pointer to the parsed frame_type
|
|
* corresponding to stream ID for the event.
|
|
*/
|
|
void gst_nvevent_parse_dec_skip_frame_update (GstEvent * event, gchar** stream_id, guint *frame_type);
|
|
|
|
|
|
/**
|
|
* Creates a new "nv-dec-enable-low-latency-mode" event.
|
|
*
|
|
* @param[out] stream_id Stream ID of the stream for which decoder-low-latenct-mode is to be sent
|
|
* @param[out] enable The decoder low latency mode to be enabled corresponding to stream ID for the event.
|
|
*/
|
|
GstEvent * gst_nvevent_dec_enable_low_latency_mode (gchar* stream_id, gint enable);
|
|
|
|
/**
|
|
* Parses a "nv-dec-enable-low-latency-mode" event received on the sinkpad.
|
|
*
|
|
* @param[in] event The event received on the sinkpad
|
|
* when the stream ID sends a enable-low-latency-mode event.
|
|
* @param[out] stream_id A pointer to the parsed stream ID for which
|
|
* the event is sent.
|
|
* @param[out] enable A pointer to the parsed enable flag
|
|
* corresponding to stream ID for the event.
|
|
*/
|
|
void gst_nvevent_parse_dec_enable_low_latency_mode (GstEvent * event, gchar** stream_id, gint *enable);
|
|
|
|
/**
|
|
* Creates a new "nv-enc-bitrate-update" event.
|
|
*
|
|
* @param[out] stream_id Stream ID of the stream for which encoder-bitrate-update is to be sent
|
|
* @param[out] bitrate The encoder bitrate to be set corresponding to stream ID for the event.
|
|
*/
|
|
GstEvent * gst_nvevent_enc_bitrate_update (gchar* stream_id, guint bitrate);
|
|
|
|
/**
|
|
* Parses a "nv-enc-bitrate-update" event received on the sinkpad.
|
|
*
|
|
* @param[in] event The event received on the sinkpad
|
|
* when the stream ID sends a bitrate-update event.
|
|
* @param[out] stream_id A pointer to the parsed stream ID for which
|
|
* the event is sent.
|
|
* @param[out] bitrate A pointer to the parsed bitrate value
|
|
* corresponding to stream ID for the event.
|
|
*/
|
|
void gst_nvevent_parse_enc_bitrate_update (GstEvent * event, gchar** stream_id, guint *bitrate);
|
|
|
|
/**
|
|
* Creates a new "nv-enc-force-idr" event.
|
|
*
|
|
* @param[out] stream_id Stream ID of the stream for which encoder-force-idr is to be sent
|
|
* @param[out] force The encoder force IDR frame corresponding to stream ID for the event.
|
|
*/
|
|
GstEvent * gst_nvevent_enc_force_idr (gchar* stream_id, gint force);
|
|
|
|
/**
|
|
* Parses a "nv-enc-force-idr" event received on the sinkpad.
|
|
*
|
|
* @param[in] event The event received on the sinkpad
|
|
* when the stream ID sends a force-idr event.
|
|
* @param[out] stream_id A pointer to the parsed stream ID for which
|
|
* the event is sent.
|
|
* @param[out] force A pointer to the parsed force value
|
|
* corresponding to stream ID for the event.
|
|
*/
|
|
void gst_nvevent_parse_enc_force_idr (GstEvent * event, gchar** stream_id, gint *force);
|
|
|
|
/**
|
|
* Creates a new "nv-enc-force-intra" event.
|
|
*
|
|
* @param[out] stream_id Stream ID of the stream for which encoder-force-intra is to be sent
|
|
* @param[out] force The encoder force Intra frame corresponding to stream ID for the event.
|
|
*/
|
|
GstEvent * gst_nvevent_enc_force_intra (gchar* stream_id, gint force);
|
|
|
|
/**
|
|
* Parses a "nv-enc-force-intra" event received on the sinkpad.
|
|
*
|
|
* @param[in] event The event received on the sinkpad
|
|
* when the stream ID sends a force-intra event.
|
|
* @param[out] stream_id A pointer to the parsed stream ID for which
|
|
* the event is sent.
|
|
* @param[out] force A pointer to the parsed force value
|
|
* corresponding to stream ID for the event.
|
|
*/
|
|
void gst_nvevent_parse_enc_force_intra (GstEvent * event, gchar** stream_id, gint *force);
|
|
|
|
/**
|
|
* Creates a new "nv-enc-iframeinterval-update" event.
|
|
*
|
|
* @param[out] stream_id Stream ID of the stream for which encoder-iframeinterval-update is to be sent
|
|
* @param[out] interval The encoder iframeinterval to be set corresponding to stream ID for the event.
|
|
*/
|
|
GstEvent * gst_nvevent_enc_iframeinterval_update (gchar* stream_id, guint interval);
|
|
|
|
/**
|
|
* Parses a "nv-enc-iframeinterval-update" event received on the sinkpad.
|
|
*
|
|
* @param[in] event The event received on the sinkpad
|
|
* when the stream ID sends a iframeinterval-update event.
|
|
* @param[out] stream_id A pointer to the parsed stream ID for which
|
|
* the event is sent.
|
|
* @param[out] bitrate A pointer to the parsed interval value
|
|
* corresponding to stream ID for the event.
|
|
*/
|
|
void gst_nvevent_parse_enc_iframeinterval_update (GstEvent * event, gchar** stream_id, guint *interval);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/** @} */
|