diff --git a/plugins/obs-ffmpeg/ffmpeg-mux/CMakeLists.txt b/plugins/obs-ffmpeg/ffmpeg-mux/CMakeLists.txt index 8c564d8d1..c464b8e5f 100644 --- a/plugins/obs-ffmpeg/ffmpeg-mux/CMakeLists.txt +++ b/plugins/obs-ffmpeg/ffmpeg-mux/CMakeLists.txt @@ -1,26 +1,20 @@ -project(ffmpeg-mux) +project(obs-ffmpeg-mux) find_package(FFmpeg REQUIRED COMPONENTS avcodec avutil avformat) include_directories(${FFMPEG_INCLUDE_DIRS}) -set(ffmpeg-mux_SOURCES +set(obs-ffmpeg-mux_SOURCES ffmpeg-mux.c) -set(ffmpeg-mux_HEADERS +set(obs-ffmpeg-mux_HEADERS ffmpeg-mux.h) -add_executable(ffmpeg-mux - ${ffmpeg-mux_SOURCES} - ${ffmpeg-mux_HEADERS}) +add_executable(obs-ffmpeg-mux + ${obs-ffmpeg-mux_SOURCES} + ${obs-ffmpeg-mux_HEADERS}) -target_link_libraries(ffmpeg-mux +target_link_libraries(obs-ffmpeg-mux ${FFMPEG_LIBRARIES}) -if(WIN32) - set_target_properties(ffmpeg-mux - PROPERTIES - OUTPUT_NAME "ffmpeg-mux${_output_suffix}") -endif() - -install_obs_datatarget(ffmpeg-mux "obs-plugins/obs-ffmpeg") +install_obs_core(obs-ffmpeg-mux) diff --git a/plugins/obs-ffmpeg/obs-ffmpeg-mux.c b/plugins/obs-ffmpeg/obs-ffmpeg-mux.c index 466fa1a37..f059ce52a 100644 --- a/plugins/obs-ffmpeg/obs-ffmpeg-mux.c +++ b/plugins/obs-ffmpeg/obs-ffmpeg-mux.c @@ -113,13 +113,9 @@ static void *ffmpeg_mux_create(obs_data_t *settings, obs_output_t *output) } #ifdef _WIN32 -#ifdef _WIN64 -#define FFMPEG_MUX "ffmpeg-mux64.exe" +#define FFMPEG_MUX "obs-ffmpeg-mux.exe" #else -#define FFMPEG_MUX "ffmpeg-mux32.exe" -#endif -#else -#define FFMPEG_MUX "ffmpeg-mux" +#define FFMPEG_MUX "obs-ffmpeg-mux" #endif static inline bool capturing(struct ffmpeg_muxer *stream) @@ -241,7 +237,7 @@ static void build_command_line(struct ffmpeg_muxer *stream, struct dstr *cmd, num_tracks++; } - dstr_init_move_array(cmd, obs_module_file(FFMPEG_MUX)); + dstr_init_move_array(cmd, os_get_executable_path_ptr(FFMPEG_MUX)); dstr_insert_ch(cmd, 0, '\"'); dstr_cat(cmd, "\" \"");