Projects
Multimedia
obs-studio
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 74
View file
obs-studio.changes
Changed
@@ -1,4 +1,22 @@ ------------------------------------------------------------------- +Thu Mar 19 19:26:37 UTC 2020 - jimmy@boombatower.com + +- Update to version 25.0.1: + * libobs: Update version to 25.0.1 + * libobs-winrt: Fix missing parentheses + * UI: Fix memory leak + * Revert "win-capture, libobs: Show names of displays in Display Capture" + * obs-browser: Fix a few crashes + * UI: Fix preview state when minimizing to tray + * UI: Remove unnecessary vertices for preview + * UI: Get actual projector monitor name on windows + * obs-ffmpeg: Make sure to show FFmpeg NVENC on non-windows + * libobs-winrt: Catch more hresult exceptions + * win-capture: Retry with last known window if first fails + * UI: Restart when browser hardware acceleration changed + * libobs-winrt: win-capture: Clean up error handling + +------------------------------------------------------------------- Wed Mar 18 18:46:43 UTC 2020 - jimmy@boombatower.com - Update to version 25.0.0:
View file
obs-studio.spec
Changed
@@ -1,5 +1,5 @@ Name: obs-studio -Version: 25.0.0 +Version: 25.0.1 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/25.0.0</param> + <param name="revision">refs/tags/25.0.1</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">327a6f599e7ae1d48a288ec3885ff3cd8b7bf538</param> + <param name="changesrevision">b19ea6fe3516a7a8bdf44f50bb95a36f4681330d</param> </service> </servicedata>
View file
obs-studio-25.0.0.tar.xz/UI/platform-windows.cpp -> obs-studio-25.0.1.tar.xz/UI/platform-windows.cpp
Changed
@@ -19,6 +19,7 @@ #include <sstream> #include "obs-config.h" #include "obs-app.hpp" +#include "qt-wrappers.hpp" #include "platform.hpp" #include <util/windows/win-version.h> @@ -330,3 +331,86 @@ RunOnceMutex rom(h ? new RunOnceMutexData(h) : nullptr); return rom; } + +struct MonitorData { + const wchar_t *id; + MONITORINFOEX info; + bool found; +}; + +static BOOL CALLBACK GetMonitorCallback(HMONITOR monitor, HDC, LPRECT, + LPARAM param) +{ + MonitorData *data = (MonitorData *)param; + + if (GetMonitorInfoW(monitor, &data->info)) { + if (wcscmp(data->info.szDevice, data->id) == 0) { + data->found = true; + return false; + } + } + + return true; +} + +#define GENERIC_MONITOR_NAME QStringLiteral("Generic PnP Monitor") + +QString GetMonitorName(const QString &id) +{ + MonitorData data = {}; + data.id = (const wchar_t *)id.utf16(); + data.info.cbSize = sizeof(data.info); + + EnumDisplayMonitors(nullptr, nullptr, GetMonitorCallback, + (LPARAM)&data); + if (!data.found) { + return GENERIC_MONITOR_NAME; + } + + UINT32 numPath, numMode; + if (!GetDisplayConfigBufferSizes(QDC_ONLY_ACTIVE_PATHS, &numPath, + &numMode) == ERROR_SUCCESS) { + return GENERIC_MONITOR_NAME; + } + + std::vector<DISPLAYCONFIG_PATH_INFO> paths(numPath); + std::vector<DISPLAYCONFIG_MODE_INFO> modes(numMode); + + if (!QueryDisplayConfig(QDC_ONLY_ACTIVE_PATHS, &numPath, paths.data(), + &numMode, modes.data(), + nullptr) == ERROR_SUCCESS) { + return GENERIC_MONITOR_NAME; + } + + DISPLAYCONFIG_TARGET_DEVICE_NAME target; + bool found = false; + + paths.resize(numPath); + for (size_t i = 0; i < numPath; ++i) { + const DISPLAYCONFIG_PATH_INFO &path = paths[i]; + + DISPLAYCONFIG_SOURCE_DEVICE_NAME s; + s.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME; + s.header.size = sizeof(s); + s.header.adapterId = path.sourceInfo.adapterId; + s.header.id = path.sourceInfo.id; + + if (DisplayConfigGetDeviceInfo(&s.header) == ERROR_SUCCESS && + wcscmp(data.info.szDevice, s.viewGdiDeviceName) == 0) { + target.header.type = + DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME; + target.header.size = sizeof(target); + target.header.adapterId = path.sourceInfo.adapterId; + target.header.id = path.targetInfo.id; + found = DisplayConfigGetDeviceInfo(&target.header) == + ERROR_SUCCESS; + break; + } + } + + if (!found) { + return GENERIC_MONITOR_NAME; + } + + return QString::fromWCharArray(target.monitorFriendlyDeviceName); +}
View file
obs-studio-25.0.0.tar.xz/UI/platform.hpp -> obs-studio-25.0.1.tar.xz/UI/platform.hpp
Changed
@@ -60,6 +60,7 @@ }; RunOnceMutex GetRunOnceMutex(bool &already_running); +QString GetMonitorName(const QString &id); #endif #ifdef __APPLE__
View file
obs-studio-25.0.0.tar.xz/UI/window-basic-main-scene-collections.cpp -> obs-studio-25.0.1.tar.xz/UI/window-basic-main-scene-collections.cpp
Changed
@@ -392,6 +392,7 @@ OBSImporter *imp; imp = new OBSImporter(this); imp->exec(); + delete imp; RefreshSceneCollections(); }
View file
obs-studio-25.0.0.tar.xz/UI/window-basic-main.cpp -> obs-studio-25.0.1.tar.xz/UI/window-basic-main.cpp
Changed
@@ -29,6 +29,7 @@ #include <QColorDialog> #include <QSizePolicy> #include <QScrollBar> +#include <QTextStream> #include <util/dstr.h> #include <util/util.hpp> @@ -1451,9 +1452,8 @@ gs_render_start(true); gs_vertex2f(0.0f, 0.0f); gs_vertex2f(0.0f, 1.0f); - gs_vertex2f(1.0f, 1.0f); gs_vertex2f(1.0f, 0.0f); - gs_vertex2f(0.0f, 0.0f); + gs_vertex2f(1.0f, 1.0f); box = gs_render_save(); gs_render_start(true); @@ -4173,15 +4173,11 @@ QRect screenGeometry = screen->geometry(); QString name = ""; #ifdef _WIN32 - DISPLAY_DEVICE ddev; - ddev.cb = sizeof(ddev); - BPtr<wchar_t> wideName; - os_utf8_to_wcs_ptr(screen->name().toStdString().c_str(), 0, - &wideName); - EnumDisplayDevices(wideName, 0, &ddev, 1); - BPtr<char> newName; - os_wcs_to_utf8_ptr(ddev.DeviceString, 0, &newName); - name = newName; + QTextStream fullname(&name); + fullname << GetMonitorName(screen->name()); + fullname << " ("; + fullname << (i + 1); + fullname << ")"; #elif defined(__APPLE__) name = screen->name(); #elif QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) @@ -7184,8 +7180,10 @@ AddProjectorMenuMonitors(studioProgramProjector, this, SLOT(OpenStudioProgramProjector())); - if (reason == QSystemTrayIcon::Trigger) + if (reason == QSystemTrayIcon::Trigger) { + EnablePreviewDisplay(previewEnabled && !isVisible()); ToggleShowHide(); + } } void OBSBasic::SysTrayNotify(const QString &text,
View file
obs-studio-25.0.0.tar.xz/UI/window-basic-preview.cpp -> obs-studio-25.0.1.tar.xz/UI/window-basic-preview.cpp
Changed
@@ -1514,10 +1514,9 @@ gs_vertex2f(x1, y1); gs_vertex2f(x1 + (xSide * (thickness / scale.x)), y1 + (ySide * (thickness / scale.y))); + gs_vertex2f(x2, y2); gs_vertex2f(x2 + (xSide * (thickness / scale.x)), y2 + (ySide * (thickness / scale.y))); - gs_vertex2f(x2, y2); - gs_vertex2f(x1, y1); gs_vertbuffer_t *line = gs_render_save(); @@ -1532,24 +1531,17 @@ gs_vertex2f(0.0f, 0.0f); gs_vertex2f(0.0f + (thickness / scale.x), 0.0f); - gs_vertex2f(0.0f + (thickness / scale.x), 1.0f); - gs_vertex2f(0.0f, 1.0f); - gs_vertex2f(0.0f, 0.0f); gs_vertex2f(0.0f, 1.0f); + gs_vertex2f(0.0f + (thickness / scale.x), 1.0f); gs_vertex2f(0.0f, 1.0f - (thickness / scale.y)); - gs_vertex2f(1.0f, 1.0f - (thickness / scale.y)); - gs_vertex2f(1.0f, 1.0f); - gs_vertex2f(0.0f, 1.0f); gs_vertex2f(1.0f, 1.0f); + gs_vertex2f(1.0f, 1.0f - (thickness / scale.y)); gs_vertex2f(1.0f - (thickness / scale.x), 1.0f); - gs_vertex2f(1.0f - (thickness / scale.x), 0.0f); - gs_vertex2f(1.0f, 0.0f); - gs_vertex2f(1.0f, 1.0f); gs_vertex2f(1.0f, 0.0f); + gs_vertex2f(1.0f - (thickness / scale.x), 0.0f); gs_vertex2f(1.0f, 0.0f + (thickness / scale.y)); - gs_vertex2f(0.0f, 0.0f + (thickness / scale.y)); gs_vertex2f(0.0f, 0.0f); - gs_vertex2f(1.0f, 0.0f); + gs_vertex2f(0.0f, 0.0f + (thickness / scale.y)); gs_vertbuffer_t *rect = gs_render_save(); @@ -1897,10 +1889,8 @@ gs_vertex2f(0.0f, 0.0f); gs_vertex2f(1.0f, 0.0f); - gs_vertex2f(1.0f, 1.0f); - gs_vertex2f(1.0f, 1.0f); - gs_vertex2f(0.0f, 0.0f); gs_vertex2f(0.0f, 1.0f); + gs_vertex2f(1.0f, 1.0f); rectFill = gs_render_save(); }
View file
obs-studio-25.0.0.tar.xz/UI/window-basic-settings.cpp -> obs-studio-25.0.1.tar.xz/UI/window-basic-settings.cpp
Changed
@@ -2440,6 +2440,7 @@ bool browserHWAccel = config_get_bool(App()->GlobalConfig(), "General", "BrowserHWAccel"); ui->browserHWAccel->setChecked(browserHWAccel); + prevBrowserAccel = ui->browserHWAccel->isChecked(); #endif SetComboByValue(ui->hotkeyFocusType, hotkeyFocusType); @@ -3534,8 +3535,10 @@ bool langChanged = (ui->language->currentIndex() != prevLangIndex); bool audioRestart = (ui->channelSetup->currentIndex() != channelIndex || ui->sampleRate->currentIndex() != sampleRateIndex); + bool browserHWAccelChanged = + (ui->browserHWAccel->isChecked() != prevBrowserAccel); - if (langChanged || audioRestart) + if (langChanged || audioRestart || browserHWAccelChanged) restart = true; else restart = false;
View file
obs-studio-25.0.0.tar.xz/UI/window-basic-settings.hpp -> obs-studio-25.0.1.tar.xz/UI/window-basic-settings.hpp
Changed
@@ -235,6 +235,7 @@ void OnAuthConnected(); QString lastService; int prevLangIndex; + bool prevBrowserAccel; private slots: void UpdateServerList(); void UpdateKeyLink();
View file
obs-studio-25.0.0.tar.xz/libobs-d3d11/d3d11-duplicator.cpp -> obs-studio-25.0.1.tar.xz/libobs-d3d11/d3d11-duplicator.cpp
Changed
@@ -16,8 +16,6 @@ ******************************************************************************/ #include "d3d11-subsystem.hpp" -#include "util/platform.h" -#include <map> #include <unordered_map> static inline bool get_monitor(gs_device_t *device, int monitor_idx, @@ -36,16 +34,6 @@ return true; } -static inline void get_display_device(DXGI_OUTPUT_DESC *desc, - MONITORINFOEX *moninfo, - DISPLAY_DEVICE *ddev) -{ - moninfo->cbSize = sizeof(MONITORINFOEX); - GetMonitorInfoW(desc->Monitor, moninfo); - ddev->cb = sizeof(*ddev); - EnumDisplayDevices(moninfo->szDevice, 0, ddev, 1); -} - void gs_duplicator::Start() { ComPtr<IDXGIOutput1> output1; @@ -107,10 +95,6 @@ return false; } - DISPLAY_DEVICE ddev; - MONITORINFOEX monitorinf; - get_display_device(&desc, &monitorinf, &ddev); - switch (desc.Rotation) { case DXGI_MODE_ROTATION_UNSPECIFIED: case DXGI_MODE_ROTATION_IDENTITY: @@ -135,17 +119,6 @@ info->cx = desc.DesktopCoordinates.right - info->x; info->cy = desc.DesktopCoordinates.bottom - info->y; - char *devname = NULL; -#ifdef UNICODE - os_wcs_to_utf8_ptr(ddev.DeviceString, 128, &devname); -#else - devname = (char *)bstrdup(ddev.DeviceString); -#endif - info->monitor_name = devname; - bfree(devname); - - info->flags = monitorinf.dwFlags; - return true; }
View file
obs-studio-25.0.0.tar.xz/libobs-winrt/winrt-capture.cpp -> obs-studio-25.0.1.tar.xz/libobs-winrt/winrt-capture.cpp
Changed
@@ -13,15 +13,19 @@ }; extern "C" EXPORT BOOL winrt_capture_supported() -{ - return winrt::Windows::Foundation::Metadata::ApiInformation::IsTypePresent( - L"Windows.Graphics.Capture.GraphicsCaptureSession") && - winrt::Windows::Graphics::Capture::GraphicsCaptureSession:: - IsSupported(); +try { + /* no contract for IGraphicsCaptureItemInterop, verify 10.0.18362.0 */ + return winrt::Windows::Foundation::Metadata::ApiInformation:: + IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", + 8); +} catch (winrt::hresult_error &err) { + blog(LOG_ERROR, "winrt_capture_supported (0x%08X): %ls", err.to_abi(), + err.message().c_str()); + return false; } extern "C" EXPORT BOOL winrt_capture_cursor_toggle_supported() -{ +try { #ifdef NTDDI_WIN10_VB return winrt::Windows::Foundation::Metadata::ApiInformation:: IsPropertyPresent( @@ -30,6 +34,10 @@ #else return false; #endif +} catch (winrt::hresult_error &err) { + blog(LOG_ERROR, "winrt_capture_cursor_toggle_supported (0x%08X): %ls", + err.to_abi(), err.message().c_str()); + return false; } template<typename T> @@ -125,7 +133,7 @@ if (!GetCursorInfo(&ci)) return; - if (!ci.flags & CURSOR_SHOWING) + if (!(ci.flags & CURSOR_SHOWING)) return; HICON icon = CopyIcon(ci.hCursor); @@ -311,18 +319,14 @@ thread_local bool initialized_tls; extern "C" EXPORT struct winrt_capture * -winrt_capture_init(BOOL cursor, HWND window, BOOL client_area, char **error, - HRESULT *hr_out) +winrt_capture_init(BOOL cursor, HWND window, BOOL client_area) try { ID3D11Device *const d3d_device = (ID3D11Device *)gs_get_device_obj(); ComPtr<IDXGIDevice> dxgi_device; - *error = nullptr; - HRESULT hr = d3d_device->QueryInterface(&dxgi_device); if (FAILED(hr)) { - *error = bstrdup("Failed to get DXGI device"); - *hr_out = hr; + blog(LOG_ERROR, "Failed to get DXGI device"); return nullptr; } @@ -330,8 +334,7 @@ hr = CreateDirect3D11DeviceFromDXGIDevice(dxgi_device.Get(), inspectable.put()); if (FAILED(hr)) { - *error = bstrdup("Failed to get WinRT device"); - *hr_out = hr; + blog(LOG_ERROR, "Failed to get WinRT device"); return nullptr; } @@ -347,8 +350,8 @@ IGraphicsCaptureItem>(), reinterpret_cast<void **>(winrt::put_abi(item))); } catch (winrt::hresult_error &err) { - *error = bstrdup("CreateForWindow failed"); - *hr_out = err.code(); + blog(LOG_ERROR, "CreateForWindow (0x%08X): %ls", err.to_abi(), + err.message().c_str()); return nullptr; } @@ -404,8 +407,8 @@ return capture; } catch (winrt::hresult_error &err) { - *error = bstrdup("oh wow something else in winrt_capture_init failed"); - *hr_out = err.code(); + blog(LOG_ERROR, "winrt_capture_init (0x%08X): %ls", err.to_abi(), + err.message().c_str()); return nullptr; }
View file
obs-studio-25.0.0.tar.xz/libobs-winrt/winrt-capture.h -> obs-studio-25.0.1.tar.xz/libobs-winrt/winrt-capture.h
Changed
@@ -12,8 +12,7 @@ EXPORT BOOL winrt_capture_supported(); EXPORT BOOL winrt_capture_cursor_toggle_supported(); EXPORT struct winrt_capture *winrt_capture_init(BOOL cursor, HWND window, - BOOL client_area, char **error, - HRESULT *hr); + BOOL client_area); EXPORT void winrt_capture_free(struct winrt_capture *capture); EXPORT void winrt_capture_show_cursor(struct winrt_capture *capture,
View file
obs-studio-25.0.0.tar.xz/libobs/graphics/graphics.h -> obs-studio-25.0.1.tar.xz/libobs/graphics/graphics.h
Changed
@@ -181,8 +181,6 @@ long y; long cx; long cy; - char *monitor_name; - uint32_t flags; }; struct gs_tvertarray {
View file
obs-studio-25.0.0.tar.xz/libobs/obs-config.h -> obs-studio-25.0.1.tar.xz/libobs/obs-config.h
Changed
@@ -41,7 +41,7 @@ * * Reset to zero each major or minor version */ -#define LIBOBS_API_PATCH_VER 0 +#define LIBOBS_API_PATCH_VER 1 #define MAKE_SEMANTIC_VERSION(major, minor, patch) \ ((major << 24) | (minor << 16) | patch)
View file
obs-studio-25.0.0.tar.xz/plugins/obs-browser/browser-client.cpp -> obs-studio-25.0.1.tar.xz/plugins/obs-browser/browser-client.cpp
Changed
@@ -162,7 +162,8 @@ #endif } - rect.Set(0, 0, bs->width, bs->height); + rect.Set(0, 0, bs->width < 1 ? 1 : bs->width, + bs->height < 1 ? 1 : bs->height); #if CHROME_VERSION_BUILD >= 3578 return; #else
View file
obs-studio-25.0.0.tar.xz/plugins/obs-browser/browser-version.h -> obs-studio-25.0.1.tar.xz/plugins/obs-browser/browser-version.h
Changed
@@ -2,7 +2,7 @@ #define OBS_BROWSER_VERSION_MAJOR 2 #define OBS_BROWSER_VERSION_MINOR 8 -#define OBS_BROWSER_VERSION_PATCH 5 +#define OBS_BROWSER_VERSION_PATCH 6 #ifndef MAKE_SEMANTIC_VERSION #define MAKE_SEMANTIC_VERSION(major, minor, patch) \
View file
obs-studio-25.0.0.tar.xz/plugins/obs-browser/obs-browser-source.cpp -> obs-studio-25.0.1.tar.xz/plugins/obs-browser/obs-browser-source.cpp
Changed
@@ -428,7 +428,12 @@ n_url = CefURIEncode(n_url, false); #ifdef _WIN32 - n_url.replace(n_url.find("%3A"), 3, ":"); + size_t slash = n_url.find("%2F"); + size_t colon = n_url.find("%3A"); + + if (slash != std::string::npos && + colon != std::string::npos && colon < slash) + n_url.replace(colon, 3, ":"); #endif while (n_url.find("%5C") != std::string::npos)
View file
obs-studio-25.0.0.tar.xz/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c -> obs-studio-25.0.1.tar.xz/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c
Changed
@@ -570,5 +570,9 @@ .get_extra_data = nvenc_extra_data, .get_sei_data = nvenc_sei_data, .get_video_info = nvenc_video_info, +#ifdef _WIN32 .caps = OBS_ENCODER_CAP_DYN_BITRATE | OBS_ENCODER_CAP_INTERNAL, +#else + .caps = OBS_ENCODER_CAP_DYN_BITRATE, +#endif };
View file
obs-studio-25.0.0.tar.xz/plugins/win-capture/duplicator-monitor-capture.c -> obs-studio-25.0.1.tar.xz/plugins/win-capture/duplicator-monitor-capture.c
Changed
@@ -273,32 +273,13 @@ if (!gs_get_duplicator_monitor_info(monitor_idx, &info)) return false; - struct dstr format_str = {0}; - dstr_copy(&format_str, "%s: %ldx%ld @ %ld,%ld"); - - struct dstr m = {0}; - dstr_copy(&m, info.monitor_name); - if (dstr_is_empty(&m)) { - // Fallback - struct dstr d = {0}; - dstr_catf(&d, "%s %d", TEXT_MONITOR, monitor_idx + 1); - dstr_free(&m); - dstr_copy_dstr(&m, &d); - dstr_free(&d); - } - - if (info.flags & MONITORINFOF_PRIMARY) - dstr_catf(&format_str, " (%s)", TEXT_PRIMARY_MONITOR); - - dstr_catf(&monitor_desc, format_str.array, m.array, info.cx, info.cy, - info.x, info.y); + dstr_catf(&monitor_desc, "%s %d: %ldx%ld @ %ld,%ld", TEXT_MONITOR, + monitor_idx + 1, info.cx, info.cy, info.x, info.y); obs_property_list_add_int(monitor_list, monitor_desc.array, monitor_idx); dstr_free(&monitor_desc); - dstr_free(&format_str); - dstr_free(&m); return true; }
View file
obs-studio-25.0.0.tar.xz/plugins/win-capture/game-capture.c -> obs-studio-25.0.1.tar.xz/plugins/win-capture/game-capture.c
Changed
@@ -1265,10 +1265,12 @@ DWORD error = 0; if (!init_data_map(gc, gc->window)) { + HWND retry_hwnd = (HWND)(uintptr_t)gc->global_hook_info->window; error = GetLastError(); - /* if there's an error, try with 0 (for UWP programs) */ - if (init_data_map(gc, NULL)) { + /* if there's an error, just override. some windows don't play + * nice. */ + if (init_data_map(gc, retry_hwnd)) { error = 0; } }
View file
obs-studio-25.0.0.tar.xz/plugins/win-capture/monitor-capture.c -> obs-studio-25.0.1.tar.xz/plugins/win-capture/monitor-capture.c
Changed
@@ -1,5 +1,4 @@ #include <util/dstr.h> -#include <util/platform.h> #include "dc-capture.h" /* clang-format off */ @@ -177,7 +176,7 @@ UNUSED_PARAMETER(rect); obs_property_t *monitor_list = (obs_property_t *)param; - MONITORINFOEX mi; + MONITORINFO mi; size_t monitor_id = 0; struct dstr monitor_desc = {0}; struct dstr resolution = {0}; @@ -188,40 +187,18 @@ mi.cbSize = sizeof(mi); GetMonitorInfo(handle, &mi); - DISPLAY_DEVICE ddev; - ddev.cb = sizeof(ddev); - EnumDisplayDevices(mi.szDevice, 0, &ddev, 1); - - char *devname = NULL; -#ifdef UNICODE - os_wcs_to_utf8_ptr(ddev.DeviceString, 128, &devname); -#else - devname = (char *)bstrdup(ddev.DeviceString); -#endif - dstr_catf(&resolution, "%dx%d @ %d,%d", mi.rcMonitor.right - mi.rcMonitor.left, mi.rcMonitor.bottom - mi.rcMonitor.top, mi.rcMonitor.left, mi.rcMonitor.top); - dstr_copy(&format_string, "%s: %s"); + dstr_copy(&format_string, "%s %d: %s"); if (mi.dwFlags == MONITORINFOF_PRIMARY) { dstr_catf(&format_string, " (%s)", TEXT_PRIMARY_MONITOR); } - struct dstr m = {0}; - dstr_copy(&m, devname); - dstr_replace(&m, "(", " ("); - if (dstr_is_empty(&m)) { - struct dstr d = {0}; - dstr_catf(&d, "%s %d", TEXT_MONITOR, monitor_id + 1); - dstr_free(&m); - dstr_copy_dstr(&m, &d); - dstr_free(&d); - } - - dstr_catf(&monitor_desc, format_string.array, m.array, - resolution.array); + dstr_catf(&monitor_desc, format_string.array, TEXT_MONITOR, + monitor_id + 1, resolution.array); obs_property_list_add_int(monitor_list, monitor_desc.array, (int)monitor_id); @@ -229,8 +206,6 @@ dstr_free(&monitor_desc); dstr_free(&resolution); dstr_free(&format_string); - dstr_free(&m); - bfree(devname); return TRUE; }
View file
obs-studio-25.0.0.tar.xz/plugins/win-capture/window-capture.c -> obs-studio-25.0.1.tar.xz/plugins/win-capture/window-capture.c
Changed
@@ -29,8 +29,7 @@ BOOL *(*winrt_capture_supported)(); BOOL *(*winrt_capture_cursor_toggle_supported)(); struct winrt_capture *(*winrt_capture_init)(BOOL cursor, HWND window, - BOOL client_area, - char **error, HRESULT *hr); + BOOL client_area); void (*winrt_capture_free)(struct winrt_capture *capture); void (*winrt_capture_show_cursor)(struct winrt_capture *capture, BOOL visible); @@ -247,6 +246,8 @@ /* forces a reset */ wc->window = NULL; wc->check_window_timer = WC_CHECK_TIMER; + + wc->previously_failed = false; } static uint32_t wc_width(void *data) @@ -480,24 +481,16 @@ dc_capture_capture(&wc->capture, wc->window); } else if (wc->method == METHOD_WGC) { if (wc->window && (wc->capture_winrt == NULL)) { - char *error = NULL; - HRESULT hr; - - wc->capture_winrt = wc->exports.winrt_capture_init( - wc->cursor, wc->window, wc->client_area, &error, - &hr); - - if (!wc->capture_winrt && !wc->previously_failed) { - blog(LOG_WARNING, - "%s: winrt_capture_init failed: %s: %lX", - obs_source_get_name(wc->source), error, - hr); - wc->previously_failed = true; - } else if (wc->capture_winrt) { - wc->previously_failed = false; + if (!wc->previously_failed) { + wc->capture_winrt = + wc->exports.winrt_capture_init( + wc->cursor, wc->window, + wc->client_area); + + if (!wc->capture_winrt) { + wc->previously_failed = true; + } } - - bfree(error); } }
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
.