Init API - manage mediastreamer2 library.
[Mediastreamer2 API]

Init API to manage mediastreamer2 library. More...

Functions

MS2_PUBLIC void ms_init (void)
MS2_PUBLIC int ms_load_plugins (const char *directory)
MS2_PUBLIC void ms_exit (void)
MS2_PUBLIC int ms_get_payload_max_size ()
MS2_PUBLIC int ms_discover_mtu (const char *destination_host)
MS2_PUBLIC void ms_set_mtu (int mtu)

Detailed Description

Init API to manage mediastreamer2 library.

This file provide the API needed to initialize and reset the mediastreamer2 library.


Function Documentation

MS2_PUBLIC void ms_init ( void   ) 

Initialize the mediastreamer2 library.

This must be called once before calling any other API.

MS2_PUBLIC int ms_load_plugins ( const char *  directory  ) 

Load plugins from a specific directory. This method basically loads all libraries in the specified directory and attempts to call a C function called <libraryname>_init. For example if a library 'libdummy.so' or 'libdummy.dll' is found, then the loader tries to locate a C function called 'libdummy_init()' and calls it if it exists. ms_load_plugins() can be used to load non-mediastreamer2 plugins as it does not expect mediastreamer2 specific entry points.

Parameters:
directory A directory where plugins library are available.

Returns: >0 if successfull, 0 if not plugins loaded, -1 otherwise.

MS2_PUBLIC void ms_exit ( void   ) 

Release resource allocated in the mediastreamer2 library.

This must be called once before closing program.

MS2_PUBLIC int ms_get_payload_max_size (  ) 

The max payload size allowed. Filters that generate data that can be sent through RTP should make packets whose size is below ms_get_payload_max_size(). The default value is 1440 computed as the standard internet MTU minus IPv6 header, UDP header and RTP header. As IPV4 header is smaller than IPv6 header, this value works for both.

MS2_PUBLIC int ms_discover_mtu ( const char *  destination_host  ) 

Returns the network Max Transmission Unit to reach destination_host. This will attempt to send one or more big packets to destination_host, to a random port. Those packets are filled with zeroes.

MS2_PUBLIC void ms_set_mtu ( int  mtu  ) 

Set mediastreamer default mtu, used to compute the default RTP max payload size. This function will call ms_set_payload_max_size(mtu-[ipv6 header size]).

Generated on Thu Mar 31 12:04:53 2011 for mediastreamer2 by  doxygen 1.6.3