Skip to content

Commit

Permalink
Merge branch 'obsproject:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
decahedron1 authored Jun 20, 2024
2 parents 0a20718 + 5f98d34 commit 990a338
Show file tree
Hide file tree
Showing 37 changed files with 470 additions and 321 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:

task:
install_script:
- pkg-install -y
- pkg install -y
cmake ninja binutils pkgconf curl
ffmpeg qt6-base qt6-svg jansson libsysinfo e2fsprogs-libuuid pulseaudio
alsa-lib pipewire v4l_compat libpci librist srt nlohmann-json uthash
Expand Down
12 changes: 8 additions & 4 deletions .github/actions/windows-patches/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ runs:
with:
path: "repo"
fetch-depth: 0
ref: ${{ inputs.tagName }}

- name: Download Release Artifact
shell: pwsh
Expand All @@ -40,9 +41,9 @@ runs:
- name: Setup bouf
shell: pwsh
env:
BOUF_TAG: 'v0.6.3'
BOUF_HASH: '7f1d266467620aa553a705391ee06128e8ee14af66129a0e64a282997fb6fd83'
BOUF_NSIS_HASH: 'a234126de89f122b6a552df3416de3eabcb4195217626c7f4eaec71b20fe36eb'
BOUF_TAG: 'v0.6.4'
BOUF_HASH: 'aca6810e741dc38ff843fab7b25a0ad8570ee84f5595132cf0cc4a5b0131b4c4'
BOUF_NSIS_HASH: 'ed453784486556bd959d56743a8478ad3f68fe0305e9b43ac19d8771d0515257'
GH_TOKEN: ${{ github.token }}
run: |
# Download bouf release
Expand Down Expand Up @@ -86,7 +87,10 @@ runs:
run: |
# Release notes are just the tag body on Windows
Set-Location repo
git tag -l --format='%(contents:body)' ${{ inputs.tagName }} > "${{ github.workspace }}/notes.rst"
git tag -l --format='%(contents:subject)' ${{ inputs.tagName }} > "${{ github.workspace }}/notes.rst"
Write-Output "###################################################" >> "${{ github.workspace }}/notes.rst"
Write-Output "" >> "${{ github.workspace }}/notes.rst"
git tag -l --format='%(contents:body)' ${{ inputs.tagName }} >> "${{ github.workspace }}/notes.rst"
- name: Run bouf
shell: pwsh
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
outputs:
validTag: ${{ steps.check.outputs.validTag }}
flatpakMatrix: ${{ steps.check.outputs.flatpakMatrix }}
updateChannel: ${{ steps.check.outputs.updateChannel }}
steps:
- name: Check Release Tag ☑️
id: check
Expand Down
15 changes: 9 additions & 6 deletions UI/auth-youtube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ std::shared_ptr<Auth> YoutubeAuth::Login(QWidget *owner,
}

#ifdef BROWSER_AVAILABLE
void YoutubeChatDock::SetWidget(QCefWidget *widget_)
YoutubeChatDock::YoutubeChatDock(const QString &title) : BrowserDock(title)
{
lineEdit = new LineEditAutoResize();
lineEdit->setVisible(false);
Expand All @@ -364,6 +364,14 @@ void YoutubeChatDock::SetWidget(QCefWidget *widget_)
chatLayout->addWidget(lineEdit, 1);
chatLayout->addWidget(sendButton);

QWidget::connect(lineEdit, &LineEditAutoResize::returnPressed, this,
&YoutubeChatDock::SendChatMessage);
QWidget::connect(sendButton, &QPushButton::pressed, this,
&YoutubeChatDock::SendChatMessage);
}

void YoutubeChatDock::SetWidget(QCefWidget *widget_)
{
QVBoxLayout *layout = new QVBoxLayout();
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(widget_, 1);
Expand All @@ -373,11 +381,6 @@ void YoutubeChatDock::SetWidget(QCefWidget *widget_)
widget->setLayout(layout);
setWidget(widget);

QWidget::connect(lineEdit, &LineEditAutoResize::returnPressed, this,
&YoutubeChatDock::SendChatMessage);
QWidget::connect(sendButton, &QPushButton::pressed, this,
&YoutubeChatDock::SendChatMessage);

cefWidget.reset(widget_);
}

