Commit 7a863b6c authored by Thomas Guillem's avatar Thomas Guillem

ci_filters: add way to load a specific CIFilter

For example:
vlc --video-filter ci --ci-filter CICrystallize
parent 99ebfddc
......@@ -52,6 +52,7 @@ enum filter_type
FILTER_SEPIA,
FILTER_SHARPEN,
FILTER_PSYCHEDELIC,
FILTER_CUSTOM,
NUM_FILTERS,
NUM_MAX_EQUIVALENT_VLC_FILTERS = 3
};
......@@ -184,6 +185,12 @@ static struct filter_desc filter_desc_table[] =
filter_PsychedelicInit,
filter_PsychedelicControl
},
[FILTER_CUSTOM] =
{
{ "custom" }, { { } },
filter_PsychedelicInit,
filter_PsychedelicControl
},
};
#define GET_CI_VALUE(vlc_value, vlc_range, ci_range) \
......@@ -740,6 +747,12 @@ OpenPsychedelic(vlc_object_t *obj)
return Open(obj, "psychedelic");
}
static int
OpenCustom(vlc_object_t *obj)
{
return Open(obj, "custom");
}
static void
Close(vlc_object_t *obj)
{
......@@ -766,6 +779,10 @@ Close(vlc_object_t *obj)
free(filter->p_sys);
}
#define CI_CUSTOM_FILTER_TEXT N_("Use a specific Core Image Filter")
#define CI_CUSTOM_FILTER_LONGTEXT N_( \
"Example: 'CICrystallize', 'CIBumpDistortion', 'CIThermal', 'CIComicEffect'")
vlc_module_begin()
set_capability("video filter", 0)
set_category(CAT_VIDEO)
......@@ -795,4 +812,9 @@ vlc_module_begin()
add_submodule()
set_callbacks(OpenPsychedelic, Close)
add_shortcut("psychedelic")
add_submodule()
set_callbacks(OpenCustom, Close)
add_shortcut("ci")
add_string("ci-filter", "CIComicEffect", CI_CUSTOM_FILTER_TEXT, CI_CUSTOM_FILTER_LONGTEXT, true);
vlc_module_end()
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