Skip to content
2 changes: 1 addition & 1 deletion docker/fedora41/fedora41.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ RUN \
python3-gobject-devel python3-devel tbb gnupg2 unzip gflags-devel openssl-devel openssl-devel-engine \
gobject-introspection-devel x265-devel x264-devel libde265-devel libgudev-devel libusb1 libusb1-devel nasm python3-virtualenv \
cairo-devel cairo-gobject-devel libXt-devel mesa-libGLES-devel wayland-protocols-devel libcurl-devel which \
libssh2-devel cmake git valgrind numactl libvpx-devel opus-devel libsrtp-devel libXv-devel paho-c-devel \
libssh2-devel cmake git valgrind numactl libvpx-devel opus-devel libsrtp-devel libXv-devel paho-c-devel ocl-icd-devel \
kernel-headers pmix pmix-devel hwloc hwloc-libs hwloc-devel libxcb-devel libX11-devel libatomic intel-media-driver libsoup3 && \
dnf clean all

Expand Down
24 changes: 22 additions & 2 deletions src/monolithic/gst/elements/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@

set (TARGET_NAME "elements")

find_package(OpenCV REQUIRED core imgproc)
find_package(OpenCV REQUIRED core imgproc calib3d)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GSTREAMER gstreamer-1.0>=1.16 REQUIRED)
pkg_check_modules(GSTVIDEO gstreamer-video-1.0>=1.16 REQUIRED)
pkg_check_modules(GSTALLOC gstreamer-allocators-1.0 REQUIRED)
pkg_search_module(VA va libva REQUIRED)
if(NOT MSVC)
pkg_check_modules(GSTVA REQUIRED IMPORTED_TARGET gstreamer-va-1.0)
endif()
if(${ENABLE_AUDIO_INFERENCE_ELEMENTS})
pkg_check_modules(GSTAUDIO gstreamer-audio-1.0>=1.16 REQUIRED)
endif()
Expand All @@ -31,6 +34,13 @@ file (GLOB MAIN_SRC
gvadeskew/*.c
)

# gvamotiondetect platform-specific source
if(MSVC OR WIN32)
list(APPEND MAIN_SRC gvamotiondetect/gvamotiondetect_win.cpp)
else()
list(APPEND MAIN_SRC gvamotiondetect/gvamotiondetect.cpp)
endif()

file (GLOB MAIN_HEADERS
gvametaconvert/*.h
gvametaaggregate/*.h
Expand All @@ -39,6 +49,7 @@ file (GLOB MAIN_HEADERS
gvawatermark/renderer/cpu/*.h
gvawatermark3d/*.h
gvadeskew/*.h
gvamotiondetect/*.h
)

if(${ENABLE_AUDIO_INFERENCE_ELEMENTS})
Expand All @@ -64,6 +75,7 @@ PUBLIC
gvametaaggregate
gvawatermark3d
gvadeskew
gvamotiondetect
PRIVATE
${GSTREAMER_INCLUDE_DIRS}
${GSTVIDEO_INCLUDE_DIRS}
Expand Down Expand Up @@ -91,8 +103,17 @@ PRIVATE
json-hpp
json-schema-validator
utils
dlstreamer_gst_meta
gstvideoanalyticsmeta
)

if(NOT MSVC)
target_link_libraries(${TARGET_NAME} PRIVATE
${GSTVA_LIBRARIES}
dlstreamer_vaapi
)
endif()

if(${ENABLE_AUDIO_INFERENCE_ELEMENTS})
target_link_libraries(${TARGET_NAME} PRIVATE ${GSTAUDIO_LIBRARIES})
endif()
Expand All @@ -109,7 +130,6 @@ add_subdirectory(gvaattachroi)
add_subdirectory(gvametapublish)
add_subdirectory(gvapython)
add_subdirectory(gvatrack)
add_subdirectory(gvamotiondetect)
if(ENABLE_REALSENSE)
add_subdirectory(gvarealsense)
endif()
Expand Down
92 changes: 0 additions & 92 deletions src/monolithic/gst/elements/gvamotiondetect/CMakeLists.txt

This file was deleted.

18 changes: 6 additions & 12 deletions src/monolithic/gst/elements/gvamotiondetect/gvamotiondetect.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2025 Intel Corporation
* Copyright (C) 2025-2026 Intel Corporation
*
* SPDX-License-Identifier: MIT
******************************************************************************/
Expand Down Expand Up @@ -275,7 +275,7 @@ static GstCaps *gst_gva_motion_detect_transform_caps(GstBaseTransform *, GstPadD
// -----------------------------------------------------------------------------
// VA API helper functions
// Map GST buffer to VA surface (using mapper + fallback) and return VASurfaceID
static VASurfaceID gva_motion_detect_get_surface(GstGvaMotionDetect *self, GstBuffer *buf) {
static VASurfaceID gva_motion_detect_get_surface([[maybe_unused]] GstGvaMotionDetect *self, GstBuffer *buf) {
if (!buf)
return VA_INVALID_SURFACE;
VASurfaceID sid = gst_va_buffer_get_surface(buf);
Expand Down Expand Up @@ -308,8 +308,8 @@ static bool gva_motion_detect_convert_from_surface(GstGvaMotionDetect *self, VAS
}

// Write cv::UMat back into the VA surface; returns false on failure
static bool gva_motion_detect_write_to_surface(GstGvaMotionDetect *self, const cv::UMat &src, VASurfaceID sid,
int width, int height) {
[[maybe_unused]] static bool gva_motion_detect_write_to_surface(GstGvaMotionDetect *self, const cv::UMat &src,
VASurfaceID sid, int width, int height) {
if (sid == VA_INVALID_SURFACE || !self->va_dpy)
return false;
try {
Expand Down Expand Up @@ -453,7 +453,8 @@ static gboolean gst_gva_motion_detect_start(GstBaseTransform *trans) {
return TRUE;
}

static gboolean gst_gva_motion_detect_set_caps(GstBaseTransform *trans, GstCaps *incaps, GstCaps *outcaps) {
static gboolean gst_gva_motion_detect_set_caps(GstBaseTransform *trans, GstCaps *incaps,
[[maybe_unused]] GstCaps *outcaps) {
GstGvaMotionDetect *self = GST_GVA_MOTION_DETECT(trans);
if (!gst_video_info_from_caps(&self->vinfo, incaps))
return FALSE;
Expand Down Expand Up @@ -1115,10 +1116,3 @@ static void gst_gva_motion_detect_process_and_attach(GstGvaMotionDetect *self, G
if (!stable.empty())
gst_gva_motion_detect_attach_rois(self, buf, stable, width, height);
}

static gboolean plugin_init(GstPlugin *plugin) {
return gst_element_register(plugin, "gvamotiondetect", GST_RANK_NONE, GST_TYPE_GVA_MOTION_DETECT);
}

GST_PLUGIN_DEFINE(GST_VERSION_MAJOR, GST_VERSION_MINOR, gvamotiondetect, PRODUCT_FULL_NAME " gvamotiondetect element",
plugin_init, PLUGIN_VERSION, PLUGIN_LICENSE, PACKAGE_NAME, GST_PACKAGE_ORIGIN)
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
/*******************************************************************************
* Copyright (C) 2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
******************************************************************************/

/*******************************************************************************
* Copyright (C) 2025 Intel Corporation
* Copyright (C) 2025-2026 Intel Corporation
*
* SPDX-License-Identifier: MIT
******************************************************************************/
Expand Down Expand Up @@ -573,10 +567,3 @@ static void gst_gva_motion_detect_init(GstGvaMotionDetect *self) {
self->frame_index = 0;
g_mutex_init(&self->meta_mutex);
}

static gboolean plugin_init(GstPlugin *plugin) {
return gst_element_register(plugin, "gvamotiondetect", GST_RANK_NONE, GST_TYPE_GVA_MOTION_DETECT);
}

GST_PLUGIN_DEFINE(GST_VERSION_MAJOR, GST_VERSION_MINOR, gvamotiondetect, PRODUCT_FULL_NAME " gvamotiondetect element",
plugin_init, PLUGIN_VERSION, PLUGIN_LICENSE, PACKAGE_NAME, GST_PACKAGE_ORIGIN)
1 change: 1 addition & 0 deletions src/monolithic/gst/registrator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../elements/gvatrack/
${CMAKE_CURRENT_SOURCE_DIR}/../elements/gvawatermark/
${CMAKE_CURRENT_SOURCE_DIR}/../elements/gvawatermark3d/
${CMAKE_CURRENT_SOURCE_DIR}/../elements/gvamotiondetect/
${CMAKE_CURRENT_SOURCE_DIR}/../elements/gvadeskew/
)

Expand Down
3 changes: 3 additions & 0 deletions src/monolithic/gst/registrator/register_elements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "gstgvatrack.h"
#include "gstgvawatermarkimpl.h"
#include "gvadeskew.h"
#include "gvamotiondetect.h"
#include "gvawatermark.h"
#include "gvawatermark3d.h"
#include "inference_backend/logger.h"
Expand Down Expand Up @@ -67,6 +68,8 @@ static gboolean plugin_init(GstPlugin *plugin) {
return FALSE;
if (!gst_element_register(plugin, "gvawatermark3d", GST_RANK_NONE, GST_TYPE_GVAWATERMARK3D))
return FALSE;
if (!gst_element_register(plugin, "gvamotiondetect", GST_RANK_NONE, GST_TYPE_GVA_MOTION_DETECT))
return FALSE;
#if _MSC_VER
if (!gst_element_register(plugin, "gvametapublish", GST_RANK_NONE, GST_TYPE_GVA_META_PUBLISH))
return FALSE;
Expand Down
Loading