WIP Fix includes and linking with libav/ffmpeg

This commit is contained in:
Stephen Seo 2021-11-29 19:24:50 +09:00
parent cfdd411b99
commit 6677fba89c
3 changed files with 6 additions and 3 deletions

View file

@ -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}

View file

@ -4,9 +4,9 @@
#include <fstream>
#include <iostream>
#include <libavcodec/avcodec.h>
#include <libavcodec/packet.h>
extern "C" {
#include <libavformat/avformat.h>
}
Video::Video(const char *video_filename) : Video(std::string(video_filename)) {}

View file

@ -1,7 +1,9 @@
#ifndef IGPUP_DITHERING_PROJECT_VIDEO_H_
#define IGPUP_DITHERING_PROJECT_VIDEO_H_
extern "C" {
#include <libavcodec/avcodec.h>
}
#include "image.h"