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