SHA256
Add Keyframe Interval Config UI
This commit is contained in:
2 files changed
+18
-2
No files matched your search
@@ -27,5 +27,6 @@ namespace ADOFAIRenderer.Data
|
|||||||
public int Bitrate;
|
public int Bitrate;
|
||||||
public int MaxBitrate;
|
public int MaxBitrate;
|
||||||
public int QP;
|
public int QP;
|
||||||
|
public double KeyframeInterval;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -102,7 +102,8 @@ namespace ADOFAIRenderer.UI
|
|||||||
RateControlMode = config.EncodingConfig.RateControlMode,
|
RateControlMode = config.EncodingConfig.RateControlMode,
|
||||||
Bitrate = config.EncodingConfig.Bitrate,
|
Bitrate = config.EncodingConfig.Bitrate,
|
||||||
MaxBitrate = config.EncodingConfig.MaxBitrate,
|
MaxBitrate = config.EncodingConfig.MaxBitrate,
|
||||||
QP = config.EncodingConfig.QP
|
QP = config.EncodingConfig.QP,
|
||||||
|
KeyframeInterval = config.EncodingConfig.KeyframeInterval
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_root.Contains(_encodingConfigContainer))
|
if (_root.Contains(_encodingConfigContainer))
|
||||||
@@ -194,6 +195,14 @@ namespace ADOFAIRenderer.UI
|
|||||||
qpRow.Add(qpField);
|
qpRow.Add(qpField);
|
||||||
_encodingConfigContainer.Add(qpRow);
|
_encodingConfigContainer.Add(qpRow);
|
||||||
|
|
||||||
|
// 6.5. 키프레임 간격 로우 (라벨 + 입력)
|
||||||
|
var keyframeRow = CreateRow();
|
||||||
|
var keyframeLabel = CreateFormLabel("키프레임 간격 (초)");
|
||||||
|
var keyframeField = new DoubleField { name = "EncodingKeyframeInterval", label = "", value = tempConfig.KeyframeInterval };
|
||||||
|
keyframeRow.Add(keyframeLabel);
|
||||||
|
keyframeRow.Add(keyframeField);
|
||||||
|
_encodingConfigContainer.Add(keyframeRow);
|
||||||
|
|
||||||
// 7. QP = 0 (무손실) 경고 라벨 로우 생성 (ui-row 클래스를 상속받아 NanumSquareNeo 폰트가 적용되도록 처리)
|
// 7. QP = 0 (무손실) 경고 라벨 로우 생성 (ui-row 클래스를 상속받아 NanumSquareNeo 폰트가 적용되도록 처리)
|
||||||
var warningRow = CreateRow();
|
var warningRow = CreateRow();
|
||||||
warningRow.style.height = StyleKeyword.Auto;
|
warningRow.style.height = StyleKeyword.Auto;
|
||||||
@@ -221,6 +230,11 @@ namespace ADOFAIRenderer.UI
|
|||||||
.AddLimits("EncodingQP", new RangeIntegerLimit(0, 51));
|
.AddLimits("EncodingQP", new RangeIntegerLimit(0, 51));
|
||||||
encodingValidator.SetupValidation();
|
encodingValidator.SetupValidation();
|
||||||
|
|
||||||
|
var encodingDoubleValidator = new DoubleInputValidator(_encodingConfigContainer);
|
||||||
|
encodingDoubleValidator
|
||||||
|
.AddLimits("EncodingKeyframeInterval", new PositiveOnlyDoubleLimit(), new RangeDoubleLimit(0.01, 1000.0));
|
||||||
|
encodingDoubleValidator.SetupValidation();
|
||||||
|
|
||||||
// 가시성 필터링 업데이트 (행 단위로 보임/숨김 제어)
|
// 가시성 필터링 업데이트 (행 단위로 보임/숨김 제어)
|
||||||
void UpdateVisibility(string selectedModeStr)
|
void UpdateVisibility(string selectedModeStr)
|
||||||
{
|
{
|
||||||
@@ -277,6 +291,7 @@ namespace ADOFAIRenderer.UI
|
|||||||
tempConfig.Bitrate = bitrateField.value;
|
tempConfig.Bitrate = bitrateField.value;
|
||||||
tempConfig.MaxBitrate = maxBitrateField.value;
|
tempConfig.MaxBitrate = maxBitrateField.value;
|
||||||
tempConfig.QP = qpField.value;
|
tempConfig.QP = qpField.value;
|
||||||
|
tempConfig.KeyframeInterval = keyframeField.value;
|
||||||
|
|
||||||
if (tempConfig.RateControlMode == RateControlMode.VBR && tempConfig.MaxBitrate < tempConfig.Bitrate)
|
if (tempConfig.RateControlMode == RateControlMode.VBR && tempConfig.MaxBitrate < tempConfig.Bitrate)
|
||||||
{
|
{
|
||||||
@@ -347,7 +362,7 @@ namespace ADOFAIRenderer.UI
|
|||||||
{
|
{
|
||||||
RateControlMode = RateControlMode.CBR,
|
RateControlMode = RateControlMode.CBR,
|
||||||
Bitrate = 30000, MaxBitrate = 50000,
|
Bitrate = 30000, MaxBitrate = 50000,
|
||||||
QP = 18
|
QP = 18, KeyframeInterval = 2.0
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user