Commit b0e768db authored by Ghislain MARY's avatar Ghislain MARY

Fix compilation with CMake on Windows.

parent 8009a744
......@@ -68,7 +68,7 @@ time_t ms_time (time_t *t);
#endif
#ifdef DEBUG
static inline void ms_debug(const char *fmt,...)
static MS2_INLINE void ms_debug(const char *fmt,...)
{
va_list args;
va_start (args, fmt);
......
......@@ -441,7 +441,7 @@ MS2_PUBLIC bool_t ms_filter_has_method(MSFilter *f, unsigned int id);
*
* Returns TRUE if interface is implemented, FALSE, otherwise.
**/
bool_t ms_filter_implements_interface(MSFilter *f, MSFilterInterfaceId id);
MS2_PUBLIC bool_t ms_filter_implements_interface(MSFilter *f, MSFilterInterfaceId id);
/**
* Set a callback on filter's to be informed of private filter's event.
......
......@@ -120,6 +120,9 @@ if(WIN32)
-DWINDOW_NATIVE
/FIgitversion.h
)
if(MSVC)
add_definitions(-Dinline=__inline)
endif()
set(BASE_LIBS ws2_32 ole32 oleaut32 winmm uuid)
endif(WIN32)
list(APPEND BASE_LIBS
......
......@@ -313,7 +313,7 @@ int ms_load_plugins(const char *dir){
WIN32_FIND_DATA FileData;
HANDLE hSearch;
char szDirPath[1024];
#ifdef UNICODE
#if defined(WINAPI_FAMILY_PHONE_APP) && defined(UNICODE)
wchar_t wszDirPath[1024];
#endif
char szPluginFile[1024];
......@@ -378,7 +378,7 @@ int ms_load_plugins(const char *dir){
char szPluginName[256];
char szMethodName[256];
char *minus;
#ifdef UNICODE
#if defined(WINAPI_FAMILY_PHONE_APP) && defined(UNICODE)
snprintf(szPluginName, sizeof(szPluginName), "%s", filename);
#else
snprintf(szPluginName, sizeof(szPluginName), "%s", FileData.cFileName);
......
......@@ -177,7 +177,7 @@ mblk_t *ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){
uint8_t *jpgbuf;
DWORD err;
HANDLE fd;
#if defined(UNICODE) || WINAPI_FAMILY_PHONE_APP
#if defined(UNICODE) && defined(WINAPI_FAMILY_PHONE_APP)
WCHAR wUnicode[1024];
MultiByteToWideChar(CP_UTF8, 0, jpgpath, -1, wUnicode, 1024);
fd = CreateFile2(wUnicode, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, NULL);
......@@ -191,7 +191,7 @@ mblk_t *ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){
}
st_sizel=0;
st_sizeh=0;
#if defined(UNICODE) || WINAPI_FAMILY_PHONE_APP
#if defined(UNICODE) && defined(WINAPI_FAMILY_PHONE_APP)
{
WIN32_FILE_ATTRIBUTE_DATA attr_data;
GetFileAttributesEx(wUnicode, GetFileExInfoStandard, &attr_data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment