Skip to content

Commit

Permalink
included and use the VideoCapture library from another GitHub project
Browse files Browse the repository at this point in the history
  • Loading branch information
olibartfast committed Jul 3, 2024
1 parent 9c84302 commit ece715d
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 403 deletions.
27 changes: 16 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ find_package(spdlog REQUIRED)

message(STATUS "Home path: $ENV{HOME}")

# Define an option to enable or disable GStreamer support
unset(USE_GSTREAMER CACHE)
option(USE_GSTREAMER "Use GStreamer for video capture (optional)" OFF)

# Define the default backend if not set from the command line
if(NOT DEFINED DEFAULT_BACKEND)
Expand All @@ -30,25 +27,33 @@ endif()

message(STATUS "Default backend: ${DEFAULT_BACKEND}")

# Fetch the VideoCapture project from GitHub
include(FetchContent)
FetchContent_Declare(
VideoCaptureLib
GIT_REPOSITORY https://github.com/olibartfast/VideoCapture.git
GIT_TAG master # or the specific tag/branch you want to use
)

FetchContent_MakeAvailable(VideoCaptureLib)


message(STATUS "VideoCaptureLib_SOURCE_DIR module path: ${VideoCaptureLib_SOURCE_DIR}")

set(DETECTORS_ROOT ${CMAKE_CURRENT_LIST_DIR}/components/detectors)
set(INFER_ROOT ${CMAKE_CURRENT_LIST_DIR}/components/inference-engines)
set(VIDEO_ROOT ${CMAKE_CURRENT_LIST_DIR}/components/videocapture)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
message(STATUS "Cmake module path: ${CMAKE_MODULE_PATH}")

# Add subdirectories
add_subdirectory(${DETECTORS_ROOT})
add_subdirectory(${INFER_ROOT})
add_subdirectory(${VIDEO_ROOT})

# Main executable
set(SOURCES main.cpp)

# Include GStreamer-related settings and source files if USE_GSTREAMER is ON
if (USE_GSTREAMER)
include(GStreamer)
endif()


include(SelectBackend)

Expand All @@ -59,9 +64,9 @@ target_include_directories(${PROJECT_NAME} PRIVATE
inc
${OpenCV_INCLUDE_DIRS}
${spdlog_INCLUDE_DIRS}
${VideoCaptureLib_SOURCE_DIR}/include
${VideoCaptureLib_SOURCE_DIR}/src
components/inference-engines/src
components/videocapture/src
components/videocapture/include
components/detectors/src
)

Expand Down
21 changes: 0 additions & 21 deletions cmake/GStreamer.cmake

This file was deleted.

32 changes: 0 additions & 32 deletions components/videocapture/CMakeLists.txt

This file was deleted.

16 changes: 0 additions & 16 deletions components/videocapture/include/VideoCaptureFactory.hpp

This file was deleted.

48 changes: 0 additions & 48 deletions components/videocapture/src/GStreamerCapture.hpp

This file was deleted.

168 changes: 0 additions & 168 deletions components/videocapture/src/GStreamerOpenCV.cpp

This file was deleted.

Loading

0 comments on commit ece715d

Please sign in to comment.