MLT  7.36.0
mlt_producer.h
Go to the documentation of this file.
1 
23 #ifndef MLT_PRODUCER_H
24 #define MLT_PRODUCER_H
25 
26 #include "mlt_export.h"
27 #include "mlt_filter.h"
28 #include "mlt_profile.h"
29 #include "mlt_service.h"
30 
71 {
73  struct mlt_service_s parent;
74 
83 
91 
100 
103  void *close_object;
105  void *local;
106  void *child;
107 };
108 
109 /*
110  * Public final methods
111  */
112 
113 #define MLT_PRODUCER_SERVICE(producer) (&(producer)->parent)
114 #define MLT_PRODUCER_PROPERTIES(producer) MLT_SERVICE_PROPERTIES(MLT_PRODUCER_SERVICE(producer))
115 
116 MLT_EXPORT int mlt_producer_init(mlt_producer self, void *child);
120 MLT_EXPORT int mlt_producer_seek(mlt_producer self, mlt_position position);
121 MLT_EXPORT int mlt_producer_seek_time(mlt_producer self, const char *time);
125 MLT_EXPORT int mlt_producer_set_speed(mlt_producer self, double speed);
126 MLT_EXPORT double mlt_producer_get_speed(mlt_producer self);
127 MLT_EXPORT double mlt_producer_get_fps(mlt_producer self);
129 MLT_EXPORT int mlt_producer_clear(mlt_producer self);
136 MLT_EXPORT int mlt_producer_attach(mlt_producer self, mlt_filter filter);
137 MLT_EXPORT int mlt_producer_detach(mlt_producer self, mlt_filter filter);
138 MLT_EXPORT mlt_filter mlt_producer_filter(mlt_producer self, int index);
139 MLT_EXPORT mlt_producer mlt_producer_cut(mlt_producer self, int in, int out);
140 MLT_EXPORT int mlt_producer_is_cut(mlt_producer self);
141 MLT_EXPORT int mlt_producer_is_mix(mlt_producer self);
142 MLT_EXPORT int mlt_producer_is_blank(mlt_producer self);
144 MLT_EXPORT int mlt_producer_optimise(mlt_producer self);
145 MLT_EXPORT void mlt_producer_close(mlt_producer self);
147 MLT_EXPORT void mlt_producer_set_creation_time(mlt_producer self, int64_t creation_time);
148 MLT_EXPORT int mlt_producer_probe(mlt_producer self);
149 
150 #endif
abstraction for all filter services
video output definition
interface declaration for all service classes
mlt_time_format
The time string formats.
Definition: mlt_types.h:172
int32_t mlt_position
Definition: mlt_types.h:255
struct mlt_frame_s ** mlt_frame_ptr
pointer to Frame object
Definition: mlt_types.h:281
struct mlt_producer_s * mlt_producer
pointer to Producer object
Definition: mlt_types.h:286
void(* mlt_destructor)(void *)
pointer to destructor function
Definition: mlt_types.h:307
Filter abstract service class.
Definition: mlt_filter.h:41
Producer abstract service class.
Definition: mlt_producer.h:71
double mlt_producer_get_speed(mlt_producer self)
Get the playing speed.
Definition: mlt_producer.c:451
mlt_position mlt_producer_get_playtime(mlt_producer self)
Get the total play time.
Definition: mlt_producer.c:574
int mlt_producer_attach(mlt_producer self, mlt_filter filter)
Attach a filter.
Definition: mlt_producer.c:767
mlt_position mlt_producer_get_out(mlt_producer self)
Get the out point.
Definition: mlt_producer.c:562
int mlt_producer_set_speed(mlt_producer self, double speed)
Set the playing speed.
Definition: mlt_producer.c:439
int mlt_producer_seek(mlt_producer self, mlt_position position)
Seek to a specified position.
Definition: mlt_producer.c:337
mlt_position mlt_producer_frame(mlt_producer self)
Get the current position (relative to start of producer).
Definition: mlt_producer.c:413
int mlt_producer_is_cut(mlt_producer self)
Determine if producer is a cut.
Definition: mlt_producer.c:196
int mlt_producer_detach(mlt_producer self, mlt_filter filter)
Detach a filter.
Definition: mlt_producer.c:780
char * mlt_producer_get_length_time(mlt_producer self, mlt_time_format format)
Get the total, unedited length of the producer as a time string.
Definition: mlt_producer.c:603
char * mlt_producer_frame_time(mlt_producer self, mlt_time_format format)
Get the current position (relative to start of producer) as a time string.
Definition: mlt_producer.c:426
mlt_destructor close
the destructor virtual function
Definition: mlt_producer.h:102
mlt_position mlt_producer_get_in(mlt_producer self)
Get the in point.
Definition: mlt_producer.c:550
void * local
instance object
Definition: mlt_producer.h:105
int mlt_producer_probe(mlt_producer self)
Probe the producer to publish metadata properties.
Definition: mlt_producer.c:1295
mlt_producer mlt_producer_cut(mlt_producer self, int in, int out)
Create a cut of this producer.
Definition: mlt_producer.c:265
int mlt_producer_clear(mlt_producer self)
Physically reduce the producer (typically a cut) to a 0 length.
Definition: mlt_producer.c:531
mlt_filter mlt_producer_filter(mlt_producer self, int index)
Retrieve a filter.
Definition: mlt_producer.c:793
mlt_producer mlt_producer_cut_parent(mlt_producer self)
Obtain the parent producer.
Definition: mlt_producer.c:244
int mlt_producer_optimise(mlt_producer self)
Optimise for overlapping cuts from the same clip.
Definition: mlt_producer.c:1008
int mlt_producer_seek_time(mlt_producer self, const char *time)
Seek to a specified time string.
Definition: mlt_producer.c:387
int(* seek)(mlt_producer, mlt_position)
Seek to a specified position (virtual function).
Definition: mlt_producer.h:90
int(* get_frame)(mlt_producer, mlt_frame_ptr, int)
Get a frame of data (virtual function).
Definition: mlt_producer.h:82
int mlt_producer_is_blank(mlt_producer self)
Determine if the producer is a blank.
Definition: mlt_producer.c:226
mlt_properties mlt_producer_properties(mlt_producer self)
Get the producer properties.
Definition: mlt_producer.c:322
struct mlt_service_s parent
A producer is a service.
Definition: mlt_producer.h:73
void * close_object
the object supplied to the close virtual function
Definition: mlt_producer.h:103
int mlt_producer_is_mix(mlt_producer self)
Determine if producer is a mix.
Definition: mlt_producer.c:209
mlt_service mlt_producer_service(mlt_producer self)
Get the parent service object.
Definition: mlt_producer.c:309
void mlt_producer_close(mlt_producer self)
Close the producer.
Definition: mlt_producer.c:1091
double mlt_producer_get_fps(mlt_producer self)
Get the frames per second.
Definition: mlt_producer.c:465
mlt_producer mlt_producer_new(mlt_profile profile)
Create and initialize a new producer.
Definition: mlt_producer.c:166
int mlt_producer_set_in_and_out(mlt_producer self, mlt_position in, mlt_position out)
Set the in and out points.
Definition: mlt_producer.c:486
int64_t mlt_producer_get_creation_time(mlt_producer self)
Get the creation time for the producer.
Definition: mlt_producer.c:1198
mlt_position mlt_producer_position(mlt_producer self)
Get the current position (relative to in point).
Definition: mlt_producer.c:401
void mlt_producer_prepare_next(mlt_producer self)
Prepare for next frame.
Definition: mlt_producer.c:617
int(* set_in_and_out)(mlt_producer, mlt_position, mlt_position)
Set the in and out points.
Definition: mlt_producer.h:99
void mlt_producer_set_creation_time(mlt_producer self, int64_t creation_time)
Set the creation time for the producer.
Definition: mlt_producer.c:1276
mlt_position mlt_producer_get_length(mlt_producer self)
Get the total, unedited length of the producer.
Definition: mlt_producer.c:588
void * child
the object of a subclass
Definition: mlt_producer.h:106
int mlt_producer_init(mlt_producer self, void *child)
Initialize a producer service.
Definition: mlt_producer.c:58
Profile class.
Definition: mlt_profile.h:36
Properties class.
Definition: mlt_properties.h:41
Service abstract base class.
Definition: mlt_service.h:59
void * child
the object of a subclass
Definition: mlt_service.h:76