X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=docs%2Fframework.txt;h=865258b8921c77f6cc5f4221f9bc00a89107e90c;hb=521423f4869254f213455a239688159c283594b0;hp=12b38713b85b87270f1dad20ff98586c1909863e;hpb=5b59ce704d4f317e845afa30c5ade12c0fd22d43;p=melted diff --git a/docs/framework.txt b/docs/framework.txt index 12b3871..865258b 100644 --- a/docs/framework.txt +++ b/docs/framework.txt @@ -959,7 +959,7 @@ mlt_frame: void *mlt_frame_pop_audio( mlt_frame this ); void mlt_frame_close( mlt_frame this ); - + mlt_service: The service base class extends properties and allows 0 to m inputs and 0 to @@ -1042,6 +1042,7 @@ mlt_producer: The public interface is defined by the following functions: + mlt_producer mlt_producer_new( ); int mlt_producer_init( mlt_producer this, void *child ); mlt_service mlt_producer_service( mlt_producer this ); mlt_properties mlt_producer_properties( mlt_producer this ); @@ -1059,45 +1060,6 @@ mlt_producer: void mlt_producer_prepare_next( mlt_producer this ); void mlt_producer_close( mlt_producer this ); - For the sake of discussion here, we'll assume that someone wants to provide - a new producer which random noise - - // Forward reference - static int producer_get_frame( mlt_service service, mlt_frame_ptr frame, int index ); - - mlt_producer producer_green( void *arg ) - { - // Create a new producer - mlt_producer this = mlt_producer_new( ); - - // Check that we were allocated a new producer - if ( this != NULL ) - { - // Get the service - mlt_service service = mlt_producer_service( this ); - - // We need to override the get_frame method - service->get_frame = producer_get_frame; - } - - // Return this producer - return this; - } - - static int producer_get_frame( mlt_service service, mlt_frame_ptr frame, int index ) - { - // Create a new frame - *frame = mlt_frame_init( ); - - // Specify the get_image - mlt_frame_push_get_image( *frame, producer_get_image ); - - // Specify the get_audio - mlt_frame_push_audio( *frame, producer_get_audio ); - - // Return that all was successful - return 0; - } mlt_filter: @@ -1181,5 +1143,3 @@ mlt_playlist: mlt_tractor: -mlt_factory -