{
/* Note: "none" is a magic id name, so don't use it here */
+ auto maybe_add = [](string id, string name, string category, string ffmpeg)
+ {
+ string check_name = ffmpeg;
+ size_t end = check_name.find("=");
+ if (end != string::npos) {
+ check_name = check_name.substr(0, end);
+ }
+
+ if (avfilter_get_by_name(check_name.c_str())) {
+ _filters.push_back(Filter(id, name, category, ffmpeg));
+ }
+ };
+
maybe_add (N_("vflip"), _("Vertical flip"), _("Orientation"), N_("vflip"));
maybe_add (N_("hflip"), _("Horizontal flip"), _("Orientation"), N_("hflip"));
maybe_add (N_("90clock"), _("Rotate 90 degrees clockwise"), _("Orientation"), N_("transpose=dir=clock"));
}
-void
-Filter::maybe_add (string i, string n, string c, string f)
-{
- string check_name = f;
- size_t end = check_name.find("=");
- if (end != string::npos) {
- check_name = check_name.substr (0, end);
- }
-
- if (avfilter_get_by_name(check_name.c_str())) {
- _filters.push_back (Filter(i, n, c, f));
- }
-}
-
-
/** @param filters Set of filters.
* @return String to pass to FFmpeg for the video filters.
*/