Fix YCbCrInput after the ResourcePool texture changes.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 21 Jan 2014 20:39:09 +0000 (21:39 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 21 Jan 2014 20:39:09 +0000 (21:39 +0100)
ycbcr_input.cpp
ycbcr_input.h

index 2a67ea7..87140be 100644 (file)
@@ -6,6 +6,7 @@
 #include <string.h>
 
 #include "effect_util.h"
+#include "resource_pool.h"
 #include "util.h"
 #include "ycbcr_input.h"
 
index 0f868a8..eb8d0ec 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)