843dea4c7f25b8097e0408280f2d94a350add558
[melted] / docs / melted++.txt
1 Servers and Westley Docs
2 ------------------------
3
4         One of the key features of MLT is its server capabilities. This feature
5         allows you to pass westley documents seamlessly from one process to 
6         another and even to different computers on your network. 
7
8         The miracle playout server is one such example of an application which 
9         uses this functionality - you can build your own servers into your own
10         processes with ease.
11
12         A server process would be running as follows:
13
14             #include <mlt++/Miracle>
15             using namespace Mlt;
16         
17             int main( void )
18             {
19                 Miracle miracle( "miracle", 5250 );
20                 miracle.start( );
21                 miracle.execute( "uadd sdl" );
22                 miracle.execute( "play u0" );
23                 miracle.wait_for_shutdown( );
24                 return 0;
25             }
26
27         Typically, when you have an MLT object such as a producer or a playlist,
28         you can send a westley representation of this to a running server with:
29
30             Conumser valerie( "valerie", "localhost:5250" );
31             valerie.connect( producer );
32             valerie.start( );
33
34         The effect of the push will be to append the producer on to the first
35         unit (u0).
36
37         You can completely customise the miracle server - an example of this
38         is shown below.