mirror of
git://nv-tegra.nvidia.com/tegra/gst-src/nvgstapps.git
synced 2025-12-25 11:46:18 +03:00
Compare commits
1 Commits
jetson_36.
...
jetson_38.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b25a7ae709 |
@@ -1,15 +1,15 @@
|
||||
Updating prebuilts and/or headers
|
||||
|
||||
6bafa48f47ad43d33ee446cf86f2b1da134f7868 - nvgstapps_src/nvgst_sample_apps/nvgstplayer-1.0/nvgst_asound_common.h
|
||||
c028fa403772288daf002520356e8e18cce5cb06 - nvgstapps_src/nvgst_sample_apps/nvgstplayer-1.0/nvgstplayer.h
|
||||
d2d35088439d36583769e88ae1e00b60c476fd4d - nvgstapps_src/nvgst_sample_apps/nvgstplayer-1.0/nvgstplayer.h
|
||||
33a285339d714d5546cddb92a710e418853470aa - nvgstapps_src/nvgst_sample_apps/nvgstplayer-1.0/nvgst_asound_common.c
|
||||
582a142d1a3098aed3bb4c8f7329e8cdac7b0ed8 - nvgstapps_src/nvgst_sample_apps/nvgstplayer-1.0/nvgst_x11_common.c
|
||||
d3dee823127d19bcf050cb35c5e0962e9130d789 - nvgstapps_src/nvgst_sample_apps/nvgstplayer-1.0/nvgstplayer.c
|
||||
8e85d7eb34d7f411e8269a9de58958ff84385d02 - nvgstapps_src/nvgst_sample_apps/nvgstplayer-1.0/nvgstplayer.c
|
||||
aaafd7fd4c0214a52bf73dd2a0ba0af08c675b85 - nvgstapps_src/nvgst_sample_apps/nvgstplayer-1.0/nvgst_x11_common.h
|
||||
7152d9928416f55c6879ec0170a495f71eabf80d - nvgstapps_src/nvgst_sample_apps/nvgstipctestapp-1.0/Makefile.public
|
||||
6913ed4a984b2247d1373f0e1b395c582fefb2bd - nvgstapps_src/nvgst_sample_apps/nvgstipctestapp-1.0/LICENSE
|
||||
820c394e9e2e204fd1e289e3b0aa58c91339172b - nvgstapps_src/nvgst_sample_apps/nvgstipctestapp-1.0/nvgstipctestapp.c
|
||||
bd149086ce2fd243a4f2ef669945ed673aa459b9 - nvgstapps_src/nvgst_sample_apps/nvgstcapture-1.0/nvgstcapture.h
|
||||
ec4e84387d8e0e16529f7c8bcd7fee48c16c769c - nvgstapps_src/nvgst_sample_apps/nvgstcapture-1.0/nvgstcapture.c
|
||||
a5bdf6935960973677a005d9d28a04c023f5ec6f - nvgstapps_src/nvgst_sample_apps/nvgstcapture-1.0/nvgst_x11_common.c
|
||||
f10c2dee4b1065e7c2dccbb6f32390dd6e3c1491 - nvgstapps_src/nvgst_sample_apps/nvgstipctestapp-1.0/nvgstipctestapp.c
|
||||
4d1b5a02533b224281502e7197e7945faa2885f5 - nvgstapps_src/nvgst_sample_apps/nvgstcapture-1.0/nvgstcapture.h
|
||||
68e327a1f71ca2687f4aa9f223bb6be83bcf5e5c - nvgstapps_src/nvgst_sample_apps/nvgstcapture-1.0/nvgstcapture.c
|
||||
4b5054ba7e2715bddd948e4603445230ce1cf350 - nvgstapps_src/nvgst_sample_apps/nvgstcapture-1.0/nvgst_x11_common.c
|
||||
87556b6e7da0ec3865546f10b7a58959cd8c6bfc - nvgstapps_src/nvgst_sample_apps/nvgstcapture-1.0/nvgst_x11_common.h
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2016-2024 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"),
|
||||
@@ -13,7 +14,7 @@
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
@@ -21,6 +22,7 @@
|
||||
*/
|
||||
|
||||
#include "nvgst_x11_common.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
void
|
||||
nvgst_x11_init (displayCtx * dpyCtx)
|
||||
@@ -52,7 +54,7 @@ saver_off (displayCtx * dpyCtx)
|
||||
{
|
||||
int nothing;
|
||||
if (DPMSQueryExtension (dpyCtx->mDisplay, ¬hing, ¬hing)) {
|
||||
BOOL enabled;
|
||||
BOOL enabled = false;
|
||||
CARD16 powerLevel;
|
||||
|
||||
DPMSInfo (dpyCtx->mDisplay, &powerLevel, &enabled);
|
||||
@@ -75,7 +77,7 @@ saver_on (displayCtx * dpyCtx)
|
||||
{
|
||||
int nothing;
|
||||
if (DPMSQueryExtension (dpyCtx->mDisplay, ¬hing, ¬hing)) {
|
||||
BOOL enabled;
|
||||
BOOL enabled = false;
|
||||
CARD16 powerLevel;
|
||||
|
||||
DPMSInfo (dpyCtx->mDisplay, &powerLevel, &enabled);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2014-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2014-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -1405,14 +1405,12 @@ invalid_input:
|
||||
void
|
||||
set_capture_device_node (void)
|
||||
{
|
||||
gchar *fname = g_strdup ("/dev/video");
|
||||
fname = strcat (fname, app->cap_dev_node);
|
||||
gchar *fname = g_strdup_printf ("/dev/video%s", app->cap_dev_node);
|
||||
|
||||
if (app->vidcap_device && access (fname, F_OK) != -1) {
|
||||
g_free (app->vidcap_device);
|
||||
app->vidcap_device = NULL;
|
||||
app->vidcap_device = g_strdup ("/dev/video");
|
||||
app->vidcap_device = strcat (app->vidcap_device, app->cap_dev_node);
|
||||
app->vidcap_device = g_strdup_printf ("/dev/video%s", app->cap_dev_node);
|
||||
} else {
|
||||
g_print ("%s does not exist\n",fname);
|
||||
}
|
||||
@@ -1790,6 +1788,9 @@ capture_init_params (void)
|
||||
app->x_cond = malloc(sizeof(*(app->x_cond)));
|
||||
g_cond_init (app->x_cond);
|
||||
|
||||
app->x_event_thread = NULL;
|
||||
g_atomic_int_set(&app->x_thread_should_exit, FALSE);
|
||||
|
||||
app->native_record = GST_PAD_PROBE_DROP;
|
||||
app->file_name = g_strdup (NVGST_DEFAULT_FILENAME);
|
||||
app->vidcap_device = g_strdup (NVGST_DEFAULT_VIDCAP_DEVICE);
|
||||
@@ -4146,7 +4147,7 @@ exit_capture (gpointer data)
|
||||
static void
|
||||
nvgst_handle_xevents ()
|
||||
{
|
||||
XEvent e;
|
||||
XEvent e = {0};
|
||||
Atom wm_delete;
|
||||
displayCtx *dpyCtx = &app->disp;
|
||||
|
||||
@@ -4168,13 +4169,17 @@ static gpointer
|
||||
nvgst_x_event_thread (gpointer data)
|
||||
{
|
||||
g_mutex_lock (app->lock);
|
||||
while (app->disp.window) {
|
||||
while (app->disp.window && !g_atomic_int_get(&app->x_thread_should_exit)) {
|
||||
nvgst_handle_xevents ();
|
||||
g_mutex_unlock(app->lock);
|
||||
g_usleep(G_USEC_PER_SEC / 20);
|
||||
g_mutex_lock(app->lock);
|
||||
/* Wait for 50ms or until signaled to exit */
|
||||
gint64 end_time = g_get_monotonic_time() + 50000; /* 50ms timeout */
|
||||
g_cond_wait_until(app->x_cond, app->lock, end_time);
|
||||
}
|
||||
g_mutex_unlock(app->lock);
|
||||
|
||||
/* Only unlock if we still have a valid lock */
|
||||
if (app->lock)
|
||||
g_mutex_unlock(app->lock);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
@@ -4754,12 +4759,20 @@ done:
|
||||
g_main_loop_unref (loop);
|
||||
|
||||
#if !GUI
|
||||
g_mutex_lock (app->lock);
|
||||
if (app->disp.window)
|
||||
nvgst_destroy_window (&app->disp);
|
||||
g_mutex_unlock (app->lock);
|
||||
/* Properly signal X event thread to exit and wait for it */
|
||||
if (app->lock && app->x_event_thread) {
|
||||
g_mutex_lock (app->lock);
|
||||
/* Signal the X event thread to exit */
|
||||
g_atomic_int_set(&app->x_thread_should_exit, TRUE);
|
||||
g_cond_signal(app->x_cond); /* Wake up the waiting thread immediately */
|
||||
if (app->disp.window)
|
||||
nvgst_destroy_window (&app->disp);
|
||||
g_mutex_unlock (app->lock);
|
||||
|
||||
g_thread_join(app->x_event_thread);
|
||||
/* Join the thread before destroying the mutex */
|
||||
g_thread_join(app->x_event_thread);
|
||||
app->x_event_thread = NULL;
|
||||
}
|
||||
|
||||
if (app->disp.mDisplay)
|
||||
nvgst_x11_uninit (&app->disp);
|
||||
@@ -4767,16 +4780,19 @@ done:
|
||||
|
||||
if (app->lock) {
|
||||
g_mutex_clear (app->lock);
|
||||
g_free (app->lock);
|
||||
app->lock = NULL;
|
||||
}
|
||||
|
||||
if (app->cond) {
|
||||
g_cond_clear (app->cond);
|
||||
g_free (app->cond);
|
||||
app->cond = NULL;
|
||||
}
|
||||
|
||||
if (app->x_cond) {
|
||||
g_cond_clear (app->x_cond);
|
||||
g_free (app->x_cond);
|
||||
app->x_cond = NULL;
|
||||
}
|
||||
|
||||
@@ -4786,9 +4802,6 @@ done:
|
||||
g_free (app->csi_options_argus);
|
||||
g_free (app->overlayConfig);
|
||||
g_free (app->eglConfig);
|
||||
g_free (app->lock);
|
||||
g_free (app->cond);
|
||||
g_free (app->x_cond);
|
||||
|
||||
NVGST_INFO_MESSAGE ("Camera application will now exit");
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2014-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2014-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -663,6 +663,7 @@ typedef struct
|
||||
GCond *x_cond;
|
||||
GThread *reset_thread;
|
||||
GThread *x_event_thread;
|
||||
gint x_thread_should_exit; // Flag to signal X event thread to exit (atomic)
|
||||
|
||||
CamRes capres;
|
||||
EncSet encset;
|
||||
|
||||
@@ -34,6 +34,10 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#define MAX_SOURCE_BINS 32
|
||||
#define CONFIG_CSI_SOURCE_WIDTH 1920
|
||||
#define CONFIG_CSI_SOURCE_HEIGHT 1080
|
||||
#define CONFIG_CSI_SOURCE_FPS_N 30
|
||||
#define CONFIG_CSI_SOURCE_FPS_D 1
|
||||
|
||||
/* NVIDIA Decoder source pad memory feature. This feature signifies that source
|
||||
* pads having this capability will push GstBuffers containing cuda buffers. */
|
||||
@@ -43,6 +47,8 @@ typedef struct
|
||||
{
|
||||
gchar *uri;
|
||||
gchar *socket_path;
|
||||
guint cam_src;
|
||||
guint sensor_id;
|
||||
guint bus_id;
|
||||
GstElement *pipeline;
|
||||
void *appCtx;
|
||||
@@ -76,7 +82,7 @@ bus_call (GstBus * bus, GstMessage * msg, gpointer user_data)
|
||||
case GST_MESSAGE_WARNING:
|
||||
{
|
||||
gchar *debug;
|
||||
GError *error;
|
||||
GError *error = NULL;
|
||||
gst_message_parse_warning (msg, &error, &debug);
|
||||
g_printerr ("WARNING from element %s: %s\n",
|
||||
GST_OBJECT_NAME (msg->src), error->message);
|
||||
@@ -88,7 +94,7 @@ bus_call (GstBus * bus, GstMessage * msg, gpointer user_data)
|
||||
case GST_MESSAGE_ERROR:
|
||||
{
|
||||
gchar *debug;
|
||||
GError *error;
|
||||
GError *error = NULL;
|
||||
gst_message_parse_error (msg, &error, &debug);
|
||||
g_printerr ("ERROR from element %s: %s\n",
|
||||
GST_OBJECT_NAME (msg->src), error->message);
|
||||
@@ -100,7 +106,7 @@ bus_call (GstBus * bus, GstMessage * msg, gpointer user_data)
|
||||
break;
|
||||
}
|
||||
case GST_MESSAGE_STATE_CHANGED:{
|
||||
GstState oldstate, newstate;
|
||||
GstState oldstate = GST_STATE_NULL, newstate = GST_STATE_NULL;
|
||||
gst_message_parse_state_changed (msg, &oldstate, &newstate, NULL);
|
||||
switch (newstate) {
|
||||
case GST_STATE_PLAYING:
|
||||
@@ -223,6 +229,67 @@ create_source_bin (guint index, gchar * uri)
|
||||
return bin;
|
||||
}
|
||||
|
||||
static GstElement*
|
||||
create_csi_source_bin (guint index, guint sensor_id) {
|
||||
GstElement *bin = NULL, *src_elem = NULL, *caps_filter = NULL;
|
||||
GstPad *source_pad = NULL, *ghost_sourcepad = NULL;
|
||||
GstCaps *caps = NULL;
|
||||
gchar bin_name[16] = {};
|
||||
|
||||
g_snprintf(bin_name, 15, "source-bin-%02d", index);
|
||||
/* Create a source GstBin to abstract this bin's content from the rest of the
|
||||
* pipeline */
|
||||
bin = gst_bin_new(bin_name);
|
||||
|
||||
src_elem = gst_element_factory_make ("nvarguscamerasrc", "csi_src_elem");
|
||||
|
||||
if (!bin || !src_elem) {
|
||||
g_printerr("One element in source bin could not be created.\n");
|
||||
return NULL;
|
||||
}
|
||||
g_object_set (G_OBJECT (src_elem), "sensor-id", sensor_id, NULL);
|
||||
|
||||
caps_filter = gst_element_factory_make("capsfilter", "src_cap_filter");
|
||||
if (!caps_filter) {
|
||||
g_printerr("Could not create 'src_cap_filter'");
|
||||
return NULL;
|
||||
}
|
||||
caps = gst_caps_new_simple(
|
||||
"video/x-raw", "format", G_TYPE_STRING, "NV12", "width", G_TYPE_INT,
|
||||
CONFIG_CSI_SOURCE_WIDTH, "height", G_TYPE_INT, CONFIG_CSI_SOURCE_HEIGHT,
|
||||
"framerate", GST_TYPE_FRACTION, CONFIG_CSI_SOURCE_FPS_N,
|
||||
CONFIG_CSI_SOURCE_FPS_D, NULL);
|
||||
|
||||
GstCapsFeatures *feature = NULL;
|
||||
feature = gst_caps_features_new ("memory:NVMM", NULL);
|
||||
gst_caps_set_features (caps, 0, feature);
|
||||
|
||||
g_object_set (G_OBJECT (caps_filter), "caps", caps, NULL);
|
||||
|
||||
gst_bin_add_many (GST_BIN (bin), src_elem, caps_filter, NULL);
|
||||
|
||||
if (!gst_element_link_many (src_elem, caps_filter, NULL)) {
|
||||
g_printerr ("Elements could not be linked. Exiting.\n");
|
||||
gst_caps_unref (caps);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
source_pad = gst_element_get_static_pad (caps_filter, "src");
|
||||
ghost_sourcepad = gst_ghost_pad_new ("src", source_pad);
|
||||
gst_pad_set_active (ghost_sourcepad, TRUE);
|
||||
if (!gst_element_add_pad (bin, ghost_sourcepad)) {
|
||||
g_printerr ("Failed to add ghost pad in source bin\n");
|
||||
gst_caps_unref (caps);
|
||||
gst_object_unref (source_pad);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gst_caps_unref (caps);
|
||||
gst_object_unref (source_pad);
|
||||
|
||||
return bin;
|
||||
}
|
||||
|
||||
static GstElement *
|
||||
create_ipc_source_bin (NvIpcClientPipeline *ipcclient, guint index, gchar *socket_path)
|
||||
{
|
||||
@@ -430,15 +497,15 @@ create_server_pipeline (int argc, char *argv[])
|
||||
{
|
||||
AppCtx appCtx;
|
||||
guint i =0, num_sources = 0;
|
||||
num_sources = (argc - 2)/2;
|
||||
GMainLoop *loop = NULL;
|
||||
char **arg = argv + 2;
|
||||
gboolean PERF_MODE = g_getenv("NV_IPC_TEST_PERF_MODE") &&
|
||||
!g_strcmp0(g_getenv("NV_IPC_TEST_PERF_MODE"), "1");
|
||||
|
||||
memset(&appCtx, 0, sizeof(AppCtx));
|
||||
appCtx.loop = loop = g_main_loop_new (NULL, FALSE);
|
||||
|
||||
for (i = 0; i < num_sources; i++) {
|
||||
while (*arg) {
|
||||
GstElement *pipeline = NULL;
|
||||
GstBus *bus = NULL;
|
||||
guint bus_watch_id;
|
||||
@@ -451,15 +518,27 @@ create_server_pipeline (int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
source_bin = create_source_bin (i, argv[(i*2) + 2]);
|
||||
if (!strcmp(*arg, "-cs")) {
|
||||
arg++;
|
||||
appCtx.ipcserver[i].cam_src = atoi(*arg++);
|
||||
appCtx.ipcserver[i].sensor_id = 0;
|
||||
if (!strcmp(*arg, "-sid")) {
|
||||
arg++;
|
||||
appCtx.ipcserver[i].sensor_id = atoi(*arg++);
|
||||
}
|
||||
source_bin = create_csi_source_bin (i, appCtx.ipcserver[i].sensor_id);
|
||||
} else {
|
||||
appCtx.ipcserver[i].uri = strdup(*arg++);
|
||||
source_bin = create_source_bin (i, appCtx.ipcserver[i].uri);
|
||||
}
|
||||
|
||||
if (!source_bin) {
|
||||
g_printerr ("Failed to create source bin. Exiting.\n");
|
||||
return -1;
|
||||
}
|
||||
gst_bin_add (GST_BIN (pipeline), source_bin);
|
||||
appCtx.ipcserver[i].uri = strdup(argv[(i*2) + 2]);
|
||||
|
||||
appCtx.ipcserver[i].socket_path = strdup(argv[(i*2) + 3]);
|
||||
appCtx.ipcserver[i].socket_path = strdup(*arg++);
|
||||
nvunixfdsink = gst_element_factory_make ("nvunixfdsink", NULL);
|
||||
if (!nvunixfdsink) {
|
||||
g_printerr ("Failed to create nvunixfdsink. Exiting.\n");
|
||||
@@ -491,6 +570,9 @@ create_server_pipeline (int argc, char *argv[])
|
||||
appCtx.ipcserver[i].appCtx = &appCtx;
|
||||
if (PERF_MODE)
|
||||
g_signal_connect(pipeline, "deep-notify", G_CALLBACK(gst_object_default_deep_notify), NULL);
|
||||
|
||||
i++;
|
||||
num_sources++;
|
||||
}
|
||||
|
||||
/* Set the pipeline to "playing" state */
|
||||
@@ -498,8 +580,7 @@ create_server_pipeline (int argc, char *argv[])
|
||||
|
||||
for (i = 0; i < num_sources; i++) {
|
||||
gst_element_set_state (appCtx.ipcserver[i].pipeline, GST_STATE_PLAYING);
|
||||
g_print("server is started uri: %s path: %s\n",
|
||||
appCtx.ipcserver[i].uri, appCtx.ipcserver[i].socket_path);
|
||||
g_print("server is started path: %s\n", appCtx.ipcserver[i].socket_path);
|
||||
}
|
||||
|
||||
/* Wait till pipeline encounters an error or EOS */
|
||||
@@ -514,10 +595,11 @@ create_server_pipeline (int argc, char *argv[])
|
||||
gst_element_set_state (appCtx.ipcserver[i].pipeline, GST_STATE_NULL);
|
||||
gst_object_unref (GST_OBJECT (appCtx.ipcserver[i].pipeline));
|
||||
g_source_remove (appCtx.ipcserver[i].bus_id);
|
||||
g_print("server is closed uri: %s path: %s\n",
|
||||
appCtx.ipcserver[i].uri, appCtx.ipcserver[i].socket_path);
|
||||
g_free(appCtx.ipcserver[i].uri);
|
||||
g_free(appCtx.ipcserver[i].socket_path);
|
||||
g_print("server is closed path: %s\n", appCtx.ipcserver[i].socket_path);
|
||||
if (appCtx.ipcserver[i].uri)
|
||||
g_free(appCtx.ipcserver[i].uri);
|
||||
if (appCtx.ipcserver[i].socket_path)
|
||||
g_free(appCtx.ipcserver[i].socket_path);
|
||||
}
|
||||
|
||||
g_main_loop_unref (loop);
|
||||
@@ -532,7 +614,10 @@ main (int argc, char *argv[])
|
||||
/* Check input arguments */
|
||||
if (argc < 3) {
|
||||
g_printerr ("Usage: %s <server> <rtsp_url> <socket_path>\n", argv[0]);
|
||||
g_printerr ("OR: %s <server> -cs <camera_source> -sid <sensor_id> <socket_path> \n", argv[0]);
|
||||
g_printerr ("OR: %s <client> <socket_path> \n", argv[0]);
|
||||
g_printerr ("-cs : camera source to use (0 = CSI)\n");
|
||||
g_printerr ("-sid : camera sensor ID value (0, 1, ...)\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2013-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2013-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -613,7 +613,7 @@ on_input (GIOChannel * ichannel, GIOCondition cond, gpointer data)
|
||||
res = NVGST_RET_ERR;
|
||||
|
||||
} else if (!g_strcmp0 (tbuffer, "spos") && app->running) {
|
||||
GstClockTimeDiff pos;
|
||||
GstClockTimeDiff pos = 0;
|
||||
GstFormat format = GST_FORMAT_TIME;
|
||||
|
||||
if (gst_element_query_position (app->pipeline, format, &pos))
|
||||
@@ -637,7 +637,7 @@ on_input (GIOChannel * ichannel, GIOCondition cond, gpointer data)
|
||||
|
||||
} else if (g_str_has_prefix (tbuffer, "f") &&
|
||||
is_valid_number (tbuffer + 1, TRUE, TRUE)) {
|
||||
GstClockTimeDiff pos;
|
||||
GstClockTimeDiff pos = 0;
|
||||
GstFormat format = GST_FORMAT_TIME;
|
||||
|
||||
if (gst_element_query_position (app->pipeline, format, &pos) &&
|
||||
@@ -651,7 +651,7 @@ on_input (GIOChannel * ichannel, GIOCondition cond, gpointer data)
|
||||
res = NVGST_RET_ERR;
|
||||
}
|
||||
} else if (g_str_has_prefix (tbuffer, "<")) {
|
||||
GstClockTimeDiff pos;
|
||||
GstClockTimeDiff pos = 0;
|
||||
GstFormat format = GST_FORMAT_TIME;
|
||||
|
||||
if (gst_element_query_position (app->pipeline, format, &pos) &&
|
||||
@@ -1113,7 +1113,7 @@ bus_call (GstBus * bus, GstMessage * msg, gpointer data)
|
||||
break;
|
||||
|
||||
case GST_MESSAGE_INFO:{
|
||||
GError *gerror;
|
||||
GError *gerror = NULL;
|
||||
gchar *debug = NULL;
|
||||
gchar *name = gst_object_get_path_string (GST_MESSAGE_SRC (msg));
|
||||
|
||||
@@ -2324,6 +2324,9 @@ autoplug_select (GstElement * dbin, GstPad * pad, GstCaps * caps,
|
||||
g_strcmp0(name, "video/x-wmv") &&
|
||||
g_strcmp0(name, "video/x-h263"))
|
||||
app->svd = g_strconcat (NVGST_DEFAULT_VIDEO_DEC, NULL);
|
||||
/* Use nvjpegdec for jpeg format */
|
||||
else if (!app->svd && !g_strcmp0(name, "image/jpeg"))
|
||||
app->svd = g_strconcat (NVGST_DEFAULT_IMAGE_DEC, NULL);
|
||||
in->video_dec = get_keys (caps, NVGST_VIDEO_DEC, app->svd);
|
||||
|
||||
if (in->video_dec) {
|
||||
|
||||
@@ -98,6 +98,7 @@ dummy_func ()
|
||||
#define NVGST_DEFAULT_AUDIO_SINK "alsasink"
|
||||
#define NVGST_DEFAULT_VIDEO_SINK "nv3dsink"
|
||||
#define NVGST_DEFAULT_VIDEO_DEC "nvv4l2decoder"
|
||||
#define NVGST_DEFAULT_IMAGE_DEC "nvjpegdec"
|
||||
#define NVGST_DEFAULT_FILE_SRC "filesrc"
|
||||
#define NVGST_DEFAULT_RTSP_SRC "rtspsrc"
|
||||
#define NVGST_DEFAULT_HTTP_SRC "souphttpsrc"
|
||||
|
||||
@@ -1 +1 @@
|
||||
jetson_36.4
|
||||
jetson_38.2
|
||||
|
||||
Reference in New Issue
Block a user