-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
obs-webrtc: Add WHIP output & service
This adds a WHIP output & associated service. - Code inspiration from DDRBoxman - Implemented by Sean DuBois & tt2468 - Various fixes and contributions by pkv. Co-authored-by: tt2468 <tt2468@irltoolkit.com> Co-authored-by: DDRBoxman <colin@recursivepenguin.com> Co-authored-by: pkv <pkv@obsproject.com> Signed-off-by: pkv <pkv@obsproject.com>
- Loading branch information
1 parent
ed577a0
commit 851a8c2
Showing
12 changed files
with
843 additions
and
0 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
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,21 @@ | ||
cmake_minimum_required(VERSION 3.16...3.25) | ||
|
||
legacy_check() | ||
|
||
option(ENABLE_WEBRTC "Enable WebRTC Output support" ON) | ||
if(NOT ENABLE_WEBRTC) | ||
message(STATUS "OBS: DISABLED obs-webrtc") | ||
return() | ||
endif() | ||
|
||
find_package(LibDataChannel REQUIRED) | ||
find_package(CURL REQUIRED) | ||
|
||
add_library(obs-webrtc MODULE) | ||
add_library(OBS::webrtc ALIAS obs-webrtc) | ||
|
||
target_sources(obs-webrtc PRIVATE obs-webrtc.cpp whip-output.cpp whip-output.h whip-service.cpp whip-service.h) | ||
|
||
target_link_libraries(obs-webrtc PRIVATE OBS::libobs LibDataChannel::LibDataChannel CURL::libcurl) | ||
|
||
set_target_properties_obs(obs-webrtc PROPERTIES FOLDER plugins 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,21 @@ | ||
project(obs-webrtc) | ||
|
||
option(ENABLE_WEBRTC "Enable WebRTC Output support" ON) | ||
if(NOT ENABLE_WEBRTC) | ||
obs_status(DISABLED, "obs-webrtc") | ||
return() | ||
endif() | ||
|
||
find_package(LibDataChannel REQUIRED) | ||
find_package(CURL REQUIRED) | ||
|
||
add_library(obs-webrtc MODULE) | ||
add_library(OBS::webrtc ALIAS obs-webrtc) | ||
|
||
target_sources(obs-webrtc PRIVATE obs-webrtc.cpp whip-output.cpp whip-output.h whip-service.cpp whip-service.h) | ||
|
||
target_link_libraries(obs-webrtc PRIVATE OBS::libobs LibDataChannel::LibDataChannel CURL::libcurl) | ||
|
||
set_target_properties(obs-webrtc PROPERTIES FOLDER "plugins") | ||
|
||
setup_plugin_target(obs-webrtc) |
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,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleName</key> | ||
<string>obs-webrtc</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.obsproject.obs-webrtc</string> | ||
<key>CFBundleVersion</key> | ||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleExecutable</key> | ||
<string>obs-webrtc</string> | ||
<key>CFBundlePackageType</key> | ||
<string>BNDL</string> | ||
<key>CFBundleSupportedPlatforms</key> | ||
<array> | ||
<string>MacOSX</string> | ||
</array> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string> | ||
<key>NSHumanReadableCopyright</key> | ||
<string>(c) 2012-${CURRENT_YEAR} Hugh Bailey</string> | ||
</dict> | ||
</plist> |
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 output 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-webrtc" | ||
VALUE "OriginalFilename", "obs-webrtc" | ||
END | ||
END | ||
|
||
BLOCK "VarFileInfo" | ||
BEGIN | ||
VALUE "Translation", 0x0409, 0x04B0 | ||
END | ||
END |
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,3 @@ | ||
Output.Name="WHIP Output" | ||
Service.Name="WHIP Service" | ||
Service.BearerToken="Bearer Token" |
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,19 @@ | ||
#include <obs-module.h> | ||
|
||
#include "whip-output.h" | ||
#include "whip-service.h" | ||
|
||
OBS_DECLARE_MODULE() | ||
OBS_MODULE_USE_DEFAULT_LOCALE("obs-webrtc", "en-US") | ||
MODULE_EXPORT const char *obs_module_description(void) | ||
{ | ||
return "OBS WebRTC module"; | ||
} | ||
|
||
bool obs_module_load() | ||
{ | ||
register_whip_output(); | ||
register_whip_service(); | ||
|
||
return true; | ||
} |
Oops, something went wrong.