Start implementing / blacklisting avfilters

parent b74e93d2
......@@ -121,3 +121,22 @@ mono
# Effects need extra GUI to create the resulting melt.xml with the corrected content
videostab
videostab2
# Unimplemented/unusable Avfilter Effects
avfilter.abench
avfilter.adelay
avfilter.aemphasis
avfilter.aeval
avfilter.afade
avfilter.afftfilt
avfilter.aformat
avfilter.subtitles
avfilter.ssim
avfilter.stereo3d
avfilter.ass
# Avfilter Effects with XML
avfilter.acompressor
avfilter.aecho
avfilter.agate
......@@ -133,3 +133,4 @@ tracker.xml
DESTINATION ${DATA_INSTALL_DIR}/kdenlive/effects)
add_subdirectory(update)
add_subdirectory(avfilter)
INSTALL (FILES
acompressor.xml
aecho.xml
agate.xml
DESTINATION ${DATA_INSTALL_DIR}/kdenlive/effects)
<!DOCTYPE kpartgui>
<effect tag="avfilter.acompressor" type="audio">
<name>Compressor (avfilter)</name>
<description>Audio Compressor</description>
<author>libavfilter</author>
<parameter type="constant" name="av.level_in" max="64" min="0.016" default="1" decimals="3">
<name>Input Gain</name>
</parameter>
<parameter type="constant" name="av.threshold" max="1" min="0.001" default="0.125" decimals="3">
<name>Threshold</name>
</parameter>
<parameter type="constant" name="av.ratio" max="20" min="1" default="2">
<name>Ratio</name>
</parameter>
<parameter type="constant" name="av.attack" max="2000" min="0.01" default="20" decimals="3">
<name>Attack</name>
</parameter>
<parameter type="constant" name="av.release" max="9000" min="0.01" default="250" decimals="3">
<name>Release</name>
</parameter>
<parameter type="constant" name="av.makeup" max="64" min="1" default="2">
<name>Make Up Gain</name>
</parameter>
<parameter type="constant" name="av.knee" max="8" min="1" default="2.828" decimals="3">
<name>Knee</name>
</parameter>
<parameter type="list" name="av.link" default="0" paramlist="0;1">
<paramlistdisplay>Average,Maximum</paramlistdisplay>
<name>Link Type</name>
</parameter>
<parameter type="list" name="av.detection" default="0" paramlist="0;1">
<paramlistdisplay>Peak,Rms</paramlistdisplay>
<name>Detection</name>
</parameter>
<parameter type="constant" name="av.level_sc" max="64" min="0.016" default="1" decimals="3">
<name>Sidechain Gain</name>
</parameter>
<parameter type="constant" name="av.mix" max="1" min="0" default="1" decimals="3">
<name>Mix</name>
</parameter>
</effect>
<!DOCTYPE kpartgui>
<effect tag="avfilter.aecho" type="audio">
<name>Echo (avfilter)</name>
<description>Add Echo</description>
<author>libavfilter</author>
<parameter type="constant" name="av.in_gain" max="1" min="0" default="0.6" decimals="3">
<name>Input Gain</name>
</parameter>
<parameter type="constant" name="av.out_gain" max="1" min="0" default="0.3" decimals="3">
<name>Output Gain</name>
</parameter>
<parameter type="constant" name="av.delays" max="90000" min="0" default="1000">
<name>Delay</name>
</parameter>
<parameter type="constant" name="av.decays" max="1" min="0" default="0.5" decimals="2">
<name>Decay</name>
</parameter>
</effect>
<!DOCTYPE kpartgui>
<effect tag="avfilter.agate" type="audio">
<name>Gate (avfilter)</name>
<description>Audio Gate</description>
<author>libavfilter</author>
<parameter type="constant" name="av.level_in" max="64" min="0.016" default="1" decimals="3">
<name>Input Gain</name>
</parameter>
<parameter type="constant" name="av.range" max="1" min="0" default="0.061" decimals="3">
<name>Range</name>
</parameter>
<parameter type="constant" name="av.threshold" max="1" min="0" default="0.125" decimals="3">
<name>Threshold</name>
</parameter>
<parameter type="constant" name="av.ratio" max="9000" min="1" default="1">
<name>Ratio</name>
</parameter>
<parameter type="constant" name="av.attack" max="9000" min="0.01" default="20" decimals="3" suffif="ms">
<name>Attack</name>
</parameter>
<parameter type="constant" name="av.release" max="9000" min="0.01" default="250" decimals="3" suffif="ms">
<name>Release</name>
</parameter>
<parameter type="constant" name="av.makeup" max="64" min="1" default="1">
<name>Make Up Gain</name>
</parameter>
<parameter type="constant" name="av.knee" max="8" min="1" default="2.828" decimals="3">
<name>Knee</name>
</parameter>
<parameter type="list" name="av.detection" default="0" paramlist="0;1">
<paramlistdisplay>Peak,Rms</paramlistdisplay>
<name>Detection</name>
</parameter>
<parameter type="list" name="av.link" default="0" paramlist="0;1">
<paramlistdisplay>Average,Maximum</paramlistdisplay>
<name>Link Type</name>
</parameter>
</effect>
......@@ -592,17 +592,20 @@ QDomDocument initEffects::createDescriptionFromMlt(Mlt::Repository* repository,
// This parameter has to be given as attribute when using command line, do not show it in Kdenlive
continue;
}
if (paramdesc.get("readonly") && !strcmp(paramdesc.get("readonly"), "yes")) {
// Do not expose readonly parameters
continue;
}
if (paramdesc.get("maximum")) params.setAttribute(QStringLiteral("max"), paramdesc.get("maximum"));
if (paramdesc.get("minimum")) params.setAttribute(QStringLiteral("min"), paramdesc.get("minimum"));
QString paramType = paramdesc.get("type");
if (paramType == QLatin1String("integer")) {
if (params.attribute(QStringLiteral("min")) == QLatin1String("0") && params.attribute(QStringLiteral("max")) == QLatin1String("1"))
params.setAttribute(QStringLiteral("type"), QStringLiteral("bool"));
else params.setAttribute(QStringLiteral("type"), QStringLiteral("constant"));
}
else if (paramType == QLatin1String("float")) {
params.setAttribute(QStringLiteral("type"), QStringLiteral("constant"));
......
......@@ -968,7 +968,9 @@ void ParameterContainer::slotCollectAllParameters()
QString setValue;
if (type == QLatin1String("double") || type == QLatin1String("constant")) {
DoubleParameterWidget *doubleparam = static_cast<DoubleParameterWidget*>(m_valueItems.value(paramName));
if (doubleparam) setValue = locale.toString(doubleparam->getValue());
if (doubleparam) {
setValue = locale.toString(doubleparam->getValue());
}
} else if (type == QLatin1String("list")) {
Listval* val = static_cast<Listval*>(m_valueItems.value(paramName));
if (val) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment