MLT  7.28.0
mlt_types.h
Go to the documentation of this file.
1 
22 #ifndef MLT_TYPES_H
23 #define MLT_TYPES_H
24 
25 #ifndef GCC_VERSION
26 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
27 #endif
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #include "mlt_pool.h"
34 #include <inttypes.h>
35 #include <limits.h>
36 #include <stdio.h>
37 
38 #ifndef PATH_MAX
39 #define PATH_MAX 4096
40 #endif
41 
44 typedef enum {
57 
60 typedef enum {
69 
70 typedef enum {
99 
102 typedef enum {
109  = 5,
117 
118 typedef enum {
131 
134 typedef enum {
140 
143 typedef enum {
145  = 0,
183 
186 typedef enum {
191 
194 typedef enum {
208 
209 /* I don't want to break anyone's applications without warning. -Zach */
210 #ifdef DOUBLE_MLT_POSITION
211 #define MLT_POSITION_FMT "%f"
212 #define MLT_POSITION_MOD(A, B) ((A) - (B) * ((int) ((A) / (B))))
213 typedef double mlt_position;
214 #else
215 #define MLT_POSITION_MOD(A, B) ((A) % (B))
216 #define MLT_POSITION_FMT "%d"
217 typedef int32_t mlt_position;
218 #endif
219 
222 typedef struct
223 {
224  double x;
225  double y;
226  double w;
227  double h;
228  double o;
229 } mlt_rect;
230 
233 typedef struct
234 {
235  uint8_t r;
236  uint8_t g;
237  uint8_t b;
238  uint8_t a;
239 } mlt_color;
240 
241 typedef struct mlt_audio_s *mlt_audio;
242 typedef struct mlt_image_s *mlt_image;
243 typedef struct mlt_frame_s *mlt_frame, **mlt_frame_ptr;
244 typedef struct mlt_property_s *mlt_property;
246 typedef struct mlt_event_struct *mlt_event;
247 typedef struct mlt_service_s *mlt_service;
248 typedef struct mlt_producer_s *mlt_producer;
249 typedef struct mlt_playlist_s *mlt_playlist;
251 typedef struct mlt_filter_s *mlt_filter;
253 typedef struct mlt_tractor_s *mlt_tractor;
254 typedef struct mlt_field_s *mlt_field;
255 typedef struct mlt_consumer_s *mlt_consumer;
256 typedef struct mlt_parser_s *mlt_parser;
257 typedef struct mlt_deque_s *mlt_deque;
258 typedef struct mlt_geometry_s *mlt_geometry;
259 typedef struct mlt_geometry_item_s *mlt_geometry_item;
260 typedef struct mlt_profile_s *mlt_profile;
262 typedef struct mlt_cache_s *mlt_cache;
265 typedef struct mlt_slices_s *mlt_slices;
266 typedef struct mlt_link_s *mlt_link;
267 typedef struct mlt_chain_s *mlt_chain;
269 typedef void (*mlt_destructor)(void *);
270 typedef char *(*mlt_serialiser)(void *, int length);
271 typedef void *(*mlt_thread_function_t)(void *);
273 #define MLT_SERVICE(x) ((mlt_service) (x))
274 #define MLT_PRODUCER(x) ((mlt_producer) (x))
275 #define MLT_MULTITRACK(x) ((mlt_multitrack) (x))
276 #define MLT_PLAYLIST(x) ((mlt_playlist) (x))
277 #define MLT_TRACTOR(x) ((mlt_tractor) (x))
278 #define MLT_FILTER(x) ((mlt_filter) (x))
279 #define MLT_TRANSITION(x) ((mlt_transition) (x))
280 #define MLT_CONSUMER(x) ((mlt_consumer) (x))
281 #define MLT_FRAME(x) ((mlt_frame) (x))
282 #define MLT_LINK(x) ((mlt_link) (x))
283 #define MLT_CHAIN(x) ((mlt_chain) (x))
285 #ifndef MIN
286 #define MIN(x, y) ((x) < (y) ? (x) : (y))
287 #endif
288 #ifndef MAX
289 #define MAX(x, y) ((x) > (y) ? (x) : (y))
290 #endif
291 #ifndef CLAMP
292 #define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
293 #endif
294 
295 #ifdef _WIN32
296 #include <pthread.h>
297 /* Win32 compatibility function declarations */
298 #if !defined(__MINGW32__)
299 extern int usleep(unsigned int useconds);
300 #endif
301 #ifndef WIN_PTHREADS_TIME_H
302 extern int nanosleep(const struct timespec *rqtp, struct timespec *rmtp);
303 #endif
304 extern int setenv(const char *name, const char *value, int overwrite);
305 extern char *getlocale();
306 extern FILE *win32_fopen(const char *filename_utf8, const char *mode_utf8);
307 #include <sys/stat.h>
308 #include <sys/types.h>
309 extern int win32_stat(const char *filename_utf8, struct stat *buffer);
310 #include <time.h>
311 extern char *strptime(const char *buf, const char *fmt, struct tm *tm);
312 #define mlt_fopen win32_fopen
313 #define mlt_stat win32_stat
314 #define MLT_DIRLIST_DELIMITER ";"
315 #else
316 #define mlt_fopen fopen
317 #define mlt_stat stat
318 #define MLT_DIRLIST_DELIMITER ":"
319 #endif /* ifdef _WIN32 */
320 
321 extern const char *mlt_deinterlacer_name(mlt_deinterlacer method);
322 extern mlt_deinterlacer mlt_deinterlacer_id(const char *name);
323 
324 #ifdef __cplusplus
325 }
326 #endif
327 
328 #endif
memory pooling functionality
struct mlt_multitrack_s * mlt_multitrack
pointer to Multitrack object
Definition: mlt_types.h:250
struct mlt_cache_s * mlt_cache
pointer to Cache object
Definition: mlt_types.h:262
mlt_time_format
The time string formats.
Definition: mlt_types.h:134
@ mlt_time_clock
SMIL clock-value as [[hh:]mm:]ss[.fraction].
Definition: mlt_types.h:136
@ mlt_time_smpte_ndf
SMPTE NDF timecode as [[[hh:]mm:]ss:]frames.
Definition: mlt_types.h:138
@ mlt_time_smpte_df
SMPTE timecode as [[[hh:]mm:]ss{:|;}]frames.
Definition: mlt_types.h:137
@ mlt_time_frames
frame count
Definition: mlt_types.h:135
const char * mlt_deinterlacer_name(mlt_deinterlacer method)
Definition: mlt_types.c:27
int32_t mlt_position
Definition: mlt_types.h:217
struct mlt_property_s * mlt_property
pointer to Property object
Definition: mlt_types.h:244
struct mlt_audio_s * mlt_audio
pointer to Audio object
Definition: mlt_types.h:241
struct mlt_profile_s * mlt_profile
pointer to Profile object
Definition: mlt_types.h:260
struct mlt_frame_s ** mlt_frame_ptr
pointer to Frame object
Definition: mlt_types.h:243
struct mlt_tractor_s * mlt_tractor
pointer to Tractor object
Definition: mlt_types.h:253
struct mlt_event_struct * mlt_event
pointer to Event object
Definition: mlt_types.h:246
struct mlt_chain_s * mlt_chain
pointer to Chain object
Definition: mlt_types.h:267
mlt_channel_layout
Definition: mlt_types.h:70
@ mlt_channel_mono
Definition: mlt_types.h:73
@ mlt_channel_quad_side
Definition: mlt_types.h:80
@ mlt_channel_2p1
Definition: mlt_types.h:75
@ mlt_channel_6p0
Definition: mlt_types.h:87
@ mlt_channel_3p0
Definition: mlt_types.h:76
@ mlt_channel_6p1_back
Definition: mlt_types.h:91
@ mlt_channel_independent
channels are not related
Definition: mlt_types.h:72
@ mlt_channel_6p0_front
Definition: mlt_types.h:88
@ mlt_channel_stereo
Definition: mlt_types.h:74
@ mlt_channel_4p1
Definition: mlt_types.h:84
@ mlt_channel_3p0_back
Definition: mlt_types.h:77
@ mlt_channel_6p1_front
Definition: mlt_types.h:92
@ mlt_channel_7p0_front
Definition: mlt_types.h:94
@ mlt_channel_7p1_wide_back
Definition: mlt_types.h:97
@ mlt_channel_auto
MLT will determine the default configuration based on channel number.
Definition: mlt_types.h:71
@ mlt_channel_7p0
Definition: mlt_types.h:93
@ mlt_channel_5p1
Definition: mlt_types.h:86
@ mlt_channel_5p0
Definition: mlt_types.h:83
@ mlt_channel_7p1_wide_side
Definition: mlt_types.h:96
@ mlt_channel_4p0
Definition: mlt_types.h:78
@ mlt_channel_5p0_back
Definition: mlt_types.h:82
@ mlt_channel_7p1
Definition: mlt_types.h:95
@ mlt_channel_5p1_back
Definition: mlt_types.h:85
@ mlt_channel_6p1
Definition: mlt_types.h:90
@ mlt_channel_3p1
Definition: mlt_types.h:81
@ mlt_channel_hexagonal
Definition: mlt_types.h:89
@ mlt_channel_quad_back
Definition: mlt_types.h:79
struct mlt_deque_s * mlt_deque
pointer to Deque object
Definition: mlt_types.h:257
struct mlt_consumer_s * mlt_consumer
pointer to Consumer object
Definition: mlt_types.h:255
struct mlt_geometry_item_s * mlt_geometry_item
pointer to Geometry Item object
Definition: mlt_types.h:259
struct mlt_producer_s * mlt_producer
pointer to Producer object
Definition: mlt_types.h:248
mlt_deinterlacer
Definition: mlt_types.h:118
@ mlt_deinterlacer_yadif
Definition: mlt_types.h:126
@ mlt_deinterlacer_yadif_nospatial
Definition: mlt_types.h:125
@ mlt_deinterlacer_estdif
Definition: mlt_types.h:128
@ mlt_deinterlacer_invalid
Definition: mlt_types.h:129
@ mlt_deinterlacer_none
Definition: mlt_types.h:119
@ mlt_deinterlacer_weave
Definition: mlt_types.h:122
@ mlt_deinterlacer_linearblend
Definition: mlt_types.h:121
@ mlt_deinterlacer_bob
Definition: mlt_types.h:123
@ mlt_deinterlacer_onefield
Definition: mlt_types.h:120
@ mlt_deinterlacer_greedy
Definition: mlt_types.h:124
@ mlt_deinterlacer_bwdif
Definition: mlt_types.h:127
struct mlt_filter_s * mlt_filter
pointer to Filter object
Definition: mlt_types.h:251
struct mlt_animation_s * mlt_animation
pointer to Property Animation object
Definition: mlt_types.h:264
struct mlt_parser_s * mlt_parser
pointer to Properties object
Definition: mlt_types.h:256
struct mlt_field_s * mlt_field
pointer to Field object
Definition: mlt_types.h:254
void(* mlt_destructor)(void *)
pointer to destructor function
Definition: mlt_types.h:269
mlt_whence
The relative time qualifiers.
Definition: mlt_types.h:186
@ mlt_whence_relative_current
relative to the current position
Definition: mlt_types.h:188
@ mlt_whence_relative_start
relative to the beginning
Definition: mlt_types.h:187
@ mlt_whence_relative_end
relative to the end
Definition: mlt_types.h:189
mlt_keyframe_type
Interpolation methods for animation keyframes.
Definition: mlt_types.h:143
@ mlt_keyframe_sinusoidal_out
Definition: mlt_types.h:153
@ mlt_keyframe_quadratic_out
Definition: mlt_types.h:156
@ mlt_keyframe_smooth_loose
Unity Catmull-Rom spline interpolation.
Definition: mlt_types.h:148
@ mlt_keyframe_linear
simple, constant pace from this key frame to the next
Definition: mlt_types.h:146
@ mlt_keyframe_exponential_in_out
Definition: mlt_types.h:169
@ mlt_keyframe_sinusoidal_in
Definition: mlt_types.h:152
@ mlt_keyframe_circular_in_out
Definition: mlt_types.h:172
@ mlt_keyframe_quintic_out
Definition: mlt_types.h:165
@ mlt_keyframe_bounce_in
Definition: mlt_types.h:179
@ mlt_keyframe_quintic_in
Definition: mlt_types.h:164
@ mlt_keyframe_smooth
deprecated use mlt_keyframe_smooth_loose
Definition: mlt_types.h:147
@ mlt_keyframe_circular_in
Definition: mlt_types.h:170
@ mlt_keyframe_bounce_in_out
Definition: mlt_types.h:181
@ mlt_keyframe_elastic_in
Definition: mlt_types.h:176
@ mlt_keyframe_smooth_tight
Centripetal Catmull-Rom spline interpolation with 0 slope at each keyframe.
Definition: mlt_types.h:151
@ mlt_keyframe_discrete
non-interpolated; value changes instantaneously at the key frame
Definition: mlt_types.h:144
@ mlt_keyframe_quartic_out
Definition: mlt_types.h:162
@ mlt_keyframe_back_out
Definition: mlt_types.h:174
@ mlt_keyframe_cubic_out
Definition: mlt_types.h:159
@ mlt_keyframe_elastic_in_out
Definition: mlt_types.h:178
@ mlt_keyframe_cubic_in_out
Definition: mlt_types.h:160
@ mlt_keyframe_quintic_in_out
Definition: mlt_types.h:166
@ mlt_keyframe_back_in
Definition: mlt_types.h:173
@ mlt_keyframe_quadratic_in_out
Definition: mlt_types.h:157
@ mlt_keyframe_back_in_out
Definition: mlt_types.h:175
@ mlt_keyframe_circular_out
Definition: mlt_types.h:171
@ mlt_keyframe_sinusoidal_in_out
Definition: mlt_types.h:154
@ mlt_keyframe_bounce_out
Definition: mlt_types.h:180
@ mlt_keyframe_quartic_in
Definition: mlt_types.h:161
@ mlt_keyframe_quartic_in_out
Definition: mlt_types.h:163
@ mlt_keyframe_cubic_in
Definition: mlt_types.h:158
@ mlt_keyframe_exponential_in
Definition: mlt_types.h:167
@ mlt_keyframe_smooth_natural
Centripetal Catmull-Rom spline interpolation with natural slope at each keyframe.
Definition: mlt_types.h:150
@ mlt_keyframe_quadratic_in
Definition: mlt_types.h:155
@ mlt_keyframe_elastic_out
Definition: mlt_types.h:177
@ mlt_keyframe_exponential_out
Definition: mlt_types.h:168
mlt_service_type
The recognized subclasses of mlt_service.
Definition: mlt_types.h:194
@ mlt_service_consumer_type
Consumer class.
Definition: mlt_types.h:203
@ mlt_service_link_type
Link class.
Definition: mlt_types.h:205
@ mlt_service_producer_type
Producer class.
Definition: mlt_types.h:197
@ mlt_service_tractor_type
Tractor class.
Definition: mlt_types.h:198
@ mlt_service_filter_type
Filter class.
Definition: mlt_types.h:201
@ mlt_service_invalid_type
invalid service
Definition: mlt_types.h:195
@ mlt_service_unknown_type
unknown class
Definition: mlt_types.h:196
@ mlt_service_transition_type
Transition class.
Definition: mlt_types.h:202
@ mlt_service_chain_type
Chain class.
Definition: mlt_types.h:206
@ mlt_service_multitrack_type
Multitrack class.
Definition: mlt_types.h:200
@ mlt_service_playlist_type
Playlist class.
Definition: mlt_types.h:199
@ mlt_service_field_type
Field class.
Definition: mlt_types.h:204
mlt_colorspace
Colorspace definitions.
Definition: mlt_types.h:102
@ mlt_colorspace_bt2020_cl
ITU-R BT2020 constant luminance system.
Definition: mlt_types.h:114
@ mlt_colorspace_reserved
Definition: mlt_types.h:106
@ mlt_colorspace_smpte240m
functionally identical to above
Definition: mlt_types.h:111
@ mlt_colorspace_bt470bg
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
Definition: mlt_types.h:108
@ mlt_colorspace_bt2020_ncl
ITU-R BT2020 non-constant luminance system.
Definition: mlt_types.h:113
@ mlt_colorspace_fcc
FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
Definition: mlt_types.h:107
@ mlt_colorspace_smpte2085
SMPTE 2085, Y'D'zD'x.
Definition: mlt_types.h:115
@ mlt_colorspace_unspecified
Definition: mlt_types.h:105
@ mlt_colorspace_rgb
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
Definition: mlt_types.h:103
@ mlt_colorspace_smpte170m
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
Definition: mlt_types.h:110
@ mlt_colorspace_bt709
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
Definition: mlt_types.h:104
@ mlt_colorspace_ycgco
Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16.
Definition: mlt_types.h:112
struct mlt_transition_s * mlt_transition
pointer to Transition object
Definition: mlt_types.h:252
mlt_image_format
The set of supported image formats.
Definition: mlt_types.h:44
@ mlt_image_yuv422p16
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: mlt_types.h:52
@ mlt_image_yuv420p10
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: mlt_types.h:53
@ mlt_image_opengl_texture
an OpenGL texture name
Definition: mlt_types.h:51
@ mlt_image_yuv422
8-bit YUV 4:2:2 packed
Definition: mlt_types.h:48
@ mlt_image_rgba
8-bit RGB with alpha channel
Definition: mlt_types.h:47
@ mlt_image_movit
for movit module internal use only
Definition: mlt_types.h:50
@ mlt_image_yuv420p
8-bit YUV 4:2:0 planar
Definition: mlt_types.h:49
@ mlt_image_rgb
8-bit RGB
Definition: mlt_types.h:46
@ mlt_image_invalid
Definition: mlt_types.h:55
@ mlt_image_none
image not available
Definition: mlt_types.h:45
@ mlt_image_yuv444p10
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: mlt_types.h:54
struct mlt_image_s * mlt_image
pointer to Image object
Definition: mlt_types.h:242
struct mlt_playlist_s * mlt_playlist
pointer to Playlist object
Definition: mlt_types.h:249
struct mlt_cache_item_s * mlt_cache_item
pointer to CacheItem object
Definition: mlt_types.h:263
mlt_deinterlacer mlt_deinterlacer_id(const char *name)
Definition: mlt_types.c:56
struct mlt_service_s * mlt_service
pointer to Service object
Definition: mlt_types.h:247
mlt_audio_format
The set of supported audio formats.
Definition: mlt_types.h:60
@ mlt_audio_s16
signed 16-bit interleaved PCM
Definition: mlt_types.h:62
@ mlt_audio_f32le
32-bit interleaved floating point
Definition: mlt_types.h:66
@ mlt_audio_s32le
signed 32-bit interleaved PCM
Definition: mlt_types.h:65
@ mlt_audio_none
audio not available
Definition: mlt_types.h:61
@ mlt_audio_u8
unsigned 8-bit interleaved PCM
Definition: mlt_types.h:67
@ mlt_audio_float
32-bit non-interleaved floating point
Definition: mlt_types.h:64
@ mlt_audio_s32
signed 32-bit non-interleaved PCM
Definition: mlt_types.h:63
struct mlt_repository_s * mlt_repository
pointer to Repository object
Definition: mlt_types.h:261
struct mlt_frame_s * mlt_frame
Definition: mlt_types.h:243
struct mlt_link_s * mlt_link
pointer to Link object
Definition: mlt_types.h:266
struct mlt_geometry_s * mlt_geometry
pointer to Geometry object
Definition: mlt_types.h:258
struct mlt_slices_s * mlt_slices
pointer to Sliced processing context object
Definition: mlt_types.h:265
struct mlt_properties_s * mlt_properties
pointer to Properties object
Definition: mlt_types.h:245
Property Animation class.
Definition: mlt_animation.c:51
Audio class.
Definition: mlt_audio.h:34
Cache item class.
Definition: mlt_cache.c:50
Cache class.
Definition: mlt_cache.c:82
Chain class.
Definition: mlt_chain.h:37
A tuple of color components.
Definition: mlt_types.h:234
uint8_t g
green
Definition: mlt_types.h:236
uint8_t a
alpha
Definition: mlt_types.h:238
uint8_t b
blue
Definition: mlt_types.h:237
uint8_t r
red
Definition: mlt_types.h:235
Consumer abstract service class.
Definition: mlt_consumer.h:94
Double-Ended Queue (deque) class.
Definition: mlt_deque.c:48
Event class.
Definition: mlt_events.c:62
Field class.
Definition: mlt_field.c:39
Filter abstract service class.
Definition: mlt_filter.h:40
Frame class.
Definition: mlt_frame.h:90
Definition: mlt_image.h:35
Multitrack class.
Definition: mlt_multitrack.h:48
Parser class.
Definition: mlt_parser.h:34
Playlist class.
Definition: mlt_playlist.h:72
Producer abstract service class.
Definition: mlt_producer.h:70
Profile class.
Definition: mlt_profile.h:35
Properties class.
Definition: mlt_properties.h:40
Property class.
Definition: mlt_property.c:62
A rectangle type with coordinates, size, and opacity.
Definition: mlt_types.h:223
double w
width
Definition: mlt_types.h:226
double y
Y coordinate.
Definition: mlt_types.h:225
double x
X coordinate.
Definition: mlt_types.h:224
double o
opacity / mix-level
Definition: mlt_types.h:228
double h
height
Definition: mlt_types.h:227
Repository class.
Definition: mlt_repository.c:46
Service abstract base class.
Definition: mlt_service.h:58
Definition: mlt_slices.c:57
Tractor class.
Definition: mlt_tractor.h:40
Transition abstract service class.
Definition: mlt_transition.h:43