]> git.sesse.net Git - movit/blobdiff - ycbcr_input.h
Fix YCbCrInput after the ResourcePool texture changes.
[movit] / ycbcr_input.h
index 0f868a8a4ee4fdfc67cfd35a36bb8cb5fb7d3821..eb8d0ec335db4b90bb8b138f45b3c67ddb31fbde 100644 (file)
 #include <string>
 
 #include "effect.h"
+#include "effect_chain.h"
 #include "image_format.h"
 #include "input.h"
 
+class ResourcePool;
+
 struct YCbCrFormat {
        // Which formula for Y' to use.
        YCbCrLumaCoefficients luma_coefficients;
@@ -87,6 +90,11 @@ public:
                this->pitch[channel] = pitch;
        }
 
+       virtual void inform_added(EffectChain *chain)
+       {
+               resource_pool = chain->get_resource_pool();
+       }
+
 private:
        ImageFormat image_format;
        YCbCrFormat ycbcr_format;
@@ -98,6 +106,7 @@ private:
        unsigned width, height, widths[3], heights[3];
        const unsigned char *pixel_data[3];
        unsigned pitch[3];
+       ResourcePool *resource_pool;
 };
 
 #endif // !defined(_MOVIT_YCBCR_INPUT_H)