X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_consumer.h;h=82a08b42ce08e7b2805eb55340465272a13ceb7d;hb=eabc3498604fc7983bbd805d40dad2e7df135f17;hp=d6a963759136131f8ceee4312622a401ed84c7e7;hpb=d8eef875f19feb30549855d3695a91df72c5c60f;p=melted diff --git a/src/framework/mlt_consumer.h b/src/framework/mlt_consumer.h index d6a9637..82a08b4 100644 --- a/src/framework/mlt_consumer.h +++ b/src/framework/mlt_consumer.h @@ -22,6 +22,7 @@ #define _MLT_CONSUMER_H_ #include "mlt_service.h" +#include /** The interface definition for all consumers. */ @@ -32,20 +33,48 @@ struct mlt_consumer_s struct mlt_service_s parent; // public virtual + int ( *start )( mlt_consumer ); + int ( *stop )( mlt_consumer ); + int ( *is_stopped )( mlt_consumer ); void ( *close )( mlt_consumer ); // Private data - void *private; + void *local; void *child; + + int real_time; + int ahead; + mlt_image_format format; + mlt_deque queue; + pthread_t ahead_thread; + pthread_mutex_t mutex; + pthread_cond_t cond; + pthread_mutex_t put_mutex; + pthread_cond_t put_cond; + mlt_frame put; + int put_active; }; /** Public final methods */ -extern int mlt_consumer_init( mlt_consumer this, void *child ); -extern mlt_service mlt_consumer_service( mlt_consumer this ); -extern mlt_properties mlt_consumer_properties( mlt_consumer this ); -extern int mlt_consumer_connect( mlt_consumer this, mlt_service producer ); +#define MLT_CONSUMER_SERVICE( consumer ) ( &( consumer )->parent ) +#define MLT_CONSUMER_PROPERTIES( consumer ) MLT_SERVICE_PROPERTIES( MLT_CONSUMER_SERVICE( consumer ) ) + +extern int mlt_consumer_init( mlt_consumer self, void *child ); +extern mlt_consumer mlt_consumer_new( ); +extern mlt_service mlt_consumer_service( mlt_consumer self ); +extern mlt_properties mlt_consumer_properties( mlt_consumer self ); +extern int mlt_consumer_connect( mlt_consumer self, mlt_service producer ); +extern int mlt_consumer_start( mlt_consumer self ); +extern void mlt_consumer_purge( mlt_consumer self ); +extern int mlt_consumer_put_frame( mlt_consumer self, mlt_frame frame ); +extern mlt_frame mlt_consumer_get_frame( mlt_consumer self ); +extern mlt_frame mlt_consumer_rt_frame( mlt_consumer self ); +extern int mlt_consumer_stop( mlt_consumer self ); +extern int mlt_consumer_is_stopped( mlt_consumer self ); +extern void mlt_consumer_stopped( mlt_consumer self ); extern void mlt_consumer_close( mlt_consumer ); +extern int mlt_consumer_profile( mlt_properties properties, char *profile ); #endif