libobs: Don't use source flags for async buffering
(This commit also modifies the decklink, linux-v4l2, mac-avcapture, obs-ffmpeg, and win-dshow modules) Originally, async buffering for sources was supposed to be a user-controllable flag. However, that turned out to be less than ideal because sources (such as the win-dshow plugin) were programmed with automatic control over their buffering (such as automatically detecting USB 2.0 capture devices and then enabling in those cases). The fact that it was a flag caused a design flaw to where buffering values would be overwritten when a source is loaded from save data. Because of that, this flag is being deprecated and replaced with a specific function to enable unbuffered mode instead.
This commit is contained in:
@@ -273,14 +273,14 @@ static void ffmpeg_source_update(void *data, obs_data_t *settings)
|
||||
input_format = NULL;
|
||||
s->is_looping = obs_data_get_bool(settings, "looping");
|
||||
|
||||
obs_source_set_flags(s->source, OBS_SOURCE_FLAG_UNBUFFERED);
|
||||
obs_source_set_async_unbuffered(s->source, true);
|
||||
} else {
|
||||
input = (char *)obs_data_get_string(settings, "input");
|
||||
input_format = (char *)obs_data_get_string(settings,
|
||||
"input_format");
|
||||
s->is_looping = false;
|
||||
|
||||
obs_source_set_flags(s->source, 0);
|
||||
obs_source_set_async_unbuffered(s->source, false);
|
||||
}
|
||||
|
||||
s->input = input ? bstrdup(input) : NULL;
|
||||
|
Reference in New Issue
Block a user