Expand Down
2 changes: 1 addition & 1 deletion UI/auth-youtube.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class YoutubeChatDock : public BrowserDock {
QHBoxLayout *chatLayout;

public:
inline YoutubeChatDock(const QString &title) : BrowserDock(title) {}
YoutubeChatDock(const QString &title);
void SetWidget(QCefWidget *widget_);
void SetApiChatId(const std::string &id);

Expand Down
4 changes: 2 additions & 2 deletions UI/data/themes/System.obt
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,13 @@ QCalendarWidget QToolButton {
QCalendarWidget #qt_calendar_prevmonth {
padding: 2px;
qproperty-icon: url(theme:Dark/left.svg);
icon-size: 16px, 16px;
icon-size: 16px;
}

QCalendarWidget #qt_calendar_nextmonth {
padding: 2px;
qproperty-icon: url(theme:Dark/right.svg);
icon-size: 16px, 16px;
icon-size: 16px;
}

/* Status Bar */
Expand Down
18 changes: 9 additions & 9 deletions UI/data/themes/Yami.obt
Original file line number Diff line number Diff line change
Expand Up @@ -649,12 +649,12 @@ QScrollBar::handle:horizontal {

QPushButton#sourcePropertiesButton {
qproperty-icon: url(theme:Dark/settings/general.svg);
icon-size: var(--icon_base), var(--icon_base);
icon-size: var(--icon_base);
}

QPushButton#sourceFiltersButton {
qproperty-icon: url(theme:Dark/filter.svg);
icon-size: var(--icon_base), var(--icon_base);
icon-size: var(--icon_base);
}

/* Scenes and Sources toolbar */
Expand Down Expand Up @@ -1041,7 +1041,7 @@ QPushButton {
height: var(--input_height);
max-height: var(--input_height);
padding: var(--input_padding) var(--padding_wide);
icon-size: var(--icon_base), var(--icon_base);
icon-size: var(--icon_base);
}

QPushButton {
Expand All @@ -1059,7 +1059,7 @@ QPushButton[toolButton="true"] {
margin: 0px var(--spacing_base);
border: 1px solid var(--button_border);
border-radius: var(--border_radius);
icon-size: var(--icon_base), var(--icon_base);
icon-size: var(--icon_base);
}

QToolButton:last-child,
Expand Down Expand Up @@ -1212,7 +1212,7 @@ QSlider::handle:disabled {
margin: 0px;
border: 1px solid var(--button_border);
border-radius: var(--border_radius);
icon-size: var(--icon_base), var(--icon_base);
icon-size: var(--icon_base);
}

/* This is an incredibly cursed but necessary fix */
Expand Down Expand Up @@ -1603,7 +1603,7 @@ MuteCheckBox::indicator:unchecked {
margin: 0px;
border: 1px solid var(--button_border);
border-radius: var(--border_radius);
icon-size: var(--icon_base), var(--icon_base);
icon-size: var(--icon_base);
}

MuteCheckBox::indicator:hover,
Expand All @@ -1612,7 +1612,7 @@ MuteCheckBox::indicator:unchecked:hover {
padding: var(--padding_base_border) var(--padding_base_border);
margin: 0px;
border: 1px solid var(--button_border_hover);
icon-size: var(--icon_base), var(--icon_base);
icon-size: var(--icon_base);
}

MuteCheckBox::indicator:pressed,
Expand Down Expand Up @@ -1883,13 +1883,13 @@ QCalendarWidget QToolButton {
QCalendarWidget #qt_calendar_prevmonth {
padding: var(--padding_small);
qproperty-icon: url(theme:Dark/left.svg);
icon-size: var(--icon_base), var(--icon_base);
icon-size: var(--icon_base);
}

QCalendarWidget #qt_calendar_nextmonth {
padding: var(--padding_small);
qproperty-icon: url(theme:Dark/right.svg);
icon-size: var(--icon_base), var(--icon_base);
icon-size: var(--icon_base);
}

