From: Stephen Seo Date: Mon, 29 Nov 2021 10:24:50 +0000 (+0900) Subject: WIP Fix includes and linking with libav/ffmpeg X-Git-Url: https://git.seodisparate.com/stephenseo/static/gitweb.css?a=commitdiff_plain;h=6677fba89c11723f2b50b3098a13d553db060b40;p=EN605.617.81.FA21_StephenSeo_DitheringProject WIP Fix includes and linking with libav/ffmpeg --- diff --git a/CMakeLists.txt b/CMakeLists.txt index f995bb5..1518449 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ project(EN605.617.81.FA21_StephenSeo_DitheringProject) set(Project_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/main.cc ${CMAKE_CURRENT_SOURCE_DIR}/src/image.cc + ${CMAKE_CURRENT_SOURCE_DIR}/src/video.cc ${CMAKE_CURRENT_SOURCE_DIR}/src/opencl_handle.cc ) @@ -25,7 +26,7 @@ find_package(OpenCL REQUIRED) find_package(PNG REQUIRED) find_package(PkgConfig REQUIRED) -pkg_check_modules(FFMPEG_LIBAVCODEC REQUIRED libavcodec) +pkg_check_modules(FFMPEG_LIBAVCODEC REQUIRED libavcodec libavformat libavutil) target_include_directories(DitheringProject PUBLIC ${OpenCL_INCLUDE_DIRS} diff --git a/src/video.cc b/src/video.cc index fcac248..ac86500 100644 --- a/src/video.cc +++ b/src/video.cc @@ -4,9 +4,9 @@ #include #include -#include -#include +extern "C" { #include +} Video::Video(const char *video_filename) : Video(std::string(video_filename)) {} diff --git a/src/video.h b/src/video.h index 7e0e283..ac0af82 100644 --- a/src/video.h +++ b/src/video.h @@ -1,7 +1,9 @@ #ifndef IGPUP_DITHERING_PROJECT_VIDEO_H_ #define IGPUP_DITHERING_PROJECT_VIDEO_H_ +extern "C" { #include +} #include "image.h"