Skip to content

Commit 3600d13

Browse files
committed
port usb_cam patch from jazzy
1 parent dc2a1d4 commit 3600d13

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

patch/ros-humble-usb-cam.patch

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 6c7abf3..3737f94 100644
2+
index 2387c32..0413704 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
5-
@@ -15,8 +15,8 @@ ament_auto_find_build_dependencies()
5+
@@ -8,7 +8,7 @@ endif()
66

7-
## pkg-config libraries
8-
find_package(PkgConfig REQUIRED)
9-
-pkg_check_modules(avcodec libavcodec REQUIRED)
10-
-pkg_check_modules(swscale libswscale REQUIRED)
11-
+pkg_search_module(avcodec libavcodec REQUIRED)
12-
+pkg_search_module(swscale libswscale REQUIRED)
7+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
8+
if($ENV{ROS_VERSION} EQUAL 2)
9+
- add_compile_options(-Wall -Wextra -Wpedantic -Werror)
10+
+ add_compile_options(-Wall -Wextra -Wpedantic)
11+
endif()
12+
endif()
1313

14-
include_directories(include
15-
${avcodec_INCLUDE_DIRS}
16-
@@ -35,8 +35,8 @@ ament_auto_add_library(${PROJECT_NAME}_node SHARED
14+
diff --git a/include/usb_cam/formats/av_pixel_format_helper.hpp b/include/usb_cam/formats/av_pixel_format_helper.hpp
15+
index ad1792e..1ea720d 100644
16+
--- a/include/usb_cam/formats/av_pixel_format_helper.hpp
17+
+++ b/include/usb_cam/formats/av_pixel_format_helper.hpp
18+
@@ -744,11 +744,6 @@ const std::unordered_map<std::string, AVPixelFormat> STR_2_AVPIXFMT = {
19+
///< big-endian
1720

18-
target_link_libraries(${PROJECT_NAME}_node
19-
${PROJECT_NAME}
20-
- ${avcodec_LIBRARIES}
21-
- ${swscale_LIBRARIES}
22-
+ ${avcodec_LINK_LIBRARIES}
23-
+ ${swscale_LINK_LIBRARIES}
24-
# TODO(lucasw) should this have been in libavcodec?
25-
#avutil
26-
)
21+
22+
- {stringify(AV_PIX_FMT_XVMC), AV_PIX_FMT_XVMC}, ///< XVideo Motion
23+
- ///< Acceleration via common
24+
- ///< packet passing
25+
-
26+
-
27+
{stringify(AV_PIX_FMT_YUV440P10LE), AV_PIX_FMT_YUV440P10LE}, ///< planar YUV 4:4:0,20bpp,
28+
///< (1 Cr & Cb sample per
29+
///< 1x2 Y samples),

0 commit comments

Comments
 (0)