]> git.sesse.net Git - mlt/blob - src/modules/qt/qimage_wrapper.h
7e4b7395421d44b33f1e964a8f6b8d44910b7f3a
[mlt] / src / modules / qt / qimage_wrapper.h
1 /*
2  * qimage_wrapper.h -- a QT/QImage based producer for MLT
3  * Copyright (C) 2006 Visual Media
4  * Author: Charles Yates <charles.yates@gmail.com>
5  *
6  * NB: This module is designed to be functionally equivalent to the 
7  * gtk2 image loading module so it can be used as replacement.
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22  */
23
24 #ifndef MLT_QIMAGE_WRAPPER
25 #define MLT_QIMAGE_WRAPPER
26
27 #include <framework/mlt.h>
28
29 #include "config.h"
30 #include <pthread.h>
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 struct producer_qimage_s
37 {
38         struct mlt_producer_s parent;
39         mlt_properties filenames;
40         int count;
41         int image_idx;
42         int qimage_idx;
43         uint8_t *current_image;
44         uint8_t *current_alpha;
45         int current_width;
46         int current_height;
47         mlt_cache_item image_cache;
48         mlt_cache_item alpha_cache;
49         mlt_cache_item qimage_cache;
50         void *qimage;
51         mlt_image_format format;
52 };
53
54 typedef struct producer_qimage_s *producer_qimage;
55
56 extern int refresh_qimage( producer_qimage self, mlt_frame frame );
57 extern void refresh_image( producer_qimage, mlt_frame, mlt_image_format, int width, int height );
58 extern void make_tempfile( producer_qimage, const char *xml );
59 extern void init_qimage();
60
61
62 #ifdef __cplusplus
63 }
64 #endif
65
66 #endif