@@ -81,25 +81,30 @@ void OutputProcessors::loadFromJSON(const Json::Value& config, bool clear) {
81
81
}
82
82
}
83
83
OutputProcessor* OutputProcessors::create (const Json::Value& config) {
84
- std::string type = config[" type" ].asString ();
85
- if (type == " Remap" ) {
86
- return new RemapOutputProcessor (config);
87
- } else if (type == " Brightness" ) {
88
- return new BrightnessOutputProcessor (config);
89
- } else if (type == " Hold Value" ) {
90
- return new HoldValueOutputProcessor (config);
91
- } else if (type == " Set Value" ) {
92
- return new SetValueOutputProcessor (config);
93
- } else if (type == " Reorder Colors" ) {
94
- return new ColorOrderOutputProcessor (config);
95
- } else if (type == " Three to Four" ) {
96
- return new ThreeToFourOutputProcessor (config);
97
- } else if (type == " Override Zero" ) {
98
- return new OverrideZeroOutputProcessor (config);
99
- } else if (type == " Fold" ) {
100
- return new FoldOutputProcessor (config);
84
+ int active = config[" active" ].asInt ();
85
+ if (active == 1 ) {
86
+ std::string type = config[" type" ].asString ();
87
+ if (type == " Remap" ) {
88
+ return new RemapOutputProcessor (config);
89
+ } else if (type == " Brightness" ) {
90
+ return new BrightnessOutputProcessor (config);
91
+ } else if (type == " Hold Value" ) {
92
+ return new HoldValueOutputProcessor (config);
93
+ } else if (type == " Set Value" ) {
94
+ return new SetValueOutputProcessor (config);
95
+ } else if (type == " Reorder Colors" ) {
96
+ return new ColorOrderOutputProcessor (config);
97
+ } else if (type == " Three to Four" ) {
98
+ return new ThreeToFourOutputProcessor (config);
99
+ } else if (type == " Override Zero" ) {
100
+ return new OverrideZeroOutputProcessor (config);
101
+ } else if (type == " Fold" ) {
102
+ return new FoldOutputProcessor (config);
103
+ } else {
104
+ LogErr (VB_CHANNELOUT, " Unknown OutputProcessor type: %s\n " , type.c_str ());
105
+ }
101
106
} else {
102
- LogErr (VB_CHANNELOUT, " Unknown OutputProcessor type: %s \n " , type. c_str () );
107
+ LogDebug (VB_CHANNELOUT, " Skipping disabled OutputProcessor \n " );
103
108
}
104
109
return nullptr ;
105
110
}
0 commit comments