#include <GL/glx.h>
#endif
+using namespace movit;
+
void dec_ref_and_delete(GlslManager *p)
{
if (p->dec_ref() == 0) {
};
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<mlt_producer, MltInput*> inputs;
// All services owned by the effect chain and their associated Movit effect.
- std::map<mlt_service, Effect*> effects;
+ std::map<mlt_service, movit::Effect*> 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.
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);
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);
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;
#include "filter_glsl_manager.h"
#include <movit/blur_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_filter filter = (mlt_filter) mlt_frame_pop_service( frame );
#include <mlt++/MltProducer.h>
#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 )
#include <movit/padding_effect.h>
#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;
#include "filter_glsl_manager.h"
#include <movit/deconvolution_sharpen_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_filter filter = (mlt_filter) mlt_frame_pop_service( frame );
#include "filter_glsl_manager.h"
#include <movit/diffusion_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_filter filter = (mlt_filter) mlt_frame_pop_service( frame );
#include "filter_glsl_manager.h"
#include <movit/glow_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_filter filter = (mlt_filter) mlt_frame_pop_service( frame );
#include "filter_glsl_manager.h"
#include <movit/lift_gamma_gain_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_filter filter = (mlt_filter) mlt_frame_pop_service( frame );
#include "filter_glsl_manager.h"
#include <movit/mirror_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_filter filter = (mlt_filter) mlt_frame_pop_service( frame );
#include "filter_glsl_manager.h"
#include <movit/multiply_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_filter filter = (mlt_filter) mlt_frame_pop_service( frame );
#include <framework/mlt.h>
#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
#include <movit/resample_effect.h>
#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 );
#include <movit/padding_effect.h>
#include "optional_effect.h"
+using namespace movit;
+
static float alignment_parse( char* align )
{
int ret = 0.0f;
#include "filter_glsl_manager.h"
#include <movit/saturation_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_filter filter = (mlt_filter) mlt_frame_pop_service( frame );
#include "filter_glsl_manager.h"
#include <movit/vignette_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_filter filter = (mlt_filter) mlt_frame_pop_service( frame );
#include "filter_glsl_manager.h"
#include <movit/white_balance_effect.h>
+using namespace movit;
+
static double srgb8_to_linear(int c)
{
double x = c / 255.0f;
namespace Mlt
{
-class VerticalFlip : public Effect {
+class VerticalFlip : public movit::Effect {
public:
VerticalFlip() {}
virtual std::string effect_type_id() const { return "MltVerticalFlip"; }
#include "mlt_movit_input.h"
+using namespace movit;
+
MltInput::MltInput()
: input(0)
, isRGB(true)
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
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]);
#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;
#include <movit/util.h>
#include <movit/overlay_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;