New upstream version 24.0.3+dfsg1

This commit is contained in:
Sebastian Ramacher 2019-10-13 21:58:08 +02:00
parent 5a730d6ec3
commit 52fa83f147
16 changed files with 213 additions and 32 deletions

View file

@ -10,6 +10,14 @@
EXTERN_C const GUID DECLSPEC_SELECTANY name = { \
l, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}}
#define do_log(level, format, ...) \
blog(level, "[audio monitoring: '%s'] " format, \
obs_source_get_name(monitor->source), ##__VA_ARGS__)
#define warn(format, ...) do_log(LOG_WARNING, format, ##__VA_ARGS__)
#define info(format, ...) do_log(LOG_INFO, format, ##__VA_ARGS__)
#define debug(format, ...) do_log(LOG_DEBUG, format, ##__VA_ARGS__)
ACTUALLY_DEFINE_GUID(CLSID_MMDeviceEnumerator, 0xBCDE0395, 0xE52F, 0x467C, 0x8E,
0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E);
ACTUALLY_DEFINE_GUID(IID_IMMDeviceEnumerator, 0xA95664D2, 0x9614, 0x4F35, 0xA7,
@ -256,6 +264,7 @@ static bool audio_monitor_init(struct audio_monitor *monitor,
const char *id = obs->audio.monitoring_device_id;
if (!id) {
warn("%s: No device ID set", __FUNCTION__);
return false;
}
@ -277,6 +286,8 @@ static bool audio_monitor_init(struct audio_monitor *monitor,
hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL,
&IID_IMMDeviceEnumerator, (void **)&immde);
if (FAILED(hr)) {
warn("%s: Failed to create IMMDeviceEnumerator: %08lX",
__FUNCTION__, hr);
return false;
}
@ -291,6 +302,7 @@ static bool audio_monitor_init(struct audio_monitor *monitor,
}
if (FAILED(hr)) {
warn("%s: Failed to get device: %08lX", __FUNCTION__, hr);
goto fail;
}
@ -301,11 +313,13 @@ static bool audio_monitor_init(struct audio_monitor *monitor,
&IID_IAudioClient, CLSCTX_ALL,
NULL, (void **)&monitor->client);
if (FAILED(hr)) {
warn("%s: Failed to activate device: %08lX", __FUNCTION__, hr);
goto fail;
}
hr = monitor->client->lpVtbl->GetMixFormat(monitor->client, &wfex);
if (FAILED(hr)) {
warn("%s: Failed to get mix format: %08lX", __FUNCTION__, hr);
goto fail;
}
@ -313,6 +327,7 @@ static bool audio_monitor_init(struct audio_monitor *monitor,
AUDCLNT_SHAREMODE_SHARED, 0,
10000000, 0, wfex, NULL);
if (FAILED(hr)) {
warn("%s: Failed to initialize: %08lX", __FUNCTION__, hr);
goto fail;
}
@ -346,6 +361,7 @@ static bool audio_monitor_init(struct audio_monitor *monitor,
hr = monitor->client->lpVtbl->GetBufferSize(monitor->client, &frames);
if (FAILED(hr)) {
warn("%s: Failed to get buffer size: %08lX", __FUNCTION__, hr);
goto fail;
}
@ -353,15 +369,19 @@ static bool audio_monitor_init(struct audio_monitor *monitor,
&IID_IAudioRenderClient,
(void **)&monitor->render);
if (FAILED(hr)) {
warn("%s: Failed to get IAudioRenderClient: %08lX",
__FUNCTION__, hr);
goto fail;
}
if (pthread_mutex_init(&monitor->playback_mutex, NULL) != 0) {
warn("%s: Failed to initialize mutex", __FUNCTION__);
goto fail;
}
hr = monitor->client->lpVtbl->Start(monitor->client);
if (FAILED(hr)) {
warn("%s: Failed to start audio: %08lX", __FUNCTION__, hr);
goto fail;
}

View file

@ -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

@ -139,6 +139,8 @@ static bool obs_init_gpu_conversion(struct obs_video_info *ovi)
if (!video->convert_textures[2])
return false;
break;
default:
break;
}
#ifdef _WIN32
}
@ -190,6 +192,8 @@ static bool obs_init_gpu_copy_surfaces(struct obs_video_info *ovi, size_t i)
if (!video->copy_surfaces[i][2])
return false;
break;
default:
break;
}
return true;