X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmodules%2Fopengl%2Ffilter_glsl_manager.h;h=35e81b13eb16efa35de1746664617af689c17abc;hb=234d3e7f9969098b33f9c1293d5cf1f1d53f864f;hp=28810506b4b3fe9cbb893415b98862aeecda83c6;hpb=1efe96041e015b55eb70f300cac5a1083decc868;p=mlt diff --git a/src/modules/opengl/filter_glsl_manager.h b/src/modules/opengl/filter_glsl_manager.h index 28810506..35e81b13 100644 --- a/src/modules/opengl/filter_glsl_manager.h +++ b/src/modules/opengl/filter_glsl_manager.h @@ -20,7 +20,11 @@ #ifndef GLSL_MANAGER_H #define GLSL_MANAGER_H -#include +// Include a random Movit header file to get in GL.h, without including it +// ourselves (which might interfere with whatever OpenGL extension library +// Movit has chosen to use). +#include + #include #include #include @@ -56,21 +60,26 @@ struct glsl_pbo_s }; typedef struct glsl_pbo_s *glsl_pbo; +namespace movit { + class Effect; class EffectChain; -class MltInput; class ResourcePool; +} // namespace movit + +class MltInput; + struct GlslChain { - EffectChain *effect_chain; + movit::EffectChain *effect_chain; // All MltInputs in the effect chain. These are not owned by the // EffectChain (although the contained Input* is). std::map inputs; // All services owned by the effect chain and their associated Movit effect. - std::map effects; + std::map effects; // For each effect in the Movit graph, a unique identifier for the service // and whether it's disabled or not, using post-order traversal. @@ -92,13 +101,13 @@ public: glsl_pbo get_pbo(int size); void cleanupContext(); - ResourcePool* get_resource_pool() { return resource_pool; } + movit::ResourcePool* get_resource_pool() { return resource_pool; } static void set_chain(mlt_service, GlslChain*); static GlslChain* get_chain(mlt_service); - static Effect* get_effect(mlt_service, mlt_frame); - static Effect* set_effect(mlt_service, mlt_frame, Effect*); + static movit::Effect* get_effect(mlt_service, mlt_frame); + static movit::Effect* set_effect(mlt_service, mlt_frame, movit::Effect*); static MltInput* get_input(mlt_producer, mlt_frame); static MltInput* set_input(mlt_producer, mlt_frame, MltInput*); static uint8_t* get_input_pixel_pointer(mlt_producer, mlt_frame); @@ -109,8 +118,8 @@ public: static void get_effect_secondary_input(mlt_service, mlt_frame, mlt_service*, mlt_frame*); static void set_effect_secondary_input(mlt_service, mlt_frame, mlt_service, mlt_frame); - int render_frame_texture(EffectChain*, mlt_frame, int width, int height, uint8_t **image); - int render_frame_rgba(EffectChain*, mlt_frame, int width, int height, uint8_t **image); + int render_frame_texture(movit::EffectChain*, mlt_frame, int width, int height, uint8_t **image); + int render_frame_rgba(movit::EffectChain*, mlt_frame, int width, int height, uint8_t **image); static void lock_service(mlt_frame frame); static void unlock_service(mlt_frame frame); @@ -122,7 +131,7 @@ private: static void onClose( mlt_properties owner, GlslManager* filter ); static void onServiceChanged( mlt_properties owner, mlt_service service ); static void onPropertyChanged( mlt_properties owner, mlt_service service, const char* property ); - ResourcePool* resource_pool; + movit::ResourcePool* resource_pool; Mlt::Deque texture_list; Mlt::Deque syncs_to_delete; glsl_pbo pbo;