Fix api export define error

This commit is contained in:
dijunkun
2023-11-29 22:02:45 -08:00
parent 3a1be00ca5
commit 079ceddae7
4 changed files with 7 additions and 5 deletions

View File

@@ -1,10 +1,12 @@
#ifndef _X_H_ #ifndef _X_H_
#define _X_H_ #define _X_H_
#ifdef DLL_EXPORTS #if defined(_MSC_VER)
#define DLLAPI __declspec(dllexport) #define DLLAPI __declspec(dllexport)
#elif defined(__GNUC__)
#define DLLAPI __attribute__((visibility("default")))
#else #else
#define DLLAPI __declspec(dllimport) #define DLLAPI
#endif #endif
#include <stdint.h> #include <stdint.h>

View File

@@ -47,7 +47,7 @@ FfmpegVideoDecoder::~FfmpegVideoDecoder() {
} }
int FfmpegVideoDecoder::Init() { int FfmpegVideoDecoder::Init() {
av_log_set_level(AV_LOG_ERROR); av_log_set_level(AV_LOG_QUIET);
codec_id_ = AV_CODEC_ID_H264; codec_id_ = AV_CODEC_ID_H264;
codec_ = avcodec_find_decoder(codec_id_); codec_ = avcodec_find_decoder(codec_id_);

View File

@@ -2,7 +2,7 @@ package("ffmpeg")
set_homepage("https://www.ffmpeg.org") 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_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 if is_plat("windows", "mingw") then
add_urls("https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-$(version)-full_build-shared.7z") add_urls("https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-$(version)-full_build-shared.7z")

View File

@@ -36,7 +36,7 @@ elseif is_os("macosx") then
add_requires("brew::libnice", "brew::glib") add_requires("brew::libnice", "brew::glib")
add_requires("brew::openh264", {configs = {shared = false}}) add_requires("brew::openh264", {configs = {shared = false}})
add_packages("ffmpeg", "glib", "libnice") add_packages("ffmpeg", "glib", "libnice")
add_ldflags("-ld_classic", {force = true}) add_ldflags("-Wl,-ld_classic")
end end
target("log") target("log")