mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
Set defaults automatically
Automatically query defaults for sources/outputs/encoders and set them before calling create
This commit is contained in:
@@ -684,8 +684,6 @@ static void *coreaudio_create(obs_data_t settings, obs_source_t source,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
coreaudio_defaults(settings);
|
||||
|
||||
ca->device_uid = bstrdup(obs_data_getstring(settings, "device_id"));
|
||||
ca->source = source;
|
||||
ca->input = input;
|
||||
|
||||
@@ -358,8 +358,6 @@ static void *obs_x264_create(obs_data_t settings, obs_encoder_t encoder)
|
||||
{
|
||||
struct obs_x264 *data = bzalloc(sizeof(struct obs_x264));
|
||||
data->encoder = encoder;
|
||||
|
||||
obs_x264_defaults(settings);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,9 +119,7 @@ static void *monitor_capture_create(obs_data_t settings, obs_source_t source)
|
||||
capture = bzalloc(sizeof(struct monitor_capture));
|
||||
capture->opaque_effect = opaque_effect;
|
||||
|
||||
monitor_capture_defaults(settings);
|
||||
update_settings(capture, settings);
|
||||
|
||||
return capture;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ WASAPISource::WASAPISource(obs_data_t settings, obs_source_t source_,
|
||||
source (source_),
|
||||
isInputDevice (input)
|
||||
{
|
||||
GetWASAPIDefaults(settings);
|
||||
UpdateSettings(settings);
|
||||
|
||||
stopSignal = CreateEvent(nullptr, true, false, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user