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:
@@ -912,11 +912,8 @@ fail:
|
||||
static void v4l2_update_source_flags(struct v4l2_data *data,
|
||||
obs_data_t *settings)
|
||||
{
|
||||
uint32_t flags = obs_source_get_flags(data->source);
|
||||
flags = (obs_data_get_bool(settings, "buffering"))
|
||||
? flags & ~OBS_SOURCE_FLAG_UNBUFFERED
|
||||
: flags | OBS_SOURCE_FLAG_UNBUFFERED;
|
||||
obs_source_set_flags(data->source, flags);
|
||||
obs_source_set_async_unbuffered(data->source,
|
||||
!obs_data_get_bool(settings, "buffering"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user