From 87a9c8a82aaf7a8abf1da0f9f1268a4465bb21e1 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Wed, 12 Feb 2014 02:05:30 +0100 Subject: [PATCH] Adjust for Movit moving into namespace movit. --- src/modules/opengl/filter_glsl_manager.cpp | 2 ++ src/modules/opengl/filter_glsl_manager.h | 23 +++++++++++-------- src/modules/opengl/filter_movit_blur.cpp | 2 ++ src/modules/opengl/filter_movit_convert.cpp | 2 ++ src/modules/opengl/filter_movit_crop.cpp | 2 ++ .../filter_movit_deconvolution_sharpen.cpp | 2 ++ src/modules/opengl/filter_movit_diffusion.cpp | 2 ++ src/modules/opengl/filter_movit_glow.cpp | 2 ++ .../opengl/filter_movit_lift_gamma_gain.cpp | 2 ++ src/modules/opengl/filter_movit_mirror.cpp | 2 ++ src/modules/opengl/filter_movit_opacity.cpp | 2 ++ src/modules/opengl/filter_movit_rect.cpp | 2 ++ src/modules/opengl/filter_movit_resample.cpp | 2 ++ src/modules/opengl/filter_movit_resize.cpp | 2 ++ .../opengl/filter_movit_saturation.cpp | 2 ++ src/modules/opengl/filter_movit_vignette.cpp | 2 ++ .../opengl/filter_movit_white_balance.cpp | 2 ++ src/modules/opengl/mlt_flip_effect.h | 2 +- src/modules/opengl/mlt_movit_input.cpp | 2 ++ src/modules/opengl/mlt_movit_input.h | 10 ++++---- src/modules/opengl/optional_effect.h | 2 +- src/modules/opengl/transition_movit_mix.cpp | 2 ++ .../opengl/transition_movit_overlay.cpp | 2 ++ 23 files changed, 59 insertions(+), 16 deletions(-) diff --git a/src/modules/opengl/filter_glsl_manager.cpp b/src/modules/opengl/filter_glsl_manager.cpp index cf71a211..0a33bc9a 100644 --- a/src/modules/opengl/filter_glsl_manager.cpp +++ b/src/modules/opengl/filter_glsl_manager.cpp @@ -42,6 +42,8 @@ extern "C" { #include #endif +using namespace movit; + void dec_ref_and_delete(GlslManager *p) { if (p->dec_ref() == 0) { diff --git a/src/modules/opengl/filter_glsl_manager.h b/src/modules/opengl/filter_glsl_manager.h index 28810506..e867f26f 100644 --- a/src/modules/opengl/filter_glsl_manager.h +++ b/src/modules/opengl/filter_glsl_manager.h @@ -56,21 +56,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 +97,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 +114,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 +127,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; diff --git a/src/modules/opengl/filter_movit_blur.cpp b/src/modules/opengl/filter_movit_blur.cpp index e89a09da..62f9542f 100644 --- a/src/modules/opengl/filter_movit_blur.cpp +++ b/src/modules/opengl/filter_movit_blur.cpp @@ -24,6 +24,8 @@ #include "filter_glsl_manager.h" #include +using namespace movit; + static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable ) { mlt_filter filter = (mlt_filter) mlt_frame_pop_service( frame ); diff --git a/src/modules/opengl/filter_movit_convert.cpp b/src/modules/opengl/filter_movit_convert.cpp index 76437437..5d40f34b 100644 --- a/src/modules/opengl/filter_movit_convert.cpp +++ b/src/modules/opengl/filter_movit_convert.cpp @@ -30,6 +30,8 @@ #include #include "mlt_flip_effect.h" +using namespace movit; + static void set_movit_parameters( GlslChain *chain, mlt_service service, mlt_frame frame ); static void yuv422_to_yuv422p( uint8_t *yuv422, uint8_t *yuv422p, int width, int height ) diff --git a/src/modules/opengl/filter_movit_crop.cpp b/src/modules/opengl/filter_movit_crop.cpp index 120bbca9..24ae8702 100644 --- a/src/modules/opengl/filter_movit_crop.cpp +++ b/src/modules/opengl/filter_movit_crop.cpp @@ -25,6 +25,8 @@ #include #include "optional_effect.h" +using namespace movit; + static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable ) { int error = 0; diff --git a/src/modules/opengl/filter_movit_deconvolution_sharpen.cpp b/src/modules/opengl/filter_movit_deconvolution_sharpen.cpp index 20edea67..f8060184 100644 --- a/src/modules/opengl/filter_movit_deconvolution_sharpen.cpp +++ b/src/modules/opengl/filter_movit_deconvolution_sharpen.cpp @@ -24,6 +24,8 @@ #include "filter_glsl_manager.h" #include +using namespace movit; + static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable ) { mlt_filter filter = (mlt_filter) mlt_frame_pop_service( frame ); diff --git a/src/modules/opengl/filter_movit_diffusion.cpp b/src/modules/opengl/filter_movit_diffusion.cpp index 0ffdf7bb..dcd7fa67 100644 --- a/src/modules/opengl/filter_movit_diffusion.cpp +++ b/src/modules/opengl/filter_movit_diffusion.cpp @@ -24,6 +24,8 @@ #include "filter_glsl_manager.h" #include +using namespace movit; + static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable ) { mlt_filter filter = (mlt_filter) mlt_frame_pop_service( frame ); diff --git a/src/modules/opengl/filter_movit_glow.cpp b/src/modules/opengl/filter_movit_glow.cpp index 3d5f198f..d1a5bb5d 100644 --- a/src/modules/opengl/filter_movit_glow.cpp +++ b/src/modules/opengl/filter_movit_glow.cpp @@ -24,6 +24,8 @@ #include "filter_glsl_manager.h" #include +using namespace movit; + static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable ) { mlt_filter filter = (mlt_filter) mlt_frame_pop_service( frame ); diff --git a/src/modules/opengl/filter_movit_lift_gamma_gain.cpp b/src/modules/opengl/filter_movit_lift_gamma_gain.cpp index a45d87b3..dcabeb59 100644 --- a/src/modules/opengl/filter_movit_lift_gamma_gain.cpp +++ b/src/modules/opengl/filter_movit_lift_gamma_gain.cpp @@ -24,6 +24,8 @@ #include "filter_glsl_manager.h" #include +using namespace movit; + static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable ) { mlt_filter filter = (mlt_filter) mlt_frame_pop_service( frame ); diff --git a/src/modules/opengl/filter_movit_mirror.cpp b/src/modules/opengl/filter_movit_mirror.cpp index 6c7b6132..03206b21 100644 --- a/src/modules/opengl/filter_movit_mirror.cpp +++ b/src/modules/opengl/filter_movit_mirror.cpp @@ -24,6 +24,8 @@ #include "filter_glsl_manager.h" #include +using namespace movit; + static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable ) { mlt_filter filter = (mlt_filter) mlt_frame_pop_service( frame ); diff --git a/src/modules/opengl/filter_movit_opacity.cpp b/src/modules/opengl/filter_movit_opacity.cpp index 3cdb8ab3..300145c2 100644 --- a/src/modules/opengl/filter_movit_opacity.cpp +++ b/src/modules/opengl/filter_movit_opacity.cpp @@ -24,6 +24,8 @@ #include "filter_glsl_manager.h" #include +using namespace movit; + static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable ) { mlt_filter filter = (mlt_filter) mlt_frame_pop_service( frame ); diff --git a/src/modules/opengl/filter_movit_rect.cpp b/src/modules/opengl/filter_movit_rect.cpp index 110fd8f0..f09a77e1 100644 --- a/src/modules/opengl/filter_movit_rect.cpp +++ b/src/modules/opengl/filter_movit_rect.cpp @@ -20,6 +20,8 @@ #include #include "filter_glsl_manager.h" +using namespace movit; + static mlt_frame process( mlt_filter filter, mlt_frame frame ) { // Drive the resize and resample filters on the b_frame for these composite parameters diff --git a/src/modules/opengl/filter_movit_resample.cpp b/src/modules/opengl/filter_movit_resample.cpp index 74dd55a9..16aec9e8 100644 --- a/src/modules/opengl/filter_movit_resample.cpp +++ b/src/modules/opengl/filter_movit_resample.cpp @@ -25,6 +25,8 @@ #include #include "optional_effect.h" +using namespace movit; + static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable ) { mlt_properties properties = MLT_FRAME_PROPERTIES( frame ); diff --git a/src/modules/opengl/filter_movit_resize.cpp b/src/modules/opengl/filter_movit_resize.cpp index c5f2835f..32f47c2a 100644 --- a/src/modules/opengl/filter_movit_resize.cpp +++ b/src/modules/opengl/filter_movit_resize.cpp @@ -28,6 +28,8 @@ #include #include "optional_effect.h" +using namespace movit; + static float alignment_parse( char* align ) { int ret = 0.0f; diff --git a/src/modules/opengl/filter_movit_saturation.cpp b/src/modules/opengl/filter_movit_saturation.cpp index fa8a7e7d..90eff2bb 100644 --- a/src/modules/opengl/filter_movit_saturation.cpp +++ b/src/modules/opengl/filter_movit_saturation.cpp @@ -24,6 +24,8 @@ #include "filter_glsl_manager.h" #include +using namespace movit; + static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable ) { mlt_filter filter = (mlt_filter) mlt_frame_pop_service( frame ); diff --git a/src/modules/opengl/filter_movit_vignette.cpp b/src/modules/opengl/filter_movit_vignette.cpp index f4ff63d9..8cabee58 100644 --- a/src/modules/opengl/filter_movit_vignette.cpp +++ b/src/modules/opengl/filter_movit_vignette.cpp @@ -24,6 +24,8 @@ #include "filter_glsl_manager.h" #include +using namespace movit; + static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable ) { mlt_filter filter = (mlt_filter) mlt_frame_pop_service( frame ); diff --git a/src/modules/opengl/filter_movit_white_balance.cpp b/src/modules/opengl/filter_movit_white_balance.cpp index d2301ee7..f9d7e5a5 100644 --- a/src/modules/opengl/filter_movit_white_balance.cpp +++ b/src/modules/opengl/filter_movit_white_balance.cpp @@ -25,6 +25,8 @@ #include "filter_glsl_manager.h" #include +using namespace movit; + static double srgb8_to_linear(int c) { double x = c / 255.0f; diff --git a/src/modules/opengl/mlt_flip_effect.h b/src/modules/opengl/mlt_flip_effect.h index 3fa9b72e..98a79c00 100644 --- a/src/modules/opengl/mlt_flip_effect.h +++ b/src/modules/opengl/mlt_flip_effect.h @@ -23,7 +23,7 @@ namespace Mlt { -class VerticalFlip : public Effect { +class VerticalFlip : public movit::Effect { public: VerticalFlip() {} virtual std::string effect_type_id() const { return "MltVerticalFlip"; } diff --git a/src/modules/opengl/mlt_movit_input.cpp b/src/modules/opengl/mlt_movit_input.cpp index 11f44bf3..89a2d84d 100644 --- a/src/modules/opengl/mlt_movit_input.cpp +++ b/src/modules/opengl/mlt_movit_input.cpp @@ -19,6 +19,8 @@ #include "mlt_movit_input.h" +using namespace movit; + MltInput::MltInput() : input(0) , isRGB(true) diff --git a/src/modules/opengl/mlt_movit_input.h b/src/modules/opengl/mlt_movit_input.h index df8b36ec..c200cc67 100644 --- a/src/modules/opengl/mlt_movit_input.h +++ b/src/modules/opengl/mlt_movit_input.h @@ -30,18 +30,18 @@ public: MltInput(); ~MltInput(); - void useFlatInput(MovitPixelFormat pix_fmt, unsigned width, unsigned height); - void useYCbCrInput(const ImageFormat& image_format, const YCbCrFormat& ycbcr_format, unsigned width, unsigned height); + void useFlatInput(movit::MovitPixelFormat pix_fmt, unsigned width, unsigned height); + void useYCbCrInput(const movit::ImageFormat& image_format, const movit::YCbCrFormat& ycbcr_format, unsigned width, unsigned height); void set_pixel_data(const unsigned char* data); void invalidate_pixel_data(); - Input *get_input() { return input; } + movit::Input *get_input() { return input; } private: unsigned m_width, m_height; // Note: Owned by the EffectChain, so should not be deleted by us. - Input *input; + movit::Input *input; bool isRGB; - YCbCrFormat m_ycbcr_format; + movit::YCbCrFormat m_ycbcr_format; }; #endif // MLT_MOVIT_INPUT_H diff --git a/src/modules/opengl/optional_effect.h b/src/modules/opengl/optional_effect.h index ec6ea27a..2cb13915 100644 --- a/src/modules/opengl/optional_effect.h +++ b/src/modules/opengl/optional_effect.h @@ -12,7 +12,7 @@ class OptionalEffect : public T { public: OptionalEffect() : disable(0) { this->register_int("disable", &disable); } virtual std::string effect_type_id() const { return "OptionalEffect[" + T::effect_type_id() + "]"; } - virtual void rewrite_graph(EffectChain *graph, Node *self) { + virtual void rewrite_graph(movit::EffectChain *graph, movit::Node *self) { if (disable) { assert(self->incoming_links.size() == 1); graph->replace_sender(self, self->incoming_links[0]); diff --git a/src/modules/opengl/transition_movit_mix.cpp b/src/modules/opengl/transition_movit_mix.cpp index 3e7ef964..9a87f9c5 100644 --- a/src/modules/opengl/transition_movit_mix.cpp +++ b/src/modules/opengl/transition_movit_mix.cpp @@ -30,6 +30,8 @@ #include "mlt_movit_input.h" #include "mlt_flip_effect.h" +using namespace movit; + static int get_image( mlt_frame a_frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable ) { int error; diff --git a/src/modules/opengl/transition_movit_overlay.cpp b/src/modules/opengl/transition_movit_overlay.cpp index 2b77c9c6..c855c658 100644 --- a/src/modules/opengl/transition_movit_overlay.cpp +++ b/src/modules/opengl/transition_movit_overlay.cpp @@ -28,6 +28,8 @@ #include #include +using namespace movit; + static int get_image( mlt_frame a_frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable ) { int error; -- 2.39.2