Skip to content

Commit 51ee982

Browse files
authored
Merge pull request #221 from Libvisual/lv-tool-base-exclusion-set
lv-tool: Always skip actors "gstreamer" and "gdkpixbuf" when cycling
2 parents 5f0d93c + 860472a commit 51ee982

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

libvisual/tools/lv-tool/lv-tool.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <atomic>
3333
#include <stdexcept>
3434
#include <iostream>
35+
#include <unordered_set>
3536
#include <string>
3637
#include <cstdio>
3738
#include <cstdlib>
@@ -56,6 +57,11 @@
5657

5758
namespace {
5859

60+
const std::unordered_set<std::string> actors_to_skip {
61+
"gdkpixbuf",
62+
"gstreamer"
63+
};
64+
5965
std::string actor_name;
6066
std::string input_name = DEFAULT_INPUT;
6167
std::string morph_name = DEFAULT_MORPH;
@@ -388,6 +394,12 @@ namespace {
388394
new_name = cycler (nullptr);
389395
}
390396

397+
// Always skip actors that are of little interest to end users,
398+
// while allowing explicit "--actor (gdkpixbuf|gstreamer)".
399+
if (actors_to_skip.contains (new_name)) {
400+
return cycle_actor_name (new_name, dir);
401+
}
402+
391403
// FIXME: this won't work if an actor's name is used as part of
392404
// another actor's name
393405
if (exclude_actors.find (new_name) != std::string::npos) {

0 commit comments

Comments
 (0)