Просмотр исходного кода

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.
jp9000 6 лет назад
Родитель
Сommit
cd6e9e34b8
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      plugins/win-dshow/win-dshow.cpp

+ 2 - 2
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 long long GetOBSFPS();
 
 
-static inline bool IsEncoded(const VideoConfig &config)
+static inline bool IsDelayedDevice(const VideoConfig &config)
 {
 {
 	return config.format >= VideoFormat::MJPEG ||
 	return config.format >= VideoFormat::MJPEG ||
 	       wstrstri(config.name.c_str(), L"elgato") != NULL ||
 	       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);
 	bufType = (BufferingType)obs_data_get_int(settings, BUFFERING_VAL);
 
 
 	if (bufType == BufferingType::Auto)
 	if (bufType == BufferingType::Auto)
-		useBuffering = IsEncoded(videoConfig);
+		useBuffering = IsDelayedDevice(videoConfig);
 	else
 	else
 		useBuffering = bufType == BufferingType::On;
 		useBuffering = bufType == BufferingType::On;