QCalendarWidget QToolButton:hover {
Expand Down
10 changes: 7 additions & 3 deletions UI/data/themes/Yami_Classic.ovt
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ QMenu::item {
padding: var(--padding_menu_y) var(--padding_menu);
}

QMenu::item {
padding-right: 20px;
}

QGroupBox {
background: var(--bg_window);
border: 1px solid var(--border_color);
Expand Down Expand Up @@ -198,7 +202,7 @@ QPushButton[toolButton="true"] {
#stackedMixerArea QPushButton {
min-width: var(--icon_base);
padding: var(--padding_large) var(--padding_large);
icon-size: var(--icon_base), var(--icon_base);
icon-size: var(--icon_base);
}

#stackedMixerArea QPushButton:!hover {
Expand All @@ -217,7 +221,7 @@ MuteCheckBox::indicator:unchecked {
border: none;
width: var(--icon_base_mixer);
height: var(--icon_base_mixer);
icon-size: var(--icon_base_mixer), var(--icon_base_mixer);
icon-size: var(--icon_base_mixer);
}

MuteCheckBox::indicator:checked {
Expand All @@ -231,7 +235,7 @@ MuteCheckBox::indicator:unchecked:hover {

MuteCheckBox::indicator:hover,
MuteCheckBox::indicator:unchecked:hover {
icon-size: var(--icon_base_mixer), var(--icon_base_mixer);
icon-size: var(--icon_base_mixer);
border: none;
}

Expand Down
10 changes: 8 additions & 2 deletions UI/forms/OBSBasicSettings.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1670,14 +1670,20 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string notr="true"> Kbps</string>
</property>
<property name="minimum">
<number>500</number>
<number>0</number>
</property>
<property name="maximum">
<number>1000000</number>
</property>
<property name="singleStep">
<number>50</number>
</property>
<property name="value">
<number>8000</number>
<number>0</number>
</property>
</widget>
</item>
Expand Down
16 changes: 12 additions & 4 deletions UI/goliveapi-network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,27 @@ GoLiveApi::Config DownloadGoLiveConfig(QWidget *parent, QString url,

QString MultitrackVideoAutoConfigURL(obs_service_t *service)
{
static const QString url = [service]() -> QString {
static const std::optional<QString> cli_url =
[]() -> std::optional<QString> {
auto args = qApp->arguments();
for (int i = 0; i < args.length() - 1; i++) {
if (args[i] == "--config-url" &&
args.length() > (i + 1)) {
return args[i + 1];
}
}
OBSDataAutoRelease settings = obs_service_get_settings(service);
return obs_data_get_string(
settings, "multitrack_video_configuration_url");
return std::nullopt;
}();

QString url;
if (cli_url.has_value()) {
url = *cli_url;
} else {
OBSDataAutoRelease settings = obs_service_get_settings(service);
url = obs_data_get_string(settings,
"multitrack_video_configuration_url");
}

blog(LOG_INFO, "Go live URL: %s", url.toUtf8().constData());
return url;
}
49 changes: 39 additions & 10 deletions UI/goliveapi-postdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,58 @@ constructGoLivePost(QString streamKey,
{
GoLiveApi::PostData post_data{};
post_data.service = "IVS";
post_data.schema_version = "2023-05-10";
post_data.schema_version = "2024-06-04";
post_data.authentication = streamKey.toStdString();

system_info(post_data.capabilities);

auto &client = post_data.capabilities.client;
auto &client = post_data.client;

client.name = "obs-studio";
client.version = obs_get_version_string();
client.vod_track_audio = vod_track_enabled;

auto add_codec = [&](const char *codec) {
auto it = std::find(std::begin(client.supported_codecs),
std::end(client.supported_codecs), codec);
if (it != std::end(client.supported_codecs))
return;

client.supported_codecs.push_back(codec);
};

const char *encoder_id = nullptr;
for (size_t i = 0; obs_enum_encoder_types(i, &encoder_id); i++) {
auto codec = obs_get_encoder_codec(encoder_id);
if (!codec)
continue;

if (qstricmp(codec, "h264") == 0) {
add_codec("h264");
#ifdef ENABLE_HEVC
} else if (qstricmp(codec, "hevc")) {
add_codec("h265");
#endif
} else if (qstricmp(codec, "av1")) {
add_codec("av1");
}
}

auto &preferences = post_data.preferences;
preferences.vod_track_audio = vod_track_enabled;

obs_video_info ovi;
if (obs_get_video_info(&ovi)) {
client.width = ovi.output_width;
client.height = ovi.output_height;
client.fps_numerator = ovi.fps_num;
client.fps_denominator = ovi.fps_den;
preferences.width = ovi.output_width;
preferences.height = ovi.output_height;
preferences.framerate.numerator = ovi.fps_num;
preferences.framerate.denominator = ovi.fps_den;

client.canvas_width = ovi.base_width;
client.canvas_height = ovi.base_height;
preferences.canvas_width = ovi.base_width;
preferences.canvas_height = ovi.base_height;

preferences.composition_gpu_index = ovi.adapter;
}

auto &preferences = post_data.preferences;
if (maximum_aggregate_bitrate.has_value())
preferences.maximum_aggregate_bitrate =
maximum_aggregate_bitrate.value();
Expand Down
2 changes: 1 addition & 1 deletion UI/lineedit-autoresize.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "lineedit-autoresize.hpp"

LineEditAutoResize::LineEditAutoResize()
LineEditAutoResize::LineEditAutoResize() : m_maxLength(32767)
{
connect(this, &LineEditAutoResize::textChanged, this,
&LineEditAutoResize::checkTextLength);
Expand Down
Loading

0 comments on commit 990a338

Please sign in to comment.