Skip to content

Instantly share code, notes, and snippets.

@Ewoodss
Created June 18, 2024 08:30
Show Gist options
  • Select an option

  • Save Ewoodss/b48eaa7329e0417e5b8af53ec4de7419 to your computer and use it in GitHub Desktop.

Select an option

Save Ewoodss/b48eaa7329e0417e5b8af53ec4de7419 to your computer and use it in GitHub Desktop.

Revisions

  1. Ewoodss created this gist Jun 18, 2024.
    22 changes: 22 additions & 0 deletions jetson-ffmpeg.patch
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index 64abbfc..6af2fca 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -18,7 +18,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-value -fPIC")
    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath-link=/usr/lib/aarch64-linux-gnu/tegra")
    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath-link=/usr/local/cuda/lib64")

    -find_library(LIB_NVBUF nvbuf_utils PATHS /usr/lib/aarch64-linux-gnu/tegra)
    +#find_library(LIB_NVBUF nvbuf_utils PATHS /usr/lib/aarch64-linux-gnu/tegra)
    find_library(LIB_V4L2 nvv4l2 PATHS /usr/lib/aarch64-linux-gnu/tegra)
    find_library(LIB_NVJPEG nvjpeg PATHS /usr/lib/aarch64-linux-gnu/tegra)
    find_package (Threads)
    @@ -47,7 +47,7 @@ set(NVMPI_SRC
    ${JETSON_MULTIMEDIA_API_SRC_DIR}/NvVideoDecoder.cpp
    ${JETSON_MULTIMEDIA_API_SRC_DIR}/NvVideoEncoder.cpp)

    -set(NVMPI_DEP_LIBS ${CMAKE_THREAD_LIBS_INIT} ${LIB_NVBUF} ${LIB_V4L2} ${LIB_NVJPEG})
    +set(NVMPI_DEP_LIBS ${CMAKE_THREAD_LIBS_INIT} ${LIB_V4L2} ${LIB_NVJPEG})

    #if NvUtils API is present prefer it to nvbuf_utils
    if(EXISTS "/usr/src/jetson_multimedia_api/include/nvbufsurface.h")