MLT  7.28.0
mlt_consumer.h
Go to the documentation of this file.
1 
23 #ifndef MLT_CONSUMER_H
24 #define MLT_CONSUMER_H
25 
26 #include "mlt_events.h"
27 #include "mlt_service.h"
28 #include <pthread.h>
29 
94 {
96  struct mlt_service_s parent;
97 
104 
111 
118 
123  void (*purge)(mlt_consumer);
124 
129  void (*close)(mlt_consumer);
130 
131  void *local;
132  void *child;
133 };
134 
135 #define MLT_CONSUMER_SERVICE(consumer) (&(consumer)->parent)
136 #define MLT_CONSUMER_PROPERTIES(consumer) MLT_SERVICE_PROPERTIES(MLT_CONSUMER_SERVICE(consumer))
137 
138 extern int mlt_consumer_init(mlt_consumer self, void *child, mlt_profile profile);
142 extern int mlt_consumer_connect(mlt_consumer self, mlt_service producer);
153 
154 #endif
event handling
interface declaration for all service classes
int32_t mlt_position
Definition: mlt_types.h:217
struct mlt_consumer_s * mlt_consumer
pointer to Consumer object
Definition: mlt_types.h:255
Consumer abstract service class.
Definition: mlt_consumer.h:94
int mlt_consumer_start(mlt_consumer self)
Start the consumer.
Definition: mlt_consumer.c:461
mlt_frame mlt_consumer_get_frame(mlt_consumer self)
Protected method for consumer to get frames from connected service.
Definition: mlt_consumer.c:618
int(* is_stopped)(mlt_consumer)
Get whether the consumer is running or stopped (virtual function).
Definition: mlt_consumer.h:117
void(* purge)(mlt_consumer)
Purge the consumer of buffered data (virtual function).
Definition: mlt_consumer.h:123
int mlt_consumer_is_stopped(mlt_consumer self)
Determine if the consumer is stopped.
Definition: mlt_consumer.c:1680
mlt_properties mlt_consumer_properties(mlt_consumer self)
Get the consumer properties.
Definition: mlt_consumer.c:381
void(* close)(mlt_consumer)
The destructor virtual function.
Definition: mlt_consumer.h:129
void mlt_consumer_stopped(mlt_consumer self)
Callback for the implementation to indicate a stopped condition.
Definition: mlt_consumer.c:1604
void * local
instance object
Definition: mlt_consumer.h:131
void mlt_consumer_purge(mlt_consumer self)
Flush the read/render thread's buffer.
Definition: mlt_consumer.c:1312
void mlt_consumer_close(mlt_consumer self)
Close and destroy the consumer.
Definition: mlt_consumer.c:1695
int(* stop)(mlt_consumer)
Stop the consumer (virtual function).
Definition: mlt_consumer.h:110
struct mlt_service_s parent
A consumer is a service.
Definition: mlt_consumer.h:96
mlt_consumer mlt_consumer_new(mlt_profile profile)
Create a new consumer.
Definition: mlt_consumer.c:345
int(* start)(mlt_consumer)
Start the consumer to pull frames (virtual function).
Definition: mlt_consumer.h:103
int mlt_consumer_stop(mlt_consumer self)
Stop the consumer.
Definition: mlt_consumer.c:1618
mlt_frame mlt_consumer_rt_frame(mlt_consumer self)
Get the next frame from the producer connected to a consumer.
Definition: mlt_consumer.c:1526
int mlt_consumer_connect(mlt_consumer self, mlt_service producer)
Connect the consumer to the producer.
Definition: mlt_consumer.c:397
mlt_position mlt_consumer_position(mlt_consumer consumer)
Get the position of the last frame shown.
Definition: mlt_consumer.c:1732
mlt_service mlt_consumer_service(mlt_consumer self)
Get the parent service object.
Definition: mlt_consumer.c:368
int mlt_consumer_put_frame(mlt_consumer self, mlt_frame frame)
An alternative method to feed frames into the consumer.
Definition: mlt_consumer.c:577
void * child
the object of a subclass
Definition: mlt_consumer.h:132
int mlt_consumer_init(mlt_consumer self, void *child, mlt_profile profile)
Initialize a consumer service.
Definition: mlt_consumer.c:105
Frame class.
Definition: mlt_frame.h:90
Profile class.
Definition: mlt_profile.h:35
Properties class.
Definition: mlt_properties.h:40
Service abstract base class.
Definition: mlt_service.h:58
void * child
the object of a subclass
Definition: mlt_service.h:75