]> git.sesse.net Git - mlt/blob - src/modules/gtk2/factory.c
Cleanup license declarations and remove dv1394d references.
[mlt] / src / modules / gtk2 / factory.c
1 /*
2  * factory.c -- the factory method interfaces
3  * Copyright (C) 2003-2004 Ushodaya Enterprises Limited
4  * Author: Charles Yates <charles.yates@pandora.be>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include "config.h"
22 #include <string.h>
23
24 #ifdef USE_PIXBUF
25 #include <gdk-pixbuf/gdk-pixbuf.h>
26 #include "producer_pixbuf.h"
27 #include "filter_rescale.h"
28 #endif
29
30 #ifdef USE_GTK2
31 #include "consumer_gtk2.h"
32 #endif
33
34 #ifdef USE_PANGO
35 #include "producer_pango.h"
36 #endif
37
38 static void initialise( )
39 {
40         static int init = 0;
41         if ( init == 0 )
42         {
43                 init = 1;
44                 g_type_init( );
45         }
46 }
47
48 void *mlt_create_producer( char *id, void *arg )
49 {
50         initialise( );
51
52 #ifdef USE_PIXBUF
53         if ( !strcmp( id, "pixbuf" ) )
54                 return producer_pixbuf_init( arg );
55 #endif
56
57 #ifdef USE_PANGO
58         if ( !strcmp( id, "pango" ) )
59                 return producer_pango_init( arg );
60 #endif
61
62         return NULL;
63 }
64
65 void *mlt_create_filter( char *id, void *arg )
66 {
67         initialise( );
68
69 #ifdef USE_PIXBUF
70         if ( !strcmp( id, "gtkrescale" ) )
71                 return filter_rescale_init( arg );
72 #endif
73
74         return NULL;
75 }
76
77 void *mlt_create_transition( char *id, void *arg )
78 {
79         return NULL;
80 }
81
82 void *mlt_create_consumer( char *id, void *arg )
83 {
84         initialise( );
85
86 #ifdef USE_GTK2
87         if ( !strcmp( id, "gtk2_preview" ) )
88                 return consumer_gtk2_preview_init( arg );
89 #endif
90
91         return NULL;
92 }
93