#include <iostream>
#include <string>
+#include <cstring>
#include <sstream>
using namespace std;
{
private:
Event *event;
+ Profile profile;
public:
Custom( char *name = "Custom", int port = 5290, char *config = NULL ) :
Response *received( char *command, char *document )
{
cerr << document << endl;
- Producer producer( "westley-xml", document );
+ Producer producer( profile, "westley-xml", document );
return push( command, &producer );
}
// Push handling - clear the playlist, append, seek to beginning and play
- Response *push( char *command, Service *service )
+ Response *push( char*, Service *service )
{
Playlist playlist( ( mlt_playlist )( unit( 0 )->get_data( "playlist" ) ) );
Producer producer( *service );
}
// Callback for frame render notification
- static void frame_render( mlt_consumer consumer, Custom *self, mlt_frame frame_ptr )
+ static void frame_render( mlt_consumer, Custom *self, mlt_frame frame_ptr )
{
Frame frame( frame_ptr );
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 )
+int main( int, char** )
{
Custom server( "Server" );
server.start( );