3 * Copyright (C) 2013 Dan Dennedy <dan@dennedy.org>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #ifndef MLT_MOVIT_INPUT_H
21 #define MLT_MOVIT_INPUT_H
23 #include <framework/mlt_types.h>
25 #include <movit/flat_input.h>
26 #include <movit/ycbcr_input.h>
27 #include <movit/effect_chain.h>
32 MltInput( mlt_image_format format );
35 void useFlatInput(movit::MovitPixelFormat pix_fmt, unsigned width, unsigned height);
36 void useYCbCrInput(const movit::ImageFormat& image_format, const movit::YCbCrFormat& ycbcr_format, unsigned width, unsigned height);
37 void set_pixel_data(const unsigned char* data);
38 void invalidate_pixel_data();
39 movit::Input *get_input() { return input; }
41 // The original pixel format that was used to create this MltInput,
42 // in case we change our mind later and want to convert on the CPU instead.
43 mlt_image_format get_format() const { return m_format; }
46 mlt_image_format m_format;
47 unsigned m_width, m_height;
48 // Note: Owned by the EffectChain, so should not be deleted by us.
51 movit::YCbCrFormat m_ycbcr_format;
54 #endif // MLT_MOVIT_INPUT_H