]> git.sesse.net Git - mlt/blob - src/framework/mlt_types.h
05c7bf5c95e839b9c317ae70543bdcfb5a964c30
[mlt] / src / framework / mlt_types.h
1 /**
2  * \file mlt_types.h
3  * \brief Provides forward definitions of all public types
4  *
5  * Copyright (C) 2003-2009 Ushodaya Enterprises Limited
6  * \author Charles Yates <charles.yates@pandora.be>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22
23 #ifndef _MLT_TYPES_H_
24 #define _MLT_TYPES_H_
25
26 #ifndef GCC_VERSION
27 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
28 #endif
29
30 #include <stdint.h>
31
32 #include "mlt_pool.h"
33
34 /** The set of supported image formats */
35
36 typedef enum
37 {
38         mlt_image_none = 0,/**< image not available */
39         mlt_image_rgb24,   /**< 8-bit RGB */
40         mlt_image_rgb24a,  /**< 8-bit RGB with alpha channel */
41         mlt_image_yuv422,  /**< 8-bit YUV 4:2:2 packed */
42         mlt_image_yuv420p, /**< 8-bit YUV 4:2:0 planar */
43         mlt_image_opengl   /**< suitable for OpenGL texture */
44 }
45 mlt_image_format;
46
47 /** The set of supported audio formats */
48
49 typedef enum
50 {
51         mlt_audio_none = 0,/**< audio not available */
52         mlt_audio_pcm = 1, /**< \deprecated signed 16-bit interleaved PCM */
53         mlt_audio_s16 = 1, /**< signed 16-bit interleaved PCM */
54         mlt_audio_s32,     /**< signed 32-bit non-interleaved PCM */
55         mlt_audio_float    /**< 32-bit non-interleaved floating point */
56 }
57 mlt_audio_format;
58
59 /** The relative time qualifiers */
60
61 typedef enum
62 {
63         mlt_whence_relative_start,  /**< relative to the beginning */
64         mlt_whence_relative_current,/**< relative to the current position */
65         mlt_whence_relative_end     /**< relative to the end */
66 }
67 mlt_whence;
68
69 /** The recognized subclasses of mlt_service */
70
71 typedef enum
72 {
73         invalid_type,               /**< invalid service */
74         unknown_type,               /**< unknown class */
75         producer_type,              /**< Producer class */
76         tractor_type,               /**< Tractor class */
77         playlist_type,              /**< Playlist class */
78         multitrack_type,            /**< Multitrack class */
79         filter_type,                /**< Filter class */
80         transition_type,            /**< Transition class */
81         consumer_type,              /**< Consumer class */
82         field_type                  /**< Field class */
83 }
84 mlt_service_type;
85
86 /* I don't want to break anyone's applications without warning. -Zach */
87 #undef DOUBLE_MLT_POSITION
88 #ifdef DOUBLE_MLT_POSITION
89 typedef double mlt_position;
90 #else
91 typedef int32_t mlt_position;
92 #endif
93
94 typedef struct mlt_frame_s *mlt_frame, **mlt_frame_ptr; /**< pointer to Frame object */
95 typedef struct mlt_property_s *mlt_property;            /**< pointer to Property object */
96 typedef struct mlt_properties_s *mlt_properties;        /**< pointer to Properties object */
97 typedef struct mlt_event_struct *mlt_event;             /**< pointer to Event object */
98 typedef struct mlt_service_s *mlt_service;              /**< pointer to Service object */
99 typedef struct mlt_producer_s *mlt_producer;            /**< pointer to Producer object */
100 typedef struct mlt_playlist_s *mlt_playlist;            /**< pointer to Playlist object */
101 typedef struct mlt_multitrack_s *mlt_multitrack;        /**< pointer to Multitrack object */
102 typedef struct mlt_filter_s *mlt_filter;                /**< pointer to Filter object */
103 typedef struct mlt_transition_s *mlt_transition;        /**< pointer to Transition object */
104 typedef struct mlt_tractor_s *mlt_tractor;              /**< pointer to Tractor object */
105 typedef struct mlt_field_s *mlt_field;                  /**< pointer to Field object */
106 typedef struct mlt_consumer_s *mlt_consumer;            /**< pointer to Consumer object */
107 typedef struct mlt_parser_s *mlt_parser;                /**< pointer to Properties object */
108 typedef struct mlt_deque_s *mlt_deque;                  /**< pointer to Deque object */
109 typedef struct mlt_geometry_s *mlt_geometry;            /**< pointer to Geometry object */
110 typedef struct mlt_geometry_item_s *mlt_geometry_item;  /**< pointer to Geometry Item object */
111 typedef struct mlt_profile_s *mlt_profile;              /**< pointer to Profile object */
112 typedef struct mlt_repository_s *mlt_repository;        /**< pointer to Repository object */
113 typedef struct mlt_cache_s *mlt_cache;                  /**< pointer to Cache object */
114 typedef struct mlt_cache_item_s *mlt_cache_item;        /**< pointer to CacheItem object */
115
116 typedef void ( *mlt_destructor )( void * );             /**< pointer to destructor function */
117 typedef char *( *mlt_serialiser )( void *, int length );/**< pointer to serialization function */
118
119 #define MLT_SERVICE(x) ( ( mlt_service )( x ) )         /**< Cast to a Service pointer */
120 #define MLT_PRODUCER(x) ( ( mlt_producer )( x ) )       /**< Cast to a Producer pointer */
121 #define MLT_MULTITRACK(x) ( ( mlt_multitrack )( x ) )   /**< Cast to a Multitrack pointer */
122 #define MLT_PLAYLIST(x) ( ( mlt_playlist )( x ) )       /**< Cast to a Playlist pointer */
123 #define MLT_TRACTOR(x) ( ( mlt_tractor )( x ) )         /**< Cast to a Tractor pointer */
124 #define MLT_FILTER(x) ( ( mlt_filter )( x ) )           /**< Cast to a Filter pointer */
125 #define MLT_TRANSITION(x) ( ( mlt_transition )( x ) )   /**< Cast to a Transition pointer */
126
127 #endif