From cd6e9e34b84d3abfd466f2b6203c8fa9da792ec0 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sun, 28 Jul 2019 22:46:32 -0700 Subject: [PATCH] win-dshow: Clarify function name/purpose IsEncoded is meant to be used to indicated delayed devices, such as older Elgato devices, or Hauppauge device. Devices that use H264 and have a 800+ millisecond latency. This changes the function name to better indicate that. --- plugins/win-dshow/win-dshow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/win-dshow/win-dshow.cpp b/plugins/win-dshow/win-dshow.cpp index 96ef9fea5..8ef0fd772 100644 --- a/plugins/win-dshow/win-dshow.cpp +++ b/plugins/win-dshow/win-dshow.cpp @@ -804,7 +804,7 @@ static bool DetermineResolution(int &cx, int &cy, obs_data_t *settings, static long long GetOBSFPS(); -static inline bool IsEncoded(const VideoConfig &config) +static inline bool IsDelayedDevice(const VideoConfig &config) { return config.format >= VideoFormat::MJPEG || wstrstri(config.name.c_str(), L"elgato") != NULL || @@ -824,7 +824,7 @@ inline void DShowInput::SetupBuffering(obs_data_t *settings) bufType = (BufferingType)obs_data_get_int(settings, BUFFERING_VAL); if (bufType == BufferingType::Auto) - useBuffering = IsEncoded(videoConfig); + useBuffering = IsDelayedDevice(videoConfig); else useBuffering = bufType == BufferingType::On;