Updated cmake files for ffmpeg plugin
Also, fixed an enum name issue. No clue why visual studio actually compiled that without warnings/errors
This commit is contained in:
@@ -4,5 +4,5 @@ if(WIN32)
|
||||
add_subdirectory(dshow)
|
||||
endif()
|
||||
|
||||
#add_subdirectory(obs-ffmpeg)
|
||||
add_subdirectory(obs-ffmpeg)
|
||||
add_subdirectory(obs-outputs)
|
||||
|
@@ -1,5 +1,13 @@
|
||||
project(obs-ffmpeg)
|
||||
|
||||
find_package(Libavcodec REQUIRED)
|
||||
include_directories(${Libavcodec_INCLUDE_DIR})
|
||||
add_definitions(${Libavcodec_DEFINITIONS})
|
||||
|
||||
find_package(Libswscale REQUIRED)
|
||||
include_directories(${Libswscale_INCLUDE_DIR})
|
||||
add_definitions(${Libswscale_DEFINITIONS})
|
||||
|
||||
find_package(Libavformat REQUIRED)
|
||||
include_directories(${Libavformat_INCLUDE_DIR})
|
||||
add_definitions(${Libavformat_DEFINITIONS})
|
||||
@@ -20,10 +28,14 @@ add_library(obs-ffmpeg MODULE
|
||||
${obs-ffmpeg_HEADERS})
|
||||
target_link_libraries(obs-ffmpeg
|
||||
libobs
|
||||
${Libavcodec_LIBRARIES}
|
||||
${Libswscale_LIBRARIES}
|
||||
${Libavformat_LIBRARIES}
|
||||
${Libswresample_LIBRARIES})
|
||||
|
||||
install_obs_plugin(obs-ffmpeg)
|
||||
|
||||
obs_fixup_install_target(obs-ffmpeg PATH ${Libavcodec_LIBRARIES})
|
||||
obs_fixup_install_target(obs-ffmpeg PATH ${Libswscale_LIBRARIES})
|
||||
obs_fixup_install_target(obs-ffmpeg PATH ${Libavformat_LIBRARIES})
|
||||
obs_fixup_install_target(obs-ffmpeg PATH ${Libswresample_LIBRARIES})
|
||||
|
@@ -44,7 +44,7 @@ static inline enum AVPixelFormat obs_to_ffmpeg_video_format(
|
||||
}
|
||||
|
||||
static bool new_stream(struct ffmpeg_data *data, AVStream **stream,
|
||||
AVCodec **codec, enum AVCoecID id)
|
||||
AVCodec **codec, enum AVCodecID id)
|
||||
{
|
||||
*codec = avcodec_find_encoder(id);
|
||||
if (!*codec) {
|
||||
|
Reference in New Issue
Block a user