X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=theme.h;h=2a8b9d68b12afc44910a7d03059e44fe97a6b4f7;hb=25f6b207f157c081495d7abd4ea314b5ef760322;hp=4394513cceeb53a8729994e6f1966e152f53ac5b;hpb=ba2dc655c098912b8860676596fe89c1305affe9;p=nageru diff --git a/theme.h b/theme.h index 4394513..2a8b9d6 100644 --- a/theme.h +++ b/theme.h @@ -2,6 +2,7 @@ #define _THEME_H 1 #include +#include #include #include #include @@ -16,9 +17,9 @@ struct InputState; namespace movit { -class ResourcePool; class Effect; class EffectChain; +class ResourcePool; struct ImageFormat; struct YCbCrFormat; } // namespace movit @@ -88,6 +89,7 @@ private: // the mixer, and communicates that state over to the actual YCbCrInput. class LiveInputWrapper { public: + // Note: is irrelevant for PixelFormat_8BitRGBA. LiveInputWrapper(Theme *theme, movit::EffectChain *chain, bmusb::PixelFormat pixel_format, bool override_bounce, bool deinterlace); void connect_signal(int signal_num); @@ -95,15 +97,18 @@ public: { if (deinterlace) { return deinterlace_effect; + } else if (pixel_format == bmusb::PixelFormat_8BitRGBA) { + return rgba_inputs[0]; } else { - return inputs[0]; + return ycbcr_inputs[0]; } } private: Theme *theme; // Not owned by us. bmusb::PixelFormat pixel_format; - std::vector inputs; // Multiple ones if deinterlacing. Owned by the chain. + std::vector ycbcr_inputs; // Multiple ones if deinterlacing. Owned by the chain. + std::vector rgba_inputs; // Multiple ones if deinterlacing. Owned by the chain. movit::Effect *deinterlace_effect = nullptr; // Owned by the chain. bool deinterlace; };