mlt_producer producer = mlt_producer_cut_parent( mlt_frame_get_original_producer( frame ) );
MltInput* input = GlslManager::get_input( producer, frame );
GlslManager::set_input( producer, frame, NULL );
- chain->effect_chain->add_input( input );
- chain->effects.insert(std::make_pair( MLT_SERVICE( producer ), input ) );
- return input;
+ chain->effect_chain->add_input( input->get_input() );
+ chain->inputs.insert(std::make_pair( producer, input ) );
+ return input->get_input();
}
Effect* effect = GlslManager::get_effect( service, frame );
{
if ( service == (mlt_service) -1 ) {
mlt_producer producer = mlt_producer_cut_parent( mlt_frame_get_original_producer( frame ) );
- MltInput* input = (MltInput *) chain->effects[ MLT_PRODUCER_SERVICE( producer ) ];
+ MltInput* input = chain->inputs[ producer ];
input->set_pixel_data( GlslManager::get_input_pixel_pointer( producer, frame ) );
return;
}
{
if ( service == (mlt_service) -1 ) {
mlt_producer producer = mlt_producer_cut_parent( mlt_frame_get_original_producer( frame ) );
- MltInput* input = (MltInput *) chain->effects[ MLT_PRODUCER_SERVICE( producer ) ];
+ MltInput* input = chain->inputs[ producer ];
input->invalidate_pixel_data();
mlt_pool_release( GlslManager::get_input_pixel_pointer( producer, frame ) );
return;
// Create an MltInput for an image with the given format and dimensions.
static MltInput* create_input( mlt_properties properties, mlt_image_format format, int aspect_width, int aspect_height, int width, int height )
{
- MltInput* input = new MltInput( aspect_width, aspect_height );
+ MltInput* input = new MltInput();
if ( format == mlt_image_rgb24a || format == mlt_image_opengl ) {
// TODO: Get the color space if available.
input->useFlatInput( FORMAT_RGBA_POSTMULTIPLIED_ALPHA, width, height );
if ( !chain || !input || width != w || height != h || *format != f ) {
chain = new EffectChain( width, height );
input = create_input( properties, *format, width, height, width, height );
- chain->add_input( input );
+ chain->add_input( input->get_input() );
chain->add_effect( new Mlt::VerticalFlip() );
ImageFormat movit_output_format;
movit_output_format.color_space = COLORSPACE_sRGB;