~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Open Mash Cross Reference
mash/tcl/indiva/doc/src/use-mgr.html

Component: ~ [ mash ] ~ [ apps ] ~ [ gsm ] ~ [ lib ] ~ [ otcl ] ~ [ srm ] ~ [ tcl8.3 ] ~ [ tclcl ] ~ [ tk8.3 ] ~ [ tutorials ] ~

  1 <h2 class=chapter>
  2     Setting Up Indiva Managers
  3 </h2>
  4 <h3 class=section>
  5     <a name="compile">
  6     How to compile and install Indiva
  7     </a>
  8 </h3>
  9 <p>
 10     First, make sure that your local OpenMash source code is up to date
 11     by running "cvs update", "make", and "make import".  Run "make indiva"
 12     under your mash build directory (usually <tt>mash-code/mash</tt>)
 13     to create Indiva scripts.  Created scripts are located under the
 14     <tt>bin</tt> sub-directory.
 15 </p>
 16 <p>
 17     The scripts created are: <tt>imgr</tt> (Indiva Manager), <tt>ihm</tt>
 18     (Indiva Host Manager), <tt>iae</tt> (Indiva Audio Encoder),
 19     <tt>ive</tt> (Indiva Video Encoder), <tt>ifwd</tt> (Indiva Forwarder),
 20     <tt>ikld</tt> (Indiva Kaleido Controller), <tt>irs</tt> (Indiva Routing 
 21     Switcher), <tt>iview</tt> (Indiva Viewer), <tt>ictrl</tt> (Indiva 
 22     Controller).  You should make sure that the scripts (as well as the
 23     executables <tt>mash</tt> and <tt>smash</tt>) are in your 
 24     <tt>PATH</tt> environment variable.
 25 </p>
 26 <h3 class=section>
 27     <a name="setupimgr">
 28     Setting up Indiva Manager
 29     </a>
 30 </h3>
 31 <p>
 32     <tt>imgr</tt> accepts the following parameters
 33     <dl>
 34     <dt>-port <i>port</i> or -p <i>port</i></dt>
 35     <dd>Use <i>port</i> for RPC communication. Default to 9500.</dd>
 36     <dt>-root <i>root</i> or -r <i>root</i></dt>
 37     <dd>Use <i>root</i> as the root of Indiva resource directory.  
 38     Default to <tt>$HOME/.indiva</tt></dd>
 39     <dt>-log <i>filename</i> or -l <i>filename</i></dt>
 40     <dd>Write log messages to file named <i>filename</i>.  By default, 
 41     log messages are written to stdout.</dd>
 42     </dl>
 43 </p>
 44 <p>
 45     The manager also listens to (RPC port + 1) for HTTP connection.
 46 </p>
 47 <h3 class=section>
 48     <a name="defresrc">
 49     Defining Indiva Resources
 50     </a>
 51 </h3>
 52 <p>
 53     Resources in Indiva domains are represented by files or 
 54     directories located under the Indiva root directory.  Every non-hidden
 55     file or directory under the Indiva root directory will be treated
 56     as a resource.
 57 </p>
 58 <p>
 59     TIP: Hiding a file or directory is a convenient way to 
 60     "comment" out a particular resource.
 61 </p>
 62 <p>
 63     Resources are classified according to their <i>classes</i>.  A 2-3
 64     letters extension
 65     in the file or directory name indicates the class of the resource.  
 66     The following table shows the list of available classes.  
 67     <p>
 68     <table border="0" bgcolor="#000000" cellspacing="0"
 69     cellpadding="0">
 70       <tr>
 71         <td width="100%">
 72           <table border="0" cellspacing="1" cellpadding="4">
 73             <tr bgcolor="#c0c0c0">
 74               <td><b>Extension</b></td><td><b>Class ID</b></td><td> <b>Description</b> </td>
 75             </tr>
 76             <tr bgcolor="#ffffff">
 77               <td> <b>.cam</b> </td><td>camera</td><td> Camera </td>
 78             </tr>
 79             <tr bgcolor="#ffffff">
 80               <td> <b>.mic</b> </td><td>microphone</td><td> Microphone </td>
 81             </tr>
 82             <tr bgcolor="#ffffff">
 83               <td> <b>.pc</b> </td><td>hostmachine</td><td> Host PC </td>
 84             </tr>
 85             <tr bgcolor="#ffffff">
 86               <td> <b>.rtp</b> </td><td>stream</td><td> RTP stream </td>
 87             </tr>
 88             <tr bgcolor="#ffffff">
 89               <td> <b>.ses</b> </td><td>session</td><td> MBone session (audio and video) </td>
 90             </tr>
 91             <tr bgcolor="#ffffff">
 92               <td> <b>.con</b> </td><td>conference</td><td> MBone conference </td>
 93             </tr>
 94             <tr bgcolor="#ffffff">
 95               <td> <b>.mix</b> </td><td>mixer</td><td> Mixer (eg. Kaleido) </td>
 96             </tr>
 97             <tr bgcolor="#ffffff">
 98               <td> <b>.cap</b> </td><td>capturecard</td><td> Capture Card </td>
 99             </tr>
