diff --git a/src/interface/x.h b/src/interface/x.h index 8be266d..5912144 100644 --- a/src/interface/x.h +++ b/src/interface/x.h @@ -1,10 +1,12 @@ #ifndef _X_H_ #define _X_H_ -#ifdef DLL_EXPORTS +#if defined(_MSC_VER) #define DLLAPI __declspec(dllexport) +#elif defined(__GNUC__) +#define DLLAPI __attribute__((visibility("default"))) #else -#define DLLAPI __declspec(dllimport) +#define DLLAPI #endif #include diff --git a/src/media/video/decode/ffmpeg/ffmpeg_video_decoder.cpp b/src/media/video/decode/ffmpeg/ffmpeg_video_decoder.cpp index 7417544..a5be277 100644 --- a/src/media/video/decode/ffmpeg/ffmpeg_video_decoder.cpp +++ b/src/media/video/decode/ffmpeg/ffmpeg_video_decoder.cpp @@ -47,7 +47,7 @@ FfmpegVideoDecoder::~FfmpegVideoDecoder() { } int FfmpegVideoDecoder::Init() { - av_log_set_level(AV_LOG_ERROR); + av_log_set_level(AV_LOG_QUIET); codec_id_ = AV_CODEC_ID_H264; codec_ = avcodec_find_decoder(codec_id_); diff --git a/thirdparty/ffmpeg/xmake.lua b/thirdparty/ffmpeg/xmake.lua index 3e90c88..b775580 100644 --- a/thirdparty/ffmpeg/xmake.lua +++ b/thirdparty/ffmpeg/xmake.lua @@ -2,7 +2,7 @@ package("ffmpeg") set_homepage("https://www.ffmpeg.org") set_description("A collection of libraries to process multimedia content such as audio, video, subtitles and related metadata.") - set_license("GPL-3.0") + set_license("LGPL-3.0") if is_plat("windows", "mingw") then add_urls("https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-$(version)-full_build-shared.7z") diff --git a/xmake.lua b/xmake.lua index 061e030..89f3824 100644 --- a/xmake.lua +++ b/xmake.lua @@ -36,7 +36,7 @@ elseif is_os("macosx") then add_requires("brew::libnice", "brew::glib") add_requires("brew::openh264", {configs = {shared = false}}) add_packages("ffmpeg", "glib", "libnice") - add_ldflags("-ld_classic", {force = true}) + add_ldflags("-Wl,-ld_classic") end target("log")