Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
84b8376
Revert "UI: Add timer to NewYouTubeAppDock()"
tytan652 Aug 22, 2023
578a411
Revert "UI: Add "YouTube Control Panel" dock panel"
tytan652 Aug 9, 2023
5764f67
Revert "UI: Enable WHIP service in UI"
tytan652 Jun 15, 2023
9b32d2f
Revert "UI: Work around Qt dock restore crash"
tytan652 May 22, 2023
a2ce578
UI: Move dockstate to profile
tytan652 May 22, 2023
04a0ec6
UI: Work around Qt dock restore crash
tytan652 May 22, 2023
36c9806
UI,libobs,docs: Add audio track capability to the Service API
tytan652 May 13, 2023
29b7be3
UI: Move OBSBasic service functions in its own file
tytan652 Mar 23, 2023
702523a
UI: Remove service integration UI from settings
tytan652 Apr 7, 2023
7836258
UI: Remove service integration UI from auto-wizard
tytan652 Apr 7, 2023
523a4c0
libobs,docs: Add feature flags in Services API
tytan652 May 3, 2023
d4f4eab
libobs,docs,rtmp-services: Add supported protocols in Services API
tytan652 May 3, 2023
1e9cc3c
libobs: Add properties2 and default2 to Services API
tytan652 May 3, 2023
def104b
UI: Use PropertiesView for service settings
tytan652 Jun 12, 2023
f6e6623
UI: Use service object to create PropertiesView
tytan652 Jun 4, 2023
3b103da
UI: Sort services list
tytan652 May 18, 2023
78ecfc5
UI: Remove Twitch region test feature in auto-config wizard
tytan652 May 17, 2023
ebb0a3b
UI,libobs,docs: Add bandwidth test to the Services API
tytan652 Jun 22, 2023
2f274d0
UI: Use PropertyView for auto-wizard service
tytan652 Jul 1, 2023
dfbbe85
build-aux,plugins: Add obs-services with its JSON Schemas
tytan652 May 29, 2023
5f8e817
obs-services,json-schema: Add format version
tytan652 May 30, 2023
29e4764
plugins: Add custom-services
tytan652 May 31, 2023
9ea24de
rtmp-services: Deprecate and hide services
tytan652 May 31, 2023
025de56
plugins: Add orphaned-services
tytan652 Jun 1, 2023
da75f70
plugins: Add obs-youtube
tytan652 Jun 3, 2023
b99eeed
custom-service: Add WHIP support
tytan652 Jun 12, 2023
221c080
obs-services,json-schema: Add WHIP Support
tytan652 Jun 12, 2023
80388bc
obs-webrtc: Remove WHIP custom service
tytan652 Jun 12, 2023
e0cf001
deps: Move obf in its own subdirectory
tytan652 Jun 12, 2023
9681e21
deps: Add OAuth
tytan652 Jun 15, 2023
78d51b0
oauth-service: Add OAuth service base
tytan652 Jun 15, 2023
3f52e51
oauth-service: Remove scope from access token response
tytan652 Jul 1, 2023
5b9d9b7
oauth-service: Add OAuth local redirect
tytan652 Jun 15, 2023
b8dd8b8
UI,docs: Add frontend API browser functions
tytan652 Oct 22, 2022
3c08b6c
UI: Remove integrated YouTube integration
tytan652 Jun 18, 2023
371bae6
service-base: Add login reason
tytan652 Jun 21, 2023
29a5451
UI,docs: Add broadcast flow in the frontend API
tytan652 Jun 22, 2023
ba5295b
obs-youtube: Add account integration
tytan652 Jun 22, 2023
8d845a1
obs-youtube: Add bandwidth test support
tytan652 Jun 22, 2023
9492d5c
UI,docs: Ignore broadcast flow if bandwidth test enabled
tytan652 Jun 23, 2023
5b337c4
UI: Disable stream settings while an output is active
tytan652 Jun 23, 2023
4d5beb6
plugins: Add obs-twitch
tytan652 Jun 24, 2023
27931f5
UI: Remove integrated Twitch integration
tytan652 Jul 1, 2023
0128577
oauth-service: Add OBS Browser login
tytan652 Jul 5, 2023
5affc9c
obs-twitch: Add account integration
tytan652 Jul 1, 2023
89d622f
plugins: Add obs-restream
tytan652 Jul 1, 2023
16dfa51
UI: Remove integrated Restream integration
tytan652 Jul 1, 2023
61147d3
obs-restream: Add account integration
tytan652 Jul 1, 2023
4b2623a
UI: Remove auth-related code
tytan652 Jul 1, 2023
980da97
libobs,UI,docs: Replace supported resolution and max bitrate getters
tytan652 Jul 6, 2023
88f8a77
obs-youtube: Add maximum bitrates
tytan652 Jul 6, 2023
fd1255a
obs-twitch: Add maximum bitrates
tytan652 Jul 6, 2023
021b849
obs-services: Add supported resolutions and maximums
tytan652 Jul 6, 2023
e914f1d
custom-services,obs-services: Apply MPEG TS fixes
tytan652 May 31, 2023
4fccc13
custom-services,obs-services Apply WHIP fixes
tytan652 Jun 12, 2023
8ec09f5
libobs,UI,docs: Add apply encoder settings 2
tytan652 Jul 7, 2023
1b16996
custom-services,obs-services: Migrate apply encoder settings
tytan652 Jul 7, 2023
b4c19c4
obs-services,json-schema: Apply recommendation and maximums
tytan652 Jul 7, 2023
57627d9
obs-services,json-schema: Add Github login to services
tytan652 Jul 7, 2023
3ced1c5
obs-youtube: Add apply encoder settings
tytan652 Jul 8, 2023
79b0d8c
obs-twitch: Add apply encoder settings
tytan652 Jul 8, 2023
47f6fc6
UI: Avoid re-creating the service if it was not changed
tytan652 Jul 8, 2023
60faf7f
file-updater: Enable use in C++
tytan652 Jul 8, 2023
190153f
obs-services,json-schema: Add services update
tytan652 Jul 8, 2023
5bf4722
UI: Add service migration
tytan652 Jul 8, 2023
ae5c7e4
build-aux: Add script for obs-services JSON parser
tytan652 Jul 5, 2023
2aba466
CI: Add obs-services JSON parser validator
tytan652 Jul 6, 2023
5ef1362
[WIP] UI: Allow to make the dock a native window
tytan652 Aug 10, 2023
34a956e
obs-restream: Fix missing nativz window flag for docks
tytan652 Aug 10, 2023
40765ac
obs-twitch: Fix missing nativz window flag for docks
tytan652 Aug 10, 2023
abc8677
obs-youtube: Fix missing nativz window flag for chat dock
tytan652 Aug 10, 2023
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
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,11 @@ indent_size = 2
[{*.zsh,.*.zsh,build-aux/.functions/*,.github/scripts/utils.zsh/*}]
indent_style = space
indent_size = 2

[json-schema/*.json]
indent_style = space
indent_size = 4

[plugins/obs-services/json/**/*.json]
indent_style = space
indent_size = 4
51 changes: 51 additions & 0 deletions .github/actions/obs-services-json-parser-validator/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: obs-services JSON Parser Validator
description: Runs quicktype againts obs-services JSON schemas and checks for any changes introduced by it
inputs:
failCondition:
description: Controls whether failed checks also fail the workflow run
required: false
default: never
workingDirectory:
description: Working directory for checks
required: false
default: ${{ github.workspace }}
runs:
using: composite
steps:
- name: Check Runner Operating System 🏃‍♂️
if: runner.os == 'Windows'
shell: bash
run: |
: Check Runner Operating System 🏃‍♂️
echo "::notice::obs-services-json-parser-validator action requires a macOS-based or Linux-based runner."
exit 2

- name: Install Dependencies 🛍️
if: runner.os == 'Linux'
shell: bash
run: |
: Install Dependencies 🛍️
echo ::group::Install Dependencies
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
brew install --quiet zsh
echo ::endgroup::

- name: Validate obs-services JSON Parser 🎛️
id: result
shell: zsh --no-rcs --errexit --pipefail {0}
working-directory: ${{ github.workspace }}
env:
GITHUB_EVENT_FORCED: ${{ github.event.forced }}
GITHUB_REF_BEFORE: ${{ github.event.before }}
run: |
: Validate obs-services JSON Parser 🎛️
if (( ${+RUNNER_DEBUG} )) setopt XTRACE

print ::group::Install quicktype
npm install -g quicktype@23.0.49
print ::endgroup::

print ::group::Run Validation
./build-aux/regen-obs-services-json-parser.zsh --fail-${{ inputs.failCondition }} --check
print ::endgroup::
12 changes: 12 additions & 0 deletions .github/workflows/check-format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,15 @@ jobs:
uses: ./.github/actions/qt-xml-validator
with:
failCondition: error

obs-services-json-parser-validator:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Validate obs-services JSON Parser
id: obs-services-json-parser-check
uses: ./.github/actions/obs-services-json-parser-validator
with:
failCondition: error
26 changes: 8 additions & 18 deletions UI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ if(NOT TARGET OBS::json11)
add_subdirectory("${CMAKE_SOURCE_DIR}/deps/json11" "${CMAKE_BINARY_DIR}/deps/json11")
endif()

if(NOT TARGET OBS::obf)
add_subdirectory("${CMAKE_SOURCE_DIR}/deps/obf" "${CMAKE_BINARY_DIR}/deps/obf")
endif()

add_executable(obs-studio)
add_executable(OBS::studio ALIAS obs-studio)

Expand All @@ -31,23 +35,15 @@ target_link_libraries(
FFmpeg::avformat
OBS::libobs
OBS::frontend-api
OBS::json11)
OBS::json11
OBS::obf)