100             <tr bgcolor="#ffffff">
101               <td> <b>.rs</b> </td><td>routingswitch</td><td> Routing Switcher </td>
102             </tr>
103             <tr bgcolor="#ffffff">
104               <td> <b>.in</b> </td><td>inport</td><td> Input Port </td>
105             </tr>
106             <tr bgcolor="#ffffff">
107               <td> <b>.out</b> </td><td>outport</td><td> Output Port </td>
108             </tr>
109             <tr bgcolor="#ffffff">
110               <td> <b>.ch</b> </td><td>channel</td><td> TV Channel </td>
111             </tr>
112           </table>
113         </td>
114       </tr>
115     </table>
116 </p>
117 <p>
118     In this document, I will refer to the input and output ports
119     collectively as <i>ports</i>, and camera, microphone, mixer,
120     routing switcher and capture cards collectively as <i>devices</i>.
121     Conferences, sessions and streams will be collectively called
122     <i>media resources</i>.
123 </p>
124 <p>
125     Putting resource <i>A</i> under the directory of resource
126     <i>B</i> means that <i>A</i> belongs to <i>B</i>. 
127     Therefore, the following constraints holds:
128     <ul>
129     <li>RTP streams and ports must be represented by files.  Everything 
130         else must be represented by a directory.
131     <li>An RTP stream must be located in a .ses session directory, and a 
132         session directory must be located in a .con conference directory.
133     <li>Ports must be located either in a device directory, or in some 
134         sub directories under a device directory.
135     </ul>
136 
137 <h3 class=section>
138     <a name="resrcattr">
139     Resource Attributes
140     </a>
141 </h3>
142 <p>
143     Each resource has some associated metadata, given by a list of
144     (key,value) pairs.
145 </p>
146 <p>
147     Metadata for RTP streams and ports is stored in the file that
148     represents the resource.  For other resources, metadata
149     is stored in a hidden file named ".info" under the directory that
150     represents the resource.  Indiva uses plain text in Tcl's list format
151     (for ease of parsing) to store the metadata.  The format of the
152     metadata is as follows:
153     <pre>        classid {
154             key1 {value1}
155             key2 {value2}
156               :
157               :
158         } 
159         {
160         }</pre>
161 <p>
162     <tt>classid</tt> is a string that represents the class of the resource
163     (used for sanity check).  It must be exactly the string as shown in
164     the above class table.  The last empty list item { } in the metadata
165     is reserved for future extension.
166 </p>
167 <p>
168     Some (key,value) pairs are required.  You can also define your
169     own keys.  Keys can appear in any order in the metadata file.
170     Here are some of the required keys that may break the system if
171     not defined correctly.
172 </p>
173     <p><b>Keys for MBone session</b></p>
174     <P>
175     <table border="0" bgcolor="#000000" cellspacing="0" cellpadding="0">
176       <tr><td width="100%">
177           <table border="0" cellspacing="1" cellpadding="4">
178             <tr bgcolor="#c0c0c0">
179               <td><b>Key</b></td><td><b>Description</b></td>
180             </tr>
181             <tr bgcolor="#ffffff">
182               <td> <b>addr</b> </td><td>Address of the session.</td>
183             </tr>
184             <tr bgcolor="#ffffff">
185               <td> <b>port</b> </td><td>Port for the session</td>
186             </tr>
187             <tr bgcolor="#ffffff">
188               <td> <b>ttl</b> </td><td>TTL for the session</td>
189             </tr>
190             <tr bgcolor="#ffffff">
191               <td> <b>type</b></td><td>Type of session. Must be either "video" or "audio".
192             </tr>
193           </table>
194         </td>
195       </tr>
196     </table>
197     </P>
198     <p><b>Keys for Devices</b></p>
199     <P>
200     <table border="0" bgcolor="#000000" cellspacing="0" cellpadding="0">
201       <tr><td width="100%">
202           <table border="0" cellspacing="1" cellpadding="4">
203             <tr bgcolor="#c0c0c0">
204               <td><b>Key</b></td><td><b>Description</b></td>
205             </tr>
206             <tr bgcolor="#ffffff">
207               <td><b>defaultout</b></td><td>Default output port of the device. Must be one 
208               of the output port that belongs to the device.</td>
209             </tr>
210             <tr bgcolor="#ffffff">
211               <td><b>hostname</b></td><td>Name of the host that controls the device.</td>
212             </tr>
213             <tr bgcolor="#ffffff">
214               <td><b>id</b> </td><td>A string used by Mash to identify a
215               device.  For example, The id of a capture card $device must match 
216               the value returned by <tt>[$device nickname]</tt>.  For others, 
217               it must match the Mash class that controls the device.</td>
218             </tr>
219             <tr bgcolor="#ffffff">
220               <td><b>norm</b> </td><td>Norm of output from the device.  Must be either 
221               "ntsc" or "pal" or "secam"</td>
222             </tr>
223             <tr bgcolor="#ffffff">
224               <td><b>path</b> </td><td>Unix path to the device (e.g.
225               <tt>/dev/video0</tt>).</td>
226             </tr>
227             <tr bgcolor="#ffffff">
228               <td><b>friendlyname</b></td><td>A user-friendly description of
229               the device.</td>
230             </tr>
231             <tr bgcolor="#ffffff">
232               <td><b>action</b></td><td>A string that identifies what to do
233               when dealing with this device.  Must be either "encode", "switch", 
234               "capture" or "kaleido".  There must be an implementation of
235               this action inside Indiva.</td>
236             </tr>
237           </table>
238         </td>
239       </tr>
240     </table>
241     <p><b>Keys for Ports</b></p>
242     <p>
243     <table border="0" bgcolor="#000000" cellspacing="0" cellpadding="0">
244       <tr><td width="100%">
245           <table border="0" cellspacing="1" cellpadding="4">
246             <tr bgcolor="#c0c0c0">
247               <td><b>Key</b></td><td><b>Description</b></td>
248             </tr>
249             <tr bgcolor="#ffffff">
250               <td> <b>to</b></td><td>Path (absolute or relative) of the resource(s) this resource is connected to. 
251               Glob style regular expression is allowed.</td>
252             </tr>
253             <tr bgcolor="#ffffff">
254               <td> <b>type</b></td><td>Type of port.  Must be either "composite",
255               "svhs", "s-video" or "audio".</td>
256             </tr>
257             <tr bgcolor="#ffffff">
258               <td><b>id</b></td><td>Mash identifier for a particular port on
259               a capture card.  It must be one of the values returned by
260               <tt>[$device get_attribute ports]</tt> (for video capture card) or
261               <tt>[$device get_input_ports]</tt> (for sound card).</td>
262             </tr>
263           </table>
264         </td>
265       </tr>
266    </table>
267     </p>
268 </p>
269 <p>
270     Adding a new resource in Indiva is as easy as creating a text file.
271     Remember that each resource is represented by a text file or by a 
272     directory containing a hidden file <tt>.info</tt>.  Just create a file
273     with the intended name and properly define their attributes.  The 
274     resource will be recorgnized by Indiva after Indiva Manager restarts.
275 </p>
276 <h3 class=section><a name="setupihm">Setting Up Indiva Host Manager</a></h3>
277 <p>
278     Indiva host manager (<tt>ihm</tt>) is responsible for launching
279     services.   Therefore, it must be running on hosts that run services.
280     These include the capture machines and the control machines.
281     You must also make sure that <tt>ihm</tt> have executable access
282     to all the services.  You should also ensure that <tt>smash</tt>
283     is in your <tt>PATH</tt> environment variable, and the service
284     scripts are accesible by <tt>ihm</tt>.  By default, <tt>ihm</tt>
285     looks for the scripts in the current directory.  However, you can
286     specify the scripts directory using option <tt>-path</tt>.
287 </p>
288 <p>
289     Multicast must be working between <tt>ihm</tt> and <tt>imgr</tt>.
290 </p>
291 <p>
292     <tt>ihm</tt> accepts the following parameters
293     <dl>
294     <dt>-log <i>filename</i> or -l <i>filename</i></dt>
295     <dd>Write log messages to file named <i>filename</i>.  By default, 
296     log messages are written to stdout.</dd>
297     <dt>-path <i>directory</i></dt>
298     <dd>Location of Indiva services.</dd>
299     </dl>
300 <p>
301     There are a whole bunch of other parameters ihm supports.  But I never
302     tested them.  The default values to those parameters seem to be working
303     fine.
304 </p>
305 <h3 class=section><a name="setupas">Active Service Parameters</a> </h3>
306 <p>
307     The managers and services uses Active Service AS1 protocol to
308     communicate with each other.  There are a few more command line
309     arguments that you can give to <tt>imgr</tt>, <tt>ihm</tt> and 
310     services to configure the behavior of Active Services.  You 
311     normally don't need this.
312     <dl>
313     <dt>-as_service <i>value</i></dt>
314     <dd>If <i>value</i> is <tt>yes</tt>, then Active Service is turned on.  If
315         <i>value</i> is <tt>no</tt>, AS1 Protocol will be turned off.   This is
316         useful if you want to run a service as a stand-alone application.
317         Default is <tt>yes</tt>.
318     </dd>
319     <dt>-as_spec <i>addr/port/ttl</i></dt>
320     <dd>
321         Use multicast channel <i>addr</i> and port <i>port</i> for 
322         AS1 communication.  Default is <tt>224.4.5.24/50000/1</tt>
323     </dd>
324     <dt>-as_bw <i>bw</i></dt>
325     <dd>
326         Limit the bandwidth of AS1 messages to <i>bw</i> bps.  Default 
327         is 50000.
328     </dd>
329     </dl>
330 </p>

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.