提交 2d2ca06f 编写于 作者: S SuslikV 提交者: jp9000

obs-x264: Don't show buffer size if buffer size off

Whether buffer size is visible is determined by the value of the "Use
buffer size" property (the "use_bufsize" setting).

(Commit edited and formatted by Jim: separated this code from the
previous commit, and gave it a proper commit message)

Closes jp9000/obs-studio#567
上级 2fb1d180
......@@ -142,6 +142,7 @@ static bool rate_control_modified(obs_properties_t *ppts, obs_property_t *p,
obs_data_t *settings)
{
const char *rc = obs_data_get_string(settings, "rate_control");
bool use_bufsize = obs_data_get_bool(settings, "use_bufsize");
bool abr = astrcmpi(rc, "CBR") == 0 || astrcmpi(rc, "ABR") == 0;
bool rc_crf = astrcmpi(rc, "CRF") == 0;
......@@ -153,7 +154,7 @@ static bool rate_control_modified(obs_properties_t *ppts, obs_property_t *p,
p = obs_properties_get(ppts, "use_bufsize");
obs_property_set_visible(p, !rc_crf);
p = obs_properties_get(ppts, "buffer_size");
obs_property_set_visible(p, !rc_crf);
obs_property_set_visible(p, !rc_crf && use_bufsize);
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册