return self->stack_service;
}
+/** Set a new image on the frame.
+ *
+ * \public \memberof mlt_frame_s
+ * \param self a frame
+ * \param image a pointer to the raw image data
+ * \param size the size of the image data in bytes (optional)
+ * \param destroy a function to deallocate \p image when the frame is closed (optional)
+ * \return true if error
+ */
+
+int mlt_frame_set_image( mlt_frame self, uint8_t *image, int size, mlt_destructor destroy )
+{
+ return mlt_properties_set_data( MLT_FRAME_PROPERTIES( self ), "image", image, size, destroy, NULL );
+}
+
+/** Set a new alpha channel on the frame.
+ *
+ * \public \memberof mlt_frame_s
+ * \param self a frame
+ * \param alpha a pointer to the alpha channel
+ * \param size the size of the alpha channel in bytes (optional)
+ * \param destroy a function to deallocate \p alpha when the frame is closed (optional)
+ * \return true if error
+ */
+
+int mlt_frame_set_alpha( mlt_frame self, uint8_t *alpha, int size, mlt_destructor destroy )
+{
+ return mlt_properties_set_data( MLT_FRAME_PROPERTIES( self ), "alpha", alpha, size, destroy, NULL );
+}
+
/** Replace image stack with the information provided.
*
* This might prove to be unreliable and restrictive - the idea is that a transition
extern int mlt_frame_set_aspect_ratio( mlt_frame self, double value );
extern mlt_position mlt_frame_get_position( mlt_frame self );
extern int mlt_frame_set_position( mlt_frame self, mlt_position value );
+extern int mlt_frame_set_image( mlt_frame self, uint8_t *image, int size, mlt_destructor destroy );
+extern int mlt_frame_set_alpha( mlt_frame self, uint8_t *alpha, int size, mlt_destructor destroy );
extern void mlt_frame_replace_image( mlt_frame self, uint8_t *image, mlt_image_format format, int width, int height );
extern int mlt_frame_get_image( mlt_frame self, uint8_t **buffer, mlt_image_format *format, int *width, int *height, int writable );
extern uint8_t *mlt_frame_get_alpha_mask( mlt_frame self );
{
return new Producer( mlt_frame_get_original_producer( get_frame( ) ) );
}
+
+mlt_properties Frame::get_unique_properties( Service &service )
+{
+ return mlt_frame_unique_properties( get_frame(), service.get_service() );
+}
+
+int Frame::set_image( uint8_t *image, int size, mlt_destructor destroy )
+{
+ return mlt_frame_set_image( get_frame(), image, size, destroy );
+}
+
+int Frame::set_alpha( uint8_t *alpha, int size, mlt_destructor destroy )
+{
+ return mlt_frame_set_alpha( get_frame(), alpha, size, destroy );
+}
{
class Properties;
class Producer;
+ class Service;
class MLTPP_DECLSPEC Frame : public Properties
{
void *get_audio( mlt_audio_format &format, int &frequency, int &channels, int &samples );
unsigned char *get_waveform( int w, int h );
Producer *get_original_producer( );
+ mlt_properties get_unique_properties( Service &service );
+ int set_image( uint8_t *image, int size, mlt_destructor destroy );
+ int set_alpha( uint8_t *alpha, int size, mlt_destructor destroy );
};
}