Merge mlt++/CUSTOMISING into docs/melted++.
[melted] / mlt++ / test / server.cpp
index bcedd6f..b82087f 100644 (file)
@@ -1,5 +1,6 @@
 #include <iostream>
 #include <string>
+#include <cstring>
 #include <sstream>
 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,12 +31,12 @@ 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 );
                }
 
                // 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 );
@@ -92,7 +94,7 @@ class Custom : public Miracle
                }
 
                // 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 );
@@ -120,7 +122,7 @@ class Custom : public Miracle
                }
 };
        
-int main( int argc, char **argv )
+int main( int, char** )
 {
        Custom server( "Server" );
        server.start( );