In several cases you want to configure some node specific parameters like the location of a node. Thus, the clic syntax allows to set such parameters which are prefaced by the symbol '#' followed by a parameter which is identical to the corresponding C++ method. These parameters must be written after the node name and its jack tag. Currently the following parameter types are supported:
setLocation(<string>): The setLocation parameter expects a string as argument allows to specify the host, from where the node is requested. Note: The application serverregistry must be running on this host.
setPort(<int>): The setPort parameter expects an integer as argument and allows to specify the port a server registry is listening on. By default the port 22801 is used.
setSharingType(<sharing-type>): This parameter expects a sharing type as argument and allows to specify whether the node can be reused from other applications or not.
MP3ReadNode ! MPEGAudioDecodeNode ! PlaybackNode
|
The clic application normally requests a node from the local system, but the NMM framework allows transparent access to nodes distributed in a network. To support this feature in the clic-application, the location of a node inside the network can be specified with the parameter setLocation. Instead of requesting a node from the local system it is requested from the specified one. This is especially helpful if a resource intensive job, like video encoding, should be done on a powerful computer. To request a node from another host the application serverregistry must be running on this system. This parameter expects a single string as argument which specifies the hostname as seen in the following example.
% This graph description describes a simple MP3 player where the MP3ReadNode
% is running on host "server1". The serverregistry on host "server1"
% is listening on port 22801.
% Use the -i option of clic to specify the MP3 file
MP3ReadNode # setLocation("server1") !
MPEGAudioDecodeNode !
PlaybackNode
|
If the serverregistry application is listening on a different port for some reason, e.g. 3000, you can set it using the setPort parameter as seen in the following example.
% This graph description describes a simple MP3 player where the MP3ReadNode
% is running on host "server1". The serverregistry on host "server1" is
% listening on port 3000.
% Use the -i option of clic to specify the MP3 file
MP3ReadNode # setLocation("server1")
# setPort(3000) !
MPEGAudioDecodeNode !
PlaybackNode
|
NMM provides a service called Session Sharing which allows to share parts of a running flow graph between several applications. This is especially useful to use limited hardware devices, like TV cards, efficiently. So several user can share the same TV card, but use different displays in a different room to watch TV. In contrast to a streaming application each user is able to control all nodes of the entire flow graph. The following sharing types are supported:
EXCLUSIVE: A new Node is requested and other applications must not share it.
EXCLUSIVE_THEN_SHARED: A new Node is requested, but other applications can use this running node as well.
SHARED: Using this sharing type no new node is allocated, instead the node is used from an application that requested the node with sharing type EXCLUSIVE_THEN_SHARED.
EXCLUSIVE_OR_SHARED: First clic tries to request an EXCLUSIVE node. If this fails, it tries to request a node with sharing type SHARED.
SHARED_OR_EXCLUSIVE: First clic tries to request a SHARED node. If this fails, it tries to request a node with sharing type EXCLUSIVE.
EXCLUSIVE_THEN_SHARED_OR_SHARED: First clic tries to request an EXCLUSIVE node, that can be shared with other applications. If this fails, it tries to request a node with sharing type SHARED.
SHARED_OR_EXCLUSIVE_THEN_SHARED: First clic tries to request a SHARED node. If this fails, it tries to request a node with sharing type EXCLUSIVE_THEN_SHARED
% This graph description describes a simple MP3 player where the MP3ReadNode
% can be reused by other applications. The remaining nodes are exclusive and
% can not be accessed by other applications.
% Use the -i option of clic to specify the MP3 file
MP3ReadNode # setSharingType(EXCLUSIVE_THEN_SHARED) !
MPEGAudioDecodeNode # setSharingType( EXCLUSIVE ) !
PlaybackNode # setSharingType( EXCLUSIVE )
|
% This graph description describes a simple MP3 player which requests an
% MP3ReadNode by an already running application. In this case no MP3 file
% can be specified because it has been set by the running application.
MP3ReadNode # setSharingType(SHARED) !
MPEGAudioDecodeNode !
PlaybackNode
|