-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plugins: Move AMF encoders from obs-ffmpeg as a separate plugin
- Loading branch information
Showing
12 changed files
with
81 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
cmake_minimum_required(VERSION 3.28...3.30) | ||
|
||
option(ENABLE_AMF "Build AMD Radeon Hardware Encoder Plugin" ON) | ||
|
||
if(NOT ENABLE_AMF) | ||
target_disable_feature(obs-amf "AMD Radeon Hardware Encoder") | ||
target_disable(obs-amf) | ||
return() | ||
endif() | ||
|
||
if(NOT TARGET OBS::opts-parser) | ||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/opts-parser" "${CMAKE_BINARY_DIR}/shared/opts-parser") | ||
endif() | ||
|
||
find_package(AMF 1.4.29 REQUIRED) | ||
|
||
add_library(obs-amf MODULE) | ||
add_library(OBS::amf ALIAS obs-amf) | ||
|
||
add_subdirectory(obs-amf-test) | ||
|
||
target_sources(obs-amf PRIVATE obs-amf.c texture-amf-opts.hpp texture-amf.cpp) | ||
|
||
target_link_libraries(obs-amf PRIVATE OBS::libobs OBS::opts-parser AMF::AMF) | ||
|
||
if(OS_WINDOWS) | ||
configure_file(cmake/windows/obs-module.rc.in obs-amf.rc) | ||
target_sources(obs-amf PRIVATE obs-amf.rc) | ||
endif() | ||
|
||
set_target_properties_obs(obs-amf PROPERTIES FOLDER plugins/obs-amf PREFIX "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
1 VERSIONINFO | ||
FILEVERSION ${OBS_VERSION_MAJOR},${OBS_VERSION_MINOR},${OBS_VERSION_PATCH},0 | ||
BEGIN | ||
BLOCK "StringFileInfo" | ||
BEGIN | ||
BLOCK "040904B0" | ||
BEGIN | ||
VALUE "CompanyName", "${OBS_COMPANY_NAME}" | ||
VALUE "FileDescription", "OBS AMF module" | ||
VALUE "FileVersion", "${OBS_VERSION_CANONICAL}" | ||
VALUE "ProductName", "${OBS_PRODUCT_NAME}" | ||
VALUE "ProductVersion", "${OBS_VERSION_CANONICAL}" | ||
VALUE "Comments", "${OBS_COMMENTS}" | ||
VALUE "LegalCopyright", "${OBS_LEGAL_COPYRIGHT}" | ||
VALUE "InternalName", "obs-amf" | ||
VALUE "OriginalFilename", "obs-amf" | ||
END | ||
END | ||
|
||
BLOCK "VarFileInfo" | ||
BEGIN | ||
VALUE "Translation", 0x0409, 0x04B0 | ||
END | ||
END |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include <obs-module.h> | ||
|
||
extern void amf_load(void); | ||
extern void amf_unload(void); | ||
|
||
OBS_DECLARE_MODULE() | ||
OBS_MODULE_USE_DEFAULT_LOCALE("obs-amf", "en-US") | ||
|
||
MODULE_EXPORT const char *obs_module_description(void) | ||
{ | ||
return "AMD Radeon Encoder (AMF) Plugin"; | ||
} | ||
|
||
bool obs_module_load(void) | ||
{ | ||
amf_load(); | ||
|
||
return true; | ||
} | ||
|
||
void obs_module_unload(void) | ||
{ | ||
amf_unload(); | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters