MLT 7.40.0
Multimedia Framework
MltProperties.h
Go to the documentation of this file.
1
20#ifndef MLTPP_PROPERTIES_H
21#define MLTPP_PROPERTIES_H
22
23#include "MltConfig.h"
24
25#include <framework/mlt.h>
26#include <stdio.h>
27
28namespace Mlt {
29class Event;
30class Animation;
31
41{
42private:
44
45public:
46 Properties();
47 Properties(bool dummy);
48 Properties(Properties &properties);
49 Properties(const Properties &properties);
51 Properties(mlt_properties properties);
52 Properties(void *properties);
54 Properties(const char *file);
55 virtual ~Properties();
56 Properties &operator=(const Properties &properties);
57 virtual mlt_properties get_properties();
58 int inc_ref();
59 int dec_ref();
60 int ref_count();
62 void lock();
64 void unlock();
66 void block(void *object = NULL);
68 void unblock(void *object = NULL);
70 int fire_event(const char *event);
72 bool is_valid();
74 int count();
76 char *get(const char *name);
78 int get_int(const char *name);
80 int64_t get_int64(const char *name);
82 double get_double(const char *name);
84 void *get_data(const char *name, int &size);
85 void *get_data(const char *name);
87 int set(const char *name, const char *value);
89 int set_string(const char *name, const char *value);
91 int set(const char *name, int value);
93 int set(const char *name, int64_t value);
95 int set(const char *name, double value);
97 int set(const char *name,
98 void *value,
99 int size,
100 mlt_destructor destroy = NULL,
101 mlt_serialiser serial = NULL);
103 int copy(Properties &that, const char *prefix);
105 void pass_property(Properties &that, const char *name);
107 int pass_values(Properties &that, const char *prefix);
109 int pass_list(Properties &that, const char *list);
111 int parse(const char *namevalue);
113 char *get_name(int index);
115 char *get(int index);
117 char *get(int index, mlt_time_format);
118 void *get_data(int index, int &size);
120 void mirror(Properties &that);
122 int inherit(Properties &that);
124 int rename(const char *source, const char *dest);
126 void dump(FILE *output = stderr);
127 void debug(const char *title = "Object", FILE *output = stderr);
129 void load(const char *file);
131 int save(const char *file);
133 Event *listen(const char *id, void *object, mlt_listener);
134 static void delete_event(Event *);
136 Event *setup_wait_for(const char *id);
137 void wait_for(Event *, bool destroy = true);
138 void wait_for(const char *id);
140 bool is_sequence();
142 static Properties *parse_yaml(const char *file);
143 char *serialise_yaml();
145 int preset(const char *name);
146 int set_lcnumeric(const char *locale);
147 const char *get_lcnumeric();
148 void clear(const char *name);
149 bool property_exists(const char *name);
150
151 char *get_time(const char *name, mlt_time_format = mlt_time_smpte_df);
152 char *frames_to_time(int, mlt_time_format = mlt_time_smpte_df);
153 int time_to_frames(const char *time);
154
155 mlt_color get_color(const char *name);
156 int set(const char *name, mlt_color value);
157 mlt_color anim_get_color(const char *name, int position, int length = 0);
158 int anim_set(const char *name,
159 mlt_color value,
160 int position,
161 int length = 0,
162 mlt_keyframe_type keyframe_type = mlt_keyframe_linear);
163
164 char *anim_get(const char *name, int position, int length = 0);
165 int anim_set(const char *name, const char *value, int position, int length = 0);
166 int anim_get_int(const char *name, int position, int length = 0);
167 int anim_set(const char *name,
168 int value,
169 int position,
170 int length = 0,
171 mlt_keyframe_type keyframe_type = mlt_keyframe_linear);
172 double anim_get_double(const char *name, int position, int length = 0);
173 int anim_set(const char *name,
174 double value,
175 int position,
176 int length = 0,
177 mlt_keyframe_type keyframe_type = mlt_keyframe_linear);
178
179 int set(const char *name, mlt_rect value);
180 int set(const char *name, double x, double y, double w, double h, double opacity = 1.0);
181 mlt_rect get_rect(const char *name);
182 int anim_set(const char *name,
183 mlt_rect value,
184 int position,
185 int length = 0,
186 mlt_keyframe_type keyframe_type = mlt_keyframe_linear);
187 mlt_rect anim_get_rect(const char *name, int position, int length = 0);
188 mlt_animation get_animation(const char *name);
189 Animation *get_anim(const char *name);
190 bool is_anim(const char *name);
191
192 int set(const char *name, Properties &properties);
193 Properties *get_props(const char *name);
194 Properties *get_props_at(int index);
195};
196} // namespace Mlt
197
198#endif
#define MLTPP_DECLSPEC
MltConfig.h - Convenience header file for all mlt++ objects Copyright (C) 2004-2026 Meltytech,...
Definition MltConfig.h:33
C++ wrapper for mlt_animation — keyframe animation data.
Definition MltAnimation.h:38
C++ wrapper for mlt_event — a registered event listener handle.
Definition MltEvent.h:39
C++ wrapper for mlt_properties.
Definition MltProperties.h:41
mlt_properties instance
Definition MltProperties.h:43
header file for lazy client and implementation code :-)
void(* mlt_listener)(mlt_properties, void *, mlt_event_data)
event handler when receiving an event message
Definition mlt_events.h:53
mlt_time_format
The time string formats.
Definition mlt_types.h:172
@ mlt_time_smpte_df
SMPTE timecode as [[[hh:]mm:]ss{:|;}]frames.
Definition mlt_types.h:175
void(* mlt_destructor)(void *)
pointer to destructor function
Definition mlt_types.h:307
mlt_keyframe_type
Interpolation methods for animation keyframes.
Definition mlt_types.h:181
@ mlt_keyframe_linear
simple, constant pace from this key frame to the next
Definition mlt_types.h:184
char *(* mlt_serialiser)(void *, int length)
pointer to serialization function
Definition mlt_types.h:308
MLT C++ wrapper Copyright (C) 2015-2026 Meltytech, LLC.
Definition MltAnimation.h:27
Property Animation class.
Definition mlt_animation.c:51
A tuple of color components.
Definition mlt_types.h:272
Properties class.
Definition mlt_properties.h:41
A rectangle type with coordinates, size, and opacity.
Definition mlt_types.h:261