Overview
Request 5521 (accepted)
- Update to version 27.2.3:
* virtualcam-module: Revert changes since 27.1.3 (for now)
* virtualcam-module: Prevent placeholder memory leak
* virtualcam-module: Only initialize placeholder once
* libobs: Update version to 27.2.3
* virtualcam-module: Fix incorrect correct res/fps
* UI: Remove conflicting setlocale call
* UI: Restore LC_NUMERIC to C locale on Mac/Linux
* libobs: Update version to 27.2.2
* virtualcam-module: Remove unnecessarily inlines
* virtualcam-module: Stop thread on Stop call
* win-dshow: Ensure thread is joinable before joining
* obs-scripting: Make callback "removed" variable atomic
* libobs/util: Use integer math for Windows timing
* libobs: Clamp video timing for safety
* libobs/util: Fix rounding error with os_sleepto_ns()
* UI: Additional product details
* linux-v4l2: scandir with alphasort on non-Linux
* libobs/graphics: gs_query_dmabuf_* on FreeBSD too
* UI: Refresh edit menu on item locked signal
* linux-v4l2: Fix warnings in mjpeg
* win-wasapi: Fall back to old code if RTWQ fails
* CI: Update workflow to copy SOVERSION symlinks
* libobs: Map wayland keymap with MAP_PRIVATE
- Created by boombatower about 3 years ago
- In state accepted
-
Package maintainers:
boombatower,
darix, and
frispete
obs-studio.changes
Changed
-------------------------------------------------------------------
+Thu Mar 03 03:34:02 UTC 2022 - jimmy@boombatower.com
+
+- Update to version 27.2.3:
+ * virtualcam-module: Revert changes since 27.1.3 (for now)
+ * virtualcam-module: Prevent placeholder memory leak
+ * virtualcam-module: Only initialize placeholder once
+ * libobs: Update version to 27.2.3
+ * virtualcam-module: Fix incorrect correct res/fps
+ * UI: Remove conflicting setlocale call
+ * UI: Restore LC_NUMERIC to C locale on Mac/Linux
+ * libobs: Update version to 27.2.2
+ * virtualcam-module: Remove unnecessarily inlines
+ * virtualcam-module: Stop thread on Stop call
+ * win-dshow: Ensure thread is joinable before joining
+ * obs-scripting: Make callback "removed" variable atomic
+ * libobs/util: Use integer math for Windows timing
+ * libobs: Clamp video timing for safety
+ * libobs/util: Fix rounding error with os_sleepto_ns()
+ * UI: Additional product details
+ * linux-v4l2: scandir with alphasort on non-Linux
+ * libobs/graphics: gs_query_dmabuf_* on FreeBSD too
+ * UI: Refresh edit menu on item locked signal
+ * linux-v4l2: Fix warnings in mjpeg
+ * win-wasapi: Fall back to old code if RTWQ fails
+ * CI: Update workflow to copy SOVERSION symlinks
+ * libobs: Map wayland keymap with MAP_PRIVATE
+
+-------------------------------------------------------------------
Tue Feb 22 16:22:47 UTC 2022 - Jimmy Berry <jimmy@boombatower.com>
- Add new build dependencies:
obs-studio.spec
Changed
Name: obs-studio
-Version: 27.2.1
+Version: 27.2.3
Release: 0
Summary: A recording/broadcasting program
Group: Productivity/Multimedia/Video/Editors and Convertors
_service
Changed
<services>
<service name="tar_scm" mode="disabled">
<param name="versionformat">@PARENT_TAG@</param>
- <param name="revision">refs/tags/27.2.1</param>
+ <param name="revision">refs/tags/27.2.3</param>
<param name="url">git://github.com/jp9000/obs-studio.git</param>
<param name="scm">git</param>
<param name="changesgenerate">enable</param>
_servicedata
Changed
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/jp9000/obs-studio.git</param>
- <param name="changesrevision">acad9dbaf7bcf8f567c3e5c613411ca04ba92fa9</param>
+ <param name="changesrevision">b65ee7e7fbca05e6c4bfd55b7ff721150b3c0735</param>
</service>
</servicedata>
obs-studio-27.2.1.tar.xz/.github/workflows/main.yml -> obs-studio-27.2.3.tar.xz/.github/workflows/main.yml
Changed
rm -rf ./OBS.app/Contents/Resources/data/obs-scripting/
fi
+ /bin/cp -cpR /tmp/obsdeps/lib/*.dylib ./OBS.app/Contents/Frameworks
+
BUNDLE_PLUGINS=(
./OBS.app/Contents/PlugIns/coreaudio-encoder.so
./OBS.app/Contents/PlugIns/decklink-ouput-ui.so
obs-studio-27.2.1.tar.xz/UI/obs-app.cpp -> obs-studio-27.2.3.tar.xz/UI/obs-app.cpp
Changed
OBSApp::OBSApp(int &argc, char **argv, profiler_name_store_t *store)
: QApplication(argc, argv), profilerNameStore(store)
{
+ /* fix float handling */
+#if defined(Q_OS_UNIX)
+ if (!setlocale(LC_NUMERIC, "C"))
+ blog(LOG_WARNING, "Failed to set LC_NUMERIC to C locale");
+#endif
+
sleepInhibitor = os_inhibit_sleep_create("OBS Video/audio");
#ifdef __APPLE__
obs-studio-27.2.1.tar.xz/UI/platform-x11.cpp -> obs-studio-27.2.3.tar.xz/UI/platform-x11.cpp
Changed
void PIDFileCheck(bool &already_running)
{
std::string tmpfile_name =
- "/tmp/obs-studio.lock." + to_string(geteuid());
+ "/tmp/obs-studio.lock." + std::to_string(geteuid());
int fd = open(tmpfile_name.c_str(), O_RDWR | O_CREAT | O_EXLOCK, 0600);
if (fd == -1) {
already_running = true;
vector<string> GetPreferredLocales()
{
- setlocale(LC_ALL, "");
vector<string> matched;
string messages = setlocale(LC_MESSAGES, NULL);
if (!messages.size() || messages == "C" || messages == "POSIX")
obs-studio-27.2.1.tar.xz/UI/source-tree.cpp -> obs-studio-27.2.3.tar.xz/UI/source-tree.cpp
Changed
void SourceTreeItem::LockedChanged(bool locked)
{
lock->setChecked(locked);
+ OBSBasic::Get()->UpdateEditMenu();
}
void SourceTreeItem::Renamed(const QString &name)
obs-studio-27.2.1.tar.xz/UI/xdg-data/com.obsproject.Studio.appdata.xml.in -> obs-studio-27.2.3.tar.xz/UI/xdg-data/com.obsproject.Studio.appdata.xml.in
Changed
<summary>Live streaming and video recording software</summary>
<description>
<p>Free and open source software for video capturing, recording, and live streaming.</p>
+ <p>Features:</p>
+ <ul>
+ <li>High performance real time video/audio capturing and mixing. Create scenes made up of multiple sources including window captures, images, text, browser windows, webcams, capture cards and more.</li>
+ <li>Set up an unlimited number of scenes you can switch between seamlessly via custom transitions.</li>
+ <li>Intuitive audio mixer with per-source filters such as noise gate, noise suppression, and gain. Take full control with VST plugin support.</li>
+ <li>Powerful and easy to use configuration options. Add new Sources, duplicate existing ones, and adjust their properties effortlessly.</li>
+ <li>Streamlined Settings panel gives you access to a wide array of configuration options to tweak every aspect of your broadcast or recording.</li>
+ <li>Modular 'Dock' UI allows you to rearrange the layout exactly as you like. You can even pop out each individual Dock to its own window.</li>
+ </ul>
+ <p>Create Professional Productions:</p>
+ <ul>
+ <li>Choose from a number of different and customizable transitions for when you switch between your scenes or add your own stinger video files.</li>
+ <li>Set hotkeys for nearly every sort of action, such as switching between scenes, starting/stopping streams or recordings, muting audio sources, push to talk, and more.</li>
+ <li>Studio Mode lets you preview your scenes and sources before pushing them live. Adjust your scenes and sources or create new ones and ensure they're perfect before your viewers ever see them.</li>
+ <li>Get a high level view of your production using the Multiview. Monitor 8 different scenes and easily cue or transition to any of them with merely a single or double click.</li>
+ </ul>
</description>
<url type="homepage">https://obsproject.com</url>
<url type="bugtracker">https://github.com/obsproject/obs-studio/issues</url>
<url type="translate">https://crowdin.com/project/obs-studio</url>
<screenshots>
<screenshot type="default">
- <image>https://obsproject.com/assets/images/OBSDemoApp.jpg</image>
+ <image>https://obsproject.com/assets/images/OBSDemoApp2610.png</image>
</screenshot>
</screenshots>
<content_rating type="oars-1.1"/>
obs-studio-27.2.1.tar.xz/deps/obs-scripting/obs-scripting-callback.h -> obs-studio-27.2.3.tar.xz/deps/obs-scripting/obs-scripting-callback.h
Changed
obs_script_t *script;
calldata_t extra;
- bool removed;
+ volatile bool removed;
};
+static inline bool script_callback_removed(struct script_callback *cb)
+{
+ return os_atomic_load_bool(&cb->removed);
+}
+
static inline void *add_script_callback(struct script_callback **first,
obs_script_t *script, size_t extra_size)
{
static inline void remove_script_callback(struct script_callback *cb)
{
- cb->removed = true;
+ os_atomic_set_bool(&cb->removed, true);
struct script_callback *next = cb->next;
if (next)
obs-studio-27.2.1.tar.xz/deps/obs-scripting/obs-scripting-lua-frontend.c -> obs-studio-27.2.3.tar.xz/deps/obs-scripting/obs-scripting-lua-frontend.c
Changed
struct lua_obs_callback *cb = priv;
lua_State *script = cb->script;
- if (cb->base.removed) {
+ if (script_callback_removed(&cb->base)) {
obs_frontend_remove_event_callback(frontend_event_callback, cb);
return;
}
struct lua_obs_callback *cb = priv;
lua_State *script = cb->script;
- if (cb->base.removed) {
+ if (script_callback_removed(&cb->base)) {
obs_frontend_remove_save_callback(frontend_save_callback, cb);
return;
}
obs-studio-27.2.1.tar.xz/deps/obs-scripting/obs-scripting-lua.c -> obs-studio-27.2.3.tar.xz/deps/obs-scripting/obs-scripting-lua.c
Changed
{
struct lua_obs_callback *cb = (struct lua_obs_callback *)p_cb;
- if (p_cb->removed)
+ if (script_callback_removed(p_cb))
return;
lock_callback();
struct lua_obs_callback *cb = priv;
lua_State *script = cb->script;
- if (cb->base.removed) {
+ if (script_callback_removed(&cb->base)) {
obs_remove_main_render_callback(obs_lua_main_render_callback,
cb);
return;
struct lua_obs_callback *cb = priv;
lua_State *script = cb->script;
- if (cb->base.removed) {
+ if (script_callback_removed(&cb->base)) {
obs_remove_tick_callback(obs_lua_tick_callback, cb);
return;
}
struct lua_obs_callback *cb = priv;
lua_State *script = cb->script;
- if (cb->base.removed) {
+ if (script_callback_removed(&cb->base)) {
signal_handler_remove_current();
return;
}
struct lua_obs_callback *cb = priv;
lua_State *script = cb->script;
- if (cb->base.removed) {
+ if (script_callback_removed(&cb->base)) {
signal_handler_remove_current();
return;
}
struct lua_obs_callback *cb = p_cb;
lua_State *script = cb->script;
- if (cb->base.removed)
+ if (script_callback_removed(&cb->base))
return;
lock_callback();
{
struct lua_obs_callback *cb = p_cb;
- if (cb->base.removed)
+ if (script_callback_removed(&cb->base))
return;
if (pressed)
lua_State *script = cb->script;
bool ret = false;
- if (cb->base.removed)
+ if (script_callback_removed(&cb->base))
return false;
lock_callback();
lua_State *script = cb->script;
bool ret = false;
- if (cb->base.removed)
+ if (script_callback_removed(&cb->base))
return false;
lock_callback();
struct lua_obs_timer *next = timer->next;
struct lua_obs_callback *cb = lua_obs_timer_cb(timer);
- if (cb->base.removed) {
+ if (script_callback_removed(&cb->base)) {
lua_obs_timer_remove(timer);
} else {
uint64_t elapsed = ts - timer->last_ts;
lua_State *script = data->script;
/* ---------------------------- */
+ /* mark callbacks as removed */
+
+ pthread_mutex_lock(&data->mutex);
+
+ /* XXX: scripts can potentially make callbacks when this happens, so
+ * this probably still isn't ideal as we can't predict how the
+ * processor or operating system is going to schedule things. a more
+ * ideal method would be to reference count the script objects and
+ * atomically share ownership with callbacks when they're called. */
+ struct lua_obs_callback *cb =
+ (struct lua_obs_callback *)data->first_callback;
+ while (cb) {
+ os_atomic_set_bool(&cb->base.removed, true);
+ cb = (struct lua_obs_callback *)cb->base.next;
+ }
+
+ pthread_mutex_unlock(&data->mutex);
+
+ /* ---------------------------- */
/* undefine source types */
undef_lua_script_sources(data);
/* ---------------------------- */
/* remove all callbacks */
- struct lua_obs_callback *cb =
- (struct lua_obs_callback *)data->first_callback;
+ cb = (struct lua_obs_callback *)data->first_callback;
while (cb) {
struct lua_obs_callback *next =
(struct lua_obs_callback *)cb->base.next;
obs-studio-27.2.1.tar.xz/deps/obs-scripting/obs-scripting-python-frontend.c -> obs-studio-27.2.3.tar.xz/deps/obs-scripting/obs-scripting-python-frontend.c
Changed
{
struct python_obs_callback *cb = priv;
- if (cb->base.removed) {
+ if (script_callback_removed(&cb->base)) {
obs_frontend_remove_save_callback(frontend_save_callback, cb);
return;
}
{
struct python_obs_callback *cb = priv;
- if (cb->base.removed) {
+ if (script_callback_removed(&cb->base)) {
obs_frontend_remove_event_callback(frontend_event_callback, cb);
return;
}
obs-studio-27.2.1.tar.xz/deps/obs-scripting/obs-scripting-python.c -> obs-studio-27.2.3.tar.xz/deps/obs-scripting/obs-scripting-python.c
Changed
{
struct python_obs_callback *cb = (struct python_obs_callback *)p_cb;
- if (p_cb->removed)
+ if (script_callback_removed(p_cb))
return;
lock_callback(cb);
{
struct python_obs_callback *cb = priv;
- if (cb->base.removed) {
+ if (script_callback_removed(&cb->base)) {
obs_remove_tick_callback(obs_python_tick_callback, cb);
return;
}
{
struct python_obs_callback *cb = priv;
- if (cb->base.removed) {
+ if (script_callback_removed(&cb->base)) {
signal_handler_remove_current();
return;
}
{
struct python_obs_callback *cb = priv;
- if (cb->base.removed) {
+ if (script_callback_removed(&cb->base)) {
signal_handler_remove_current();
return;
}
{
struct python_obs_callback *cb = p_cb;
- if (cb->base.removed)
+ if (script_callback_removed(&cb->base))
return;
lock_callback(cb);
{
struct python_obs_callback *cb = p_cb;
- if (cb->base.removed)
+ if (script_callback_removed(&cb->base))
return;
if (pressed)
struct python_obs_callback *cb = p_cb;
bool ret = false;
- if (cb->base.removed)
+ if (script_callback_removed(&cb->base))
return false;
lock_callback(cb);
struct python_obs_callback *cb = p_cb;
bool ret = false;
- if (cb->base.removed)
+ if (script_callback_removed(&cb->base))
return false;
lock_callback(cb);
return;
/* ---------------------------- */
+ /* mark callbacks as removed */
+
+ lock_python();
+
+ /* XXX: scripts can potentially make callbacks when this happens, so
+ * this probably still isn't ideal as we can't predict how the
+ * processor or operating system is going to schedule things. a more
+ * ideal method would be to reference count the script objects and
+ * atomically share ownership with callbacks when they're called. */
+ struct script_callback *cb = data->first_callback;
+ while (cb) {
+ os_atomic_set_bool(&cb->removed, true);
+ cb = cb->next;
+ }
+
+ unlock_python();
+
+ /* ---------------------------- */
/* unhook tick function */
if (data->p_prev_next_tick) {
data->next_tick = NULL;
}
- lock_python();
+ relock_python();
Py_XDECREF(data->tick);
Py_XDECREF(data->save);
/* ---------------------------- */
/* remove all callbacks */
- struct script_callback *cb = data->first_callback;
+ cb = data->first_callback;
while (cb) {
struct script_callback *next = cb->next;
remove_script_callback(cb);
struct python_obs_timer *next = timer->next;
struct python_obs_callback *cb = python_obs_timer_cb(timer);
- if (cb->base.removed) {
+ if (script_callback_removed(&cb->base)) {
python_obs_timer_remove(timer);
} else {
uint64_t elapsed = ts - timer->last_ts;
obs-studio-27.2.1.tar.xz/deps/obs-scripting/obs-scripting-python.h -> obs-studio-27.2.3.tar.xz/deps/obs-scripting/obs-scripting-python.h
Changed
#define py_error() py_error_(__FUNCTION__, __LINE__)
#define lock_python() PyGILState_STATE gstate = PyGILState_Ensure()
+#define relock_python() gstate = PyGILState_Ensure()
#define unlock_python() PyGILState_Release(gstate)
struct py_source;
obs-studio-27.2.1.tar.xz/libobs/graphics/graphics.h -> obs-studio-27.2.3.tar.xz/libobs/graphics/graphics.h
Changed
EXPORT void gs_register_loss_callbacks(const struct gs_device_loss *callbacks);
EXPORT void gs_unregister_loss_callbacks(void *data);
-#elif __linux__
+#elif defined(__linux__) || defined(__FreeBSD__)
EXPORT gs_texture_t *gs_texture_create_from_dmabuf(
unsigned int width, unsigned int height, uint32_t drm_format,
obs-studio-27.2.1.tar.xz/libobs/obs-config.h -> obs-studio-27.2.3.tar.xz/libobs/obs-config.h
Changed
*
* Reset to zero each major or minor version
*/
-#define LIBOBS_API_PATCH_VER 1
+#define LIBOBS_API_PATCH_VER 3
#define MAKE_SEMANTIC_VERSION(major, minor, patch) \
((major << 24) | (minor << 16) | patch)
obs-studio-27.2.1.tar.xz/libobs/obs-nix-wayland.c -> obs-studio-27.2.3.tar.xz/libobs/obs-nix-wayland.c
Changed
UNUSED_PARAMETER(format);
obs_hotkeys_platform_t *plat = (obs_hotkeys_platform_t *)data;
- char *keymap_shm = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
+ char *keymap_shm = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
if (keymap_shm == MAP_FAILED) {
close(fd);
return;
obs-studio-27.2.1.tar.xz/libobs/obs-video.c -> obs-studio-27.2.3.tar.xz/libobs/obs-video.c
Changed
*p_time = t;
count = 1;
} else {
- count = (int)((os_gettime_ns() - cur_time) / interval_ns);
+ const uint64_t udiff = os_gettime_ns() - cur_time;
+ int64_t diff;
+ memcpy(&diff, &udiff, sizeof(diff));
+ const uint64_t clamped_diff =
+ (diff > (int64_t)interval_ns) ? diff : interval_ns;
+ count = (int)(clamped_diff / interval_ns);
*p_time = cur_time + interval_ns * count;
}
obs-studio-27.2.1.tar.xz/libobs/util/platform-windows.c -> obs-studio-27.2.3.tar.xz/libobs/util/platform-windows.c
Changed
#include <shlobj.h>
#include <intrin.h>
#include <psapi.h>
+#include <math.h>
#include "base.h"
#include "platform.h"
#include "darray.h"
#include "dstr.h"
+#include "util_uint64.h"
#include "windows/win-registry.h"
#include "windows/win-version.h"
bool os_sleepto_ns(uint64_t time_target)
{
- const double freq = (double)get_clockfreq();
+ const uint64_t freq = get_clockfreq();
const LONGLONG count_target =
- (LONGLONG)((double)time_target * freq / 1000000000.0);
+ util_mul_div64(time_target, freq, 1000000000);
LARGE_INTEGER count;
QueryPerformanceCounter(&count);
uint64_t os_gettime_ns(void)
{
LARGE_INTEGER current_time;
- double time_val;
-
QueryPerformanceCounter(¤t_time);
- time_val = (double)current_time.QuadPart;
- time_val *= 1000000000.0;
- time_val /= (double)get_clockfreq();
-
- return (uint64_t)time_val;
+ return util_mul_div64(current_time.QuadPart, 1000000000,
+ get_clockfreq());
}
/* returns [folder]\[name] on windows */
obs-studio-27.2.1.tar.xz/plugins/linux-v4l2/v4l2-mjpeg.c -> obs-studio-27.2.3.tar.xz/plugins/linux-v4l2/v4l2-mjpeg.c
Changed
int v4l2_decode_mjpeg(struct obs_source_frame *out, uint8_t *data,
size_t length, struct v4l2_mjpeg_decoder *decoder)
{
-
decoder->packet->data = data;
decoder->packet->size = length;
if (avcodec_send_packet(decoder->context, decoder->packet) < 0) {
case AV_PIX_FMT_YUV444P:
out->format = VIDEO_FORMAT_I444;
break;
+ default:
+ break;
}
return 0;
obs-studio-27.2.1.tar.xz/plugins/linux-v4l2/v4l2-mjpeg.h -> obs-studio-27.2.3.tar.xz/plugins/linux-v4l2/v4l2-mjpeg.h
Changed
* Data structure for mjpeg decoding
*/
struct v4l2_mjpeg_decoder {
- AVCodec *codec;
+ const AVCodec *codec;
AVCodecContext *context;
AVPacket *packet;
AVFrame *frame;
obs-studio-27.2.1.tar.xz/plugins/linux-v4l2/v4l2-output.c -> obs-studio-27.2.3.tar.xz/plugins/linux-v4l2/v4l2-output.c
Changed
return false;
}
- n = scandir("/dev", &list, scanfilter, versionsort);
+ n = scandir("/dev", &list, scanfilter,
+#if defined(__linux__)
+ versionsort
+#else
+ alphasort
+#endif
+ );
+
if (n == -1)
return false;
obs-studio-27.2.1.tar.xz/plugins/win-dshow/virtualcam-module/placeholder.cpp -> obs-studio-27.2.3.tar.xz/plugins/win-dshow/virtualcam-module/placeholder.cpp
Changed
bool initialize_placeholder()
{
+ if (initialized)
+ return true;
+
GdiplusStartupInput si;
ULONG_PTR token;
GdiplusStartup(&token, &si, nullptr);
obs-studio-27.2.1.tar.xz/plugins/win-dshow/virtualcam-module/virtualcam-filter.cpp -> obs-studio-27.2.3.tar.xz/plugins/win-dshow/virtualcam-module/virtualcam-filter.cpp
Changed
VCamFilter::~VCamFilter()
{
SetEvent(thread_stop);
- th.join();
+ if (th.joinable())
+ th.join();
video_queue_close(vq);
if (placeholder.scaled_data)
obs-studio-27.2.1.tar.xz/plugins/win-wasapi/win-wasapi.cpp -> obs-studio-27.2.3.tar.xz/plugins/win-wasapi/win-wasapi.cpp
Changed
(PFN_RtwqPutWaitingWorkItem)GetProcAddress(
rtwq_module, "RtwqPutWaitingWorkItem");
- hr = rtwq_create_async_result(nullptr, &startCapture, nullptr,
- &startCaptureAsyncResult);
- if (FAILED(hr)) {
- enumerator->UnregisterEndpointNotificationCallback(
- notify);
- throw HRError(
- "Could not create startCaptureAsyncResult", hr);
- }
+ try {
+ hr = rtwq_create_async_result(nullptr, &startCapture,
+ nullptr,
+ &startCaptureAsyncResult);
+ if (FAILED(hr)) {
+ throw HRError(
+ "Could not create startCaptureAsyncResult",
+ hr);
+ }
- hr = rtwq_create_async_result(nullptr, &sampleReady, nullptr,
- &sampleReadyAsyncResult);
- if (FAILED(hr)) {
- enumerator->UnregisterEndpointNotificationCallback(
- notify);
- throw HRError("Could not create sampleReadyAsyncResult",
- hr);
- }
+ hr = rtwq_create_async_result(nullptr, &sampleReady,
+ nullptr,
+ &sampleReadyAsyncResult);
+ if (FAILED(hr)) {
+ throw HRError(
+ "Could not create sampleReadyAsyncResult",
+ hr);
+ }
- hr = rtwq_create_async_result(nullptr, &restart, nullptr,
- &restartAsyncResult);
- if (FAILED(hr)) {
- enumerator->UnregisterEndpointNotificationCallback(
- notify);
- throw HRError("Could not create restartAsyncResult",
- hr);
- }
+ hr = rtwq_create_async_result(nullptr, &restart,
+ nullptr,
+ &restartAsyncResult);
+ if (FAILED(hr)) {
+ throw HRError(
+ "Could not create restartAsyncResult",
+ hr);
+ }
- DWORD taskId = 0;
- DWORD id = 0;
- hr = rtwq_lock_shared_work_queue(L"Capture", 0, &taskId, &id);
- if (FAILED(hr)) {
- enumerator->UnregisterEndpointNotificationCallback(
- notify);
- throw HRError("RtwqLockSharedWorkQueue failed", hr);
+ DWORD taskId = 0;
+ DWORD id = 0;
+ hr = rtwq_lock_shared_work_queue(L"Capture", 0, &taskId,
+ &id);
+ if (FAILED(hr)) {
+ throw HRError("RtwqLockSharedWorkQueue failed",
+ hr);
+ }
+
+ startCapture.SetQueueId(id);
+ sampleReady.SetQueueId(id);
+ restart.SetQueueId(id);
+ } catch (HRError &err) {
+ blog(LOG_ERROR, "RTWQ setup failed: %s (0x%08X)",
+ err.str, err.hr);
+ rtwq_supported = false;
}
+ }
- startCapture.SetQueueId(id);
- sampleReady.SetQueueId(id);
- restart.SetQueueId(id);
- } else {
+ if (!rtwq_supported) {
captureThread = CreateThread(nullptr, 0,
WASAPISource::CaptureThread, this,
0, nullptr);
No build results available
No rpmlint results available
Request History
boombatower created request about 3 years ago
- Update to version 27.2.3:
* virtualcam-module: Revert changes since 27.1.3 (for now)
* virtualcam-module: Prevent placeholder memory leak
* virtualcam-module: Only initialize placeholder once
* libobs: Update version to 27.2.3
* virtualcam-module: Fix incorrect correct res/fps
* UI: Remove conflicting setlocale call
* UI: Restore LC_NUMERIC to C locale on Mac/Linux
* libobs: Update version to 27.2.2
* virtualcam-module: Remove unnecessarily inlines
* virtualcam-module: Stop thread on Stop call
* win-dshow: Ensure thread is joinable before joining
* obs-scripting: Make callback "removed" variable atomic
* libobs/util: Use integer math for Windows timing
* libobs: Clamp video timing for safety
* libobs/util: Fix rounding error with os_sleepto_ns()
* UI: Additional product details
* linux-v4l2: scandir with alphasort on non-Linux
* libobs/graphics: gs_query_dmabuf_* on FreeBSD too
* UI: Refresh edit menu on item locked signal
* linux-v4l2: Fix warnings in mjpeg
* win-wasapi: Fall back to old code if RTWQ fails
* CI: Update workflow to copy SOVERSION symlinks
* libobs: Map wayland keymap with MAP_PRIVATE
boombatower accepted request about 3 years ago
ok