include(cmake/ui-qt.cmake)
include(cmake/ui-elements.cmake)
include(cmake/ui-windows.cmake)
include(cmake/feature-importers.cmake)
include(cmake/feature-browserpanels.cmake)

if(NOT OAUTH_BASE_URL)
# cmake-format: off
set(OAUTH_BASE_URL "https://auth.obsproject.com/" CACHE STRING "Default OAuth base URL")
mark_as_advanced(OAUTH_BASE_URL)
# cmake-format: on
endif()
include(cmake/feature-twitch.cmake)
include(cmake/feature-restream.cmake)
include(cmake/feature-youtube.cmake)
include(cmake/feature-sparkle.cmake)
include(cmake/feature-whatsnew.cmake)

Expand All @@ -59,19 +55,13 @@ target_sources(
obs-studio
PRIVATE # cmake-format: sortable
api-interface.cpp
auth-base.cpp
auth-base.hpp
auth-listener.cpp
auth-listener.hpp
auth-oauth.cpp
auth-oauth.hpp
broadcast-flow.cpp
broadcast-flow.hpp
display-helpers.hpp
ffmpeg-utils.cpp
ffmpeg-utils.hpp
multiview.cpp
multiview.hpp
obf.c
obf.h
obs-app.cpp
obs-app.hpp
obs-proxy-style.cpp
Expand Down
92 changes: 90 additions & 2 deletions UI/api-interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

#include <functional>

#ifdef ENABLE_WAYLAND
#include <obs-nix-platform.h>
#endif

using namespace std;

Q_DECLARE_METATYPE(OBSScene);
Expand Down Expand Up @@ -399,7 +403,7 @@ struct OBSStudioAPI : obs_frontend_callbacks {
}

bool obs_frontend_add_dock_by_id(const char *id, const char *title,
void *widget) override
void *_widget) override
{
if (main->IsDockObjectNameUsed(QT_UTF8(id))) {
blog(LOG_WARNING,
Expand All @@ -410,12 +414,16 @@ struct OBSStudioAPI : obs_frontend_callbacks {
}

OBSDock *dock = new OBSDock(main);
dock->setWidget((QWidget *)widget);
QWidget *widget = (QWidget *)_widget;
dock->setWidget(widget);
dock->setWindowTitle(QT_UTF8(title));
dock->setObjectName(QT_UTF8(id));

main->AddDockWidget(dock, Qt::RightDockWidgetArea);

if (widget->property("Dock_WA_NativeWindow").toBool())
dock->setAttribute(Qt::WA_NativeWindow);

dock->setFloating(true);
dock->setVisible(false);

Expand Down Expand Up @@ -445,6 +453,59 @@ struct OBSStudioAPI : obs_frontend_callbacks {
return true;
}

bool obs_frontend_is_browser_available(void) override
{
#ifdef BROWSER_AVAILABLE
#ifdef ENABLE_WAYLAND
return (obs_get_nix_platform() != OBS_NIX_PLATFORM_WAYLAND);
#else
return true;
#endif
#else
return false;
#endif
}

void *obs_frontend_get_browser_widget_s(
const struct obs_frontend_browser_params *params,
size_t size) override
{
#ifdef BROWSER_AVAILABLE
#ifdef ENABLE_WAYLAND
if (!obs_frontend_is_browser_available())
return nullptr;
#endif
struct obs_frontend_browser_params data = {0};
if (size > sizeof(data)) {
blog(LOG_ERROR,
"Tried to add obs_frontend_get_browser_widget with size "
"%llu which is more than OBS Studio currently "
"supports (%llu)",
(long long unsigned)size,
(long long unsigned)sizeof(data));
return nullptr;
}

memcpy(&data, params, size);

return (void *)main->GetBrowserWidget(data);
#else
UNUSED_PARAMETER(params);
UNUSED_PARAMETER(size);
return nullptr;
#endif
}

void obs_frontend_delete_browser_cookie(const char *url) override
{
if (!url)
return;

std::string urlStr = url;
if (!urlStr.empty())
main->DeleteCookie(urlStr);
}

void obs_frontend_add_event_callback(obs_frontend_event_cb callback,
void *private_data) override
{
Expand Down Expand Up @@ -747,6 +808,33 @@ struct OBSStudioAPI : obs_frontend_callbacks {
undo_data, redo_data, repeatable);
}

void obs_frontend_add_broadcast_flow_s(
const obs_service_t *service,
const struct obs_frontend_broadcast_flow *flow,
size_t size) override
{
struct obs_frontend_broadcast_flow data = {0};
if (size > sizeof(data)) {
blog(LOG_ERROR,
"Tried to add obs_frontend_broadcast_flow with size "
"%llu which is more than OBS Studio currently "
"supports (%llu)",
(long long unsigned)size,
(long long unsigned)sizeof(data));
return;
}

memcpy(&data, flow, size);

main->AddBroadcastFlow(service, data);
}

void obs_frontend_remove_broadcast_flow(
const obs_service_t *service) override
{
main->RemoveBroadcastFlow(service);
}

void on_load(obs_data_t *settings) override
{
for (size_t i = saveCallbacks.size(); i > 0; i--) {
Expand Down
87 changes: 0 additions & 87 deletions UI/auth-base.cpp

This file was deleted.

Loading