Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,33 @@
"cacheVariables": {
"BUILD_TESTING": "OFF",
"SWIG_PYTHON": "OFF",
"MOD_AVFORMAT": "OFF",
"MOD_AVFORMAT": "ON",
"MOD_DECKLINK": "OFF",
"MOD_FREI0R": "OFF",
"MOD_GDK": "OFF",
"MOD_GDK": "ON",
"MOD_JACKRACK": "OFF",
"USE_LV2": "OFF",
"USE_VST2": "OFF",
"MOD_KDENLIVE": "OFF",
"MOD_KDENLIVE": "ON",
"MOD_NDI": "OFF",
"MOD_NORMALIZE": "OFF",
"MOD_OLDFILM": "OFF",
"MOD_NORMALIZE": "ON",
"MOD_OLDFILM": "ON",
"MOD_OPENCV": "OFF",
"MOD_MOVIT": "OFF",
"MOD_PLUS": "OFF",
"MOD_PLUS": "ON",
"MOD_PLUSGPL": "OFF",
"MOD_QT6": "OFF",
"MOD_QT6": "ON",
"MOD_SOX": "OFF",
"MOD_GLAXNIMATE_QT6": "OFF",
"MOD_RESAMPLE": "OFF",
"MOD_RTAUDIO": "OFF",
"MOD_RUBBERBAND": "OFF",
"MOD_RUBBERBAND": "ON",
"MOD_SDL2": "ON",
"MOD_DOX": "OFF",
"MOD_VIDSTAB": "OFF",
"MOD_VORBIS": "OFF",
"MOD_VORBIS": "ON",
"MOD_XINE": "OFF",
"MOD_XML": "OFF"
"MOD_XML": "ON"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/modules/avformat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ target_link_libraries(mltavformat PRIVATE
)

if(MSVC)
target_link_libraries(mltavformat PRIVATE PThreads4W::PThreads4W)
target_link_libraries(mltavformat PRIVATE PThreads4W::PThreads4W msvccompat)
else()
target_link_libraries(mltavformat PRIVATE m)
endif()
Expand Down
7 changes: 6 additions & 1 deletion src/modules/avformat/consumer_avformat.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <time.h>

#ifdef _MSC_VER
#include <gettimeofday.h>
#else
#include <sys/time.h>
#include <unistd.h>
#endif

// avformat header files
#include <libavcodec/avcodec.h>
Expand Down Expand Up @@ -675,7 +680,7 @@
{
int sample_fmt = AV_SAMPLE_FMT_S16;
const char *format = mlt_properties_get(properties, "mlt_audio_format");
const int *p = codec->sample_fmts;

Check warning on line 683 in src/modules/avformat/consumer_avformat.c

View workflow job for this annotation

GitHub Actions / build-cmake-msvc

'initializing': incompatible types - from 'const AVSampleFormat *const ' to 'const int *'

Check warning on line 683 in src/modules/avformat/consumer_avformat.c

View workflow job for this annotation

GitHub Actions / build-cmake-msvc

'initializing': incompatible types - from 'const AVSampleFormat *const ' to 'const int *'
const char *sample_fmt_str = mlt_properties_get(properties, "sample_fmt");

if (sample_fmt_str)
Expand All @@ -700,7 +705,7 @@
return sample_fmt;
}
// no match - pick first one we support
for (p = codec->sample_fmts; *p != -1; p++) {

Check warning on line 708 in src/modules/avformat/consumer_avformat.c

View workflow job for this annotation

GitHub Actions / build-cmake-msvc

'=': incompatible types - from 'const AVSampleFormat *const ' to 'const int *'

Check warning on line 708 in src/modules/avformat/consumer_avformat.c

View workflow job for this annotation

GitHub Actions / build-cmake-msvc

'=': incompatible types - from 'const AVSampleFormat *const ' to 'const int *'
switch (*p) {
case AV_SAMPLE_FMT_U8:
case AV_SAMPLE_FMT_S16:
Expand Down Expand Up @@ -2723,7 +2728,7 @@
remove(mlt_properties_get(properties, "_logfilename"));

// Remove the x264 dual pass logs
char *cwd = getcwd(NULL, 0);

Check warning on line 2731 in src/modules/avformat/consumer_avformat.c

View workflow job for this annotation

GitHub Actions / build-cmake-msvc

'initializing': 'char *' differs in levels of indirection from 'int'

Check warning on line 2731 in src/modules/avformat/consumer_avformat.c

View workflow job for this annotation

GitHub Actions / build-cmake-msvc

'initializing': 'char *' differs in levels of indirection from 'int'
const char *file = "x264_2pass.log";
char *full = malloc(strlen(cwd) + strlen(file) + 2);
sprintf(full, "%s/%s", cwd, file);
Expand Down
4 changes: 3 additions & 1 deletion src/modules/gdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ target_compile_options(mltgdk PRIVATE ${MLT_COMPILE_OPTIONS})
target_include_directories(mltgdk PRIVATE ${CMAKE_CURRENT_BINARY_DIR})

target_link_libraries(mltgdk PRIVATE mlt Threads::Threads PkgConfig::GdkPixbuf)
if(NOT MSVC)
if(MSVC)
target_link_libraries(mltgdk PRIVATE PThreads4W::PThreads4W)
else()
target_link_libraries(mltgdk PRIVATE m)
endif()

Expand Down
12 changes: 12 additions & 0 deletions src/modules/gdk/producer_pixbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,19 @@
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>

#ifndef _MSC_VER
#include <unistd.h>
#endif

#ifndef ssize_t
#ifdef _WIN32
#include <BaseTsd.h>
#define ssize_t SSIZE_T
#else
#define ssize_t ptrdiff_t
#endif
#endif

// this protects concurrent access to gdk_pixbuf
static pthread_mutex_t g_mutex = PTHREAD_MUTEX_INITIALIZER;
Expand Down
4 changes: 3 additions & 1 deletion src/modules/kdenlive/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ generate_export_header(mltkdenlive)
target_compile_options(mltkdenlive PRIVATE ${MLT_COMPILE_OPTIONS})
target_include_directories(mltkdenlive PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(mltkdenlive PRIVATE mlt)
if(NOT MSVC)
if(MSVC)
target_link_libraries(mltkdenlive PRIVATE PThreads4W::PThreads4W)
else()
target_link_libraries(mltkdenlive PRIVATE m)
endif()

Expand Down
3 changes: 3 additions & 0 deletions src/modules/kdenlive/producer_framebuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#ifndef _MSC_VER
#include <sys/time.h>
#endif

// Forward references.
static int producer_get_frame(mlt_producer producer, mlt_frame_ptr frame, int index);
Expand Down
4 changes: 3 additions & 1 deletion src/modules/normalize/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ generate_export_header(mltnormalize)
target_compile_options(mltnormalize PRIVATE ${MLT_COMPILE_OPTIONS})
target_include_directories(mltnormalize PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(mltnormalize PRIVATE mlt)
if(NOT MSVC)
if(MSVC)
target_link_libraries(mltnormalize PRIVATE PThreads4W::PThreads4W)
else()
target_link_libraries(mltnormalize PRIVATE m)
endif()

Expand Down
4 changes: 3 additions & 1 deletion src/modules/oldfilm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ generate_export_header(mltoldfilm)
target_compile_options(mltoldfilm PRIVATE ${MLT_COMPILE_OPTIONS})
target_include_directories(mltoldfilm PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(mltoldfilm PRIVATE mlt)
if(NOT MSVC)
if(MSVC)
target_link_libraries(mltoldfilm PRIVATE PThreads4W::PThreads4W)
else()
target_link_libraries(mltoldfilm PRIVATE m)
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/modules/plus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ target_compile_options(mltplus PRIVATE ${MLT_COMPILE_OPTIONS})
target_include_directories(mltplus PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(mltplus PRIVATE mlt Threads::Threads)
if(MSVC)
target_link_libraries(mltplus PRIVATE msvccompat)
target_link_libraries(mltplus PRIVATE PThreads4W::PThreads4W msvccompat)
else()
target_link_libraries(mltplus PRIVATE m)
endif()
Expand Down
5 changes: 4 additions & 1 deletion src/modules/plus/filter_dynamictext.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
#include <sys/stat.h> // for stat()
#include <sys/types.h> // for stat()
#include <time.h> // for strftime() and gtime()
#include <unistd.h> // for stat()

#ifndef _MSC_VER
#include <unistd.h>
#endif

#define MAX_TEXT_LEN 512

Expand Down
3 changes: 3 additions & 0 deletions src/modules/qt/producer_qimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>

#ifndef _MSC_VER
#include <unistd.h>
#endif

static void load_filenames(producer_qimage self, mlt_properties producer_properties);
static int producer_get_frame(mlt_producer parent, mlt_frame_ptr frame, int index);
Expand Down
3 changes: 3 additions & 0 deletions src/modules/qt/qimage_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
#include <cmath>
#include <sys/stat.h>
#include <sys/types.h>

#ifndef _MSC_VER
#include <unistd.h>
#endif

extern "C" {

Expand Down
3 changes: 3 additions & 0 deletions src/modules/xml/consumer_xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#ifndef _MSC_VER
#include <unistd.h>
#endif

#define ID_SIZE 128
#define TIME_PROPERTY "_consumer_xml"
Expand Down Expand Up @@ -970,7 +973,7 @@
// Specify roots in other cases...
if (resource != NULL && mlt_properties_get(properties, "root") == NULL) {
// Get the current working directory
char *cwd = getcwd(NULL, 0);

Check warning on line 976 in src/modules/xml/consumer_xml.c

View workflow job for this annotation

GitHub Actions / build-cmake-msvc

'initializing': 'char *' differs in levels of indirection from 'int'

Check warning on line 976 in src/modules/xml/consumer_xml.c

View workflow job for this annotation

GitHub Actions / build-cmake-msvc

'initializing': 'char *' differs in levels of indirection from 'int'
mlt_properties_set(MLT_SERVICE_PROPERTIES(service), "root", cwd);
free(cwd);
}
Expand Down
3 changes: 3 additions & 0 deletions src/modules/xml/producer_xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
#include <framework/mlt_log.h>
#include <stdlib.h>
#include <string.h>

#ifndef _MSC_VER
#include <unistd.h>
#endif

#include <libxml/parser.h>
#include <libxml/parserInternals.h> // for xmlCreateFileParserCtxt
Expand Down Expand Up @@ -2038,7 +2041,7 @@

// If we don't have an absolute path here, we're heading for disaster...
if (root[0] != '/' && !strchr(root, ':')) {
char *cwd = getcwd(NULL, 0);

Check warning on line 2044 in src/modules/xml/producer_xml.c

View workflow job for this annotation

GitHub Actions / build-cmake-msvc

'initializing': 'char *' differs in levels of indirection from 'int'

Check warning on line 2044 in src/modules/xml/producer_xml.c

View workflow job for this annotation

GitHub Actions / build-cmake-msvc

'initializing': 'char *' differs in levels of indirection from 'int'
char *real = malloc(strlen(cwd) + strlen(root) + 2);
sprintf(real, "%s/%s", cwd, root);
mlt_properties_set_string(context->producer_map, "root", real);
Expand Down
10 changes: 9 additions & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
"libiconv",
"pkgconf",
"pthreads",
"sdl2"
"sdl2",
"ffmpeg",
"qtbase",
"qtsvg",
"libxml2",
"libebur128",
"gdk-pixbuf",
"rubberband",
"libvorbis"
]
}
Loading