X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=mlt%2B%2B%2Ftest%2Fserver.cpp;h=eb5a6f54697a98797db62f511c4ddb1f08729eb4;hb=55757b000043f6e370b9e963ce2e3542962c03c0;hp=32ca5e04a9df194214b0f89d8b5f63c68813b1a1;hpb=af15cd486562602a829a4082863e85afbb3f6986;p=melted diff --git a/mlt++/test/server.cpp b/mlt++/test/server.cpp index 32ca5e0..eb5a6f5 100644 --- a/mlt++/test/server.cpp +++ b/mlt++/test/server.cpp @@ -1,5 +1,6 @@ #include #include +#include #include using namespace std; @@ -10,6 +11,7 @@ class Custom : public Miracle { private: Event *event; + Profile profile; public: Custom( char *name = "Custom", int port = 5290, char *config = NULL ) : @@ -29,7 +31,7 @@ class Custom : public Miracle Response *received( char *command, char *document ) { cerr << document << endl; - Producer producer( "westley-xml", document ); + Producer producer( profile, "westley-xml", document ); return push( command, &producer ); } @@ -98,11 +100,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 )