CUSTOMISING
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 27 Jun 2005 18:57:04 +0000 (18:57 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 27 Jun 2005 18:57:04 +0000 (18:57 +0000)
+ Replaced TBD for frame rendering notification event

test/server.cpp
+ Added an example frame rendering callback that removes all shotcut related fx

git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++@747 d19143bc-622f-0410-bfdd-b5b2a6649095

mlt++/CUSTOMISING
mlt++/test/server.cpp

index 30d11a8..7fdce7f 100644 (file)
@@ -356,7 +356,7 @@ EVENT HANDLING
        on 'consumer-frame-render' - this event is fired immediately before a frame
        is rendered.
 
-       TBD
+       See example in test/server.cpp
 
 
 DISABLING DVCP
index 32ca5e0..bcedd6f 100644 (file)
@@ -98,11 +98,26 @@ class Custom : public Miracle
                        self->frame_render_event( frame );
                }
 
-               // Do something to the frame here
+               // Remove all supers and attributes
                void frame_render_event( Frame &frame )
                {
-               }
+                       // Fetch the c double ended queue structure
+                       mlt_deque deque = ( mlt_deque )frame.get_data( "data_queue" );
+
+                       // While the deque isn't empty
+                       while( deque != NULL && mlt_deque_peek_back( deque ) != NULL )
+                       {
+                               // Fetch the c properties structure
+                               mlt_properties cprops = ( mlt_properties )mlt_deque_pop_back( deque );
 
+                               // For fun, convert it to c++ and output it :-)
+                               Properties properties( cprops );
+                               properties.debug( );
+
+                               // Wipe it
+                               mlt_properties_close( cprops );
+                       }
+               }
 };
        
 int main( int argc, char **argv )