mlt_events_register( properties, "consumer-frame-render", ( mlt_transmitter )mlt_consumer_frame_render );
mlt_events_register( properties, "consumer-thread-started", NULL );
mlt_events_register( properties, "consumer-thread-stopped", NULL );
+ mlt_events_register( properties, "consumer-stopping", NULL );
mlt_events_register( properties, "consumer-stopped", NULL );
mlt_events_listen( properties, self, "consumer-frame-show", ( mlt_listener )on_consumer_frame_show );
#endif
// Inform thread to stop
priv->ahead = 0;
+ mlt_events_fire( MLT_CONSUMER_PROPERTIES(self), "consumer-stopping", NULL );
// Broadcast to the condition in case it's waiting
pthread_mutex_lock( &priv->queue_mutex );
#endif
// Inform thread to stop
priv->ahead = 0;
+ mlt_events_fire( MLT_CONSUMER_PROPERTIES(self), "consumer-stopping", NULL );
// Broadcast to the queue condition in case it's waiting
pthread_mutex_lock( &priv->queue_mutex );
* \event \em consumer-frame-render The base class fires this immediately before rendering a frame.
* \event \em consumer-thread-started The base class fires when beginning execution of a rendering thread.
* \event \em consumer-thread-stopped The base class fires when a rendering thread has ended.
+ * \event \em consumer-stopping This is fired when stop was requested, but before render threads are joined.
* \event \em consumer-stopped This is fired when the subclass implementation calls mlt_consumer_stopped().
* \properties \em fps video frames per second as floating point (read only)
* \properties \em frame_rate_num the numerator of the video frame rate, overrides \p mlt_profile_s