+ // EffectChain takes ownership of the given input.
+ // input is returned back for convenience.
+ Input *add_input(Input *input);
+
+ // EffectChain takes ownership of the given effect.
+ // effect is returned back for convenience.
+ Effect *add_effect(Effect *effect) {
+ return add_effect(effect, last_added_effect());
+ }
+ Effect *add_effect(Effect *effect, Effect *input) {
+ std::vector<Effect *> inputs;
+ inputs.push_back(input);
+ return add_effect(effect, inputs);
+ }
+ Effect *add_effect(Effect *effect, Effect *input1, Effect *input2) {
+ std::vector<Effect *> inputs;
+ inputs.push_back(input1);
+ inputs.push_back(input2);
+ return add_effect(effect, inputs);
+ }
+ Effect *add_effect(Effect *effect, Effect *input1, Effect *input2, Effect *input3) {
+ std::vector<Effect *> inputs;
+ inputs.push_back(input1);
+ inputs.push_back(input2);
+ inputs.push_back(input3);
+ return add_effect(effect, inputs);
+ }
+ Effect *add_effect(Effect *effect, Effect *input1, Effect *input2, Effect *input3, Effect *input4) {
+ std::vector<Effect *> inputs;
+ inputs.push_back(input1);
+ inputs.push_back(input2);
+ inputs.push_back(input3);
+ inputs.push_back(input4);
+ return add_effect(effect, inputs);
+ }
+ Effect *add_effect(Effect *effect, Effect *input1, Effect *input2, Effect *input3, Effect *input4, Effect *input5) {
+ std::vector<Effect *> inputs;
+ inputs.push_back(input1);
+ inputs.push_back(input2);
+ inputs.push_back(input3);
+ inputs.push_back(input4);
+ inputs.push_back(input5);
+ return add_effect(effect, inputs);
+ }
+ Effect *add_effect(Effect *effect, const std::vector<Effect *> &inputs);
+
+ // Adds an RGBA output. Note that you can have at most one RGBA output and one
+ // Y'CbCr output (see below for details).
+ void add_output(const ImageFormat &format, OutputAlphaFormat alpha_format);
+
+ // Adds an YCbCr output. Note that you can only have one output.
+ // Currently, only chunked packed output is supported, and only 4:4:4
+ // (so chroma_subsampling_x and chroma_subsampling_y must both be 1).
+ //
+ // If you have both RGBA and Y'CbCr output, the RGBA output will come
+ // in the last draw buffer. Also, <format> and <alpha_format> must be
+ // identical between the two.
+ void add_ycbcr_output(const ImageFormat &format, OutputAlphaFormat alpha_format,
+ const YCbCrFormat &ycbcr_format,
+ YCbCrOutputSplitting output_splitting = YCBCR_OUTPUT_INTERLEAVED);