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:
jp9000
2017-05-13 23:32:40 -07:00
parent d64542e10b
commit d13fa96851
9 changed files with 30 additions and 30 deletions

View File

@@ -753,12 +753,7 @@ inline void DShowInput::SetupBuffering(obs_data_t *settings)
else
useBuffering = bufType == BufferingType::On;
if (useBuffering)
flags &= ~OBS_SOURCE_FLAG_UNBUFFERED;
else
flags |= OBS_SOURCE_FLAG_UNBUFFERED;
obs_source_set_flags(source, flags);
obs_source_set_async_unbuffered(source, !useBuffering);
}
static DStr GetVideoFormatName(VideoFormat format);