We truncated the diff of some files because they were too big.
If you want to see the full diff for every file, click here.
Changes of Revision 63
obs-studio.changes
Changed
x
1
2
-------------------------------------------------------------------
3
+Fri Mar 08 21:04:44 UTC 2019 - jimmy@boombatower.com
4
+
5
+- Update to version 23.0.2:
6
+ * UI: Fix "What's New" showing again each patch version
7
+ * libobs: Fix code styling
8
+ * libobs: Fix first frame when output restarted
9
+ * CI: Fix building on trusty
10
+ * UI: Add (Do not show again) checkbox to dock closing warning
11
+ * Revert "Merge pull request #1418 from cabirdme/qsv_feature_add"
12
+ * Revert "obs-qsv: Enable b-pyramid & change packet priority"
13
+ * UI: Warn when closing dock widgets for first time
14
+ * UI: Add way to exec std::function via invokeMethod
15
+ * obs-ffmpeg: Check avformat context before use
16
+ * obs-ffmpeg: Fix crash on failed audio codec init (for real)
17
+ * UI: Always set first scene collection/profiles
18
+ * obs-ffmpeg: Fix crash on failed audio codec init
19
+ * libobs-d3d11: Check for bad NV12 output on all devices
20
+ * libobs-d3d11: Perform actual test for NV12 driver bug
21
+ * libobs-d3d11: Remove NV12 blacklist
22
+ * libobs: Always query shared texture handle for encoding
23
+ * UI: Reset replay buffer button on "stop" signal
24
+ * libobs-d3d11: Reset handle and re-lock if texture rebuilt
25
+ * libobs-d3d11: Use discrete function to get shared handle
26
+ * libobs-d3d11: Set acquired bool when texture acquired
27
+ * obs-ffmpeg: Always output SEI
28
+ * obs-ffmpeg: Fix SEI data output
29
+ * frontend-tools: Fix memory leak when reloading scripts
30
+ * UI: Update tab stop order in Settings
31
+ * CI: macOS builds on Azure Pipelines
32
+ * obs-qsv11: Fix crash on destructor after init failure
33
+ * obs-qsv11: Don't try to free non allocated array on destruction
34
+ * obs-ffmpeg: Fix NVENC blacklisted card check
35
+
36
+-------------------------------------------------------------------
37
Wed Feb 27 21:36:03 UTC 2019 - jimmy@boombatower.com
38
39
- Update to version 23.0.1:
40
obs-studio.spec
Changed
8
1
2
Name: obs-studio
3
-Version: 23.0.1
4
+Version: 23.0.2
5
Release: 0
6
Summary: A recording/broadcasting program
7
Group: Productivity/Multimedia/Video/Editors and Convertors
8
_service
Changed
10
1
2
<services>
3
<service name="tar_scm" mode="disabled">
4
<param name="versionformat">@PARENT_TAG@</param>
5
- <param name="revision">refs/tags/23.0.1</param>
6
+ <param name="revision">refs/tags/23.0.2</param>
7
<param name="url">git://github.com/jp9000/obs-studio.git</param>
8
<param name="scm">git</param>
9
<param name="changesgenerate">enable</param>
10
_servicedata
Changed
9
1
2
<servicedata>
3
<service name="tar_scm">
4
<param name="url">git://github.com/jp9000/obs-studio.git</param>
5
- <param name="changesrevision">f2d7f5b2e713266138df656121da35ff89407991</param>
6
+ <param name="changesrevision">3d63907976bcfb67ac0588185c7fef295d280d36</param>
7
</service>
8
</servicedata>
9
obs-studio-23.0.1.tar.xz/CI/before-deploy-osx.sh -> obs-studio-23.0.2.tar.xz/CI/before-deploy-osx.sh
Changed
49
1
2
3
# Generate file name variables
4
export GIT_HASH=$(git rev-parse --short HEAD)
5
-export FILE_DATE=$(date +%Y-%m-%d.%H:%M:%S)
6
+export FILE_DATE=$(date +%Y-%m-%d.%H-%M-%S)
7
export FILENAME=$FILE_DATE-$GIT_HASH-$TRAVIS_BRANCH-osx.pkg
8
9
cd ./build
10
11
hr "Generating .pkg"
12
packagesbuild ../CI/install/osx/CMakeLists.pkgproj
13
14
-# Signing stuff
15
-hr "Decrypting Cert"
16
-openssl aes-256-cbc -K $encrypted_dd3c7f5e9db9_key -iv $encrypted_dd3c7f5e9db9_iv -in ../CI/osxcert/Certificates.p12.enc -out Certificates.p12 -d
17
-hr "Creating Keychain"
18
-security create-keychain -p mysecretpassword build.keychain
19
-security default-keychain -s build.keychain
20
-security unlock-keychain -p mysecretpassword build.keychain
21
-security set-keychain-settings -t 3600 -u build.keychain
22
-hr "Importing certs into keychain"
23
-security import ./Certificates.p12 -k build.keychain -T /usr/bin/productsign -P ""
24
-# macOS 10.12+
25
-security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword build.keychain
26
-hr "Signing Package"
27
-productsign --sign 2MMRE5MTB8 ./OBS.pkg ./$FILENAME
28
+if [ -v "$TRAVIS" ]; then
29
+ # Signing stuff
30
+ hr "Decrypting Cert"
31
+ openssl aes-256-cbc -K $encrypted_dd3c7f5e9db9_key -iv $encrypted_dd3c7f5e9db9_iv -in ../CI/osxcert/Certificates.p12.enc -out Certificates.p12 -d
32
+ hr "Creating Keychain"
33
+ security create-keychain -p mysecretpassword build.keychain
34
+ security default-keychain -s build.keychain
35
+ security unlock-keychain -p mysecretpassword build.keychain
36
+ security set-keychain-settings -t 3600 -u build.keychain
37
+ hr "Importing certs into keychain"
38
+ security import ./Certificates.p12 -k build.keychain -T /usr/bin/productsign -P ""
39
+ # macOS 10.12+
40
+ security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword build.keychain
41
+ hr "Signing Package"
42
+ productsign --sign 2MMRE5MTB8 ./OBS.pkg ./$FILENAME
43
+else
44
+ cp ./OBS.pkg ./$FILENAME
45
+fi
46
47
# Move to the folder that travis uses to upload artifacts from
48
hr "Moving package to nightly folder for distribution"
49
obs-studio-23.0.1.tar.xz/CI/install-dependencies-linux.sh -> obs-studio-23.0.2.tar.xz/CI/install-dependencies-linux.sh
Changed
9
1
2
set -ex
3
4
sudo add-apt-repository ppa:jonathonf/ffmpeg-3 -y
5
+curl -L https://packagecloud.io/github/git-lfs/gpgkey | sudo apt-key add -
6
sudo apt-get -qq update
7
sudo apt-get install -y \
8
build-essential \
9
obs-studio-23.0.1.tar.xz/CI/install-dependencies-osx.sh -> obs-studio-23.0.2.tar.xz/CI/install-dependencies-osx.sh
Changed
12
1
2
# Echo all commands before executing
3
set -v
4
5
-git fetch --unshallow
6
+if [ -v "$TRAVIS" ]; then
7
+ git fetch --unshallow
8
+fi
9
10
# Leave obs-studio folder
11
cd ../
12
obs-studio-23.0.1.tar.xz/README.rst -> obs-studio-23.0.2.tar.xz/README.rst
Changed
12
1
2
:alt: OBS Studio Build Status - AppVeyor CI
3
:target: https://ci.appveyor.com/project/jp9000/obs-studio/branch/master
4
5
+.. image:: https://dev.azure.com/obsjim/obsjim/_apis/build/status/obsproject.obs-studio?branchName=master
6
+ :alt: OBS Studio Build Status - Azure Pipelines
7
+ :target: https://dev.azure.com/obsjim/obsjim/_build/latest?definitionId=1&branchName=master
8
+
9
.. image:: https://discordapp.com/api/guilds/348973006581923840/widget.png?style=shield
10
:alt: OBS Studio Discord Server
11
:target: https://obsproject.com/discord
12
obs-studio-23.0.1.tar.xz/UI/CMakeLists.txt -> obs-studio-23.0.2.tar.xz/UI/CMakeLists.txt
Changed
17
1
2
${obs_libffutil_SOURCES}
3
../deps/json11/json11.cpp
4
obs-app.cpp
5
+ window-dock.cpp
6
api-interface.cpp
7
window-basic-main.cpp
8
window-basic-stats.cpp
9
10
../deps/json11/json11.hpp
11
obs-app.hpp
12
platform.hpp
13
+ window-dock.hpp
14
window-main.hpp
15
window-basic-main.hpp
16
window-basic-stats.hpp
17
obs-studio-23.0.1.tar.xz/UI/auth-mixer.cpp -> obs-studio-23.0.2.tar.xz/UI/auth-mixer.cpp
Changed
21
1
2
3
#include "window-basic-main.hpp"
4
#include "remote-text.hpp"
5
+#include "window-dock.hpp"
6
7
#include <json11.hpp>
8
9
10
return OAuthStreamKey::LoadInternal();
11
}
12
13
-class MixerChat : public QDockWidget {
14
+class MixerChat : public OBSDock {
15
public:
16
- inline MixerChat() : QDockWidget() {}
17
+ inline MixerChat() : OBSDock() {}
18
19
QScopedPointer<QCefWidget> widget;
20
};
21
obs-studio-23.0.1.tar.xz/UI/auth-twitch.cpp -> obs-studio-23.0.2.tar.xz/UI/auth-twitch.cpp
Changed
21
1
2
3
#include "window-basic-main.hpp"
4
#include "remote-text.hpp"
5
+#include "window-dock.hpp"
6
7
#include <json11.hpp>
8
9
10
return OAuthStreamKey::LoadInternal();
11
}
12
13
-class TwitchWidget : public QDockWidget {
14
+class TwitchWidget : public OBSDock {
15
public:
16
- inline TwitchWidget() : QDockWidget() {}
17
+ inline TwitchWidget() : OBSDock() {}
18
19
QScopedPointer<QCefWidget> widget;
20
21
obs-studio-23.0.1.tar.xz/UI/data/locale/en-US.ini -> obs-studio-23.0.2.tar.xz/UI/data/locale/en-US.ini
Changed
19
1
2
ShowInMultiview="Show in Multiview"
3
VerticalLayout="Vertical Layout"
4
Group="Group"
5
+DoNotShowAgain="Do not show again"
6
7
# warning if program already open
8
AlreadyRunning.Title="OBS is already running"
9
AlreadyRunning.Text="OBS is already running! Unless you meant to do this, please shut down any existing instances of OBS before trying to run a new instance. If you have OBS set to minimize to the system tray, please check to see if it's still running there."
10
AlreadyRunning.LaunchAnyway="Launch Anyway"
11
12
+# warning when closing docks. it's frustrating that we actually need this.
13
+DockCloseWarning.Title="Closing Dockable Window"
14
+DockCloseWarning.Text="You just closed a dockable window. If you'd like to show it again, use the View → Docks menu on the menu bar."
15
+
16
# Auth
17
Auth.Authing.Title="Authenticating..."
18
Auth.Authing.Text="Authenticating with %1, please wait..."
19
obs-studio-23.0.1.tar.xz/UI/forms/OBSBasic.ui -> obs-studio-23.0.2.tar.xz/UI/forms/OBSBasic.ui
Changed
59
1
2
<addaction name="menuBasic_MainMenu_Help"/>
3
</widget>
4
<widget class="OBSBasicStatusBar" name="statusbar"/>
5
- <widget class="QDockWidget" name="scenesDock">
6
+ <widget class="OBSDock" name="scenesDock">
7
<property name="features">
8
<set>QDockWidget::AllDockWidgetFeatures</set>
9
</property>
10
11
</layout>
12
</widget>
13
</widget>
14
- <widget class="QDockWidget" name="sourcesDock">
15
+ <widget class="OBSDock" name="sourcesDock">
16
<property name="features">
17
<set>QDockWidget::AllDockWidgetFeatures</set>
18
</property>
19
20
</layout>
21
</widget>
22
</widget>
23
- <widget class="QDockWidget" name="mixerDock">
24
+ <widget class="OBSDock" name="mixerDock">
25
<property name="features">
26
<set>QDockWidget::AllDockWidgetFeatures</set>
27
</property>
28
29
</layout>
30
</widget>
31
</widget>
32
- <widget class="QDockWidget" name="transitionsDock">
33
+ <widget class="OBSDock" name="transitionsDock">
34
<property name="features">
35
<set>QDockWidget::AllDockWidgetFeatures</set>
36
</property>
37
38
</layout>
39
</widget>
40
</widget>
41
- <widget class="QDockWidget" name="controlsDock">
42
+ <widget class="OBSDock" name="controlsDock">
43
<property name="features">
44
<set>QDockWidget::AllDockWidgetFeatures</set>
45
</property>
46
47
<extends>QListView</extends>
48
<header>source-tree.hpp</header>
49
</customwidget>
50
+ <customwidget>
51
+ <class>OBSDock</class>
52
+ <extends>QDockWidget</extends>
53
+ <header>window-dock.hpp</header>
54
+ <container>1</container>
55
+ </customwidget>
56
</customwidgets>
57
<resources>
58
<include location="obs.qrc"/>
59
obs-studio-23.0.1.tar.xz/UI/forms/OBSBasicSettings.ui -> obs-studio-23.0.2.tar.xz/UI/forms/OBSBasicSettings.ui
Changed
149
1
2
</widget>
3
<tabstops>
4
<tabstop>listWidget</tabstop>
5
+ <tabstop>scrollArea_2</tabstop>
6
+ <tabstop>language</tabstop>
7
+ <tabstop>theme</tabstop>
8
+ <tabstop>enableAutoUpdates</tabstop>
9
+ <tabstop>openStatsOnStartup</tabstop>
10
+ <tabstop>warnBeforeStreamStart</tabstop>
11
+ <tabstop>warnBeforeStreamStop</tabstop>
12
+ <tabstop>recordWhenStreaming</tabstop>
13
+ <tabstop>keepRecordStreamStops</tabstop>
14
+ <tabstop>replayWhileStreaming</tabstop>
15
+ <tabstop>keepReplayStreamStops</tabstop>
16
+ <tabstop>snappingEnabled</tabstop>
17
+ <tabstop>snapDistance</tabstop>
18
+ <tabstop>screenSnapping</tabstop>
19
+ <tabstop>sourceSnapping</tabstop>
20
+ <tabstop>centerSnapping</tabstop>
21
+ <tabstop>hideProjectorCursor</tabstop>
22
+ <tabstop>projectorAlwaysOnTop</tabstop>
23
+ <tabstop>saveProjectors</tabstop>
24
+ <tabstop>systemTrayEnabled</tabstop>
25
+ <tabstop>systemTrayWhenStarted</tabstop>
26
+ <tabstop>systemTrayAlways</tabstop>
27
+ <tabstop>overflowHide</tabstop>
28
+ <tabstop>overflowAlwaysVisible</tabstop>
29
+ <tabstop>overflowSelectionHide</tabstop>
30
+ <tabstop>doubleClickSwitch</tabstop>
31
+ <tabstop>studioPortraitLayout</tabstop>
32
+ <tabstop>multiviewMouseSwitch</tabstop>
33
+ <tabstop>multiviewDrawNames</tabstop>
34
+ <tabstop>multiviewDrawAreas</tabstop>
35
+ <tabstop>multiviewLayout</tabstop>
36
+ <tabstop>service</tabstop>
37
+ <tabstop>connectAccount</tabstop>
38
+ <tabstop>useStreamKey</tabstop>
39
+ <tabstop>server</tabstop>
40
+ <tabstop>customServer</tabstop>
41
+ <tabstop>key</tabstop>
42
+ <tabstop>show</tabstop>
43
+ <tabstop>connectAccount2</tabstop>
44
+ <tabstop>disconnectAccount</tabstop>
45
+ <tabstop>useAuth</tabstop>
46
+ <tabstop>authUsername</tabstop>
47
+ <tabstop>authPw</tabstop>
48
+ <tabstop>authPwShow</tabstop>
49
+ <tabstop>scrollArea_3</tabstop>
50
<tabstop>outputMode</tabstop>
51
<tabstop>simpleOutputVBitrate</tabstop>
52
+ <tabstop>simpleOutStrEncoder</tabstop>
53
<tabstop>simpleOutputABitrate</tabstop>
54
<tabstop>simpleOutAdvanced</tabstop>
55
+ <tabstop>simpleOutEnforce</tabstop>
56
<tabstop>simpleOutPreset</tabstop>
57
<tabstop>simpleOutCustom</tabstop>
58
- <tabstop>simpleOutEnforce</tabstop>
59
- <tabstop>simpleOutStrEncoder</tabstop>
60
<tabstop>simpleOutputPath</tabstop>
61
<tabstop>simpleOutputBrowse</tabstop>
62
<tabstop>simpleNoSpace</tabstop>
63
64
<tabstop>advOutRecUseRescale</tabstop>
65
<tabstop>advOutRecRescale</tabstop>
66
<tabstop>advOutMuxCustom</tabstop>
67
+ <tabstop>advOutFFType</tabstop>
68
<tabstop>advOutFFRecPath</tabstop>
69
<tabstop>advOutFFPathBrowse</tabstop>
70
- <tabstop>advOutFFURL</tabstop>
71
+ <tabstop>advOutFFNoSpace</tabstop>
72
<tabstop>advOutFFFormat</tabstop>
73
+ <tabstop>advOutFFMCfg</tabstop>
74
<tabstop>advOutFFVBitrate</tabstop>
75
<tabstop>advOutFFVGOPSize</tabstop>
76
<tabstop>advOutFFUseRescale</tabstop>
77
78
<tabstop>advOutFFTrack6</tabstop>
79
<tabstop>advOutFFAEncoder</tabstop>
80
<tabstop>advOutFFACfg</tabstop>
81
- <tabstop>advOutFFType</tabstop>
82
- <tabstop>advOutFFMCfg</tabstop>
83
- <tabstop>advOutFFNoSpace</tabstop>
84
+ <tabstop>advOutFFURL</tabstop>
85
<tabstop>advOutTrack1Bitrate</tabstop>
86
<tabstop>advOutTrack1Name</tabstop>
87
<tabstop>advOutTrack2Bitrate</tabstop>
88
89
<tabstop>advOutTrack5Name</tabstop>
90
<tabstop>advOutTrack6Bitrate</tabstop>
91
<tabstop>advOutTrack6Name</tabstop>
92
+ <tabstop>advReplayBuf</tabstop>
93
+ <tabstop>advRBSecMax</tabstop>
94
+ <tabstop>advRBMegsMax</tabstop>
95
<tabstop>sampleRate</tabstop>
96
<tabstop>channelSetup</tabstop>
97
<tabstop>desktopAudioDevice1</tabstop>
98
99
<tabstop>auxAudioDevice1</tabstop>
100
<tabstop>auxAudioDevice2</tabstop>
101
<tabstop>auxAudioDevice3</tabstop>
102
+ <tabstop>auxAudioDevice4</tabstop>
103
+ <tabstop>meterDecayRate</tabstop>
104
+ <tabstop>peakMeterType</tabstop>
105
<tabstop>audioSourceScrollArea</tabstop>
106
<tabstop>baseResolution</tabstop>
107
<tabstop>outputResolution</tabstop>
108
109
<tabstop>disableOSXVSync</tabstop>
110
<tabstop>resetOSXVSync</tabstop>
111
<tabstop>monitoringDevice</tabstop>
112
+ <tabstop>disableAudioDucking</tabstop>
113
<tabstop>filenameFormatting</tabstop>
114
<tabstop>overwriteIfExists</tabstop>
115
+ <tabstop>autoRemux</tabstop>
116
<tabstop>simpleRBPrefix</tabstop>
117
<tabstop>simpleRBSuffix</tabstop>
118
<tabstop>streamDelayEnable</tabstop>
119
120
<tabstop>bindToIP</tabstop>
121
<tabstop>enableNewSocketLoop</tabstop>
122
<tabstop>enableLowLatencyMode</tabstop>
123
- <tabstop>warnBeforeStreamStop</tabstop>
124
- <tabstop>recordWhenStreaming</tabstop>
125
- <tabstop>keepRecordStreamStops</tabstop>
126
- <tabstop>replayWhileStreaming</tabstop>
127
- <tabstop>keepReplayStreamStops</tabstop>
128
- <tabstop>snappingEnabled</tabstop>
129
- <tabstop>screenSnapping</tabstop>
130
- <tabstop>centerSnapping</tabstop>
131
- <tabstop>sourceSnapping</tabstop>
132
- <tabstop>snapDistance</tabstop>
133
- <tabstop>hideProjectorCursor</tabstop>
134
- <tabstop>projectorAlwaysOnTop</tabstop>
135
- <tabstop>saveProjectors</tabstop>
136
- <tabstop>systemTrayEnabled</tabstop>
137
- <tabstop>systemTrayWhenStarted</tabstop>
138
- <tabstop>systemTrayAlways</tabstop>
139
- <tabstop>enableAutoUpdates</tabstop>
140
- <tabstop>warnBeforeStreamStart</tabstop>
141
- <tabstop>scrollArea_2</tabstop>
142
- <tabstop>language</tabstop>
143
- <tabstop>theme</tabstop>
144
+ <tabstop>browserHWAccel</tabstop>
145
+ <tabstop>disableFocusHotkeys</tabstop>
146
</tabstops>
147
<resources>
148
<include location="obs.qrc"/>
149
obs-studio-23.0.1.tar.xz/UI/frontend-plugins/frontend-tools/scripts.cpp -> obs-studio-23.0.2.tar.xz/UI/frontend-plugins/frontend-tools/scripts.cpp
Changed
17
1
2
obs_properties_t *prop =
3
obs_script_get_properties(script);
4
obs_properties_apply_settings(prop, settings);
5
+ obs_properties_destroy(prop);
6
7
break;
8
}
9
10
obs_properties_t *prop =
11
obs_script_get_properties(script);
12
obs_properties_apply_settings(prop, settings);
13
+ obs_properties_destroy(prop);
14
}
15
}
16
}
17
obs-studio-23.0.1.tar.xz/UI/obs-app.cpp -> obs-studio-23.0.2.tar.xz/UI/obs-app.cpp
Changed
44
1
2
config_set_default_string(globalConfig, "Basic", "SceneCollectionFile",
3
Str("Untitled"));
4
5
+ if (!config_has_user_value(globalConfig, "Basic", "Profile")) {
6
+ config_set_string(globalConfig, "Basic", "Profile",
7
+ Str("Untitled"));
8
+ config_set_string(globalConfig, "Basic", "ProfileDir",
9
+ Str("Untitled"));
10
+ }
11
+
12
+ if (!config_has_user_value(globalConfig, "Basic", "SceneCollection")) {
13
+ config_set_string(globalConfig, "Basic",
14
+ "SceneCollection", Str("Untitled"));
15
+ config_set_string(globalConfig, "Basic",
16
+ "SceneCollectionFile", Str("Untitled"));
17
+ }
18
+
19
#ifdef _WIN32
20
bool disableAudioDucking = config_get_bool(globalConfig, "Audio",
21
"DisableAudioDucking");
22
23
ResetHotkeyState(applicationState() != Qt::ApplicationActive);
24
}
25
26
+Q_DECLARE_METATYPE(VoidFunc)
27
+
28
+void OBSApp::Exec(VoidFunc func)
29
+{
30
+ func();
31
+}
32
+
33
bool OBSApp::OBSInit()
34
{
35
ProfileScope("OBSApp::OBSInit");
36
37
setAttribute(Qt::AA_UseHighDpiPixmaps);
38
39
+ qRegisterMetaType<VoidFunc>();
40
+
41
if (!StartupOBS(locale.c_str(), GetProfilerNameStore()))
42
return false;
43
44
obs-studio-23.0.1.tar.xz/UI/obs-app.hpp -> obs-studio-23.0.2.tar.xz/UI/obs-app.hpp
Changed
28
1
2
#include <util/util.hpp>
3
#include <util/platform.h>
4
#include <obs-frontend-api.h>
5
+#include <functional>
6
#include <string>
7
#include <memory>
8
#include <vector>
9
10
const char *disambiguation, int n) const override;
11
};
12
13
+typedef std::function<void ()> VoidFunc;
14
+
15
class OBSApp : public QApplication {
16
Q_OBJECT
17
18
19
translatorHooks.pop_front();
20
}
21
22
+public slots:
23
+ void Exec(VoidFunc func);
24
+
25
signals:
26
void StyleChanged();
27
};
28
obs-studio-23.0.1.tar.xz/UI/window-basic-main.cpp -> obs-studio-23.0.2.tar.xz/UI/window-basic-main.cpp
Changed
27
1
2
3
startingDockLayout = saveState();
4
5
- statsDock = new QDockWidget();
6
+ statsDock = new OBSDock();
7
statsDock->setObjectName(QStringLiteral("statsDock"));
8
statsDock->setFeatures(QDockWidget::AllDockWidgetFeatures);
9
statsDock->setWindowTitle(QTStr("Basic.Stats"));
10
11
#if OBS_RELEASE_CANDIDATE > 0
12
if (lastVersion < OBS_RELEASE_CANDIDATE_VER) {
13
#else
14
- if (lastVersion < LIBOBS_API_VER) {
15
+ if ((lastVersion & ~0xFFFF) < (LIBOBS_API_VER & ~0xFFFF)) {
16
#endif
17
config_set_int(App()->GlobalConfig(), "General",
18
"InfoIncrement", -1);
19
20
return;
21
22
replayBufferButton->setText(QTStr("Basic.Main.StartReplayBuffer"));
23
+ replayBufferButton->setChecked(false);
24
25
if (sysTrayReplayBuffer)
26
sysTrayReplayBuffer->setText(replayBufferButton->text());
27
obs-studio-23.0.2.tar.xz/UI/window-dock.cpp
Added
40
1
2
+#include "window-dock.hpp"
3
+#include "obs-app.hpp"
4
+
5
+#include <QMessageBox>
6
+#include <QCheckBox>
7
+
8
+void OBSDock::closeEvent(QCloseEvent *event)
9
+{
10
+ auto msgBox = [] ()
11
+ {
12
+ QMessageBox msgbox(App()->GetMainWindow());
13
+ msgbox.setWindowTitle(QTStr("DockCloseWarning.Title"));
14
+ msgbox.setText(QTStr("DockCloseWarning.Text"));
15
+ msgbox.setIcon(QMessageBox::Icon::Information);
16
+ msgbox.addButton(QMessageBox::Ok);
17
+
18
+ QCheckBox *cb = new QCheckBox(QTStr("DoNotShowAgain"));
19
+ msgbox.setCheckBox(cb);
20
+
21
+ msgbox.exec();
22
+
23
+ if (cb->isChecked()) {
24
+ config_set_bool(App()->GlobalConfig(), "General",
25
+ "WarnedAboutClosingDocks", true);
26
+ config_save_safe(App()->GlobalConfig(), "tmp", nullptr);
27
+ }
28
+ };
29
+
30
+ bool warned = config_get_bool(App()->GlobalConfig(), "General",
31
+ "WarnedAboutClosingDocks");
32
+ if (!warned) {
33
+ QMetaObject::invokeMethod(App(), "Exec",
34
+ Qt::QueuedConnection,
35
+ Q_ARG(VoidFunc, msgBox));
36
+ }
37
+
38
+ QDockWidget::closeEvent(event);
39
+}
40
obs-studio-23.0.2.tar.xz/UI/window-dock.hpp
Added
14
1
2
+#pragma once
3
+
4
+#include <QDockWidget>
5
+
6
+class OBSDock : public QDockWidget {
7
+ Q_OBJECT
8
+
9
+public:
10
+ inline OBSDock(QWidget *parent = nullptr) : QDockWidget(parent) {}
11
+
12
+ virtual void closeEvent(QCloseEvent *event);
13
+};
14
obs-studio-23.0.2.tar.xz/azure-pipelines.yml
Added
39
1
2
+# Starter pipeline
3
+# Start with a minimal pipeline that you can customize to build and deploy your code.
4
+# Add steps that build, run tests, deploy, and more:
5
+# https://aka.ms/yaml
6
+
7
+pool:
8
+ vmImage: 'macOS-10.13'
9
+
10
+variables:
11
+ CMAKE_PREFIX_PATH: /usr/local/opt/qt5/lib/cmake
12
+ CEF_BUILD_VERSION: 3.3282.1726.gc8368c8
13
+
14
+steps:
15
+- script: git submodule update --init --recursive
16
+ displayName: 'Checkout Submodules'
17
+
18
+- script: ./CI/install-dependencies-osx.sh
19
+ displayName: 'Install Dependencies'
20
+
21
+- script: ./CI/before-script-osx.sh
22
+ displayName: 'Cmake'
23
+
24
+- bash: |
25
+ cd ./build
26
+ make -j4
27
+ cd -
28
+ displayName: 'Build'
29
+
30
+- script: ./CI/before-deploy-osx.sh
31
+ condition: ne(variables['Build.Reason'], 'PullRequest')
32
+ displayName: 'Before Deploy'
33
+
34
+- task: PublishBuildArtifacts@1
35
+ condition: ne(variables['Build.Reason'], 'PullRequest')
36
+ inputs:
37
+ pathtoPublish: './nightly'
38
+ artifactName: build
39
obs-studio-23.0.1.tar.xz/libobs-d3d11/d3d11-rebuild.cpp -> obs-studio-23.0.2.tar.xz/libobs-d3d11/d3d11-rebuild.cpp
Changed
33
1
2
if (FAILED(hr))
3
throw HRError("Failed to create GDI surface", hr);
4
}
5
+
6
+ acquired = false;
7
+
8
+ if ((td.MiscFlags & D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX) != 0) {
9
+ ComQIPtr<IDXGIResource> dxgi_res(texture);
10
+ if (dxgi_res)
11
+ GetSharedHandle(dxgi_res);
12
+ device_texture_acquire_sync(this, 0, INFINITE);
13
+ }
14
}
15
16
void gs_texture_2d::RebuildNV12_Y(ID3D11Device *dev)
17
18
InitRenderTargets();
19
20
tex_uv->RebuildNV12_UV(dev);
21
+
22
+ acquired = false;
23
+
24
+ if ((td.MiscFlags & D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX) != 0) {
25
+ ComQIPtr<IDXGIResource> dxgi_res(texture);
26
+ if (dxgi_res)
27
+ GetSharedHandle(dxgi_res);
28
+ device_texture_acquire_sync(this, 0, INFINITE);
29
+ }
30
}
31
32
void gs_texture_2d::RebuildNV12_UV(ID3D11Device *dev)
33
obs-studio-23.0.1.tar.xz/libobs-d3d11/d3d11-subsystem.cpp -> obs-studio-23.0.2.tar.xz/libobs-d3d11/d3d11-subsystem.cpp
Changed
201
1
2
D3D_FEATURE_LEVEL_9_3,
3
};
4
5
-static const char *blacklisted_nv12_geforce_gpus[] = {
6
- "8100",
7
- "8200",
8
- "8300",
9
- "8400",
10
- "8500",
11
- "8600",
12
- "8800",
13
- "9300",
14
- "9400",
15
- "9500",
16
- "9600",
17
- "9800"
18
-};
19
+/* ------------------------------------------------------------------------- */
20
+
21
+#define VERT_IN_OUT "\
22
+struct VertInOut { \
23
+ float4 pos : POSITION; \
24
+}; "
25
+
26
+#define NV12_Y_PS VERT_IN_OUT "\
27
+float main(VertInOut vert_in) : TARGET \
28
+{ \
29
+ return 1.0; \
30
+}"
31
+
32
+#define NV12_UV_PS VERT_IN_OUT "\
33
+float2 main(VertInOut vert_in) : TARGET \
34
+{ \
35
+ return float2(1.0, 1.0); \
36
+}"
37
+
38
+#define NV12_VS VERT_IN_OUT "\
39
+VertInOut main(VertInOut vert_in) \
40
+{ \
41
+ VertInOut vert_out; \
42
+ vert_out.pos = float4(vert_in.pos.xyz, 1.0); \
43
+ return vert_out; \
44
+} "
45
+
46
+/* ------------------------------------------------------------------------- */
47
+
48
+#define NV12_CX 128
49
+#define NV12_CY 128
50
+
51
+bool gs_device::HasBadNV12Output()
52
+try {
53
+ vec3 points[4];
54
+ vec3_set(&points[0], -1.0f, -1.0f, 0.0f);
55
+ vec3_set(&points[1], -1.0f, 1.0f, 0.0f);
56
+ vec3_set(&points[2], 1.0f, -1.0f, 0.0f);
57
+ vec3_set(&points[3], 1.0f, 1.0f, 0.0f);
58
+
59
+ gs_texture_2d nv12_y(this, NV12_CX, NV12_CY, GS_R8, 1, nullptr,
60
+ GS_RENDER_TARGET, GS_TEXTURE_2D, false, true);
61
+ gs_texture_2d nv12_uv(this, nv12_y.texture, GS_RENDER_TARGET);
62
+ gs_vertex_shader nv12_vs(this, "", NV12_VS);
63
+ gs_pixel_shader nv12_y_ps(this, "", NV12_Y_PS);
64
+ gs_pixel_shader nv12_uv_ps(this, "", NV12_UV_PS);
65
+ gs_stage_surface nv12_stage(this, NV12_CX, NV12_CY);
66
+
67
+ gs_vb_data *vbd = gs_vbdata_create();
68
+ vbd->num = 4;
69
+ vbd->points = (vec3*)bmemdup(&points, sizeof(points));
70
+
71
+ gs_vertex_buffer buf(this, vbd, 0);
72
+
73
+ device_load_vertexbuffer(this, &buf);
74
+ device_load_vertexshader(this, &nv12_vs);
75
+
76
+ context->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
77
+
78
+ device_set_viewport(this, 0, 0, NV12_CX, NV12_CY);
79
+ device_set_cull_mode(this, GS_NEITHER);
80
+ device_enable_depth_test(this, false);
81
+ device_enable_blending(this, false);
82
+ LoadVertexBufferData();
83
+
84
+ device_set_render_target(this, &nv12_y, nullptr);
85
+ device_load_pixelshader(this, &nv12_y_ps);
86
+ UpdateBlendState();
87
+ UpdateRasterState();
88
+ UpdateZStencilState();
89
+ context->Draw(4, 0);
90
+
91
+ device_set_viewport(this, 0, 0, NV12_CX/2, NV12_CY/2);
92
+ device_set_render_target(this, &nv12_uv, nullptr);
93
+ device_load_pixelshader(this, &nv12_uv_ps);
94
+ UpdateBlendState();
95
+ UpdateRasterState();
96
+ UpdateZStencilState();
97
+ context->Draw(4, 0);
98
+
99
+ device_load_pixelshader(this, nullptr);
100
+ device_load_vertexshader(this, nullptr);
101
+ device_set_render_target(this, nullptr, nullptr);
102
+
103
+ device_stage_texture(this, &nv12_stage, &nv12_y);
104
+
105
+ uint8_t *data;
106
+ uint32_t linesize;
107
+ bool bad_driver = false;
108
+
109
+ if (gs_stagesurface_map(&nv12_stage, &data, &linesize)) {
110
+ bad_driver = data[linesize * NV12_CY] == 0;
111
+ gs_stagesurface_unmap(&nv12_stage);
112
+ }
113
+
114
+ if (bad_driver) {
115
+ blog(LOG_WARNING, "Bad NV12 texture handling detected! "
116
+ "Disabling NV12 texture support.");
117
+ }
118
+ return bad_driver;
119
+
120
+} catch (HRError) {
121
+ return false;
122
+} catch (const char *) {
123
+ return false;
124
+}
125
126
void gs_device::InitDevice(uint32_t adapterIdx)
127
{
128
129
/* check for nv12 texture output support */
130
131
nv12Supported = false;
132
- bool geforce = astrstri(adapterNameUTF8, "geforce") != nullptr;
133
- bool nvidia = astrstri(adapterNameUTF8, "nvidia") != nullptr;
134
-
135
- /* don't use on blacklisted adapters */
136
- if (geforce) {
137
- for (const char *old_gpu : blacklisted_nv12_geforce_gpus) {
138
- if (astrstri(adapterNameUTF8, old_gpu) != nullptr) {
139
- return;
140
- }
141
- }
142
- }
143
-
144
- /* Disable NV12 textures if NVENC not available, just as a safety
145
- * measure */
146
- if (nvidia) {
147
- HMODULE nvenc = LoadLibraryW((sizeof(void*) == 8)
148
- ? L"nvEncodeAPI64.dll"
149
- : L"nvEncodeAPI.dll");
150
- if (!nvenc) {
151
- return;
152
- }
153
- }
154
155
ComQIPtr<ID3D11Device1> d3d11_1(device);
156
if (!d3d11_1) {
157
158
return;
159
}
160
161
+ if (HasBadNV12Output()) {
162
+ return;
163
+ }
164
+
165
nv12Supported = true;
166
}
167
168
169
return tex2d->isShared ? tex2d->sharedHandle : GS_INVALID_HANDLE;
170
}
171
172
-extern "C" EXPORT int device_texture_acquire_sync(gs_texture_t *tex,
173
- uint64_t key, uint32_t ms)
174
+int device_texture_acquire_sync(gs_texture_t *tex, uint64_t key, uint32_t ms)
175
{
176
gs_texture_2d *tex2d = reinterpret_cast<gs_texture_2d *>(tex);
177
if (tex->type != GS_TEXTURE_2D)
178
return -1;
179
180
+ if (tex2d->acquired)
181
+ return 0;
182
+
183
ComQIPtr<IDXGIKeyedMutex> keyedMutex(tex2d->texture);
184
if (!keyedMutex)
185
return -1;
186
187
HRESULT hr = keyedMutex->AcquireSync(key, ms);
188
- if (hr == S_OK)
189
+ if (hr == S_OK) {
190
+ tex2d->acquired = true;
191
return 0;
192
- else if (hr == WAIT_TIMEOUT)
193
+ } else if (hr == WAIT_TIMEOUT) {
194
return ETIMEDOUT;
195
+ }
196
197
return -1;
198
}
199
200
if (tex->type != GS_TEXTURE_2D)
201
obs-studio-23.0.1.tar.xz/libobs-d3d11/d3d11-subsystem.hpp -> obs-studio-23.0.2.tar.xz/libobs-d3d11/d3d11-subsystem.hpp
Changed
29
1
2
gs_texture_2d *pairedNV12texture = nullptr;
3
bool nv12 = false;
4
bool chroma = false;
5
+ bool acquired = false;
6
7
vector<vector<uint8_t>> data;
8
vector<D3D11_SUBRESOURCE_DATA> srd;
9
10
void InitResourceView();
11
void InitRenderTargets();
12
void BackupTexture(const uint8_t **data);
13
+ void GetSharedHandle(IDXGIResource *dxgi_res);
14
15
void RebuildSharedTextureFallback();
16
void Rebuild(ID3D11Device *dev);
17
18
19
void RebuildDevice();
20
21
+ bool HasBadNV12Output();
22
+
23
gs_device(uint32_t adapterIdx);
24
~gs_device();
25
};
26
+
27
+extern "C" EXPORT int device_texture_acquire_sync(gs_texture_t *tex,
28
+ uint64_t key, uint32_t ms);
29
obs-studio-23.0.1.tar.xz/libobs-d3d11/d3d11-texture2d.cpp -> obs-studio-23.0.2.tar.xz/libobs-d3d11/d3d11-texture2d.cpp
Changed
46
1
2
}
3
}
4
5
+void gs_texture_2d::GetSharedHandle(IDXGIResource *dxgi_res)
6
+{
7
+ HANDLE handle;
8
+ HRESULT hr;
9
+
10
+ hr = dxgi_res->GetSharedHandle(&handle);
11
+ if (FAILED(hr)) {
12
+ blog(LOG_WARNING, "GetSharedHandle: Failed to "
13
+ "get shared handle: %08lX", hr);
14
+ } else {
15
+ sharedHandle = (uint32_t)(uintptr_t)handle;
16
+ }
17
+}
18
+
19
void gs_texture_2d::InitTexture(const uint8_t **data)
20
{
21
HRESULT hr;
22
23
blog(LOG_WARNING, "InitTexture: Failed to query "
24
"interface: %08lX", hr);
25
} else {
26
- HANDLE handle;
27
- hr = dxgi_res->GetSharedHandle(&handle);
28
- if (FAILED(hr)) {
29
- blog(LOG_WARNING, "InitTexture: Failed to "
30
- "get shared handle: %08lX", hr);
31
- } else {
32
- sharedHandle = (uint32_t)(uintptr_t)handle;
33
- }
34
+ GetSharedHandle(dxgi_res);
35
36
if (flags & GS_SHARED_KM_TEX) {
37
ComPtr<IDXGIKeyedMutex> km;
38
39
}
40
41
km->AcquireSync(0, INFINITE);
42
+ acquired = true;
43
}
44
}
45
}
46
obs-studio-23.0.1.tar.xz/libobs/obs-config.h -> obs-studio-23.0.2.tar.xz/libobs/obs-config.h
Changed
10
1
2
*
3
* Reset to zero each major or minor version
4
*/
5
-#define LIBOBS_API_PATCH_VER 1
6
+#define LIBOBS_API_PATCH_VER 2
7
8
#define MAKE_SEMANTIC_VERSION(major, minor, patch) \
9
((major << 24) | \
10
obs-studio-23.0.1.tar.xz/libobs/obs-video.c -> obs-studio-23.0.2.tar.xz/libobs/obs-video.c
Changed
26
1
2
3
tf.tex = tex;
4
tf.tex_uv = tex_uv;
5
- tf.handle = gs_texture_get_shared_handle(tex);
6
}
7
8
tf.count = 1;
9
tf.timestamp = vframe_info->timestamp;
10
tf.released = true;
11
+ tf.handle = gs_texture_get_shared_handle(tf.tex);
12
gs_texture_release_sync(tf.tex, ++tf.lock_key);
13
circlebuf_push_back(&video->gpu_encoder_queue, &tf, sizeof(tf));
14
15
16
static void clear_base_frame_data(void)
17
{
18
struct obs_core_video *video = &obs->video;
19
- memset(video->textures_copied, 0, sizeof(video->textures_copied));
20
- memset(video->textures_converted, 0, sizeof(video->textures_converted));
21
+ memset(video->textures_rendered, 0, sizeof(video->textures_rendered));
22
+ memset(video->textures_output, 0, sizeof(video->textures_output));
23
circlebuf_free(&video->vframe_info_buffer);
24
video->cur_texture = 0;
25
}
26
obs-studio-23.0.1.tar.xz/plugins/obs-ffmpeg/jim-nvenc.c -> obs-studio-23.0.2.tar.xz/plugins/obs-ffmpeg/jim-nvenc.c
Changed
24
1
2
3
} else if (astrcmpi(rc, "vbr") != 0) { /* CBR by default */
4
h264_config->outputBufferingPeriodSEI = 1;
5
- h264_config->outputPictureTimingSEI = 1;
6
config->rcParams.rateControlMode = twopass
7
? NV_ENC_PARAMS_RC_2_PASS_QUALITY
8
: NV_ENC_PARAMS_RC_CBR;
9
}
10
11
+ h264_config->outputPictureTimingSEI = 1;
12
config->rcParams.averageBitRate = bitrate * 1000;
13
config->rcParams.maxBitRate = vbr ? max_bitrate * 1000 : bitrate * 1000;
14
15
16
}
17
18
*sei = enc->sei;
19
- *size = enc->header_size;
20
+ *size = enc->sei_size;
21
return true;
22
}
23
24
obs-studio-23.0.1.tar.xz/plugins/obs-ffmpeg/obs-ffmpeg-output.c -> obs-studio-23.0.2.tar.xz/plugins/obs-ffmpeg/obs-ffmpeg-output.c
Changed
41
1
2
for (size_t i = 0; i < MAX_AV_PLANES; i++)
3
circlebuf_free(&data->excess_frames[idx][i]);
4
5
- av_freep(&data->samples[idx][0]);
6
- avcodec_close(data->audio_streams[idx]->codec);
7
- av_frame_free(&data->aframe[idx]);
8
+ if (data->samples[idx][0])
9
+ av_freep(&data->samples[idx][0]);
10
+ if (data->audio_streams[idx])
11
+ avcodec_close(data->audio_streams[idx]->codec);
12
+ if (data->aframe[idx])
13
+ av_frame_free(&data->aframe[idx]);
14
}
15
}
16
17
18
avformat_alloc_output_context2(&data->output, output_format,
19
NULL, NULL);
20
21
+ if (!data->output) {
22
+ blog(LOG_WARNING, "Couldn't create avformat context");
23
+ goto fail;
24
+ }
25
+
26
if (is_rtmp) {
27
data->output->oformat->video_codec = AV_CODEC_ID_H264;
28
data->output->oformat->audio_codec = AV_CODEC_ID_AAC;
29
30
set_encoder_ids(data);
31
}
32
33
- if (!data->output) {
34
- blog(LOG_WARNING, "Couldn't create avformat context");
35
- goto fail;
36
- }
37
-
38
if (!init_streams(data))
39
goto fail;
40
if (!open_output_file(data))
41
obs-studio-23.0.1.tar.xz/plugins/obs-ffmpeg/obs-ffmpeg.c -> obs-studio-23.0.2.tar.xz/plugins/obs-ffmpeg/obs-ffmpeg.c
Changed
10
1
2
{
3
for (size_t i = 0; i < num_blacklisted; i++) {
4
const wchar_t *blacklisted_adapter = blacklisted_adapters[i];
5
- if (wstrstri(blacklisted_adapter, name)) {
6
+ if (wstrstri(name, blacklisted_adapter)) {
7
return true;
8
}
9
}
10
obs-studio-23.0.1.tar.xz/plugins/obs-qsv11/QSV_Encoder.cpp -> obs-studio-23.0.2.tar.xz/plugins/obs-qsv11/QSV_Encoder.cpp
Changed
21
1
2
case 0x45:
3
case 0x46:
4
return QSV_CPU_PLATFORM_HSW;
5
-
6
- case 0x3d:
7
- case 0x47:
8
- case 0x4f:
9
- case 0x56:
10
- return QSV_CPU_PLATFORM_BDW;
11
-
12
- case 0x4e:
13
- case 0x5e:
14
- return QSV_CPU_PLATFORM_SKL;
15
}
16
- //assume newer revisions are at least as capable as Skylake
17
+
18
+ //assume newer revisions are at least as capable as Haswell
19
return QSV_CPU_PLATFORM_INTEL;
20
}
21
obs-studio-23.0.1.tar.xz/plugins/obs-qsv11/QSV_Encoder.h -> obs-studio-23.0.2.tar.xz/plugins/obs-qsv11/QSV_Encoder.h
Changed
29
1
2
{"CQP", false},
3
{"AVBR", false},
4
{"ICQ", true},
5
- {"LA_CBR", true},
6
- {"LA_VBR", true},
7
{"LA_ICQ", true},
8
+ {"LA", true},
9
{0, false}
10
};
11
static const char * const qsv_profile_names[] = {
12
13
mfxU16 nKeyIntSec;
14
mfxU16 nbFrames;
15
mfxU16 nICQQuality;
16
- bool bMBBRC;
17
} qsv_param_t;
18
19
enum qsv_cpu_platform {
20
21
QSV_CPU_PLATFORM_SLM,
22
QSV_CPU_PLATFORM_CHT,
23
QSV_CPU_PLATFORM_HSW,
24
- QSV_CPU_PLATFORM_BDW,
25
- QSV_CPU_PLATFORM_SKL,
26
QSV_CPU_PLATFORM_INTEL
27
};
28
29
obs-studio-23.0.1.tar.xz/plugins/obs-qsv11/QSV_Encoder_Internal.cpp -> obs-studio-23.0.2.tar.xz/plugins/obs-qsv11/QSV_Encoder_Internal.cpp
Changed
127
1
2
m_nTaskPool(0),
3
m_pTaskPool(NULL),
4
m_nTaskIdx(0),
5
- m_nFirstSyncTask(0)
6
+ m_nFirstSyncTask(0),
7
+ m_outBitstream()
8
{
9
mfxIMPL tempImpl;
10
mfxStatus sts;
11
12
{
13
memset(&m_mfxEncParams, 0, sizeof(m_mfxEncParams));
14
15
-
16
m_mfxEncParams.mfx.CodecId = MFX_CODEC_AVC;
17
m_mfxEncParams.mfx.GopOptFlag = MFX_GOP_STRICT;
18
m_mfxEncParams.mfx.NumSlice = 1;
19
20
m_mfxEncParams.mfx.FrameInfo.CropY = 0;
21
m_mfxEncParams.mfx.FrameInfo.CropW = pParams->nWidth;
22
m_mfxEncParams.mfx.FrameInfo.CropH = pParams->nHeight;
23
- m_mfxEncParams.mfx.GopRefDist = pParams->nbFrames + 1;
24
25
m_mfxEncParams.mfx.RateControlMethod = pParams->nRateControl;
26
27
28
case MFX_RATECONTROL_LA_ICQ:
29
m_mfxEncParams.mfx.ICQQuality = pParams->nICQQuality;
30
break;
31
- case MFX_RATECONTROL_LA_HRD:
32
- m_mfxEncParams.mfx.TargetKbps = pParams->nTargetBitRate;
33
- m_mfxEncParams.mfx.MaxKbps = pParams->nTargetBitRate;
34
- break;
35
default:
36
break;
37
}
38
39
40
static mfxExtBuffer* extendedBuffers[2];
41
int iBuffers = 0;
42
+ if (pParams->nAsyncDepth == 1) {
43
+ m_mfxEncParams.mfx.NumRefFrame = 1;
44
+ // low latency, I and P frames only
45
+ m_mfxEncParams.mfx.GopRefDist = 1;
46
+ memset(&m_co, 0, sizeof(mfxExtCodingOption));
47
+ m_co.Header.BufferId = MFX_EXTBUFF_CODING_OPTION;
48
+ m_co.Header.BufferSz = sizeof(mfxExtCodingOption);
49
+ m_co.MaxDecFrameBuffering = 1;
50
+ extendedBuffers[iBuffers++] = (mfxExtBuffer*)&m_co;
51
+ }
52
+ else
53
+ m_mfxEncParams.mfx.GopRefDist = pParams->nbFrames + 1;
54
55
- memset(&m_co2, 0, sizeof(mfxExtCodingOption2));
56
- m_co2.Header.BufferId = MFX_EXTBUFF_CODING_OPTION2;
57
- m_co2.Header.BufferSz = sizeof(m_co2);
58
- if (pParams->bMBBRC)
59
- m_co2.MBBRC = MFX_CODINGOPTION_ON;
60
if (pParams->nRateControl == MFX_RATECONTROL_LA_ICQ ||
61
- pParams->nRateControl == MFX_RATECONTROL_LA)
62
+ pParams->nRateControl == MFX_RATECONTROL_LA) {
63
+
64
+ memset(&m_co2, 0, sizeof(mfxExtCodingOption2));
65
+ m_co2.Header.BufferId = MFX_EXTBUFF_CODING_OPTION;
66
+ m_co2.Header.BufferSz = sizeof(m_co2);
67
m_co2.LookAheadDepth = pParams->nLADEPTH;
68
- if (pParams->nbFrames > 1)
69
- m_co2.BRefType = MFX_B_REF_PYRAMID;
70
- extendedBuffers[iBuffers++] = (mfxExtBuffer*)& m_co2;
71
+ extendedBuffers[iBuffers++] = (mfxExtBuffer*)& m_co2;
72
+ }
73
74
if (iBuffers > 0) {
75
m_mfxEncParams.ExtParam = extendedBuffers;
76
77
mfxStatus sts = MFX_ERR_NONE;
78
sts = Drain();
79
80
- sts = m_pmfxENC->Close();
81
+ if (m_pmfxENC)
82
+ {
83
+ sts = m_pmfxENC->Close();
84
+ delete m_pmfxENC;
85
+ m_pmfxENC = NULL;
86
+ }
87
88
if (m_bUseD3D11 || m_bD3D9HACK)
89
m_mfxAllocator.Free(m_mfxAllocator.pthis, &m_mfxResponse);
90
91
- for (int i = 0; i < m_nSurfNum; i++) {
92
- if (!m_bUseD3D11 && !m_bD3D9HACK)
93
- delete m_pmfxSurfaces[i]->Data.Y;
94
+ if (m_pmfxSurfaces) {
95
+ for (int i = 0; i < m_nSurfNum; i++) {
96
+ if (!m_bUseD3D11 && !m_bD3D9HACK)
97
+ delete m_pmfxSurfaces[i]->Data.Y;
98
99
- delete m_pmfxSurfaces[i];
100
+ delete m_pmfxSurfaces[i];
101
+ }
102
+ MSDK_SAFE_DELETE_ARRAY(m_pmfxSurfaces);
103
}
104
- MSDK_SAFE_DELETE_ARRAY(m_pmfxSurfaces);
105
106
- for (int i = 0; i < m_nTaskPool; i++)
107
- delete m_pTaskPool[i].mfxBS.Data;
108
- MSDK_SAFE_DELETE_ARRAY(m_pTaskPool);
109
-
110
- delete m_outBitstream.Data;
111
+ if (m_pTaskPool) {
112
+ for (int i = 0; i < m_nTaskPool; i++)
113
+ delete m_pTaskPool[i].mfxBS.Data;
114
+ MSDK_SAFE_DELETE_ARRAY(m_pTaskPool);
115
+ }
116
117
- delete m_pmfxENC;
118
- m_pmfxENC = NULL;
119
+ if (m_outBitstream.Data)
120
+ {
121
+ delete m_outBitstream.Data;
122
+ m_outBitstream.Data = NULL;
123
+ }
124
125
if (sts >= MFX_ERR_NONE) {
126
g_numEncodersOpen--;
127
obs-studio-23.0.1.tar.xz/plugins/obs-qsv11/obs-qsv11.c -> obs-studio-23.0.2.tar.xz/plugins/obs-qsv11/obs-qsv11.c
Changed
148
1
2
obs_data_set_default_string(settings, "target_usage", "balanced");
3
obs_data_set_default_int(settings, "bitrate", 2500);
4
obs_data_set_default_int(settings, "max_bitrate", 3000);
5
- obs_data_set_default_string(settings, "profile", "high");
6
+ obs_data_set_default_string(settings, "profile", "main");
7
obs_data_set_default_int(settings, "async_depth", 4);
8
obs_data_set_default_string(settings, "rate_control", "CBR");
9
10
11
obs_data_set_default_int(settings, "qpp", 23);
12
obs_data_set_default_int(settings, "qpb", 23);
13
obs_data_set_default_int(settings, "icq_quality", 23);
14
- obs_data_set_default_int(settings, "la_depth", 15);
15
+ obs_data_set_default_int(settings, "la_depth", 40);
16
17
obs_data_set_default_int(settings, "keyint_sec", 3);
18
- obs_data_set_default_int(settings, "bframes", 3);
19
}
20
21
static inline void add_strings(obs_property_t *list, const char *const *strings)
22
23
#define TEXT_ICQ_QUALITY obs_module_text("ICQQuality")
24
#define TEXT_LA_DEPTH obs_module_text("LookAheadDepth")
25
#define TEXT_KEYINT_SEC obs_module_text("KeyframeIntervalSec")
26
-#define TEXT_BFRAMES obs_module_text("B Frames")
27
-#define TEXT_MBBRC obs_module_text("Content Adaptive Quantization")
28
-
29
-static inline bool is_skl_or_greater_platform()
30
-{
31
- enum qsv_cpu_platform plat = qsv_get_cpu_platform();
32
- return (plat >= QSV_CPU_PLATFORM_SKL);
33
-}
34
35
static bool rate_control_modified(obs_properties_t *ppts, obs_property_t *p,
36
obs_data_t *settings)
37
38
obs_property_set_visible(p, bVisible);
39
40
bVisible = astrcmpi(rate_control, "LA_ICQ") == 0 ||
41
- astrcmpi(rate_control, "LA_CBR") == 0 ||
42
- astrcmpi(rate_control, "LA_VBR") == 0;
43
+ astrcmpi(rate_control, "LA") == 0;
44
p = obs_properties_get(ppts, "la_depth");
45
obs_property_set_visible(p, bVisible);
46
47
- bVisible = astrcmpi(rate_control, "CBR") == 0 ||
48
- astrcmpi(rate_control, "VBR") == 0 ||
49
- astrcmpi(rate_control, "AVBR") == 0;
50
- p = obs_properties_get(ppts, "mbbrc");
51
- obs_property_set_visible(p, bVisible);
52
-
53
return true;
54
}
55
56
57
obs_properties_add_int(props, "qpb", "QPB", 1, 51, 1);
58
obs_properties_add_int(props, "icq_quality", TEXT_ICQ_QUALITY, 1, 51, 1);
59
obs_properties_add_int(props, "la_depth", TEXT_LA_DEPTH, 10, 100, 1);
60
- obs_properties_add_int(props, "bframes", TEXT_BFRAMES, 0, 3, 1);
61
-
62
- if (is_skl_or_greater_platform())
63
- obs_properties_add_bool(props, "mbbrc", TEXT_MBBRC);
64
65
return props;
66
}
67
68
int la_depth = (int)obs_data_get_int(settings, "la_depth");
69
int keyint_sec = (int)obs_data_get_int(settings, "keyint_sec");
70
bool cbr_override = obs_data_get_bool(settings, "cbr");
71
- int bFrames = (int)obs_data_get_int(settings, "bframes");
72
- bool mbbrc = obs_data_get_bool(settings, "mbbrc");
73
+ int bFrames = 7;
74
75
if (obs_data_has_user_value(settings, "bf"))
76
bFrames = (int)obs_data_get_int(settings, "bf");
77
78
obsqsv->params.nRateControl = MFX_RATECONTROL_ICQ;
79
else if (astrcmpi(rate_control, "LA_ICQ") == 0)
80
obsqsv->params.nRateControl = MFX_RATECONTROL_LA_ICQ;
81
- else if (astrcmpi(rate_control, "LA_VBR") == 0)
82
+ else if (astrcmpi(rate_control, "LA") == 0)
83
obsqsv->params.nRateControl = MFX_RATECONTROL_LA;
84
- else if (astrcmpi(rate_control, "LA_CBR") == 0)
85
- obsqsv->params.nRateControl = MFX_RATECONTROL_LA_HRD;
86
87
obsqsv->params.nAsyncDepth = (mfxU16)async_depth;
88
obsqsv->params.nAccuracy = (mfxU16)accuracy;
89
90
obsqsv->params.nbFrames = (mfxU16)bFrames;
91
obsqsv->params.nKeyIntSec = (mfxU16)keyint_sec;
92
obsqsv->params.nICQQuality = (mfxU16)icq_quality;
93
- obsqsv->params.bMBBRC = mbbrc;
94
95
info("settings:\n\trate_control: %s", rate_control);
96
97
98
(int)obsqsv->params.nICQQuality);
99
100
if (obsqsv->params.nRateControl == MFX_RATECONTROL_LA_ICQ ||
101
- obsqsv->params.nRateControl == MFX_RATECONTROL_LA ||
102
- obsqsv->params.nRateControl == MFX_RATECONTROL_LA_HRD)
103
+ obsqsv->params.nRateControl == MFX_RATECONTROL_LA)
104
blog(LOG_INFO,
105
"\tLookahead Depth:%d",
106
(int)obsqsv->params.nLADEPTH);
107
108
packet->size = obsqsv->packet_data.num;
109
packet->type = OBS_ENCODER_VIDEO;
110
packet->pts = pBS->TimeStamp * fps_num / 90000;
111
-
112
- packet->keyframe = (pBS->FrameType & MFX_FRAMETYPE_IDR);
113
-
114
- uint16_t frameType = pBS->FrameType;
115
- uint8_t priority;
116
-
117
- if (frameType & MFX_FRAMETYPE_I)
118
- priority = OBS_NAL_PRIORITY_HIGHEST;
119
- else if ((frameType & MFX_FRAMETYPE_P) || (frameType & MFX_FRAMETYPE_REF))
120
- priority = OBS_NAL_PRIORITY_HIGH;
121
- else
122
- priority = OBS_NAL_PRIORITY_DISPOSABLE;
123
-
124
- packet->priority = priority;
125
+ packet->keyframe = (pBS->FrameType &
126
+ (MFX_FRAMETYPE_I | MFX_FRAMETYPE_REF));
127
128
/* ------------------------------------ */
129
130
131
132
type = start[0] & 0x1F;
133
if (type == OBS_NAL_SLICE_IDR || type == OBS_NAL_SLICE) {
134
+ uint8_t prev_type = (start[0] >> 5) & 0x3;
135
start[0] &= ~(3 << 5);
136
- //0 for non-ref frames and not equal to 0 for ref frames
137
- start[0] |= priority << 5;
138
+
139
+ if (pBS->FrameType & MFX_FRAMETYPE_I)
140
+ start[0] |= OBS_NAL_PRIORITY_HIGHEST << 5;
141
+ else if (pBS->FrameType & MFX_FRAMETYPE_P)
142
+ start[0] |= OBS_NAL_PRIORITY_HIGH << 5;
143
+ else
144
+ start[0] |= prev_type << 5;
145
}
146
147
start = (uint8_t*)obs_avc_find_startcode(start, end);
148