Projects
Multimedia
obs-studio
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 94
View file
obs-studio.changes
Changed
@@ -1,4 +1,32 @@ ------------------------------------------------------------------- +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:
View file
obs-studio.spec
Changed
@@ -1,5 +1,5 @@ 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
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/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>
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">acad9dbaf7bcf8f567c3e5c613411ca04ba92fa9</param> + <param name="changesrevision">b65ee7e7fbca05e6c4bfd55b7ff721150b3c0735</param> </service> </servicedata>
View file
obs-studio-27.2.1.tar.xz/.github/workflows/main.yml -> obs-studio-27.2.3.tar.xz/.github/workflows/main.yml
Changed
@@ -215,6 +215,8 @@ 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
View file
obs-studio-27.2.1.tar.xz/UI/obs-app.cpp -> obs-studio-27.2.3.tar.xz/UI/obs-app.cpp
Changed
@@ -1156,6 +1156,12 @@ 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__
View file
obs-studio-27.2.1.tar.xz/UI/platform-x11.cpp -> obs-studio-27.2.3.tar.xz/UI/platform-x11.cpp
Changed
@@ -136,7 +136,7 @@ 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; @@ -213,7 +213,6 @@ vector<string> GetPreferredLocales() { - setlocale(LC_ALL, ""); vector<string> matched; string messages = setlocale(LC_MESSAGES, NULL); if (!messages.size() || messages == "C" || messages == "POSIX")
View file
obs-studio-27.2.1.tar.xz/UI/source-tree.cpp -> obs-studio-27.2.3.tar.xz/UI/source-tree.cpp
Changed
@@ -520,6 +520,7 @@ void SourceTreeItem::LockedChanged(bool locked) { lock->setChecked(locked); + OBSBasic::Get()->UpdateEditMenu(); } void SourceTreeItem::Renamed(const QString &name)
View file
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
@@ -9,6 +9,22 @@ <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> @@ -16,7 +32,7 @@ <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"/>
View file
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
@@ -33,9 +33,14 @@ 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) { @@ -54,7 +59,7 @@ 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)
View file
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
@@ -206,7 +206,7 @@ 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; } @@ -254,7 +254,7 @@ 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; }
View file
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
@@ -288,7 +288,7 @@ { struct lua_obs_callback *cb = (struct lua_obs_callback *)p_cb; - if (p_cb->removed) + if (script_callback_removed(p_cb)) return; lock_callback(); @@ -329,7 +329,7 @@ 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; @@ -377,7 +377,7 @@ 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; } @@ -423,7 +423,7 @@ 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; } @@ -505,7 +505,7 @@ 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; } @@ -663,7 +663,7 @@ 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(); @@ -689,7 +689,7 @@ { struct lua_obs_callback *cb = p_cb; - if (cb->base.removed) + if (script_callback_removed(&cb->base)) return; if (pressed) @@ -745,7 +745,7 @@ lua_State *script = cb->script; bool ret = false; - if (cb->base.removed) + if (script_callback_removed(&cb->base)) return false; lock_callback(); @@ -801,7 +801,7 @@ lua_State *script = cb->script; bool ret = false; - if (cb->base.removed) + if (script_callback_removed(&cb->base)) return false; lock_callback(); @@ -1078,7 +1078,7 @@ 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; @@ -1157,6 +1157,25 @@ 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); @@ -1189,8 +1208,7 @@ /* ---------------------------- */ /* 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;
View file
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
@@ -280,7 +280,7 @@ { 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; } @@ -355,7 +355,7 @@ { 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; }
View file
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
@@ -431,7 +431,7 @@ { 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); @@ -476,7 +476,7 @@ { 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; } @@ -546,7 +546,7 @@ { struct python_obs_callback *cb = priv; - if (cb->base.removed) { + if (script_callback_removed(&cb->base)) { signal_handler_remove_current(); return; } @@ -652,7 +652,7 @@ { struct python_obs_callback *cb = priv; - if (cb->base.removed) { + if (script_callback_removed(&cb->base)) { signal_handler_remove_current(); return; } @@ -767,7 +767,7 @@ { struct python_obs_callback *cb = p_cb; - if (cb->base.removed) + if (script_callback_removed(&cb->base)) return; lock_callback(cb); @@ -803,7 +803,7 @@ { struct python_obs_callback *cb = p_cb; - if (cb->base.removed) + if (script_callback_removed(&cb->base)) return; if (pressed) @@ -873,7 +873,7 @@ 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); @@ -937,7 +937,7 @@ 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); @@ -1334,6 +1334,24 @@ 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) { @@ -1350,7 +1368,7 @@ data->next_tick = NULL; } - lock_python(); + relock_python(); Py_XDECREF(data->tick); Py_XDECREF(data->save); @@ -1364,7 +1382,7 @@ /* ---------------------------- */ /* 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); @@ -1532,7 +1550,7 @@ 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;
View file
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
@@ -195,6 +195,7 @@ #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;
View file
obs-studio-27.2.1.tar.xz/libobs/graphics/graphics.h -> obs-studio-27.2.3.tar.xz/libobs/graphics/graphics.h
Changed
@@ -936,7 +936,7 @@ 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,
View file
obs-studio-27.2.1.tar.xz/libobs/obs-config.h -> obs-studio-27.2.3.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 3 #define MAKE_SEMANTIC_VERSION(major, minor, patch) \ ((major << 24) | (minor << 16) | patch)
View file
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
@@ -84,7 +84,7 @@ 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;
View file
obs-studio-27.2.1.tar.xz/libobs/obs-video.c -> obs-studio-27.2.3.tar.xz/libobs/obs-video.c
Changed
@@ -723,7 +723,12 @@ *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; }
View file
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
@@ -20,11 +20,13 @@ #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" @@ -331,9 +333,9 @@ 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); @@ -370,14 +372,9 @@ 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 */
View file
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
@@ -75,7 +75,6 @@ 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) { @@ -106,6 +105,8 @@ case AV_PIX_FMT_YUV444P: out->format = VIDEO_FORMAT_I444; break; + default: + break; } return 0;
View file
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
@@ -29,7 +29,7 @@ * Data structure for mjpeg decoding */ struct v4l2_mjpeg_decoder { - AVCodec *codec; + const AVCodec *codec; AVCodecContext *context; AVPacket *packet; AVFrame *frame;
View file
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
@@ -185,7 +185,14 @@ 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;
View file
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
@@ -123,6 +123,9 @@ bool initialize_placeholder() { + if (initialized) + return true; + GdiplusStartupInput si; ULONG_PTR token; GdiplusStartup(&token, &si, nullptr);
View file
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
@@ -112,7 +112,8 @@ VCamFilter::~VCamFilter() { SetEvent(thread_stop); - th.join(); + if (th.joinable()) + th.join(); video_queue_close(vq); if (placeholder.scaled_data)
View file
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
@@ -347,46 +347,54 @@ (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);
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
.